File tree Expand file tree Collapse file tree 2 files changed +13
-6
lines changed
LoopStructural/interpolators Expand file tree Collapse file tree 2 files changed +13
-6
lines changed Original file line number Diff line number Diff line change @@ -90,11 +90,16 @@ class InterpolatorType(IntEnum):
9090}
9191
9292support_interpolator_map = {
93- InterpolatorType .FINITE_DIFFERENCE : SupportType .StructuredGrid ,
94- InterpolatorType .DISCRETE_FOLD : SupportType .TetMesh ,
95- InterpolatorType .PIECEWISE_LINEAR : SupportType .TetMesh ,
96- InterpolatorType .PIECEWISE_QUADRATIC : SupportType .P2UnstructuredTetMesh ,
93+ InterpolatorType .FINITE_DIFFERENCE : {
94+ 2 : SupportType .StructuredGrid2D ,
95+ 3 : SupportType .StructuredGrid ,
96+ },
97+ InterpolatorType .DISCRETE_FOLD : {3 : SupportType .TetMesh , 2 : SupportType .P1Unstructured2d },
98+ InterpolatorType .PIECEWISE_LINEAR : {3 : SupportType .TetMesh , 2 : SupportType .P1Unstructured2d },
99+ InterpolatorType .PIECEWISE_QUADRATIC : {
100+ 3 : SupportType .P2UnstructuredTetMesh ,
101+ 2 : SupportType .P2Unstructured2d ,
102+ },
97103}
98104
99-
100105from ._interpolator_factory import InterpolatorFactory
Original file line number Diff line number Diff line change @@ -30,7 +30,9 @@ def create_interpolator(
3030 interpolatortype = interpolator_string_map [interpolatortype ]
3131 if support is None :
3232 # raise Exception("Support must be specified")
33- supporttype = support_interpolator_map [interpolatortype ]
33+
34+ supporttype = support_interpolator_map [interpolatortype ][boundingbox .dimensions ]
35+
3436 support = SupportFactory .create_support_from_bbox (
3537 supporttype ,
3638 bounding_box = boundingbox ,
You can’t perform that action at this time.
0 commit comments