*If(strcmp(ElemsMatProp(Material_Prototype),"CCShellMaterial")==0)
Delete ENFORCED MATERIAL *matvar ;
*If(ElemsMatProp(Activate_Reinforcement_01,Int)==1)
DELETE ENFORCED FUNCTION *Operation(matvar*IncrAdvancedMatID+9) ;
DELETE ENFORCED MATERIAL *Operation(matvar*IncrAdvancedMatID+9) ;
*EndIf
*If(ElemsMatProp(Activate_Reinforcement_02,Int)==1)
DELETE ENFORCED FUNCTION *Operation(matvar*IncrAdvancedMatID+14) ;
DELETE ENFORCED MATERIAL *Operation(matvar*IncrAdvancedMatID+14) ;
*EndIf
*If(ElemsMatProp(Activate_Reinforcement_03,Int)==1)
DELETE ENFORCED FUNCTION *Operation(matvar*IncrAdvancedMatID+17) ;
DELETE ENFORCED MATERIAL *Operation(matvar*IncrAdvancedMatID+17) ;
*EndIf
*If(ElemsMatProp(Activate_Reinforcement_04,Int)==1)
DELETE ENFORCED FUNCTION *Operation(matvar*IncrAdvancedMatID+20) ;
DELETE ENFORCED MATERIAL *Operation(matvar*IncrAdvancedMatID+20) ;
*EndIf
DELETE ENFORCED GEOMETRY *matvar ;

*ElseIf(strcmp(ElemsMatProp(Material_Prototype),"CCBeam3DMaterial")==0)
DELETE ENFORCED MATERIAL *matvar ;
*If(ElemsMatProp(Activate_Reinforcement_01,Int)==1)
DELETE ENFORCED MATERIAL *Operation(matvar*IncrAdvancedMatID+9) ;
DELETE ENFORCED FUNCTION *Operation(matvar*IncrAdvancedMatID+9) ;
*EndIf
DELETE ENFORCED GEOMETRY *matvar ;

*ElseIf(strcmp(ElemsMatProp(Material_Prototype),"CCCombinedMaterial")==0 )
DELETE ENFORCED MATERIAL *matvar ;
*If(ElemsMatProp(Activate_Concrete,Int)==1)
DELETE ENFORCED MATERIAL *Operation(matvar*IncrAdvancedMatID+9) ;
*EndIf
*If(ElemsMatProp(Activate_Smeared_Reinf_01,Int)==1)
DELETE ENFORCED MATERIAL *Operation(matvar*IncrAdvancedMatID+14) ;
*EndIf
*If(ElemsMatProp(Activate_Smeared_Reinf_02,Int)==1)
DELETE ENFORCED MATERIAL *Operation(matvar*IncrAdvancedMatID+17) ;
*EndIf
*If(ElemsMatProp(Activate_Smeared_Reinf_03,Int)==1)
DELETE ENFORCED MATERIAL *Operation(matvar*IncrAdvancedMatID+20) ;
*EndIf
DELETE ENFORCED GEOMETRY *matvar ;

*ElseIf(strcmp(ElemsMatProp(Material_Prototype),"CCCombinedMaterialWithTempDepProperties")==0)
DELETE ENFORCED MATERIAL *matvar ;
*If(ElemsMatProp(Activate_Concrete,Int)==1)
DELETE ENFORCED MATERIAL *Operation(matvar*IncrAdvancedMatID) ;
DELETE ENFORCED MATERIAL *Operation(matvar*IncrAdvancedMatID+9) ;
*#
DELETE ENFORCED FUNCTION *Operation(matvar*IncrAdvancedFunID+1)
DELETE ENFORCED FUNCTION *Operation(matvar*IncrAdvancedFunID+2)
DELETE ENFORCED FUNCTION *Operation(matvar*IncrAdvancedFunID+3)
DELETE ENFORCED FUNCTION *Operation(matvar*IncrAdvancedFunID+4)
DELETE ENFORCED FUNCTION *Operation(matvar*IncrAdvancedFunID+5)
DELETE ENFORCED FUNCTION *Operation(matvar*IncrAdvancedFunID+6)
DELETE ENFORCED FUNCTION *Operation(matvar*IncrAdvancedFunID+7)
DELETE ENFORCED FUNCTION *Operation(matvar*IncrAdvancedFunID+11)
*EndIf
*If(ElemsMatProp(Activate_Smeared_Reinf_01,Int)==1)
DELETE ENFORCED MATERIAL *Operation(matvar*IncrAdvancedMatID+13) ;
DELETE ENFORCED MATERIAL *Operation(matvar*IncrAdvancedMatID+14) ;
*EndIf
*If(ElemsMatProp(Activate_Smeared_Reinf_02,Int)==1)
DELETE ENFORCED MATERIAL *Operation(matvar*IncrAdvancedMatID+16) ;
DELETE ENFORCED MATERIAL *Operation(matvar*IncrAdvancedMatID+17) ;
*EndIf
*If(ElemsMatProp(Activate_Smeared_Reinf_03,Int)==1)
DELETE ENFORCED MATERIAL *Operation(matvar*IncrAdvancedMatID+19) ;
DELETE ENFORCED MATERIAL *Operation(matvar*IncrAdvancedMatID+20) ;
*EndIf
*#
*If(ElemsMatProp(Activate_Smeared_Reinf_01,Int)==1 || ElemsMatProp(Activate_Smeared_Reinf_02,Int)==1 || ElemsMatProp(Activate_Smeared_Reinf_03,Int)==1)
DELETE ENFORCED FUNCTION *Operation(matvar*IncrAdvancedFunID+8) ;
DELETE ENFORCED FUNCTION *Operation(matvar*IncrAdvancedFunID+9) ;
DELETE ENFORCED FUNCTION *Operation(matvar*IncrAdvancedFunID+10) ;
*EndIf

