diff --git a/plate_simulation/mesh/params.py b/plate_simulation/mesh/params.py index de3e125..83225a4 100644 --- a/plate_simulation/mesh/params.py +++ b/plate_simulation/mesh/params.py @@ -31,19 +31,20 @@ def octree_params( self, survey: ObjectBase, topography: Surface, plates: list[Surface] ): refinements = { - "Refinement A object": topography, - "Refinement A levels": "0, 2", - "Refinement A type": "surface", - "Refinement B object": survey, - "Refinement B levels": "4, 2", - "Refinement B type": "radial", + "Refinement A object": survey, + "Refinement A levels": "4, 4, 4", + "Refinement A horizon": False, + "Refinement B object": topography, + "Refinement B levels": "0, 2", + "Refinement B horizon": True, + "Refinement B distance": 1000.0, } for plate, letter in zip(plates, string.ascii_uppercase[2:], strict=False): refinements.update( { f"Refinement {letter} object": plate, f"Refinement {letter} levels": "2, 1", - f"Refinement {letter} type": "surface", + f"Refinement {letter} horizon": False, } ) @@ -63,5 +64,5 @@ def octree_params( assert isinstance(survey.workspace.h5file, Path) path = survey.workspace.h5file.parent - octree_params.input_file.write_ui_json(name="octree.ui.json", path=path) + octree_params.write_input_file(name="octree.ui.json", path=path) return octree_params diff --git a/tests/runtest/driver_test.py b/tests/runtest/driver_test.py index 9b5c60a..9120114 100644 --- a/tests/runtest/driver_test.py +++ b/tests/runtest/driver_test.py @@ -116,7 +116,7 @@ def test_plate_simulation(tmp_path): k.name in [f"Iteration_0_{i}" for i in "xyz"] for k in data.property_groups ) assert all(len(k.properties) == 20 for k in data.property_groups) - assert mesh.n_cells == 11132 + assert mesh.n_cells == 14555 assert len(np.unique(model.values)) == 4 assert all( k in np.unique(model.values) for k in [1.0 / 7500, 1.0 / 2000, 1.0 / 20] diff --git a/tests/utils/utils_test.py b/tests/utils/utils_test.py index 0a3f95d..210e193 100644 --- a/tests/utils/utils_test.py +++ b/tests/utils/utils_test.py @@ -23,7 +23,7 @@ def test_azimuth_to_unit_vector(): def test_replicate_even(tmp_path): - workspace = Workspace(tmp_path / "test.geoh5") + workspace = Workspace.create(tmp_path / "test.geoh5") surface = Surface.create( workspace, name="test", @@ -40,7 +40,7 @@ def test_replicate_even(tmp_path): def test_replicate_odd(tmp_path): - workspace = Workspace(tmp_path / "test.geoh5") + workspace = Workspace.create(tmp_path / "test.geoh5") surface = Surface.create( workspace, name="test",