@@ -328,11 +328,15 @@ def check_igr(self):
328328 def check_weno (self ):
329329 """Checks constraints regarding WENO order"""
330330 recon_type = self .get ("recon_type" , 1 )
331+ self .prohibit (recon_type not in [1 , 2 ], "recon_type must be 1 (WENO) or 2 (MUSCL)" )
331332
332333 # WENO_TYPE = 1
333334 if recon_type != 1 :
334335 return
335336
337+ for param in ["muscl_order" , "muscl_lim" ]:
338+ self .prohibit (self .is_set (param ), f"recon_type = 1 (WENO) is not compatible with { param } " )
339+
336340 weno_order = self .get ("weno_order" )
337341 m = self .get ("m" , 0 )
338342 n = self .get ("n" , 0 )
@@ -349,6 +353,8 @@ def check_weno(self):
349353 def check_muscl (self ):
350354 """Check constraints regarding MUSCL order"""
351355 recon_type = self .get ("recon_type" , 1 )
356+ self .prohibit (recon_type not in [1 , 2 ], "recon_type must be 1 (WENO) or 2 (MUSCL)" )
357+
352358 int_comp = self .get ("int_comp" , "F" ) == "T"
353359
354360 self .prohibit (int_comp and recon_type != 2 , "int_comp (THINC interface compression) requires recon_type = 2 (MUSCL)" )
@@ -357,6 +363,17 @@ def check_muscl(self):
357363 if recon_type != 2 :
358364 return
359365
366+ weno_log_params = ["mapped_weno" , "wenoz" , "teno" , "mp_weno" , "weno_avg" , "null_weights" , "weno_Re_flux" ]
367+ for param in weno_log_params :
368+ self .prohibit (self .get (param ) == "T" , f"recon_type = 2 (MUSCL) is not compatible with { param } = T" )
369+
370+ weno_numeric_params = ["wenoz_q" , "teno_CT" , "weno_eps" ]
371+ for param in weno_numeric_params :
372+ self .prohibit (self .is_set (param ), f"recon_type = 2 (MUSCL) is not compatible with { param } " )
373+
374+ weno_order = self .get ("weno_order" )
375+ self .prohibit (weno_order is not None and weno_order != 0 , f"recon_type = 2 (MUSCL) requires weno_order unset or 0, but got { weno_order } " )
376+
360377 muscl_order = self .get ("muscl_order" )
361378 m = self .get ("m" , 0 )
362379 n = self .get ("n" , 0 )
@@ -717,6 +734,13 @@ def check_finite_difference(self):
717734
718735 def check_weno_simulation (self ):
719736 """Checks WENO-specific constraints for simulation"""
737+ recon_type = self .get ("recon_type" , 1 )
738+ self .prohibit (recon_type not in [1 , 2 ], "recon_type must be 1 (WENO) or 2 (MUSCL)" )
739+
740+ # WENO_TYPE = 1
741+ if recon_type != 1 :
742+ return
743+
720744 weno_order = self .get ("weno_order" )
721745 weno_eps = self .get ("weno_eps" )
722746 wenoz = self .get ("wenoz" , "F" ) == "T"
@@ -751,6 +775,13 @@ def check_weno_simulation(self):
751775
752776 def check_muscl_simulation (self ):
753777 """Checks MUSCL-specific constraints for simulation"""
778+ recon_type = self .get ("recon_type" , 1 )
779+ self .prohibit (recon_type not in [1 , 2 ], "recon_type must be 1 (WENO) or 2 (MUSCL)" )
780+
781+ # MUSCL_TYPE = 2
782+ if recon_type != 2 :
783+ return
784+
754785 muscl_order = self .get ("muscl_order" )
755786 muscl_lim = self .get ("muscl_lim" )
756787 muscl_eps = self .get ("muscl_eps" )
0 commit comments