![]() |
stroid v0.6.0
Multi-block curvilinear mesh generation
|
Topology construction and curvilinear mapping utilities. More...
Classes | |
| class | TMOPProgressBar |
Functions | |
| void | PromoteToHighOrder (mfem::Mesh &mesh, const fourdst::config::Config< config::MeshConfig > &config) |
| Promote a mesh to high-order by attaching an H1 nodal finite element space. | |
| void | ProjectMesh (mfem::Mesh &mesh, const fourdst::config::Config< config::MeshConfig > &config) |
| Project high-order mesh nodes using the configured curvilinear mapping. | |
| std::unique_ptr< ScalarMeshField > | BuildExteriorCoordinate (mfem::Mesh &mesh, mfem::Mesh &reference_mesh, const fourdst::config::Config< config::MeshConfig > &config) |
| Build a scalar grid function representing the compactification coordinate for a mesh. This ranges from 0-1 with 0 at the stellar surface and 1 at the compactified infinity. | |
| void | ApplyEquiangular (mfem::Vector &pos) |
| Apply an equiangular (gnomonic) projection to a point on a cube. | |
| void | ApplySpheroidal (mfem::Vector &pos, const fourdst::config::Config< config::MeshConfig > &config) |
| Apply spheroidal flattening along the Z axis. | |
| void | ApplyKelvin (mfem::Vector &pos, const fourdst::config::Config< config::MeshConfig > &config) |
| Apply Kelvin transform outside the stellar radius. | |
| void | TransformPoint (mfem::Vector &pos, const fourdst::config::Config< config::MeshConfig > &config, int attribute_id) |
| Map a point from the initial block topology to the curvilinear domain. | |
| double | ComputeExteriorCoordinate (const mfem::Vector &logical_position, int attribute, const fourdst::config::Config< config::MeshConfig > &config) |
| Compute the compactification coordinate for a point in the curvilinear domain. This ranges from 0-1 with 0 at the stellar surface and 1 at the compactified infinity. | |
| void | ApplyTMOP (mfem::Mesh &mesh, const fourdst::config::Config< config::MeshConfig > &config) |
| void | OptimizeMesh (mfem::Mesh &mesh, const fourdst::config::Config< config::MeshConfig > &cfg) |
| std::unique_ptr< mfem::Mesh > | BuildSkeleton (const fourdst::config::Config< config::MeshConfig > &config) |
| Build the initial multi-block mesh topology for the star model. | |
| void | Finalize (mfem::Mesh &mesh, const fourdst::config::Config< config::MeshConfig > &config) |
| Finalize topology, validate orientation, and apply the configured refinement policy. | |
Topology construction and curvilinear mapping utilities.
| void stroid::topology::ApplyEquiangular | ( | mfem::Vector & | pos | ) |
Apply an equiangular (gnomonic) projection to a point on a cube.
| pos | Position vector updated in-place. |
| void stroid::topology::ApplyKelvin | ( | mfem::Vector & | pos, |
| const fourdst::config::Config< config::MeshConfig > & | config ) |
Apply Kelvin transform outside the stellar radius.
| pos | Position vector updated in-place. |
| config | Mesh configuration (uses r_star and r_infinity). |
| void stroid::topology::ApplySpheroidal | ( | mfem::Vector & | pos, |
| const fourdst::config::Config< config::MeshConfig > & | config ) |
Apply spheroidal flattening along the Z axis.
| pos | Position vector updated in-place. |
| config | Mesh configuration (uses flattening). |
| void stroid::topology::ApplyTMOP | ( | mfem::Mesh & | mesh, |
| const fourdst::config::Config< config::MeshConfig > & | config ) |
@breif Apply target matrix optimization to improve conditioning of the mesh
| std::unique_ptr< ScalarMeshField > stroid::topology::BuildExteriorCoordinate | ( | mfem::Mesh & | mesh, |
| mfem::Mesh & | reference_mesh, | ||
| const fourdst::config::Config< config::MeshConfig > & | config ) |
Build a scalar grid function representing the compactification coordinate for a mesh. This ranges from 0-1 with 0 at the stellar surface and 1 at the compactified infinity.
| mesh | Reference to the underlying serial MFEM mesh which has been promoted to high-order and projected into the curvilinear domain. |
| reference_mesh | reference to the underlying serial which has not been promoted to high-order or projected into the curvilinear domain. This is used to compute the compactification coordinate. |
| config | Config file |
| std::unique_ptr< mfem::Mesh > stroid::topology::BuildSkeleton | ( | const fourdst::config::Config< config::MeshConfig > & | config | ) |
Build the initial multi-block mesh topology for the star model.
| config | Mesh configuration (uses radii, domain flags, and core_mapping). The legacy spherified core uses one block; multi_block uses an inner Cartesian block and six core transition blocks. |
| double stroid::topology::ComputeExteriorCoordinate | ( | const mfem::Vector & | logical_position, |
| int | attribute, | ||
| const fourdst::config::Config< config::MeshConfig > & | config ) |
Compute the compactification coordinate for a point in the curvilinear domain. This ranges from 0-1 with 0 at the stellar surface and 1 at the compactified infinity.
| logical_position | Logical position of the point in the curvilinear domain. |
| attribute | Element attribute ID (used to determine the exterior coordinate). |
| config | Mesh configuration (uses radii and flattening). |
| void stroid::topology::Finalize | ( | mfem::Mesh & | mesh, |
| const fourdst::config::Config< config::MeshConfig > & | config ) |
Finalize topology, validate orientation, and apply the configured refinement policy.
| mesh | Mesh to finalize in-place. |
| config | Mesh configuration. Vacuum refinement overrides enable a balanced hierarchy with fine layers at both vacuum boundaries and a conforming stellar interface. Without overrides, refinement is uniform. |
| void stroid::topology::OptimizeMesh | ( | mfem::Mesh & | mesh, |
| const fourdst::config::Config< config::MeshConfig > & | cfg ) |
@breif Helper to call TMOP if the correct flags are set
| void stroid::topology::ProjectMesh | ( | mfem::Mesh & | mesh, |
| const fourdst::config::Config< config::MeshConfig > & | config ) |
Project high-order mesh nodes using the configured curvilinear mapping.
Requires nodes to be present (call PromoteToHighOrder first).
| mesh | Mesh to update in-place. |
| config | Mesh configuration (uses radii, flattening, and mapping parameters). |
| void stroid::topology::PromoteToHighOrder | ( | mfem::Mesh & | mesh, |
| const fourdst::config::Config< config::MeshConfig > & | config ) |
Promote a mesh to high-order by attaching an H1 nodal finite element space.
| mesh | Mesh to update in-place. |
| config | Mesh configuration (uses order). |
| void stroid::topology::TransformPoint | ( | mfem::Vector & | pos, |
| const fourdst::config::Config< config::MeshConfig > & | config, | ||
| int | attribute_id ) |
Map a point from the initial block topology to the curvilinear domain.
| pos | Position vector updated in-place. |
| config | Mesh configuration (uses radii, flattening, and core_mapping). The multi_block strategy requires the matching skeleton from BuildSkeleton; changing only the mapping on a legacy core element is not supported. |
| attribute_id | Element attribute ID (currently unused). |