Skip to content

Commit 8d05837

Browse files
Added python prohibit check for particle cloud packing method
1 parent 4fbeacd commit 8d05837

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

toolchain/mfc/case_validator.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -595,6 +595,17 @@ def check_ibm(self):
595595
self.prohibit(not ib and num_ibs > 0, "num_ibs is set, but ib is not enabled")
596596
self.prohibit(ib_state_wrt and not ib, "ib_state_wrt requires ib to be enabled")
597597

598+
for i in range(1, num_particle_clouds + 1):
599+
packing_method = self.get(f"particle_cloud({i})%packing_method", None)
600+
self.prohibit(
601+
packing_method is None,
602+
f"particle_cloud({i})%packing_method must be specified (1 = rejection sampling)",
603+
)
604+
self.prohibit(
605+
packing_method is not None and packing_method not in [1],
606+
f"particle_cloud({i})%packing_method must be 1 (rejection sampling is the only supported method)",
607+
)
608+
598609
num_ib_airfoils_max = get_fortran_constants().get("num_ib_airfoils_max", 5)
599610
num_stl_models_max = get_fortran_constants().get("num_stl_models_max", 10)
600611
num_stl_models = self.get("num_stl_models", 0)

0 commit comments

Comments
 (0)