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

salvus.mesh.layered_meshing.meshing_protocol.meshing_protocol

Parameters governing mesh creation.

Classes

MeshingProtocol

class MeshingProtocol(builtins.object):
    def __init__(
        self,
        lm: Union[
            salvus.mesh.layered_meshing.layered_model.layered_model.LayeredModel,
            salvus.mesh.layered_meshing.material._material.Material,
        ],
        ab: Optional[
            salvus.mesh.simple_mesh.basic_mesh.AbsorbingBoundaryParameters
        ] = None,
        interlayer_coarsening_policy: Optional[
            salvus.mesh.layered_meshing.meshing_protocol.coarsening_policy.InterlayerCoarseningPolicy,
            List[
                salvus.mesh.layered_meshing.meshing_protocol.coarsening_policy.InterlayerCoarseningPolicy
            ],
        ] = None,
        intralayer_coarsening_policy: Optional[
            salvus.mesh.layered_meshing.meshing_protocol.coarsening_policy.IntralayerCoarseningPolicy,
            List[
                salvus.mesh.layered_meshing.meshing_protocol.coarsening_policy.IntralayerCoarseningPolicy
            ],
        ] = None,
        local_refinement_policy: Optional[
            salvus.mesh.layered_meshing.meshing_protocol.coarsening_policy.LocalRefinementPolicy,
            List[
                salvus.mesh.layered_meshing.meshing_protocol.coarsening_policy.LocalRefinementPolicy
            ],
        ] = None,
        oracle_filter: Union[
            salvus.mesh.layered_meshing.meshing_protocol.coarsening_policy.OracleFilter,
            List[
                salvus.mesh.layered_meshing.meshing_protocol.coarsening_policy.OracleFilter
            ],
        ] = salvus.mesh.layered_meshing.meshing_protocol.coarsening_policy.no_filter,
    ) -> None:
        ...

A collection of a Layered Model and one or more inter- / intra-layer coarsening policies.

Create a new MeshingProtocol.

Parameters
  • lm Union[salvus.mesh.layered_meshing.layered_model.layered_model.LayeredModel, salvus.mesh.layered_meshing.material._material.Material] — The layered model to mesh. If a material is passed independently of a LayeredModel, it will be automatically converted into a LayeredModel with one layer.
  • ab Optional[salvus.mesh.simple_mesh.basic_mesh.AbsorbingBoundaryParameters] — Absorbing boundary parameters that may be used to extend the mesh to accommodate damping layers.
  • interlayer_coarsening_policy Optional[salvus.mesh.layered_meshing.meshing_protocol.coarsening_policy.InterlayerCoarseningPolicy, List[salvus.mesh.layered_meshing.meshing_protocol.coarsening_policy.InterlayerCoarseningPolicy]] — A single Interlayer Coarsening Policy, a list of Interlayer Coarsening Policies, or None. If single: the policy will be duplicated between each layer. If a list, the policies will be applied in top-down order between each layer. If the number of policies is less than the number of internal interfaces, the last policy will be extended to the bottom of the mesh.
  • intralayer_coarsening_policy Optional[salvus.mesh.layered_meshing.meshing_protocol.coarsening_policy.IntralayerCoarseningPolicy, List[salvus.mesh.layered_meshing.meshing_protocol.coarsening_policy.IntralayerCoarseningPolicy]] — A single Intralayer Coarsening Policy, a list of Intralayer Coarsening Policies, or None. If single: the policy will be duplicated for each layer. If a list, the policies will be applied in a top-down order to each layer. If the number of policies is less than the number of layers, the last policy will be extended to the bottom of the mesh.
  • local_refinement_policy Optional[salvus.mesh.layered_meshing.meshing_protocol.coarsening_policy.LocalRefinementPolicy, List[salvus.mesh.layered_meshing.meshing_protocol.coarsening_policy.LocalRefinementPolicy]] — A single Local Refinement Policy, a list of Local Refinement Policies, a list of tuples of Local Refinement Policies, or the default of no_refinements. Each policy is simply a wrapper around any callable which takes an unstructured mesh and returns a list of element ids around which refinement should take place. The availability of different options for passing this parameter encompasses the following use cases: single policy: Simply a convenient way to specify one policy for the entire mesh, without needing to proactively wrap the policy in a list. list of policies: Multiple policies which will be applied one after the other, with a refinement stage happing between. If the elements found by subsequent policies overlap with those in previous policies, the overlapping area will therefore be refined multiple times. list of tuples of policies: The element ids found by each policy will be reduced over before the refinement stage is applied. This is useful if you are marking several potentially overlapping features for refinement, but only want one stage of refinement to occur. Subsequent refinement policies in the outer list will be applied as described in “list of policies”.
  • oracle_filter Union[salvus.mesh.layered_meshing.meshing_protocol.coarsening_policy.OracleFilter, List[salvus.mesh.layered_meshing.meshing_protocol.coarsening_policy.OracleFilter]] — A single Oracle Filter, or a list of Oracle filters. If single: the filter will be duplicated for each layer. If a list: the list must of of length n_layers. Defaults to no_filter.