*#
*#
*#
*Intformat "%i"
*#
*# Vynulovat vsechno
*# WarningBox Warning: pred iniciaci TK_InitSelectionName
*tcl(TK_InitSelectionName)*\
*#
*#
*# pri prvnim pruchodu naplnim pole UniqueSelectionName()
*# WarningBox Warning: pred 1.pruchodem loop Intervals TK_CreateArraysSelectionName

*Set Cond Initial_Humidity_for_Volume   *nodes 
*Add Cond Initial_Humidity_for_Surface  *nodes   
*Add Cond Initial_Humidity_for_Line     *nodes 
*Add Cond Initial_Humidity_for_Point    *nodes  
*If(CondNumEntities(Int)>0)
*#// Initial_Humidity_for loop 1 has *CondNumEntities entities
*loop nodes *OnlyInCond
*tcl(TK_CreateArraysSelectionName *Cond(SelectionName))*\
*#
*End nodes
*EndIf
*# break
*#
*# // *\
*tcl(TK_FinishArraysSelectionName)
*#
*# pri druhem pruchodu je Vypis selections 
*#
*# WarningBox Warning: pred 2.pruchodem 
*#GenData(UniqueSelectionName)

*for(i=1;i<=GenData(UniqueSelectionName,Int);i=i+1)
*Set Var IntervalNum=0
*loop Intervals
*Set Var delkaradku=0
*Set Var IntervalNum=Operation(IntervalIndex)
*#
*Set Cond Initial_Humidity_for_Volume   *nodes 
*Add Cond Initial_Humidity_for_Surface  *nodes   
*Add Cond Initial_Humidity_for_Line     *nodes   
*Add Cond Initial_Humidity_for_Point    *nodes  
*# i = *i
*# *CondNumEntities(Int)
*If(CondNumEntities(Int)>0)
*#// Initial_Humidity_for loop 2 has *CondNumEntities entities
SELECTION "INITIAL_HUMIDITY_*GenData(UniqueSelectionName,*i)" LIST *\
*loop nodes *OnlyInCond
*#
*Set Var oSelectionName=strcmp(Cond(SelectionName),GenData(UniqueSelectionName,*i))
*#
*# *NodesNum --- *Cond(SelectionName) =? *GenData(UniqueSelectionName,*i) => *oSelectionName
*If( oSelectionName(Int)==0)
*Set Var delkaradku=Operation(delkaradku+1)
 *NodesNum *\
*If(delkaradku>=15)
*Set Var delkaradku=0

*EndIf
*EndIf
*#
*End nodes
 ;
*set var pruchod = 0
*Set Var varcons_old = 0
*set var varcoex_old = 0
*set var varcoey_old = 0
*set var varcoez_old = 0
*loop nodes *OnlyInCond 
*Set Var oSelectionName=strcmp(Cond(SelectionName),GenData(UniqueSelectionName,*i))
*If( oSelectionName(Int)==0)
*Set Var varconst = Cond(CONST_Humidity,Real)
*set var varcoefx = Cond(COEFF_X_Humidity,Real)
*set var varcoefy = Cond(COEFF_Y_Humidity,Real)
*set var varcoefz = Cond(COEFF_Z_Humidity,Real)
*set var pruchod = Operation(pruchod+1)
*If(pruchod>1)
*If(varcons_old!=varconst || varcoex_old!=varcoefx || varcoey_old!=varcoefy || varcoez_old!=varcoefz )
*#WarningBox Warning: Initial_Humidity_for - different set of parameters! Node: *NodesNum, SelectionName: *Cond(SelectionName)
*tcl(TK_CTRLclear)*\
*tcl(TK_CTRLc "Warning: Material: Initial_Humidity_for - different set of parameters! SelectionName: " *Cond(SelectionName) ". \n" )*\
*tcl(TK_TK_WarnWinTextTK_CTRLv)*\
*WarningBox Warning: Initial_Humidity_for_ creating inp was interupted. Please repair the conditions and try it again. 
*break
*EndIf
*EndIf
*# // pruchod = *pruchod
*# // *NodesNum = *Cond(SelectionName)
*# // *varcons_old = *varconst
*# // *varcoex_old = *varcoefx
*# // *varcoey_old = *varcoefy
*# // *varcoez_old = *varcoefz
*Set Var varcons_old = varconst
*set var varcoex_old = varcoefx
*set var varcoey_old = varcoefy
*set var varcoez_old = varcoefz
*EndIf
*End nodes
NODAL HUMIDITY SETTING SELECTION "INITIAL_HUMIDITY_*GenData(UniqueSelectionName,*i)"
CONST *varconst COEFF_X *varcoefx COEFF_Y *varcoefy COEFF_Z *varcoefz
GENERATE_HUMIDITY ; 

*EndIf
*# break
*End Intervals
*end

