salvus.mesh.algorithms.unstructured_mesh.material_operations
Mesh operations that involve materials.
Functions
to_material()
to_material()def to_material(mesh: UnstructuredMesh) -> material.Material: ...Create a material from the mesh, without encoding geometrical information.
Parameters
meshUnstructuredMesh — The mesh.
Returns material.Material — The material, with all parameters of type ArrayParameter.
transform_material()
transform_material()def transform_material(
mesh: UnstructuredMesh,
m: typing.Type[material.Material],
reduction_method: (
typing.Literal["remove-components", "force"] | None
) = None,
) -> UnstructuredMesh: ...Transform the material of a mesh to another compatible material.
Parameters
meshUnstructuredMesh — The mesh.mtyping.Type[material.Material] — The desired material.reduction_methodtyping.Literal['remove-components', 'force'] | None — Method to move between incompatible symmetry classes. None will only move to symmetries that are equal or more permissive, whileremove-componentswill drop components that are found to match the new material’s constraints as necessary, and thus leading to loss of free parameters but not of information. The option “force” will take all information necessary to construct the new parameter set without verification, leading to loss of information.
Returns UnstructuredMesh — A mesh with replaced elemental nodal fields for the material properties.