Muscat.Containers.MeshMappingTools module
- class FoldOverFreeMaps(mesh: Mesh, boundaryEF: ElementFilter)[source]
Bases:
object
Muscat implementation of the Fold Over Free Maps algorithm
- ComputePotential(U: _SupportsArray[dtype] | _NestedSequence[_SupportsArray[dtype]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes]) Tuple[number, ndarray] [source]
Compute the potential to be minimized
- Parameters:
U (ArrayLike) – The positions of the points
- Returns:
F the potential value G the gradient of the potential
- Return type:
Tuple[np.number, np.ndarray]
- MinDetJacobian() number [source]
Compute the minimal jacobian on the mesh
- Returns:
the min of the jacobian
- Return type:
np.number
- callback
callback function to be called at each interaction of the algorithm with the current mesh as argument
- class VolumicMeshFromTargetSurfacesMorpher(inputMesh: Mesh, targetSurfaces: Dict[str, Mesh], tol: Dict[str, float] | None = None, cut_off_distances: Dict[str, float] | None = None, largeTransf: bool = True, exportIntermediaryMeshes: bool = False, exportFolder: str = '.', verbose: bool = False)[source]
Bases:
object
Muscat implementation of an original algorithm to morph a 3D Mesh by specifying target surfaces.
STILL LARGRLY EXPERIMENTAL
The input is a 3D mesh, with a partition of its boundary given in the form of NodalTags (intersections of NodalTags are allowed). The target surfaces (on which the partition of the boundary is to be mapped) are given as input. First, the algorithm extracts the input mesh boundary and maps the lines between the partition of this boundary. This mapping is high-quality, by comparing the curvilinear abscissa of the input and target line. The other (internal boundary points are mapped by RBF, with all the points of the line as control points. Once these lines have been aligned, the internal points of the surfaces are projected from the input mesh to the target surfaces using orthogonal projection. At this point, the surfaces have been matched. The 3D mesh is then mapped by RBF using all the line points and a subset of the (internal) boundary points as control points.
TODO: code a simpler variant where targetSurfaces are from a single mesh (and compatible elements)