@@ -724,9 +724,6 @@ def __init__(self, comm=None, options=None):
724
724
# initialize comm for parallel communication
725
725
self ._initializeComm (comm )
726
726
727
- # check if the combination of options is valid.
728
- self ._checkOptions ()
729
-
730
727
# Initialize families
731
728
self .families = OrderedDict ()
732
729
@@ -773,6 +770,9 @@ def __init__(self, comm=None, options=None):
773
770
# initialize mesh information and read grids
774
771
self ._readMeshInfo ()
775
772
773
+ # check if the combination of options is valid.
774
+ self ._checkOptions ()
775
+
776
776
# initialize the mesh point vector xvVec
777
777
self ._initializeMeshPointVec ()
778
778
@@ -1124,6 +1124,7 @@ def _checkOptions(self):
1124
1124
if self .getOption ("discipline" ) not in ["aero" , "thermal" ]:
1125
1125
raise Error ("discipline: %s not supported. Options are: aero or thermal" % self .getOption ("discipline" ))
1126
1126
1127
+ # check coupling Info
1127
1128
nActivated = 0
1128
1129
for coupling in self .getOption ("couplingInfo" ):
1129
1130
if self .getOption ("couplingInfo" )[coupling ]["active" ]:
@@ -1143,6 +1144,35 @@ def _checkOptions(self):
1143
1144
"Only one couplingSurfaceGroups is supported for aerostructural, while %i found" % nAeroStructSurfaces
1144
1145
)
1145
1146
1147
+ # check the patchNames from primalBC dict
1148
+ primalBCDict = self .getOption ("primalBC" )
1149
+ for bcKey in primalBCDict :
1150
+ try :
1151
+ patches = primalBCDict [bcKey ]["patches" ]
1152
+ except Exception :
1153
+ continue
1154
+ for patchName in patches :
1155
+ if patchName not in self .boundaries .keys ():
1156
+ raise Error (
1157
+ "primalBC-%s-patches-%s is not valid. Please use a patchName from the boundaries list: %s"
1158
+ % (bcKey , patchName , self .boundaries .keys ())
1159
+ )
1160
+
1161
+ # check the patch names from objFunc dict
1162
+ objFuncDict = self .getOption ("objFunc" )
1163
+ for objKey in objFuncDict :
1164
+ for part in objFuncDict [objKey ]:
1165
+ try :
1166
+ patches = objFuncDict [objKey ][part ]["patches" ]
1167
+ except Exception :
1168
+ continue
1169
+ for patchName in patches :
1170
+ if patchName not in self .boundaries .keys ():
1171
+ raise Error (
1172
+ "objFunc-%s-%s-patches-%s is not valid. Please use a patchName from the boundaries list: %s"
1173
+ % (objKey , part , patchName , self .boundaries .keys ())
1174
+ )
1175
+
1146
1176
# check other combinations...
1147
1177
1148
1178
def saveMultiPointField (self , indexMP ):
0 commit comments