*If(strcmp(MatProp(Material_Prototype),"CCShellMaterial")==0 || strcmp(MatProp(Material_Prototype),"CCBeam3DMaterial")==0)
*If(DebugControl==1)
// (strcmp(MatProp(Material_Prototype),"CCShellMaterial")==0 || strcmp(MatProp(Material_Prototype),"CCBeam3DMaterial")==0)
*EndIf

*If(MatProp(Activate_Base,Int)!=1)
*WarningBox Info: Material has deactivate concrete 
*#MessageBox error: Error in data of Material. Can be destrued by Transform to new problemtype. Repair Activate_Base to checked in *MatProp(0) in **.mat of example!
*Else
*If(DebugControl==1)
// Solid of CCShellMaterial or CCBeam3DMaterial - DEBUG is Activate
*EndIf
*EndIf

// Shell and Beam Material definition
*#
*# // projeti materialu a jisteni jestli nejsou temp dep. či comb
*Set Var oMujMat=tcl(TK_FindMaterialNumber *MatProp(Use_Base_Material) *MatProp(0))
*Set Var oShellMatUse=0
*Set Var oShellMatUseTemp=0
*Set Var oShellMatUseComb=0
*Set Var oShellMatUseCombTemp=0
*#loop materials *NotUsed *all
*#Set Var oMat=tcl(TK_FindMaterialNumber *MatProp(0) *MatProp(0))
*#//b *oMat  *oMujMat
*#End materials
*loop materials *NotUsed *all
*Set Var oMat=tcl(TK_FindMaterialNumber *MatProp(0) *MatProp(0))
*#
*#// matvar *matvar
*#// oMujMat *oMujMat
*#// oMat *oMat
*#
*If(oMat==oMujMat)

*include ..\include.src.bas\MaterialFunctionAndParametersShell.bas
*#
*#
*If(strcmp(MatProp(Material_Prototype),"CC3DNonLinCementitious2Variable")==0)
*include ..\include.src.bas\Function_for_Variable_NonCem2.bas
*EndIf
*#
*#
*EndIf                                              
*#
*If(oMat==oMujMat && strcmp(MatProp(Material_Prototype),"CC3DNonLinCementitious2WithTempDepProperties")==0) 
*Set Var oShellMatUseTemp=1
*Set Var oShellMatUse=1
*break
*EndIf
*#
*If(oMat==oMujMat && strcmp(MatProp(Material_Prototype),"CC3DNonLinCementitious2SHCCWithTempDepProperties")==0) 
*Set Var oShellMatUseTemp=1
*Set Var oShellMatUse=1
*break
*EndIf
*#
*If(oMat==oMujMat && strcmp(MatProp(Material_Prototype),"CCCombinedMaterialWithTempDepProperties")==0)
*Set Var oShellMatUseCombTemp=1
*Set Var oShellMatUse=1
*break
*EndIf
*If(oMat==oMujMat && strcmp(MatProp(Material_Prototype),"CC3DBiLinearVonMisesWithTempDepProperties")==0)
*Set Var oShellMatUseCombTemp=1
*Set Var oShellMatUse=1
*break
*EndIf
*If(oMat==oMujMat && strcmp(MatProp(Material_Prototype),"CCCombinedMaterial")==0)
*Set Var oShellMatUseComb=1
*Set Var oShellMatUse=1
*break
*EndIf
*End materials