DELETE ENFORCED GEOMETRY *matvar ;

*ElseIf(strcmp(ElemsMatProp(Material_Prototype),"CCReinforcementWithTempDepProperties")==0)
DELETE ENFORCED MATERIAL *matvar ;
DELETE ENFORCED MATERIAL *Operation(matvar*IncrAdvancedMatID) ;
DELETE ENFORCED FUNCTION *Operation(matvar*IncrAdvancedFunID+8) ;
DELETE ENFORCED FUNCTION *Operation(matvar*IncrAdvancedFunID+9) ;
DELETE ENFORCED FUNCTION *Operation(matvar*IncrAdvancedFunID+10) ;
DELETE ENFORCED GEOMETRY *matvar ;

*ElseIf(strcmp(ElemsMatProp(Material_Prototype),"CC3DNonLinCementitious2WithTempDepProperties")==0)
DELETE ENFORCED MATERIAL *matvar 
DELETE ENFORCED MATERIAL *Operation(matvar*IncrAdvancedMatID)
DELETE ENFORCED FUNCTION *Operation(matvar*IncrAdvancedFunID+1)
DELETE ENFORCED FUNCTION *Operation(matvar*IncrAdvancedFunID+2)
DELETE ENFORCED FUNCTION *Operation(matvar*IncrAdvancedFunID+3)
DELETE ENFORCED FUNCTION *Operation(matvar*IncrAdvancedFunID+4)
DELETE ENFORCED FUNCTION *Operation(matvar*IncrAdvancedFunID+5)
DELETE ENFORCED FUNCTION *Operation(matvar*IncrAdvancedFunID+6)
DELETE ENFORCED FUNCTION *Operation(matvar*IncrAdvancedFunID+7)
DELETE ENFORCED FUNCTION *Operation(matvar*IncrAdvancedFunID+11)
DELETE ENFORCED GEOMETRY *matvar ;

*ElseIf(strcmp(ElemsMatProp(Material_Prototype),"CC3DBiLinearVonMisesWithTempDepProperties")==0)
DELETE ENFORCED MATERIAL *matvar 
DELETE ENFORCED MATERIAL *Operation(matvar*IncrAdvancedMatID)
DELETE ENFORCED FUNCTION *Operation(matvar*IncrAdvancedFunID+1)
DELETE ENFORCED FUNCTION *Operation(matvar*IncrAdvancedFunID+3)
DELETE ENFORCED FUNCTION *Operation(matvar*IncrAdvancedFunID+11)
DELETE ENFORCED GEOMETRY *matvar ;

*ElseIf(strcmp(ElemsMatProp(Material_Prototype),"CCSandwicKubina")==0)
DELETE ENFORCED GEOMETRY *matvar ;

*ElseIf(strcmp(ElemsMatProp(Material_Prototype),"CCSandwicKubinaCombinedMaterial")==0)
DELETE ENFORCED MATERIAL *matvar ;
*If(strcmp(GenData(Calculation_Analysis),"SandwichStatic3D")==0)
*If(strcmp(ElemsMatProp(Static_Material_Prototype),"CC2DInterface")==0 || strcmp(ElemsMatProp(Static_Material_Prototype),"CC3DInterface")==0)
DELETE ENFORCED FUNCTION *Operation(matvar*IncrAdvancedMatID+1) ;
DELETE ENFORCED FUNCTION *Operation(matvar*IncrAdvancedMatID+2) ;
*EndIf
*If(strcmp(ElemsMatProp(Material_Prototype),"CCSandwicKubinaCombinedMaterial")==0)
*#
*If(ElemsMatProp(Activate_Smeared_Reinf_01,Int)==1)
DELETE ENFORCED FUNCTION *Operation(matvar*IncrAdvancedMatID+9) ;
DELETE ENFORCED MATERIAL *Operation(matvar*IncrAdvancedMatID+9) ;
*EndIf
*If(ElemsMatProp(Activate_Smeared_Reinf_02,Int)==1)
DELETE ENFORCED FUNCTION *Operation(matvar*IncrAdvancedMatID+14) ;
DELETE ENFORCED MATERIAL *Operation(matvar*IncrAdvancedMatID+14) ;
*EndIf
*If(ElemsMatProp(Activate_Smeared_Reinf_03,Int)==1)
DELETE ENFORCED FUNCTION *Operation(matvar*IncrAdvancedMatID+17) ;
DELETE ENFORCED MATERIAL *Operation(matvar*IncrAdvancedMatID+17) ;
*EndIf
*If(ElemsMatProp(Activate_Smeared_Reinf_04,Int)==1)
DELETE ENFORCED FUNCTION *Operation(matvar*IncrAdvancedMatID+20) ;
DELETE ENFORCED MATERIAL *Operation(matvar*IncrAdvancedMatID+20) ;
*EndIf
*#
*EndIf
*#
*EndIf
DELETE ENFORCED GEOMETRY *matvar ;

