*if(IsQuadratic)
*else
*MessageBox error: Menu Meshing | Quadratic must be set to Quadratic.
*endif
*if(strcmp(GenData(GEOMETRY),"2D")==0)
NDIME 2 ;
*else
NDIME 3 ;
*endif
ANALYSIS   *GenData(ANALYSIS) ;
PRINTING   *GenData(PRINTING) ;
PRECISION  *GenData(PRECISION) ;
*If(strcmp(GenData(GEOMETRY),"2D")==0)
CLASS      *GenData(CLASS) ;
*endif
*if(strcmp(GenData(ANALYSIS),"MODAL")==0)
MODAL      *GenData(NUMBER_OF_MODES) ;
*endif
*if(strcmp(GenData(ANALYSIS),"MODAL_RESANTIRES")==0)
MODAL_RESANTIRES   *GenData(NUMBER_OF_MODES) ;
*endif
*if(strcmp(GenData(ANALYSIS),"HARMONIC")==0)
HARMONIC ;
*endif
*if(strcmp(GenData(ANALYSIS),"TRANSIENT")==0)
TRANSIENT   *GenData(INTEGRATION_METHOD) *GenData(NS) *GenData(NSKIP) *GenData(DELTA_t) *GenData(FL) *GenData(PARA1) *GenData(PARA2) ;
NUMBER_OF_TIME_STEPS *GenData(NUMBER_OF_TIME_STEPS) ;
*endif

LOSSES  *GenData(INCLUDE_LOSSES) ;
STRESS  *GenData(COMPUTE_STRESS) ;

*if(strcmp(GenData(MESH_UNITS),"mm")==0)
SCALE 0.001 ;
*elseif(strcmp(GenData(MESH_UNITS),"µm")==0)
SCALE 0.000001 ;
*elseif(strcmp(GenData(MESH_UNITS),"nm")==0)
SCALE 0.000000001 ;
*elseif(strcmp(GenData(MESH_UNITS),"ft")==0)
SCALE 0.3048 ;
*elseif(strcmp(GenData(MESH_UNITS),"in")==0)
SCALE 0.0254 ;
*elseif(strcmp(GenData(MESH_UNITS),"mil")==0)
SCALE 0.0000254 ;
*else
SCALE 1.0 ;
*endif

*loop intervals
INTERVAL              *LoopVar ;
TYPE                  *IntvData(TYPE) ;
FREQUENCY             *IntvData(FREQUENCY) ;
MIN_FREQUENCY         *IntvData(MIN_FREQUENCY) ;
MAX_FREQUENCY         *IntvData(MAX_FREQUENCY) ;
NUMBER_OF_FREQUENCIES *IntvData(NUMBER_OF_FREQUENCIES) ;
WEIGHT                *IntvData(WEIGHT) ;
*end intervals

NUMBER NODES *npoin;
*loop nodes
*format "%6i%15.5E%15.5E%15.5E"
NODE *NodesNum *NodesCoord ;
*end nodes

NUMBER ELEMENTS *nelem ;
*Set elems(Linear)
*loop elems
*if(elemsmat==0)
The material of element number *elemsnum is not defined.
*MessageBox error: A linear element has not a defined material. Check the dat file for additional information.
*endif
ELEMENT *elemsnum *elemsmat *elemsConec;
*end elems
*Set elems(Triangle)
*loop elems
*if(elemsmat==0)
The material of element number *elemsnum is not defined.
*MessageBox error: A triangular element has not a defined material. Check the dat file for additional information.
*endif
ELEMENT *elemsnum *elemsmat *elemsConec;
*end elems
*Set elems(Quadrilateral)
*loop elems 
*if(elemsmat==0)
The material of element number *elemsnum is not defined.
*MessageBox error: A quadrilateral element has not a defined material. Check the dat file for additional information.
*endif
ELEMENT *elemsnum *elemsmat *elemsConec;
*end elems
*Set elems(Tetrahedra)
*loop elems 
*if(elemsmat==0)
The material of element number *elemsnum is not defined.
*MessageBox error: A tetrahedra element has not a defined material. Check the dat file for additional information.
*endif
ELEMENT *elemsnum *elemsmat *elemsConec ;
*end elems
*Set elems(Hexahedra)
*loop elems 
*if(elemsmat==0)
The material of element number *elemsnum is not defined.
*MessageBox error: A hexahedra element has not a defined material. Check the dat file for additional information.
*endif
ELEMENT *elemsnum *elemsmat *elemsConec ;
*end elems