*If(oShellMatUse(Int)==0)
*loop materials *all
*Set Var oMat=tcl(TK_FindMaterialNumber *MatProp(0) *MatProp(0))
*#
*If(oMat==oMujMat)
*include ..\include.src.bas\MaterialFunctionAndParametersShell.bas
*EndIf
*#
*If(oMat==oMujMat && strcmp(MatProp(Material_Prototype),"CC3DNonLinCementitious2WithTempDepProperties")==0)
*Set Var oShellMatUseTemp=1
*Set Var oShellMatUse=1
*break
*EndIf
*#
*If(oMat==oMujMat && strcmp(MatProp(Material_Prototype),"CC3DNonLinCementitious2SHCCWithTempDepProperties")==0)
*Set Var oShellMatUseTemp=1
*Set Var oShellMatUse=1
*break
*EndIf
*#
*If(oMat==oMujMat && strcmp(MatProp(Material_Prototype),"CCCombinedMaterialWithTempDepProperties")==0)
*Set Var oShellMatUseCombTemp=1
*Set Var oShellMatUse=1
*break
*EndIf
*If(oMat==oMujMat && strcmp(MatProp(Material_Prototype),"CC3DBiLinearVonMisesWithTempDepProperties")==0)
*Set Var oShellMatUseCombTemp=1
*Set Var oShellMatUse=1
*break
*EndIf
*If(oMat==oMujMat && strcmp(MatProp(Material_Prototype),"CCCombinedMaterial")==0)
*Set Var oShellMatUseComb=1
*Set Var oShellMatUse=1
*break
*EndIf
*End materials
*endif
*#
*#
*#If(strcmp(GenData(Calculation_Analysis),"Static")==0 && strcmp(MatProp(Base_Material_Prototype),"CC3DNonLinCementitious2WithTempDepProperties")==0)

*If(strcmp(GenData(Calculation_Analysis),"Static")==0 && oShellMatUseTemp==1)
MATERIAL ID *Operation(matvar*IncrAdvancedMatID)
*ElseIf(strcmp(GenData(Calculation_Analysis),"Static")==0 && oShellMatUseCombTemp==1)
MATERIAL ID *Operation(matvar*IncrAdvancedMatID)
*ElseIf(strcmp(GenData(Calculation_Analysis),"Static")==0 && oShellMatUseComb==1)
MATERIAL ID *Operation(matvar*IncrAdvancedMatID+9)
*Else     
MATERIAL ID *matvar
*Endif     
  NAME "Solid:*MatProp(0)#*matvar#*MatNum"
  TYPE
*If(strcmp(GenData(Calculation_Analysis),"Creep")==0)
  "*MatProp(Solid_Material_Prototype)"
*If(strcmp(MatProp(Solid_Material_Prototype),"CCModelB3Improved")!=0 )
// Error in Solid_Material_Prototype of Material Template Shell. Material Model For Creep *MatProp(Solid_Material_Prototype) of Solid is not programed - please se to *.dat
*MessageBox error: Error in Solid_Material_Prototype of Material Template Shell. Material Model For Creep of Solid is not programed - please se to *.dat
*EndIf
*If(strcmp(MatProp(Solid_Material_Prototype),"CCModelB3Improved")==0 || strcmp(MatProp(Material_Prototype),"CCModelB4")==0)
*#
*Set Var oJdeoShell=1
*include ..\include.src.bas\BasicCreepMaterialParameters.bas
*include ..\include.src.bas\Check_MaterialParameter_End_OF_CURING_TIME.bas
*include ..\include.src.bas\addComplianceCreepMaterialParameter.bas
*include ..\include.src.bas\addLosessCreepMaterialParameter.bas
*include ..\include.src.bas\addShrinkagesCreepMaterialParameter.bas
*include ..\include.src.bas\addHistoryCreepMaterialParameter.bas
BASE
  TYPE *\
