1 #include "vtkMedStructElement.h"
3 #include "vtkObjectFactory.h"
4 #include "vtkMedUtilities.h"
5 #include "vtkMedVariableAttribute.h"
6 #include "vtkMedConstantAttribute.h"
7 #include "vtkMedFile.h"
8 #include "vtkMedMesh.h"
15 vtkCxxGetObjectVectorMacro(vtkMedStructElement, VariableAttribute, vtkMedVariableAttribute);
16 vtkCxxSetObjectVectorMacro(vtkMedStructElement, VariableAttribute, vtkMedVariableAttribute);
17 vtkCxxGetObjectVectorMacro(vtkMedStructElement, ConstantAttribute, vtkMedConstantAttribute);
18 vtkCxxSetObjectVectorMacro(vtkMedStructElement, ConstantAttribute, vtkMedConstantAttribute);
20 vtkCxxSetObjectMacro(vtkMedStructElement, ParentFile, vtkMedFile);
21 vtkCxxSetObjectMacro(vtkMedStructElement, SupportMesh, vtkMedMesh);
23 // vtkCxxRevisionMacro(vtkMedStructElement, "$Revision$")
24 vtkStandardNewMacro(vtkMedStructElement)
26 vtkMedStructElement::vtkMedStructElement()
28 this->MedIterator = -1;
30 this->GeometryType = MED_UNDEF_GEOTYPE;
31 this->ModelDimension = 0;
32 this->SupportMeshName = NULL;
33 this->SupportMesh = NULL;
34 this->SupportEntityType = MED_UNDEF_ENTITY_TYPE;
35 this->SupportNumberOfNode = 0;
36 this->SupportNumberOfCell = 0;
37 this->SupportGeometryType = MED_UNDEF_GEOTYPE;
38 this->AnyProfile = MED_FALSE;
39 this->VariableAttribute = new vtkObjectVector<vtkMedVariableAttribute>();
40 this->ConstantAttribute = new vtkObjectVector<vtkMedConstantAttribute>();
41 this->ParentFile = NULL;
44 vtkMedStructElement::~vtkMedStructElement()
47 this->SetSupportMeshName(NULL);
48 this->SetParentFile(NULL);
49 this->SetSupportMesh(NULL);
50 delete this->VariableAttribute;
51 delete this->ConstantAttribute;
54 void vtkMedStructElement::LoadVariableAttributes(vtkMedEntityArray* array)
56 for(int varattit = 0; varattit < this->GetNumberOfVariableAttribute(); varattit++)
58 vtkMedVariableAttribute* varatt = this->GetVariableAttribute(varattit);
63 int vtkMedStructElement::GetConnectivitySize()
65 if(strcmp(this->Name, MED_PARTICLE_NAME) == 0
66 || this->SupportEntityType != MED_CELL)
67 return this->SupportNumberOfNode;
69 return this->SupportNumberOfCell *
70 vtkMedUtilities::GetNumberOfPoint(this->SupportGeometryType);
73 void vtkMedStructElement::PrintSelf(ostream& os, vtkIndent indent)
75 this->Superclass::PrintSelf(os, indent);