*# // Geometry definition.
*# Virtual materials
*Set Var virtualmaterial=Operation(strcmp(MatProp(Material_Prototype),"CCDummyMaterial"),Int)
*# 1D materials
*Set Var cyclreinf=Operation(strcmp(MatProp(Material_Prototype),"CCCyclingReinforcement"),Int)
*Set Var reinf=    Operation(strcmp(MatProp(Material_Prototype),"CCReinforcement"),Int)
*Set Var tempreinf=Operation(strcmp(MatProp(Material_Prototype),"CCReinforcementWithTempDepProperties"),Int)
*Set Var elast1D=  Operation(strcmp(MatProp(Material_Prototype),"CC1DElastIsotropic"),Int)
*Set Var steelDRC=  Operation(strcmp(MatProp(Material_Prototype),"CCSteelDRC"),Int) 
*#
*# can be 2D or 3D materials
*Set Var oShell=     Operation(strcmp(MatProp(Material_Prototype),"CCShellMaterial"),Int)
*Set Var oBeam=      Operation(strcmp(MatProp(Material_Prototype),"CCBeam3DMaterial"),Int)
*Set Var vonmises3D= Operation(strcmp(MatProp(Material_Prototype),"CC3DBiLinearSteelVonMises"),Int)
*Set Var vonmises2D= Operation(strcmp(MatProp(Material_Prototype),"CC2DBiLinearSteelVonMises"),Int)
*Set Var ospring=    Operation(strcmp(MatProp(Material_Prototype),"CCSpringMaterial"),Int)
*#
*Set Var cement2_=   Operation(strcmp(MatProp(Material_Prototype),"CC3DNonLinCementitious2"),Int)
*Set Var cement3_=   Operation(strcmp(MatProp(Material_Prototype),"CC3DNonLinCementitious3"),Int)
*Set Var cement2User=Operation(strcmp(MatProp(Material_Prototype),"CC3DNonLinCementitious2User"),Int)
*Set Var cement2SHCC=Operation(strcmp(MatProp(Material_Prototype),"CC3DNonLinCementitious2SHCC"),Int)
*Set Var cement2SHCCTempDept=Operation(strcmp(MatProp(Material_Prototype),"CC3DNonLinCementitious2SHCCWithTempDepProperties"),Int)
*Set Var cemTempDept=Operation(strcmp(MatProp(Material_Prototype),"CC3DNonLinCementitious2WithTempDepProperties"),Int)
*Set Var combTempDept=Operation(strcmp(MatProp(Material_Prototype),"CCCombinedMaterialWithTempDepProperties"),Int)
*Set Var combine=    Operation(strcmp(MatProp(Material_Prototype),"CCCombinedMaterial"),Int)
*Set Var interf3D=   Operation(strcmp(MatProp(Material_Prototype),"CC3DInterface"),Int)
*Set Var interf2D=   Operation(strcmp(MatProp(Material_Prototype),"CC2DInterface"),Int)
*#
*# 2D materials
*Set Var sbeta=      Operation(strcmp(MatProp(Material_Prototype),"CCSBETAMaterial"),Int)
*Set Var planesteel= Operation(strcmp(MatProp(Material_Prototype),"CCPlaneStressSteel"),Int)
*Set Var planestress=Operation(strcmp(MatProp(Material_Prototype),"CCPlaneStressElastIsotropic"),Int)
*Set Var planestrain=Operation(strcmp(MatProp(Material_Prototype),"CCPlaneStrainElastIsotropic"),Int)
*Set Var elastisotropic=Operation(strcmp(MatProp(Material_Prototype),"CC3DElastIsotropic"),Int)
*Set Var axiSymElastIsotropic=Operation(strcmp(MatProp(Material_Prototype),"CCASymElastIsotropic"),Int)
*#
*Set Var oAxisymmat=Operation(strcmp(MatProp(Idealisation),"AXISYMMETRIC"),Int)
*Set Var o3Dmat=Operation(strcmp(MatProp(Idealisation),"3D"),Int)
*#
*#
*# test axisymetricke idealisace a neaxisymetricke ulohy
*Set Var oAxisym1Dmat=Operation(strcmp(MatProp(Idealisation),"1D"),Int)
*If(oAxisym1Dmat!=0)
*If(GenData(Axi_symmetric_task,Int)==0 && oAxisymmat==0)
// nonaxisymetric task With axisymmetric material or Idealisation
*MessageBox error: AXISYMMETRIC Material Idealisation is not permited in nonaxisymetric task !!!
*EndIf
*EndIf
*#
*If(combine==0 || combTempDept==0)
*If(strcmp(MatProp(Base_Material_Prototype),"CCSBETAMaterial")==0 && strcmp(MatProp(Idealisation),"PLANE_STRESS")!=0)
*MessageBox error: The Base Material CCSBETAMaterial is permited only For 2D PLANE_STRESS Idealisation !!!
*EndIf
*EndIf

*#
*If(ospring==0)
*#
*If(strcmp(MatProp(Spring_Type),"CCSpring")==0)
GEOMETRY ID *Operation(matvar) // GEOMETRY ID *Operation(matvar*IncrAdvancedFunID+1)
  NAME "Geometry for nodal Spring"
  TYPE "Spring"
  AREA *MatProp(Spring_Area)
  DIRECTION *MatProp(Dir_X,Real) *MatProp(Dir_Y,Real) *\
*If(ndime==3)
  *MatProp(Dir_Z,Real) ;