*EndIf
*EndIf
*#
*# // projeti nepouzitych i pouzitych materialu a najiti stejneho interniho cisla, pak vypis.
*Set Var oMujMat=tcl(TK_FindMaterialNumber *MatProp(Use_Base_Material) *MatProp(0))
*# Material *MatProp(Use_Base_Material) ma ID *oMujMat *tcl(TK_FindMaterialNumber *MatProp(Use_Base_Material))
*#
*# // pro nepouzite materialy
*Set Var oShellMatUse=0
*loop materials *NotUsed *all
*# jumbo *matnum() *MatProp(0) *tcl(TK_FindMaterialNumber *MatProp(0)) *MatProp(Material_Prototype)
*Set Var oMat=tcl(TK_FindMaterialNumber *MatProp(0) *MatProp(0))
*If(oMat==oMujMat)
*#
*include ..\include.src.bas\CCShell_and_Beam3DMaterial_base.bas
*#include ..\include.src.bas\MaterialFunctionAndParametersShell.bas // presunuto vyse
*#
*Set Var oShellMatUse=1
*break
*EndIf
*End materials
*#
*#
*# // pro pouzite materialy
*If(oShellMatUse(Int)==0)
*loop materials *all
*Set Var oMat=tcl(TK_FindMaterialNumber *MatProp(0) *MatProp(0))
*If(oMat==oMujMat)
*#
*include ..\include.src.bas\CCShell_and_Beam3DMaterial_base.bas
*#include ..\include.src.bas\MaterialFunctionAndParametersShell.bas // presunuto vyse
*#
*Set Var oShellMatUse=1
*break
*EndIf
*End materials
*endif

*If(oShellMatUse(Int)==1)
*#WarningBox Info: Material of Shell Base was written...
*EndIf
*# **********************************konec shellu


*If(strcmp(MatProp(Material_Prototype),"CCBeam3DMaterial")==0)
*If(MatProp(Activate_Reinforcement_01,Int)==1)

*If(strcmp(MatProp(Reinf_Material_Prototype),"CCSmearedReinf")==0 || strcmp(MatProp(Reinf_Material_Prototype),"CCCyclingSmearedReinf")==0)
FUNCTION ID *Operation(matvar*IncrAdvancedFunID+9)
 NAME "Function for Material Reinforcement"
 TYPE "CCMultiLinearFunction" REMOVE_ALL
  xvalues *\
*for(i=1;i<=MatProp(Function_for_strength,Int);i=i+2)
   *MatProp(Function_for_strength,*i,Real) *\
*Set Var posledni= MatProp(Function_for_strength,*i,Real)
*End
   *Operation(posledni*1.01) *\
*#Realformat "%10.4e"

  yvalues *\
*for(i=2;i<=MatProp(Function_for_strength,Int);i=i+2)
   *MatProp(Function_for_strength,*i,Real) *\
*End
   0.000E+00
*EndIf
	


MATERIAL ID *Operation(matvar*IncrAdvancedMatID+9)
  NAME "Beam-Reinf" // "*MatProp(0)#*matvar REBAR#1"
  TYPE "*MatProp(Reinf_Material_Prototype)"
  //  E *MatProp(Reinf_01_Young_s_Modulus-E,Real)
  MU *MatProp(Reinf_01_Poisson_s_Ratio-MU,Real)
*If(strcmp(MatProp(Reinf_Material_Prototype),"CC3DBiLinearSteelVonMises")==0)
  YIELD *MatProp(Reinf_01_Yield_Strength_YS,Real)
  HARDENING *MatProp(Reinf_01_Hardening_Modulus,real)
//	Function *Operation(matvar*IncrAdvancedFunID+9)
*ElseIf(strcmp(MatProp(Reinf_Material_Prototype),"CCReinforcement")==0)
  Function *Operation(matvar*IncrAdvancedFunID+9)
*ElseIf(strcmp(MatProp(Reinf_Material_Prototype),"CCSmearedReinf")==0 || strcmp(MatProp(Reinf_Material_Prototype),"CCCyclingSmearedReinf")==0)
  DIRECTION 1. 0.  0. 
  RATIO 1.
  Function *Operation(matvar*IncrAdvancedFunID+9)
