stroid v0.6.0
Multi-block curvilinear mesh generation
Loading...
Searching...
No Matches
stroid::config::MeshConfig Struct Reference

Configuration parameters for stroid mesh generation. More...

#include <config.h>

Public Attributes

std::optional< int > refinement_levels = 4
 Stellar refinement depth, or uniform depth when vacuum overrides are absent.
 
std::optional< int > vacuum_refinement_levels = std::nullopt
 Minimum refinement depth in the vacuum interior; unset inherits refinement_levels.
 
std::optional< int > vacuum_outer_refinement_levels = std::nullopt
 Minimum refinement depth at the vacuum outer boundary; unset inherits refinement_levels.
 
std::optional< int > order = 3
 Polynomial order for high-order elements.
 
std::optional< bool > include_external_domain = true
 Whether to include an external domain extending to r_infinity.
 
std::optional< double > r_core = 0.25
 Radius of the stellar core region.
 
std::optional< double > r_star = 1.0
 Radius of the stellar surface.
 
std::optional< double > flattening = 0
 Flattening factor for spheroidal shaping (0 = spherical, >0 = oblate).
 
std::optional< double > r_infinity = 6.0
 Outer radius of the external domain when enabled.
 
std::optional< double > r_instability = 1e-14
 Radius inside which transformations are skipped to avoid singularities.
 
std::optional< double > core_steepness = 1.0
 Controls the smoothness/steepness of the core-to-envelope transition.
 
std::optional< size_t > continuity_order = 2
 Continuity order for the core-envelope transition (0 = discontinuous, 1 = C1, 2 = C2).
 
std::optional< size_t > surface_bdr_id = 1
 Boundary attribute id for stellar surface.
 
std::optional< size_t > inf_bdr_id = 2
 Boundary attribute id for infinity in kelvin mapping.
 
std::optional< size_t > core_id = 1
 Material attribute id for the core region.
 
std::optional< size_t > envelope_id = 2
 Material attribute id for the envelope region.
 
std::optional< size_t > vacuum_id = 3
 Material attribute id for the external domain (if enabled)
 
std::optional< OptimizationMethodsoptimization_methods = OptimizationMethods{true, true}
 
std::optional< std::string > core_mapping = "multi_block"
 Core mapping strategy: legacy "spherified" or conditioned "multi_block".
 

Detailed Description

Configuration parameters for stroid mesh generation.

These values are typically loaded via fourdst::config::Config<stroid::config::MeshConfig> from a TOML file. The README shows the expected TOML layout under the [main] table. Unspecified geometry keys use the defaults defined here. ResolveDefaults preserves the historical fallback for omitted mapping and optimization controls in TOML files.

Member Data Documentation

◆ continuity_order

std::optional<size_t> stroid::config::MeshConfig::continuity_order = 2

Continuity order for the core-envelope transition (0 = discontinuous, 1 = C1, 2 = C2).

toml

  • [main].continuity_order

◆ core_id

std::optional<size_t> stroid::config::MeshConfig::core_id = 1

Material attribute id for the core region.

toml

  • [main].core_id

◆ core_mapping

std::optional<std::string> stroid::config::MeshConfig::core_mapping = "multi_block"

Core mapping strategy: legacy "spherified" or conditioned "multi_block".

spherified generates a either two or three inscribed cubes then projects them into spheres. multi_block generates a multi-block topology with a single core block and six envelope blocks, then projects the core block into a sphere and the envelope blocks into a spheroid.

multi_block is strongly preferred for its ~1000x improved condition number, Spherified is only provided for legacy compatibility.

toml

  • [main].core_mapping

◆ core_steepness

std::optional<double> stroid::config::MeshConfig::core_steepness = 1.0

Controls the smoothness/steepness of the core-to-envelope transition.

toml

  • [main].core_steepness

◆ envelope_id

std::optional<size_t> stroid::config::MeshConfig::envelope_id = 2

Material attribute id for the envelope region.

toml

  • [main].envelope_id

◆ flattening

std::optional<double> stroid::config::MeshConfig::flattening = 0

Flattening factor for spheroidal shaping (0 = spherical, >0 = oblate).

toml

  • [main].flattening

◆ include_external_domain

std::optional<bool> stroid::config::MeshConfig::include_external_domain = true

Whether to include an external domain extending to r_infinity.

toml

  • [main].include_external_domain

◆ inf_bdr_id

std::optional<size_t> stroid::config::MeshConfig::inf_bdr_id = 2

Boundary attribute id for infinity in kelvin mapping.

toml

  • [main].inf_bdr_id

◆ optimization_methods

std::optional<OptimizationMethods> stroid::config::MeshConfig::optimization_methods = OptimizationMethods{true, true}

◆ order

std::optional<int> stroid::config::MeshConfig::order = 3

Polynomial order for high-order elements.

toml

  • [main].order

◆ r_core

std::optional<double> stroid::config::MeshConfig::r_core = 0.25

Radius of the stellar core region.

toml

  • [main].r_core

◆ r_infinity

std::optional<double> stroid::config::MeshConfig::r_infinity = 6.0

Outer radius of the external domain when enabled.

toml

  • [main].r_infinity

◆ r_instability

std::optional<double> stroid::config::MeshConfig::r_instability = 1e-14

Radius inside which transformations are skipped to avoid singularities.

toml

  • [main].r_instability

◆ r_star

std::optional<double> stroid::config::MeshConfig::r_star = 1.0

Radius of the stellar surface.

toml

  • [main].r_star

◆ refinement_levels

std::optional<int> stroid::config::MeshConfig::refinement_levels = 4

Stellar refinement depth, or uniform depth when vacuum overrides are absent.

toml

  • [main].refinement_levels

◆ surface_bdr_id

std::optional<size_t> stroid::config::MeshConfig::surface_bdr_id = 1

Boundary attribute id for stellar surface.

toml

  • [main].surface_bdr_id

◆ vacuum_id

std::optional<size_t> stroid::config::MeshConfig::vacuum_id = 3

Material attribute id for the external domain (if enabled)

toml

  • [main].vacuum_id

◆ vacuum_outer_refinement_levels

std::optional<int> stroid::config::MeshConfig::vacuum_outer_refinement_levels = std::nullopt

Minimum refinement depth at the vacuum outer boundary; unset inherits refinement_levels.

Boundary-adjacent cells are refined automatically, with grading toward the vacuum interior. Geometry uses the same polynomial order in every region.

toml

  • [main].vacuum_outer_refinement_levels

◆ vacuum_refinement_levels

std::optional<int> stroid::config::MeshConfig::vacuum_refinement_levels = std::nullopt

Minimum refinement depth in the vacuum interior; unset inherits refinement_levels.

Setting either vacuum override enables local isotropic refinement. Vacuum cells at the stellar surface match the stellar refinement, and automatic one-level grading can raise the interior depth above this minimum. Requires an external domain.

toml

  • [main].vacuum_refinement_levels

The documentation for this struct was generated from the following file: