Mondaic
This API reference is not for the latest stable Salvus version.

salvus.mesh.algorithms.unstructured_mesh.material_operations

Mesh operations that involve materials.

Functions

to_material()

def to_material(mesh: UnstructuredMesh) -> material.Material: ...

Create a material from the mesh, without encoding geometrical information.

Parameters
  • mesh UnstructuredMesh — The mesh.
Returns material.Material — The material, with all parameters of type ArrayParameter.

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
  • mesh UnstructuredMesh — The mesh.
  • m typing.Type[material.Material] — The desired material.
  • reduction_method typing.Literal['remove-components', 'force'] | None — Method to move between incompatible symmetry classes. None will only move to symmetries that are equal or more permissive, while remove-components will 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.