*ElseIf(strcmp(MatProp(Reinf_Material_Prototype),"CC3DElastIsotropic")==0)
//	Function *Operation(matvar*IncrAdvancedFunID+9)
*ElseIf(strcmp(MatProp(Reinf_Material_Prototype),"CCSmearedSteelDRC")==0)
  E *MatProp(Reinf_01_Young_s_Modulus-E,Real)
  FY *MatProp(Reinf_01_FY,Real)
  EU *MatProp(Reinf_01_EU,Real)
  FU *MatProp(Reinf_01_FU,Real)
  ESH *MatProp(Reinf_01_ESH,Real)
  EFT *MatProp(Reinf_01_EFT,Real)
  OMEGA *MatProp(Reinf_01_OMEGA,Real)
*If(strcmp(MatProp(Reinf_01_Type_of_definition),"PSH")==0)
  PSH *MatProp(Reinf_01_PSH,Real)
*Else
  ESH1 *MatProp(Reinf_01_ESH1,Real)
  FSH1 *MatProp(Reinf_01_FSH1,Real)
*EndIf
*Else
  //	unknown type of beam reinf !!!!
*EndIf
  RHO *MatProp(Reinf_Rho-Density,Real)
  ALPHA *MatProp(Reinf_Thermal_Expansion-Alpha,Real)
*If(strcmp(MatProp(Reinf_Material_Prototype),"CCCyclingSmearedReinf")==0)
  R *MatProp(Reinf_01_Bauschinger_exp-R_,Real)
  C1 *MatProp(Reinf_01_Menegotto-Pinto-C1,Real)
  C2 *MatProp(Reinf_01_Menegotto-Pinto-C2,Real)
*EndIf

*EndIf
*Else
*#        // SHELL
*If(MatProp(Activate_Reinforcement_01,Int)==1)

*if(strcmp(MatProp(Reinf_01_Material_Prototype),"CCSmearedSteelDRC")!=0)
*include ..\include.src.bas\CCMaterialFunction01.bas
*EndIf

MATERIAL ID *Operation(matvar*IncrAdvancedMatID+9)
  NAME "R1" // "*MatProp(0)#*matvar REBAR#1"
  TYPE "*MatProp(Reinf_01_Material_Prototype)"
  //	E *MatProp(Reinf_01_Young_s_Modulus-E,Real)
  RHO *MatProp(Reinf_01_RHO-Density,Real)
  ALPHA *MatProp(Reinf_01_Thermal_Expansion-Alpha,Real)
  RATIO 1.0
*if(strcmp(MatProp(Reinf_01_Material_Prototype),"CCSmearedSteelDRC")!=0)  
  COMPRESSION *MatProp(Reinf_01_Active_in_Compresion,Int)
  FUNCTION *Operation(matvar*IncrAdvancedFunID+9)
*EndIf
*include ..\include.src.bas\VectorDirection01.bas
*if(strcmp(MatProp(Reinf_01_Material_Prototype),"CCCyclingSmearedReinf")==0)
  R *MatProp(Reinf_01_Bauschinger_exp-R_,Real)
  C1 *MatProp(Reinf_01_Menegotto-Pinto-C1,Real)
  C2 *MatProp(Reinf_01_Menegotto-Pinto-C2,Real)
*elseif(strcmp(MatProp(Reinf_01_Material_Prototype),"CCSmearedSteelDRC")==0)
  E *MatProp(Reinf_01_Young_s_Modulus-E,Real)
  FY *MatProp(Reinf_01_FY,Real)
  EU *MatProp(Reinf_01_EU,Real)
  FU *MatProp(Reinf_01_FU,Real)
  ESH *MatProp(Reinf_01_ESH,Real)
  EFT *MatProp(Reinf_01_EFT,Real)
  OMEGA *MatProp(Reinf_01_OMEGA,Real)
*If(strcmp(MatProp(Reinf_01_Type_of_definition),"PSH")==0)
  PSH *MatProp(Reinf_01_PSH,Real)
*Else
  ESH1 *MatProp(Reinf_01_ESH1,Real)
  FSH1 *MatProp(Reinf_01_FSH1,Real)       