*EndIf
*ElseIf(strcmp(MatProp(Spring_Type),"CCLineSpring")==0)
GEOMETRY ID *Operation(matvar) // GEOMETRY ID *Operation(matvar*IncrAdvancedFunID+2)
  NAME "Geometry for line Spring"
  TYPE "Spring"
  THICKNESS *MatProp(Spring_Thickness)
*If(strcmp(MatProp(Coordinate_System),"NORMAL_OF_SURFACE")==0)
 LOCAL *\
*EndIf
  DIRECTION *MatProp(Dir_X,Real) *MatProp(Dir_Y,Real) *\
*If(ndime==3)
    *MatProp(Dir_Z,Real)
*EndIf
*If(strcmp(MatProp(Coordinate_System),"NORMAL_OF_SURFACE")==0)
 REF_VN_VECTOR *MatProp(REF_V1_VECTOR_X,Real) *MatProp(REF_V1_VECTOR_Y,Real) *\
*If(ndime==3)
    *MatProp(REF_V1_VECTOR_Z,Real)
*EndIf
*EndIf
*ElseIf(strcmp(MatProp(Spring_Type),"CCPlaneSpring")==0)
GEOMETRY ID *Operation(matvar) // GEOMETRY ID *Operation(matvar*IncrAdvancedFunID+3)
  NAME "Geometry for plane Spring"
  TYPE "Spring"
*If(strcmp(MatProp(Coordinate_System),"NORMAL_OF_SURFACE")==0)
 LOCAL *\
*EndIf
  DIRECTION *MatProp(Dir_X,Real) *MatProp(Dir_Y,Real) *\
*If(ndime==3)
    *MatProp(Dir_Z,Real)
*EndIf
*If(strcmp(MatProp(Coordinate_System),"NORMAL_OF_SURFACE")==0)
 REF_V1_VECTOR *MatProp(REF_V1_VECTOR_X,Real) *MatProp(REF_V1_VECTOR_Y,Real) *\
*If(ndime==3)
    *MatProp(REF_V1_VECTOR_Z,Real)
*EndIf
*EndIf
*Else
*# 3D
GEOMETRY ID *Operation(matvar) // GEOMETRY ID *Operation(matvar*IncrAdvancedFunID+4)
  NAME "Geometry for volume Spring"
  TYPE "3D"
  DIRECTION *MatProp(Dir_X,Real) *MatProp(Dir_Y,Real) *\
*If(ndime==3)
    *MatProp(Dir_Z,Real) ;
*EndIf
*EndIf
*#
*ElseIf(planesteel==0 || planestress==0 || planestrain==0 || interf2D==0 || sbeta==0 || axiSymElastIsotropic==0)
GEOMETRY ID *matvar
  NAME "Geometry #*matvar as name *MatProp(Material_Prototype)"
  TYPE  "2D"
*If(strcmp(MatProp(Idealisation),"AXISYMMETRIC")!=0)
  THICKNESS *MatProp(Element_Thickness,Real)
*EndIf
*If((strcmp(MatProp(Idealisation),"PLANE_STRESS")==0 || strcmp(MatProp(Idealisation),"PLANE_STRAIN")==0) && strcmp(MatProp(Material_Prototype),"CC2DInterface")!=0)
*include ..\include.src.bas\DefineLocalXdirection.bas
*EndIf
 ;
*ElseIf( reinf==0 || cyclreinf==0 || tempreinf==0 || elast1D==0 || steelDRC==0)  
*If(DebugControl==1)
// strcmp(MatProp(Material_Prototype),"CCReinforcement")==0
*EndIf
*#
*include ..\include.src.bas\CCReinforcementGeometry.bas
 ;
*ElseIf(elastisotropic==0 || vonmises2D==0 || vonmises3D==0 || cemTempDept==0 || combTempDept==0 || combine==0 || cement2_==0 || cement3_==0 || cement2User ==0 || cement2SHCC==0)
GEOMETRY ID *matvar
  NAME "Geometry #*matvar as name *MatProp(Material_Prototype)"
*If(strcmp(MatProp(Idealisation),"AXISYMMETRIC")==0)
  TYPE "2D"
*ElseIf((strcmp(MatProp(Idealisation),"PLANE_STRESS")==0 || strcmp(MatProp(Idealisation),"PLANE_STRAIN")==0) && strcmp(MatProp(Material_Prototype),"CC2DInterface")!=0)
  TYPE "2D"
*If(strcmp(MatProp(Idealisation),"AXISYMMETRIC")!=0)
  Thickness *MatProp(Element_Thickness,Real)
*EndIf  
*include ..\include.src.bas\DefineLocalXdirection.bas
*#ElseIf(strcmp(MatProp(Idealisation),"AXISYMMETRIC")==0)
*#include ..\include.src.bas\addRadialCracks_MaterialParameter.bas
*Else
  TYPE "3D"
*EndIf
 ;
*ElseIf(oShell!=0 && oBeam!=0)
*#
GEOMETRY ID *matvar
  NAME "Geometry #*matvar as name *MatProp(Material_Prototype)"
  Type *\
*If(ndime==3 && strcmp(MatProp(Idealisation),"3D")==0)
  "3D" 
*ElseIf(strcmp(MatProp(Idealisation),"1D")==0)
  "Truss"
  Area *MatProp(Element_Area,Real) ;
*Else
  "2D"
*If(strcmp(MatProp(Idealisation),"AXISYMMETRIC")!=0)
  Thickness *MatProp(Element_Thickness,Real) 
*EndIf
*EndIf
*If(interf3D==0)
*include ..\include.src.bas\DefineLocalXdirection.bas  
*EndIf
 ; 
*EndIf