*ElseIf(strcmp(ElemsMatProp(Material_Prototype),"CCReinforcement")==0 || strcmp(ElemsMatProp(Material_Prototype),"CCDiscreteReinforcementME")==0 || strcmp(ElemsMatProp(Material_Prototype),"CCCyclingReinforcement")==0 || strcmp(ElemsMatProp(Material_Prototype),"CCSmearedReinf")==0)
*Set Var myReinfGroupID = Operation(InitCablesID+Cond(Entity_number,Int))
// reinforcement
*If(strcmp(ElemsMatProp(Geom_Type),"BAR_WITH_BOND")==0 || strcmp(ElemsMatProp(Geom_Type),"BAR_WITH_MEMORY_BOND")==0)
DELETE ENFORCED FUNCTION *Operation(matvar*10000)
*EndIf
DELETE ENFORCED MATERIAL *matvar ;
DELETE ENFORCED FUNCTION *Operation(matvar*IncrAdvancedMatID+9) ;
DELETE ENFORCED GEOMETRY *matvar ;

*ElseIf(strcmp(ElemsMatProp(Material_Prototype),"CCSpringMaterial")==0 || strcmp(ElemsMatProp(Material_Prototype),"CCPlaneStressSteel")==0)
DELETE ENFORCED MATERIAL *matvar ;
DELETE ENFORCED FUNCTION *matvar ;
DELETE ENFORCED GEOMETRY *matvar ;

*ElseIf(strcmp(ElemsMatProp(Material_Prototype),"CC2DInterface")==0 || strcmp(ElemsMatProp(Material_Prototype),"CC3DInterface")==0)
DELETE ENFORCED MATERIAL *matvar ;
DELETE ENFORCED FUNCTION *Operation(matvar*IncrAdvancedFunID+1) ;
DELETE ENFORCED FUNCTION *Operation(matvar*IncrAdvancedFunID+2) ;
DELETE ENFORCED GEOMETRY *matvar ;

*ElseIf(strcmp(ElemsMatProp(Material_Prototype),"CC3DNonLinCementitious2SHCCWithTempDepProperties")==0)
DELETE ENFORCED MATERIAL *matvar 
DELETE ENFORCED MATERIAL *Operation(matvar*IncrAdvancedMatID)
DELETE ENFORCED FUNCTION *Operation(matvar*IncrAdvancedFunID+1)
DELETE ENFORCED FUNCTION *Operation(matvar*IncrAdvancedFunID+2)
DELETE ENFORCED FUNCTION *Operation(matvar*IncrAdvancedFunID+3)
DELETE ENFORCED FUNCTION *Operation(matvar*IncrAdvancedFunID+4)
DELETE ENFORCED FUNCTION *Operation(matvar*IncrAdvancedFunID+5)
DELETE ENFORCED FUNCTION *Operation(matvar*IncrAdvancedFunID+6)
DELETE ENFORCED FUNCTION *Operation(matvar*IncrAdvancedFunID+7)
DELETE ENFORCED FUNCTION *Operation(matvar*IncrAdvancedFunID+11)
DELETE ENFORCED GEOMETRY *matvar ;

*ElseIf(strcmp(ElemsMatProp(Material_Prototype),"CC3DNonLinCementitious2User")==0 || strcmp(ElemsMatProp(Material_Prototype),"CC3DNonLinCementitious2SHCC")==0)
DELETE ENFORCED MATERIAL *matvar ;
DELETE ENFORCED FUNCTION *Operation(matvar*IncrAdvancedFunID+1);
DELETE ENFORCED FUNCTION *Operation(matvar*IncrAdvancedFunID+2);

*If(strcmp(ElemsMatProp(Material_Prototype),"CC3DNonLinCementitious2User")==0)
DELETE ENFORCED FUNCTION *Operation(matvar*IncrAdvancedFunID+3);
*EndIf
DELETE ENFORCED FUNCTION *Operation(matvar*IncrAdvancedFunID+4);
DELETE ENFORCED GEOMETRY *matvar ;

*Else
DELETE ENFORCED MATERIAL *matvar ;
DELETE ENFORCED GEOMETRY *matvar ;
*EndIf