*EndIf 
*EndIf
*EndIf
*If(MatProp(Activate_Reinforcement_02,Int)==1)

*if(strcmp(MatProp(Reinf_02_Material_Prototype),"CCSmearedSteelDRC")!=0)
*include ..\include.src.bas\CCMaterialFunction02.bas
*EndIf

MATERIAL ID *Operation(matvar*IncrAdvancedMatID+14)
  NAME "R2" // "*MatProp(0)#*matvar REBAR#2"
  TYPE "*MatProp(Reinf_02_Material_Prototype)"
  //  E *MatProp(Reinf_02_Young_s_Modulus-E,Real)
  RHO *MatProp(Reinf_02_RHO-Density,Real)
  ALPHA *MatProp(Reinf_02_Thermal_Expansion-Alpha,Real)
  RATIO 1.0
*if(strcmp(MatProp(Reinf_02_Material_Prototype),"CCSmearedSteelDRC")!=0)  
  COMPRESSION *MatProp(Reinf_02_Active_in_Compresion,Int)
  Function *Operation(matvar*IncrAdvancedFunID+14)
*EndIf
*include ..\include.src.bas\VectorDirection02.bas
*if(strcmp(MatProp(Reinf_02_Material_Prototype),"CCCyclingSmearedReinf")==0)
  R *MatProp(Reinf_02_Bauschinger_exp-R_,Real)
  C1 *MatProp(Reinf_02_Menegotto-Pinto-C1,Real)
  C2 *MatProp(Reinf_02_Menegotto-Pinto-C2,Real)
*elseif(strcmp(MatProp(Reinf_02_Material_Prototype),"CCSmearedSteelDRC")==0)
  E *MatProp(Reinf_02_Young_s_Modulus-E)
  FY *MatProp(Reinf_02_FY,Real)
  EU *MatProp(Reinf_02_EU,Real)
  FU *MatProp(Reinf_02_FU,Real)
  ESH *MatProp(Reinf_02_ESH,Real)
  EFT *MatProp(Reinf_02_EFT,Real)
  OMEGA *MatProp(Reinf_02_OMEGA,Real)
*If(strcmp(MatProp(Reinf_02_Type_of_definition),"PSH")==0)
  PSH *MatProp(Reinf_02_PSH,Real)
*Else
  ESH1 *MatProp(Reinf_02_ESH1,Real)
  FSH1 *MatProp(Reinf_02_FSH1,Real)       
*EndIf 
*EndIf
*EndIf
*If(MatProp(Activate_Reinforcement_03,Int)==1)

*if(strcmp(MatProp(Reinf_03_Material_Prototype),"CCSmearedSteelDRC")!=0)
*include ..\include.src.bas\CCMaterialFunction03.bas
*EndIf

MATERIAL ID *Operation(matvar*IncrAdvancedMatID+17)
  NAME "R3" // "*MatProp(0)#*matvar REBAR#3"
  TYPE "*MatProp(Reinf_03_Material_Prototype)"
  //  E *MatProp(Reinf_03_Young_s_Modulus-E,Real)
  RHO *MatProp(Reinf_03_RHO-Density,Real)
  ALPHA *MatProp(Reinf_03_Thermal_Expansion-Alpha,Real)
  RATIO 1.0
*if(strcmp(MatProp(Reinf_03_Material_Prototype),"CCSmearedSteelDRC")!=0)  
  COMPRESSION *MatProp(Reinf_03_Active_in_Compresion,Int)
  Function *Operation(matvar*IncrAdvancedFunID+17)
*EndIf
*include ..\include.src.bas\VectorDirection03.bas
*if(strcmp(MatProp(Reinf_03_Material_Prototype),"CCCyclingSmearedReinf")==0)
  R *MatProp(Reinf_03_Bauschinger_exp-R_,Real)
  C1 *MatProp(Reinf_03_Menegotto-Pinto-C1,Real)
  C2 *MatProp(Reinf_03_Menegotto-Pinto-C2,Real)
