Version:

salvus.mesh.layered_meshing.meshing_protocol.coarsening_policy.compute_coarsening_policies

salvus.mesh.layered_meshing.meshing_protocol.coarsening_policy.compute_coarsening_policies salvus mesh layered_meshing meshing_protocol coarsening_policy compute_coarsening_policies
Utility function to compute coarsening policies.

Functions

compute_coarsening_policies()

Compute coarsening policies for meshing a layered model.
This function determines the coarsening policies for a given layered model based on the domain, mesh resolution, and an optional interlayer coarsening policy. It evaluates the minimum layer thickness and the maximum element size reduction across layers to decide the appropriate coarsening strategy.
SIGNATURE
def compute_coarsening_policies(
    domain: _domain.Domain,
    layered_model: _layered_model.LayeredModel,
    mesh_resolution: types.MeshResolution,
    coarsening_policy: InterlayerCoarseningPolicy = InterlayerDoubling(
        n_layers="auto"
    ),
) -> list[InterlayerCoarseningPolicy]: ...
ARGUMENTS
Required
domain
Type:_domain.Domain
Description:
The domain object representing the spatial domain of the mesh.
Required
layered_model
Type:_layered_model.LayeredModel
Description:
The layered model object containing the mesh layers and their properties.
Required
mesh_resolution
Type:types.MeshResolution
Description:
The resolution of the mesh, which influences the element size and coarsening decisions.
Optional
coarsening_policy
Type:InterlayerCoarseningPolicy
Default value:InterlayerDoubling(n_layers='auto')
Description:
The default interlayer coarsening policy to use. Defaults to InterlayerDoubling().
RETURNS
Return type: list[InterlayerCoarseningPolicy]
A list of coarsening policies for the layers, determined based on the computed thickness-to-element size ratio.
PAGE CONTENTS