Required
mesh_0| Type: | UnstructuredMesh |
| Description: | Source mesh (interpolate parameters from here). |
mesh_0 to mesh_1.def interpolate_mesh_to_mesh(
mesh_0: UnstructuredMesh,
mesh_1: UnstructuredMesh,
use_layers: bool,
use_1d_vertical_coordinate: bool,
verbose: bool = True,
exclude_filter: tuple[str, int] | None = None,
fields_to_interpolate: str | list[str] | None = None,
) -> UnstructuredMesh: ...| Type: | UnstructuredMesh |
| Description: | Source mesh (interpolate parameters from here). |
| Type: | UnstructuredMesh |
| Description: | Destination mesh (interpolate parameters to here). |
| Type: | bool |
| Description: | Search for the elemental parameter layer in both meshes and, if it exists, restrict the interpolation to matching layers. Useful (in fact, likely essential) when working with models containing discontinuities which should be preserved. Will throw is use_layers is not present as an element nodal field in either mesh. |
| Type: | bool |
| Description: | Search for the element nodal parameter z_node_1D in both meshes and, if it exists, use it to "flatten" any topography before the interpolation occurs. Setting this to true is consistent with what happens when doing certain model interpolations, for instance when considering the interpolation of a MantleModel or a CrustalModel. In those cases the models are interpolated using the spherical 1-D radial coordinate before topographic deformations are applied. |
| Type: | bool |
| Default value: | True |
| Description: | Print a progress bar outlining the overall progress of the interpolation routine. Defaults to True. |
| Type: | tuple[str, int] | None |
| Default value: | None |
| Description: | Exclude from the interpolation elements which have a a certain elemental flag set as an elemental_field. A tuple should be passed containing ("elemental_field_name", field value). Elements flagged will be excluded from the interpolation in both meshes. |
| Type: | str | list[str] | None |
| Default value: | None |
| Description: | Optional list of fields to interpolate. If not given, all valid material parameters defined on mesh_0 will be interpolated. |
use_1d_vertical_coordinate is toggled, but "z_node_1D" does not exist as an element nodal field in either mesh.use_1d_vertical_coordinate is toggled, but the maximum values of "z_node_1D" are different between meshes.use_1d_vertical_coordinate is toggled, but the "reference_frame" global variable is not present in either mesh, or if it varies between meshes.use_layers is toggled, but the "layer" parameter is not present as an elemental variable in either meshUnstructuredMeshmesh_0 interpolated onto the topology of mesh_1.def uniformly_refine(
mesh: UnstructuredMesh,
tensor_order: int,
refinement_order: int = 2,
change_tensor_order_kwargs: dict | None = None,
use_high_order_node_locations: bool = True,
) -> UnstructuredMesh: ...| Type: | UnstructuredMesh |
| Description: | The mesh which should be refined. |
| Type: | int |
| Description: | The tensor_order of the new refined mesh. |
| Type: | int |
| Default value: | 2 |
| Description: | The number of subdivisions per dimension, e.g. 2 will lead to a subdivision of a hex into 8 hexes or a quad into 4 quads |
| Type: | dict | None |
| Default value: | None |
| Description: | internally, UnstructuredMesh.change_tensor_order() is used to create the new points as well as to set the tensor order of the new mesh. This dictionary can be used to pass additional arguments such as for spherical interpolation. See the docstring of change_tensor_order for details. |
| Type: | bool |
| Default value: | True |
| Description: | create new nodes based on the high order shape of the original mesh. Cannot be used together with change_tensor_order_kwargs. |
UnstructuredMeshdef uniformly_refine_chunkwise(
mesh: UnstructuredMesh,
output_filename: str,
nchunk: int = 10,
show_progress: bool = True,
uniformly_refine_kwargs: dict | None = None,
) -> None: ...| Type: | UnstructuredMesh |
| Description: | The mesh which should be refined. |
| Type: | str |
| Description: | Filename of the mesh file (h5 format). |
| Type: | int |
| Default value: | 10 |
| Description: | The number of chunks to use. |
| Type: | bool |
| Default value: | True |
| Description: | show a progress bar while refining & merging. |
| Type: | dict | None |
| Default value: | None |
| Description: | dictionary of arguments passed to uniformly_refine |