*elseif(strcmp(MatProp(Reinf_03_Material_Prototype),"CCSmearedSteelDRC")==0)
  E *MatProp(Reinf_03_Young_s_Modulus-E,Real)
  FY *MatProp(Reinf_03_FY,Real)
  EU *MatProp(Reinf_03_EU,Real)
  FU *MatProp(Reinf_03_FU,Real)
  ESH *MatProp(Reinf_03_ESH,Real)
  EFT *MatProp(Reinf_03_EFT,Real)
  OMEGA *MatProp(Reinf_03_OMEGA,Real)
*If(strcmp(MatProp(Reinf_03_Type_of_definition),"PSH")==0)
  PSH *MatProp(Reinf_03_PSH,Real)
*Else
  ESH1 *MatProp(Reinf_03_ESH1,Real)
  FSH1 *MatProp(Reinf_03_FSH1,Real)       
*EndIf 
*EndIf
*EndIf
*If(MatProp(Activate_Reinforcement_04,Int)==1)

*if(strcmp(MatProp(Reinf_04_Material_Prototype),"CCSmearedSteelDRC")!=0)
*include ..\include.src.bas\CCMaterialFunction04.bas
*EndIf

MATERIAL ID *Operation(matvar*IncrAdvancedMatID+20)
  NAME "R4" // "*MatProp(0)#*matvar REBAR#4"
  TYPE "*MatProp(Reinf_04_Material_Prototype)"
  //  E *MatProp(Reinf_04_Young_s_Modulus-E,Real)
  RHO *MatProp(Reinf_04_RHO-Density,Real)
  ALPHA *MatProp(Reinf_04_Thermal_Expansion-Alpha,Real)
  RATIO 1.0
*if(strcmp(MatProp(Reinf_04_Material_Prototype),"CCSmearedSteelDRC")!=0)
  COMPRESSION *MatProp(Reinf_04_Active_in_Compresion,Int)
  Function *Operation(matvar*IncrAdvancedFunID+20)
*EndIf
*include ..\include.src.bas\VectorDirection04.bas
*if(strcmp(MatProp(Reinf_04_Material_Prototype),"CCCyclingSmearedReinf")==0)
  R *MatProp(Reinf_04_Bauschinger_exp-R_,Real)
  C1 *MatProp(Reinf_04_Menegotto-Pinto-C1,Real)
  C2 *MatProp(Reinf_04_Menegotto-Pinto-C2,Real)
*elseif(strcmp(MatProp(Reinf_04_Material_Prototype),"CCSmearedSteelDRC")==0)
  E *MatProp(Reinf_04_Young_s_Modulus-E,Real)
  FY *MatProp(Reinf_04_FY,Real)
  EU *MatProp(Reinf_04_EU,Real)
  FU *MatProp(Reinf_04_FU,Real)
  ESH *MatProp(Reinf_04_ESH,Real)
  EFT *MatProp(Reinf_04_EFT,Real)
  OMEGA *MatProp(Reinf_04_OMEGA,Real)
*If(strcmp(MatProp(Reinf_04_Type_of_definition),"PSH")==0)
  PSH *MatProp(Reinf_04_PSH,Real)
*Else
  ESH1 *MatProp(Reinf_04_ESH1,Real)
  FSH1 *MatProp(Reinf_04_FSH1,Real)       
*EndIf 
*EndIf
*#
*# If(MatProp(Activate_Reinforcement_04,Int)==1) - pouze pro 4.Vyztuziuz
*EndIf
*#
*# If(strcmp(MatProp(Material_Prototype),"CCBeam3DMaterial")==0) - konec podminky jestli Shell nebo Beam3D
*EndIf
*#
*# konec podminky na prvnim radku
*EndIf