*loop localaxes
LOCALAXES *LocalAxesNum() *LocalAxesDef(EulerAngles) *LocalAxesDefCenter ;
*end localaxes

*Set elems(All)
*Set Cond Surface_Geometry_Properties *elems
*loop elems *OnlyInCond
ELEM_PROPERTIES *elemsnum *cond(1) *cond(2) *cond(3) ;
*MessageBox error: "Surface Geometry Properties" is not yet implemented.
*end elems

*Set elems(All)
*Set Cond Surface_Polarization *elems
*loop elems *OnlyInCond
ELEM_PROPERTIES *elemsnum *LocalAxesNum *cond(1) ;
*end elems

*Set Cond Volume_Polarization *elems
*loop elems *OnlyInCond
ELEM_PROPERTIES *elemsnum *LocalAxesNum *cond(1) ;
*end elems

*Set Cond Spring  *elems
*loop elems *OnlyInCond
ELEM_PROPERTIES *elemsnum *cond(1) ;
*end elems

*Set Cond Line_Elastic_Shell  *elems
*loop elems *OnlyInCond
ELEM_PROPERTIES_ELASTIC_SHELL *elemsnum *cond(2) *cond(3) ;
*end elems

*Set Cond Line_Pressure    *elems *CanRepeat
*Add Cond Surface_Pressure *elems *CanRepeat
*loop elems *OnlyInCond
ELEM_PRESSURE *elemsnum *cond(1) *GlobalNodes ;
*end elems

*Set Cond Line_Radiating_Boundary    *elems
*Add Cond Surface_Radiating_Boundary *elems
*loop elems *OnlyInCond
ELEM_RADIATING *elemsnum *GlobalNodes ;
*end elems

*Set elems(Linear)
*Set Cond Line_BEM    *elems *CanRepeat
*loop elems *OnlyInCond
ELEM_BEM *elemsnum *elemsconec ;
*end elems

*Set elems(All)
*Remove elems(Linear)
*Set Cond Line_BEM    *elems *CanRepeat
*Add Cond Surface_BEM *elems *CanRepeat
*loop elems *OnlyInCond
ELEM_BEM *elemsnum *GlobalNodes ;
*end elems

