|
DNDSR 0.1.0.dev1+gcd065ad
Distributed Numeric Data Structure for CFV
|
Per-zone boundary condition handler for Euler/Navier-Stokes solvers. More...
#include <EulerBC.hpp>
Public Types | |
| using | TU_R = Eigen::Vector< real, nVarsFixed > |
| Fixed-size (read-only) state vector type. | |
| using | TU = Eigen::VectorFMTSafe< real, nVarsFixed > |
| fmt-printable state vector type. | |
| using | TFlags = std::map< std::string, uint32_t > |
| Per-zone option flag map (key → integer flag). | |
| using | json = nlohmann::ordered_json |
Public Member Functions | |
| BoundaryHandler (int _nVars) | |
| Construct a BoundaryHandler and pre-populate default BC zones. | |
| std::vector< std::string > | GetAllNames () |
| Return the names of all registered BC zones, ordered by internal ID. | |
| Geom::t_index | size () |
| Return the number of registered BC zones (including default slots). | |
| void | RenewID2name () |
| Rebuild the reverse map (ID2name) from the current name2ID map. | |
| void | PushBCWithJson (const json &gS) |
| Push a new BC zone from a JSON sub-object (not yet implemented). | |
| Geom::t_index | GetIDFromName (const std::string &name) |
| Look up the internal BC index for a given zone name. | |
| auto | GetNameFormID (Geom::t_index id) |
| Look up the zone name for a given internal BC index. | |
| EulerBCType | GetTypeFromID (Geom::t_index id) |
| Retrieve the BC type for a given zone index. | |
| TU | GetValueFromID (Geom::t_index id) |
| Retrieve the BC state vector for a given zone index. | |
| Eigen::Vector< real, Eigen::Dynamic > | GetValueExtraFromID (Geom::t_index id) |
| Retrieve the extra BC value vector for a given zone index. | |
| uint32_t | GetFlagFromID (Geom::t_index id, const std::string &key) |
| Retrieve an option flag for a given zone index (strict). | |
| uint32_t | GetFlagFromIDSoft (Geom::t_index id, const std::string &key) |
| Retrieve an option flag for a given zone index (lenient). | |
Static Public Attributes | |
| static const int | nVarsFixed = getnVarsFixed(model) |
| Compile-time variable count (or Eigen::Dynamic). | |
Friends | |
| void | from_json (const json &j, BoundaryHandler< model > &bc) |
Deserialize an array of BC entries from JSON into bc. | |
| void | to_json (json &j, const BoundaryHandler< model > &bc) |
| Serialize user-defined BC zones (those beyond the default slots) to JSON. | |
Per-zone boundary condition handler for Euler/Navier-Stokes solvers.
Stores the BC type, state vector (value), option flags, and extra values for every boundary zone in the mesh. Zones are identified by name; the internal name2ID map translates mesh zone names to sequential BC indices.
Default zones (far-field, wall, special test-case walls, etc.) are pre-populated during construction from Geom::GetFaceName2IDDefault().
Supports JSON round-trip serialization via ADL from_json / to_json.
| model | The EulerModel tag that determines nVarsFixed and the conservative variable layout. |
Definition at line 211 of file EulerBC.hpp.
| using DNDS::Euler::BoundaryHandler< model >::json = nlohmann::ordered_json |
Definition at line 288 of file EulerBC.hpp.
| using DNDS::Euler::BoundaryHandler< model >::TFlags = std::map<std::string, uint32_t> |
Per-zone option flag map (key → integer flag).
Definition at line 219 of file EulerBC.hpp.
| using DNDS::Euler::BoundaryHandler< model >::TU = Eigen::VectorFMTSafe<real, nVarsFixed> |
fmt-printable state vector type.
Definition at line 218 of file EulerBC.hpp.
| using DNDS::Euler::BoundaryHandler< model >::TU_R = Eigen::Vector<real, nVarsFixed> |
Fixed-size (read-only) state vector type.
Definition at line 217 of file EulerBC.hpp.
|
inline |
Construct a BoundaryHandler and pre-populate default BC zones.
Allocates storage for Geom::BC_ID_DEFAULT_MAX zones with uninitialized values and populates the default zone names and types (far-field, wall, special test-case boundaries) from Geom::GetFaceName2IDDefault().
| _nVars | Number of conservative variables (must match model). |
Definition at line 239 of file EulerBC.hpp.
|
inline |
Return the names of all registered BC zones, ordered by internal ID.
Definition at line 265 of file EulerBC.hpp.
|
inline |
Retrieve an option flag for a given zone index (strict).
Aborts if key is not present in the zone's flag map.
| id | Internal BC index. |
| key | Flag key string (e.g. "frameOpt", "anchorOpt"). |
id is not an external BC face. Definition at line 555 of file EulerBC.hpp.
|
inline |
Retrieve an option flag for a given zone index (lenient).
Returns 0 instead of aborting when key is absent.
| id | Internal BC index. |
| key | Flag key string. |
id is not external. Definition at line 571 of file EulerBC.hpp.
|
inline |
Look up the internal BC index for a given zone name.
If periodic, the returned index is negative (by convention).
| name | Mesh zone name string. |
Definition at line 489 of file EulerBC.hpp.
|
inline |
Look up the zone name for a given internal BC index.
| id | Internal BC index. |
Definition at line 502 of file EulerBC.hpp.
|
inline |
Retrieve the BC type for a given zone index.
| id | Internal BC index. |
id is not an external BC face. Definition at line 514 of file EulerBC.hpp.
|
inline |
Retrieve the extra BC value vector for a given zone index.
| id | Internal BC index. |
Definition at line 539 of file EulerBC.hpp.
|
inline |
Retrieve the BC state vector for a given zone index.
| id | Internal BC index. |
id is not an external BC. Definition at line 527 of file EulerBC.hpp.
|
inline |
Push a new BC zone from a JSON sub-object (not yet implemented).
| gS | JSON object describing the boundary condition. |
Definition at line 292 of file EulerBC.hpp.
|
inline |
Rebuild the reverse map (ID2name) from the current name2ID map.
Definition at line 281 of file EulerBC.hpp.
|
inline |
Return the number of registered BC zones (including default slots).
Definition at line 275 of file EulerBC.hpp.
|
friend |
Deserialize an array of BC entries from JSON into bc.
Each JSON element must contain at least "type" and "name". Additional keys depend on the BC group (flow, wall, symmetry). Validates that the value vector dimension matches nVars and that zone names are unique.
| j | JSON array of BC objects. |
| bc | Target BoundaryHandler to populate. |
Definition at line 307 of file EulerBC.hpp.
|
friend |
Serialize user-defined BC zones (those beyond the default slots) to JSON.
Zones with index < Geom::BC_ID_DEFAULT_MAX are built-in defaults and are not emitted. The output is a JSON array suitable for round-trip with from_json().
| j | Output JSON array. |
| bc | Source BoundaryHandler to serialize. |
TODO: make bcId arbitrary not sequential?
Definition at line 428 of file EulerBC.hpp.
|
static |
Compile-time variable count (or Eigen::Dynamic).
Definition at line 216 of file EulerBC.hpp.