*loop materials
MATERIAL        *LoopVar ;
NAME            *MatProp(0) ;
TYPE            *MatProp(TYPE) ;
*if(strcmp(MatProp(TYPE),"ELASTIC")==0)
YOUNGS_MODULUS  *MatProp(Young's_Modulus) ;
POISSON_RATIO   *MatProp(Poisson_Ratio) ;
DENSITY         *MatProp(Density) ;
E_DP            *MatProp(E") ;
NU_DP           *MatProp(NU") ;
*if(strcmp(MatProp(ENABLE),"Yes")==0)
PERMEABILITY    *MatProp(RELATIVE_PERMEABILITY) ;
*else
PERMEABILITY    0.0 ;
*endif
*elseif(strcmp(MatProp(TYPE),"PIEZOELECTRIC")==0)
*if(strcmp(MatProp(SYMMETRY_CLASS),"Triclinic_System_Class_1")==0)
SYMMETRY_CLASS  CLASS_1 ;
*elseif(strcmp(MatProp(SYMMETRY_CLASS),"Monoclinic_System_Class_2")==0)
SYMMETRY_CLASS  CLASS_2 ;
*elseif(strcmp(MatProp(SYMMETRY_CLASS),"Monoclinic_System_Class_m")==0)
SYMMETRY_CLASS  CLASS_M ;
*elseif(strcmp(MatProp(SYMMETRY_CLASS),"Orthorhombic_System_Class_222")==0)
SYMMETRY_CLASS  CLASS_222 ;
*elseif(strcmp(MatProp(SYMMETRY_CLASS),"Orthorhombic_System_Class_mm2")==0)
SYMMETRY_CLASS  CLASS_MM2 ;
*elseif(strcmp(MatProp(SYMMETRY_CLASS),"Tetragonal_System_Class_4")==0)
SYMMETRY_CLASS  CLASS_4 ;
*elseif(strcmp(MatProp(SYMMETRY_CLASS),"Tetragonal_System_Class_4o")==0)
SYMMETRY_CLASS  CLASS_4O ;
*elseif(strcmp(MatProp(SYMMETRY_CLASS),"Tetragonal_System_Class_422")==0)
SYMMETRY_CLASS  CLASS_422 ;
*elseif(strcmp(MatProp(SYMMETRY_CLASS),"Tetragonal_System_Class_4mm")==0)
SYMMETRY_CLASS  CLASS_4MM ;
*elseif(strcmp(MatProp(SYMMETRY_CLASS),"Tetragonal_System_Class_4o2m")==0)
SYMMETRY_CLASS  CLASS_4O2M ;
*elseif(strcmp(MatProp(SYMMETRY_CLASS),"Trigonal_System_Class_3")==0)
SYMMETRY_CLASS  CLASS_3 ;
*elseif(strcmp(MatProp(SYMMETRY_CLASS),"Trigonal_System_Class_32")==0)
SYMMETRY_CLASS  CLASS_32 ;
*elseif(strcmp(MatProp(SYMMETRY_CLASS),"Trigonal_System_Class_3m")==0)
SYMMETRY_CLASS  CLASS_3M ;
*elseif(strcmp(MatProp(SYMMETRY_CLASS),"Hexagonal_System_Class_6")==0)
SYMMETRY_CLASS  CLASS_6 ;
*elseif(strcmp(MatProp(SYMMETRY_CLASS),"Hexagonal_System_Class_6o")==0)
SYMMETRY_CLASS  CLASS_6O ;
*elseif(strcmp(MatProp(SYMMETRY_CLASS),"Hexagonal_System_Class_622")==0)
SYMMETRY_CLASS  CLLASS_622 ;
*elseif(strcmp(MatProp(SYMMETRY_CLASS),"Hexagonal_System_Class_6mm")==0)
SYMMETRY_CLASS  CLASS_6MM ;
*elseif(strcmp(MatProp(SYMMETRY_CLASS),"Hexagonal_System_Class_6om2")==0)
SYMMETRY_CLASS  CLASS_6OM2 ;
*elseif(strcmp(MatProp(SYMMETRY_CLASS),"Cubic_System_Classes_23_and_4o3m")==0)
SYMMETRY_CLASS  CLASSES_23_AND_4O3M ;
*else
*MessageBox error : unknown material type
*endif
DENSITY         *MatProp(DENSITY) ;
S11E            *MatProp(s11E) ;
S12E            *MatProp(s12E) ;
S13E            *MatProp(s13E) ;
S14E            *MatProp(s14E) ;
S15E            *MatProp(s15E) ;
S16E            *MatProp(s16E) ;
S22E            *MatProp(s22E) ;
S23E            *MatProp(s23E) ;
S24E            *MatProp(s24E) ;
S25E            *MatProp(s25E) ;
S26E            *MatProp(s26E) ;
S33E            *MatProp(s33E) ;
S34E            *MatProp(s34E) ;
S35E            *MatProp(s35E) ;
S36E            *MatProp(s36E) ;
S44E            *MatProp(s44E) ;
S45E            *MatProp(s45E) ;
S46E            *MatProp(s46E) ;
S55E            *MatProp(s55E) ;
S56E            *MatProp(s56E) ;
S66E            *MatProp(s66E) ;
D11             *MatProp(d11) ;
D12             *MatProp(d12) ;
D13             *MatProp(d13) ;
D14             *MatProp(d14) ;
D15             *MatProp(d15) ;
D16             *MatProp(d16) ;
D21             *MatProp(d21) ;
D22             *MatProp(d22) ;
D23             *MatProp(d23) ;
D24             *MatProp(d24) ;
D25             *MatProp(d25) ;
D26             *MatProp(d26) ;
D31             *MatProp(d31) ;
D32             *MatProp(d32) ;
D33             *MatProp(d33) ;
D34             *MatProp(d34) ;
D35             *MatProp(d35) ;
D36             *MatProp(d36) ;
E11T/E0         *MatProp(E11T/E0) ;
E12T/E0         *MatProp(E12T/E0) ;
E13T/E0         *MatProp(E13T/E0) ;
E22T/E0         *MatProp(E22T/E0) ;
E23T/E0         *MatProp(E23T/E0) ;
E33T/E0         *MatProp(E33T/E0) ;
DELTA_M         *MatProp(DELTA_M) ;
DELTA_P         *MatProp(DELTA_P) ;
DELTA_D         *MatProp(DELTA_D) ;
*elseif(strcmp(MatProp(TYPE),"MAGNETOSTRICTIVE")==0)
S11H            *MatProp(s11H) ;
S12H            *MatProp(s12H) ;
S13H            *MatProp(s13H) ;
S33H            *MatProp(s33H) ;
S44H            *MatProp(s44H) ;
DENSITY         *MatProp(DENSITY) ;
D31             *MatProp(d31) ;
D33             *MatProp(d33) ;
D15             *MatProp(d15) ;
MU11S/MU0       *MatProp(µ11S/µ0) ;
MU33S/MU0       *MatProp(µ33S/µ0) ;
DELTA_M         *MatProp(DELTA_M) ;
DELTA_P         *MatProp(DELTA_P) ;
DELTA_D         *MatProp(DELTA_D) ;
*elseif(strcmp(MatProp(TYPE),"MAGNETIC")==0)
PERMEABILITY    *MatProp(PERMEABILITY) ;
*elseif(strcmp(MatProp(TYPE),"FLUID")==0)
BULK_MODULUS    *MatProp(BULK_MODULUS) ;
DENSITY         *MatProp(DENSITY) ;
COMP_DP         *MatProp(COMP") ;
*else
*MessageBox error : unknown material type
*endif
*end materials

*Set Cond Point-Constraints   *nodes *CanRepeat
*loop nodes *OnlyInCond
CONDITION_DISPL *cond(1) *cond(2) *cond(3) *cond(4) *cond(5) *cond(6) *cond(7) *cond(8) *cond(9) *cond(10) *cond(11) *cond(12) ;
*NodesNum ;
*end nodes

*Set elems(All)
*Set Cond Line-Constraints    *elems *CanRepeat
*Add Cond Surface-Constraints *elems *CanRepeat
*loop elems *OnlyInCond
CONDITION_DISPL *cond(1) *cond(2) *cond(3) *cond(4) *cond(5) *cond(6) *cond(7) *cond(8) *cond(9) *cond(10) *cond(11) *cond(12) ;
*GlobalNodes ;
*end elems

*Set Cond Point-Rotation-Constraints   *nodes *CanRepeat
*loop nodes *OnlyInCond
CONDITION_ROTAT *cond(1) *cond(2) *cond(3) *cond(4) *cond(5) *cond(6) *cond(7) *cond(8) *cond(9) *cond(10) *cond(11) *cond(12) ;
*NodesNum ;
*end nodes

*Set elems(All)
*Set Cond Line-Rotation-Constraints    *elems *CanRepeat
*loop elems *OnlyInCond
CONDITION_ROTAT *cond(1) *cond(2) *cond(3) *cond(4) *cond(5) *cond(6) *cond(7) *cond(8) *cond(9) *cond(10) *cond(11) *cond(12) ;
*GlobalNodes ;
*end elems

*Set Cond Point-Force       *nodes *CanRepeat
*loop nodes *OnlyInCond
POINT_FORCE *cond(1) *cond(2) *cond(3) *cond(4) *cond(5) *cond(6) *cond(7) *cond(8) *cond(9) ;
*NodesNum ;
*end nodes

*Set elems(All)
*Set Cond Line-Force        *elems *CanRepeat
*Add Cond Surface-Force     *elems *CanRepeat
*loop elems *OnlyInCond
LOADING_FORCE *cond(1) *cond(2) *cond(3) *cond(4) *cond(5) *cond(6) ;
*GlobalNodes ;
*end elems

*Set Cond Line_Electric_Potential      *nodes
*Add Cond Surface_Electric_Potential   *nodes
*loop nodes *OnlyInCond
CONDITION_POTENTIAL *NodesNum *cond(1) *cond(2) *cond(3) *cond(4) *cond(5) *cond(6) *cond(7) *cond(8) *cond(9) *cond(10) *cond(11) ;
*end nodes

*Set Cond Point_Magnetic_Potential     *nodes
*Add Cond Line_Magnetic_Potential      *nodes
*Add Cond Surface_Magnetic_Potential   *nodes
*loop nodes *OnlyInCond
CONDITION_MAGNETO *NodesNum *cond(1)  ;
*end nodes

*Set Cond Point_Inductor               *nodes
*loop nodes *OnlyInCond
INDUCTOR *cond(1) *cond(2) *cond(3) *cond(4) *cond(5) *cond(6) *cond(7) *cond(8) *cond(9) *cond(10) *cond(11) *cond(12) *cond(13) *cond(14) *cond(15) *cond(16) *cond(17);
*end nodes
