Main header file for a complex fluid dynamics solver. More...
#include "petscvec.h"#include "petscdmda.h"#include "petscksp.h"#include "petscsnes.h"#include "petscdmswarm.h"#include <stdio.h>#include <stdlib.h>#include <string.h>#include <unistd.h>Go to the source code of this file.
Data Structures | |
| struct | Cmpnts |
| A 3D point or vector with PetscScalar components. More... | |
| struct | Cmpnts2 |
| A 2D point or vector with PetscScalar components. More... | |
| struct | SymTensor |
| A symmetric second-order tensor stored by its six independent components. More... | |
| struct | Cpt2D |
| A 2D vector of PETSc real numbers (for geometry/coordinates). More... | |
| struct | BCS |
| Boundary condition data used by the BC pipeline and ghost cell machinery. More... | |
| struct | BoundingBox |
| Defines a 3D axis-aligned bounding box. More... | |
| struct | Cell |
| Defines the vertices of a single hexahedral grid cell. More... | |
| struct | FacePlane |
| One cell face as the particle search tests against it: a plane through the vertex mean. More... | |
| struct | CellFacePlanes |
The six face planes of one hexahedron, indexed by Face, and its characteristic size. More... | |
| struct | Particle |
| Defines a particle's core properties for Lagrangian tracking. More... | |
| struct | RankNeighbors |
| The MPI ranks of the subdomains around this one, across faces, edges and corners. More... | |
| struct | RankCellInfo |
| A lean struct to hold the global cell ownership range for a single MPI rank. More... | |
| struct | MigrationInfo |
| Information needed to migrate a single particle between MPI ranks. More... | |
| struct | VerificationFieldConfig |
| A verification-only prescribed field: an expression in physical x, y, z and t, enabled when set. More... | |
| struct | SearchMetricsState |
| Aggregated per-timestep search instrumentation counters. More... | |
| struct | BC_Param_s |
| A node in a linked list for storing key-value parameters from the bcs.dat file. More... | |
| struct | BCContext |
| Provides execution context for a boundary condition handler. More... | |
| struct | BoundaryCondition |
| The "virtual table" struct for a boundary condition handler object. More... | |
| struct | BoundaryFaceElements |
| The elements of one boundary face that this rank owns: one per interior cell beside the face, addressed by the face's normal axis, its two tangential axes and their owned index ranges. More... | |
| struct | BoundaryFaceConfig |
| Holds the complete configuration for one of the six boundary faces. More... | |
| struct | IBMInfo |
| Holds interpolation and distance information for a single IBM point. More... | |
| struct | IBMNodes |
| Represents a collection of nodes forming a surface for the IBM. More... | |
| struct | IBMVNodes |
| Represents a collection of nodes forming a volume for the IBM. More... | |
| struct | node |
| A generic C-style linked list node for integers. More... | |
| struct | list |
| Head of a generic C-style linked list. More... | |
| struct | list_node |
| A generic C-style linked list node for indices. More... | |
| struct | IBMListNode |
| A linked list node containing IBM interpolation info. More... | |
| struct | IBMList |
| Head of a linked list for IBM data. More... | |
| struct | SurfElmtInfo |
| Information about a surface element for FSI calculations. More... | |
| struct | FSInfo |
| Holds all data related to the state and motion of a body in FSI. More... | |
| struct | Cstart |
| Defines prescribed body motion using splines. More... | |
| struct | LESConfig |
| Every user-selectable parameter of the LES closure. More... | |
| struct | LESDiagnosticsState |
| Pre-clipping volume statistics captured by one dynamic-coefficient update. More... | |
| struct | WallModelDiagnosticsState |
| Near-wall statistics captured by one wall-model pass. More... | |
| struct | MGCtx |
| Context for Multigrid operations. More... | |
| struct | UserMG |
| User-level context for managing the entire multigrid hierarchy. More... | |
| struct | PostProcessParams |
| Holds all configuration parameters for a post-processing run. More... | |
| struct | VTKFieldInfo |
| Stores all necessary information for a single data array in a VTK file. More... | |
| struct | VTKMetaData |
| One VTK file being assembled collectively. More... | |
| struct | ScalingCtx |
| struct | SimCtx |
| The master context for the entire simulation. More... | |
| struct | UserCtx |
| User-defined context containing data specific to a single computational grid level. More... | |
Macros | |
| #define | PICURV_RELEASE_VERSION "0.0.0" |
| #define | PICURV_BUILD_VERSION PICURV_RELEASE_VERSION |
| #define | PICURV_GIT_COMMIT "unknown" |
| #define | PICURV_BUILD_DIRTY "unknown" |
| #define | PICURV_ALWAYS_INLINE inline |
| Forces inlining of a per-cell or per-face kernel whose size defeats the compiler's inlining heuristics, so a call with constant arguments compiles to specialised straight-line code. | |
| #define | PICURV_MAX_TRACED_PARTICLES 64 |
Most particle IDs one run can trace (-picurv_trace_particles). | |
| #define | PICURV_SNAPSHOT_ROWS_PER_RANK 32 |
Most rows one rank contributes to a particle console snapshot (io.particle_log_interval samples IDs). | |
| #define | PICURV_RUN_CSV_CAPACITY 256 |
| Most distinct CSV records one run opens through PicurvOpenRunCsv(): about twenty, plus a few per block. | |
| #define | COEF_TIME_ACCURACY 1.5 |
| Coefficient controlling the temporal accuracy scheme (e.g., 1.5 for 2nd Order Backward Difference). | |
| #define | RANK_NEIGHBOR_INDEX(di, dj, dk) (9 * ((dk) + 1) + 3 * ((dj) + 1) + ((di) + 1)) |
| Index in RankNeighbors::rank of the neighbour offset (di, dj, dk), each -1, 0 or 1. | |
| #define | MAX_PIPELINE_LENGTH 1024 |
| #define | MAX_FIELD_LIST_LENGTH 1024 |
| #define | MAX_FILENAME_LENGTH 256 |
| #define | MAX_POINT_DATA_FIELDS 20 |
| Defines the maximum number of data fields for VTK point data. | |
| #define | MAX_VTK_FIELD_NAME_LENGTH 64 |
| Maximum length for VTK field names. | |
| #define | mom_dt_rk4_residual_norm_noise_allowance_factor mom_dt_jameson_residual_norm_noise_allowance_factor |
Typedefs | |
| typedef struct SimCtx | SimCtx |
| The master context for the entire simulation. | |
| typedef struct UserCtx | UserCtx |
| User-defined context containing data specific to a single computational grid level. | |
| typedef struct BC_Param_s | BC_Param |
| typedef struct BoundaryCondition | BoundaryCondition |
| The "virtual table" struct for a boundary condition handler object. | |
| typedef struct BoundaryFaceConfig | BoundaryFaceConfig |
| Holds the complete configuration for one of the six boundary faces. | |
| typedef struct IBMNodes | IBMNodes |
| Represents a collection of nodes forming a surface for the IBM. | |
| typedef struct IBMVNodes | IBMVNodes |
| Represents a collection of nodes forming a volume for the IBM. | |
| typedef struct FSInfo | FSInfo |
| Holds all data related to the state and motion of a body in FSI. | |
| typedef struct UserMG | UserMG |
| User-level context for managing the entire multigrid hierarchy. | |
| typedef struct BoundingBox | BoundingBox |
| Defines a 3D axis-aligned bounding box. | |
| typedef struct Cell | Cell |
| Defines the vertices of a single hexahedral grid cell. | |
| typedef struct Particle | Particle |
| Defines a particle's core properties for Lagrangian tracking. | |
| typedef struct RankNeighbors | RankNeighbors |
| The MPI ranks of the subdomains around this one, across faces, edges and corners. | |
| typedef struct RankCellInfo | RankCellInfo |
| A lean struct to hold the global cell ownership range for a single MPI rank. | |
| typedef struct MigrationInfo | MigrationInfo |
| Information needed to migrate a single particle between MPI ranks. | |
| typedef struct Cstart | Cstart |
| Defines prescribed body motion using splines. | |
| typedef struct MGCtx | MGCtx |
| Context for Multigrid operations. | |
| typedef struct PostProcessParams | PostProcessParams |
| Holds all configuration parameters for a post-processing run. | |
| typedef struct VTKFieldInfo | VTKFieldInfo |
| Stores all necessary information for a single data array in a VTK file. | |
| typedef struct VTKMetaData | VTKMetaData |
| One VTK file being assembled collectively. | |
| typedef struct IBMInfo | IBMInfo |
| Holds interpolation and distance information for a single IBM point. | |
| typedef struct SurfElmtInfo | SurfElmtInfo |
| Information about a surface element for FSI calculations. | |
| typedef struct ScalingCtx | ScalingCtx |
| typedef struct Cmpnts | Cmpnts |
| A 3D point or vector with PetscScalar components. | |
| typedef struct Cmpnts2 | Cmpnts2 |
| A 2D point or vector with PetscScalar components. | |
| typedef struct SymTensor | SymTensor |
| A symmetric second-order tensor stored by its six independent components. | |
| typedef struct Cpt2D | Cpt2D |
| A 2D vector of PETSc real numbers (for geometry/coordinates). | |
| typedef struct BCS | BCS |
| Boundary condition data used by the BC pipeline and ghost cell machinery. | |
| typedef struct FacePlane | FacePlane |
| One cell face as the particle search tests against it: a plane through the vertex mean. | |
| typedef struct CellFacePlanes | CellFacePlanes |
The six face planes of one hexahedron, indexed by Face, and its characteristic size. | |
| typedef struct VerificationFieldConfig | VerificationFieldConfig |
| A verification-only prescribed field: an expression in physical x, y, z and t, enabled when set. | |
| typedef struct SearchMetricsState | SearchMetricsState |
| Aggregated per-timestep search instrumentation counters. | |
| typedef struct BCContext | BCContext |
| Provides execution context for a boundary condition handler. | |
| typedef struct BoundaryFaceElements | BoundaryFaceElements |
| The elements of one boundary face that this rank owns: one per interior cell beside the face, addressed by the face's normal axis, its two tangential axes and their owned index ranges. | |
| typedef struct node | node |
| A generic C-style linked list node for integers. | |
| typedef struct list | List |
| Head of a generic C-style linked list. | |
| typedef struct list_node | Node_List |
| A generic C-style linked list node for indices. | |
| typedef struct IBMListNode | IBMListNode |
| A linked list node containing IBM interpolation info. | |
| typedef struct IBMList | IBMList |
| Head of a linked list for IBM data. | |
| typedef struct LESConfig | LESConfig |
| Every user-selectable parameter of the LES closure. | |
| typedef struct LESDiagnosticsState | LESDiagnosticsState |
| Pre-clipping volume statistics captured by one dynamic-coefficient update. | |
| typedef struct WallModelDiagnosticsState | WallModelDiagnosticsState |
| Near-wall statistics captured by one wall-model pass. | |
Functions | |
| static PetscBool | ParticlesEnabled (const SimCtx *simCtx) |
| Whether the run carries particles: a seeded or restored population, or inlets that inject them. | |
Main header file for a complex fluid dynamics solver.
This file defines the core data structures, global variables, and function prototypes for a CFD application. It combines features for a curvilinear, multi-block, immersed boundary (IBM) solver with fluid-structure interaction (FSI), a modern particle tracking system, a modular boundary condition framework, and post-processing utilities. It heavily utilizes the PETSc library.
*** REVISION NOTE *** This version introduces a central SimulationContext struct to encapsulate all simulation-wide configuration, replacing the legacy system of global variables. The UserCtx struct has been refactored to hold only data specific to a single grid level and now contains a back-pointer to the SimulationContext. All struct definitions now follow the typedef struct Name { ... } Name; convention.
Definition in file variables.h.
| struct Cmpnts |
A 3D point or vector with PetscScalar components.
Definition at line 144 of file variables.h.
| Data Fields | ||
|---|---|---|
| PetscScalar | x | |
| PetscScalar | y | |
| PetscScalar | z | |
| struct Cmpnts2 |
A 2D point or vector with PetscScalar components.
Definition at line 149 of file variables.h.
| Data Fields | ||
|---|---|---|
| PetscScalar | x | |
| PetscScalar | y | |
| struct SymTensor |
A symmetric second-order tensor stored by its six independent components.
The three missing components are recovered by symmetry: yx == xy, zx == xz, and zy == yz. Contractions must therefore double the off-diagonal terms, which is what SymTensorContract() exists to do in one place instead of at every call site. Used for strain rates and for the Germano identity's Leonard and model tensors.
Definition at line 161 of file variables.h.
| Data Fields | ||
|---|---|---|
| PetscReal | xx | |
| PetscReal | xy | |
| PetscReal | xz | |
| PetscReal | yy | |
| PetscReal | yz | |
| PetscReal | zz | |
| struct Cpt2D |
A 2D vector of PETSc real numbers (for geometry/coordinates).
Definition at line 166 of file variables.h.
| Data Fields | ||
|---|---|---|
| PetscReal | x | |
| PetscReal | y | |
| struct BCS |
Boundary condition data used by the BC pipeline and ghost cell machinery.
Definition at line 171 of file variables.h.
| struct BoundingBox |
Defines a 3D axis-aligned bounding box.
Definition at line 212 of file variables.h.
| Data Fields | ||
|---|---|---|
| Cmpnts | min_coords | Minimum x, y, z coordinates of the bounding box. |
| Cmpnts | max_coords | Maximum x, y, z coordinates of the bounding box. |
| struct Cell |
Defines the vertices of a single hexahedral grid cell.
Definition at line 218 of file variables.h.
| Data Fields | ||
|---|---|---|
| Cmpnts | vertices[8] | Coordinates of the eight vertices of the cell. |
| struct FacePlane |
One cell face as the particle search tests against it: a plane through the vertex mean.
Definition at line 223 of file variables.h.
| Data Fields | ||
|---|---|---|
| Cmpnts | normal | Unit outward normal of (v2 - v1) x (v4 - v1); unnormalised when degenerate. |
| Cmpnts | centroid | Mean of the face's four vertices. |
| struct CellFacePlanes |
The six face planes of one hexahedron, indexed by Face, and its characteristic size.
Definition at line 229 of file variables.h.
| Data Fields | ||
|---|---|---|
| FacePlane | face[NUM_FACES] | Face planes in LEFT..BACK order. |
| PetscInt | degenerate | Bit f set when face f's normal magnitude is below 1e-12. |
| PetscReal | size | Mean edge length (GetCellCharacteristicSize()); 0 where unused. |
| struct Particle |
Defines a particle's core properties for Lagrangian tracking.
Definition at line 236 of file variables.h.
| Data Fields | ||
|---|---|---|
| PetscInt64 | PID | |
| PetscInt | cell[3] | |
| Cmpnts | loc | |
| Cmpnts | vel | |
| Cmpnts | weights | |
| ParticleLocationStatus | location_status | |
| PetscMPIInt | destination_rank | |
| PetscReal | diffusivity | |
| Cmpnts | diffusivitygradient | |
| PetscReal | psi | |
| struct RankNeighbors |
The MPI ranks of the subdomains around this one, across faces, edges and corners.
In DMDAGetNeighbors() order, indexed by RANK_NEIGHBOR_INDEX(); entry 13 is this rank. A neighbour across a periodic axis is the wrapped rank (this rank when the axis has one rank); one beyond a non-periodic boundary is MPI_PROC_NULL.
Definition at line 258 of file variables.h.
| Data Fields | ||
|---|---|---|
| PetscMPIInt | rank[27] | |
| struct RankCellInfo |
A lean struct to hold the global cell ownership range for a single MPI rank.
Definition at line 263 of file variables.h.
| Data Fields | ||
|---|---|---|
| PetscInt | xs_cell | |
| PetscInt | ys_cell | |
| PetscInt | zs_cell | |
| PetscInt | xm_cell | |
| PetscInt | ym_cell | |
| PetscInt | zm_cell | |
| struct MigrationInfo |
Information needed to migrate a single particle between MPI ranks.
Definition at line 269 of file variables.h.
| Data Fields | ||
|---|---|---|
| PetscInt | local_index | |
| PetscInt | target_rank | |
| struct VerificationFieldConfig |
A verification-only prescribed field: an expression in physical x, y, z and t, enabled when set.
Definition at line 275 of file variables.h.
| Data Fields | ||
|---|---|---|
| struct PicurvExpression * | expression | Compiled expression, or NULL when the field is not configured. |
| struct SearchMetricsState |
Aggregated per-timestep search instrumentation counters.
Definition at line 280 of file variables.h.
| struct BC_Param_s |
A node in a linked list for storing key-value parameters from the bcs.dat file.
Definition at line 372 of file variables.h.
| Data Fields | ||
|---|---|---|
| char * | key | |
| char * | value | |
| struct BC_Param_s * | next | |
| struct BCContext |
Provides execution context for a boundary condition handler.
Definition at line 379 of file variables.h.
| Data Fields | ||
|---|---|---|
| UserCtx * | user | |
| BCFace | face_id | |
| const PetscReal * | global_inflow_sum | |
| const PetscReal * | global_farfield_inflow_sum | |
| const PetscReal * | global_farfield_outflow_sum | |
| const PetscReal * | global_outflow_sum | |
| struct BoundaryFaceElements |
The elements of one boundary face that this rank owns: one per interior cell beside the face, addressed by the face's normal axis, its two tangential axes and their owned index ranges.
Filled by GetBoundaryFaceElements().
Element (p, q) sits at index layer along normal, lo[0] + p along a and lo[1] + q along b. layer indexes the face's own metric and flux: 0 on a negative face, where the dummy cell is that same index and the cell behind it is 1; m - 2 on a positive face, where the cell behind it is that index and the dummy cell is m - 1.
Definition at line 415 of file variables.h.
| struct BoundaryFaceConfig |
Holds the complete configuration for one of the six boundary faces.
Definition at line 424 of file variables.h.
| Data Fields | ||
|---|---|---|
| BCFace | face_id | |
| BCType | mathematical_type | |
| BCHandlerType | handler_type | |
| ParticleBoundaryPolicy | particle_policy | What a particle crossing this face becomes (BC param particle_policy). |
| BC_Param * | params | |
| BoundaryCondition * | handler | |
| struct IBMInfo |
Holds interpolation and distance information for a single IBM point.
Definition at line 438 of file variables.h.
| Data Fields | ||
|---|---|---|
| PetscInt | i1 | |
| PetscInt | j1 | |
| PetscInt | k1 | |
| PetscInt | i2 | |
| PetscInt | j2 | |
| PetscInt | k2 | |
| PetscInt | i3 | |
| PetscInt | j3 | |
| PetscInt | k3 | |
| PetscReal | cr1 | |
| PetscReal | cr2 | |
| PetscReal | cr3 | |
| PetscReal | d_i | |
| PetscInt | imode | |
| PetscInt | ni | |
| PetscInt | nj | |
| PetscInt | nk | |
| PetscReal | d_s | |
| Cmpnts | pmin | |
| PetscInt | cell | |
| PetscReal | cs1 | |
| PetscReal | cs2 | |
| PetscReal | cs3 | |
| PetscInt | i11 | |
| PetscInt | j11 | |
| PetscInt | k11 | |
| PetscInt | i22 | |
| PetscInt | j22 | |
| PetscInt | k22 | |
| PetscInt | i33 | |
| PetscInt | j33 | |
| PetscInt | k33 | |
| PetscReal | cr11 | |
| PetscReal | cr22 | |
| PetscReal | cr33 | |
| PetscReal | d_ii | |
| PetscInt | iimode | |
| PetscReal | cs11 | |
| PetscReal | cs22 | |
| PetscReal | cs33 | |
| PetscInt | ii1 | |
| PetscInt | jj1 | |
| PetscInt | kk1 | |
| PetscInt | ii2 | |
| PetscInt | jj2 | |
| PetscInt | kk2 | |
| PetscInt | ii3 | |
| PetscInt | jj3 | |
| PetscInt | kk3 | |
| PetscReal | ct1 | |
| PetscReal | ct2 | |
| PetscReal | ct3 | |
| PetscInt | smode | |
| PetscInt | ii11 | |
| PetscInt | jj11 | |
| PetscInt | kk11 | |
| PetscInt | ii22 | |
| PetscInt | jj22 | |
| PetscInt | kk22 | |
| PetscInt | ii33 | |
| PetscInt | jj33 | |
| PetscInt | kk33 | |
| PetscReal | ct11 | |
| PetscReal | ct22 | |
| PetscReal | ct33 | |
| PetscReal | d_ss | |
| PetscInt | ssmode | |
| struct IBMNodes |
Represents a collection of nodes forming a surface for the IBM.
Definition at line 463 of file variables.h.
| Data Fields | ||
|---|---|---|
| PetscInt | nbnumber | |
| PetscInt | n_v | |
| PetscInt | n_elmt | |
| PetscInt * | nv1 | |
| PetscInt * | nv2 | |
| PetscInt * | nv3 | |
| PetscReal * | nf_x | |
| PetscReal * | nf_y | |
| PetscReal * | nf_z | |
| PetscReal * | x_bp | |
| PetscReal * | y_bp | |
| PetscReal * | z_bp | |
| PetscReal * | x_bp0 | |
| PetscReal * | y_bp0 | |
| PetscReal * | z_bp0 | |
| PetscReal * | x_bp_o | |
| PetscReal * | y_bp_o | |
| PetscReal * | z_bp_o | |
| PetscReal * | cf | |
| PetscReal * | cfsum | |
| PetscReal * | CCp | |
| PetscReal | x_bp_in[101][3270] | |
| PetscReal | y_bp_in[101][3270] | |
| PetscReal | z_bp_in[101][3270] | |
| Cmpnts * | u | |
| Cmpnts * | uold | |
| Cmpnts * | urm1 | |
| PetscReal * | dA | |
| PetscReal * | nt_x | |
| PetscReal * | nt_y | |
| PetscReal * | nt_z | |
| PetscReal * | ns_x | |
| PetscReal * | ns_y | |
| PetscReal * | ns_z | |
| PetscReal * | cent_x | |
| PetscReal * | cent_y | |
| PetscReal * | cent_z | |
| PetscReal * | pres | |
| PetscReal * | tau0 | |
| PetscReal * | tauN | |
| PetscReal * | Bvel_u | |
| PetscReal * | Bvel_v | |
| PetscReal * | Bvel_w | |
| PetscReal | x_min | |
| PetscReal | x_max | |
| PetscReal | y_min | |
| PetscReal | y_max | |
| PetscReal | z_min | |
| PetscReal | z_max | |
| Cmpnts * | qvec | |
| PetscReal * | radvec | |
| struct IBMVNodes |
Represents a collection of nodes forming a volume for the IBM.
Definition at line 483 of file variables.h.
| Data Fields | ||
|---|---|---|
| PetscInt | nbnumber | |
| PetscInt | n_v | |
| PetscInt | n_elmt | |
| PetscInt * | nv1 | |
| PetscInt * | nv2 | |
| PetscInt * | nv3 | |
| PetscInt * | nv4 | |
| PetscReal * | x_bp | |
| PetscReal * | y_bp | |
| PetscReal * | z_bp | |
| PetscReal * | x_bp0 | |
| PetscReal * | y_bp0 | |
| PetscReal * | z_bp0 | |
| PetscReal * | x_bp_o | |
| PetscReal * | y_bp_o | |
| PetscReal * | z_bp_o | |
| Cmpnts * | u | |
| Cmpnts * | uold | |
| Cmpnts * | urm1 | |
| PetscReal | V | |
| PetscReal * | dV0 | |
| PetscReal * | cent_x | |
| PetscReal * | cent_y | |
| PetscReal * | cent_z | |
| PetscReal | x_c | |
| PetscReal | y_c | |
| PetscReal | z_c | |
| PetscReal | J[3][3] | |
| PetscReal | I_inv[3][3] | |
| struct node |
A generic C-style linked list node for integers.
Definition at line 498 of file variables.h.
| Data Fields | ||
|---|---|---|
| PetscInt | Node | |
| struct node * | next | |
| struct list |
Head of a generic C-style linked list.
Definition at line 504 of file variables.h.
| Data Fields | ||
|---|---|---|
| node * | head | |
| struct list_node |
A generic C-style linked list node for indices.
Definition at line 509 of file variables.h.
| Data Fields | ||
|---|---|---|
| PetscInt | index | |
| struct list_node * | next | |
| struct IBMListNode |
A linked list node containing IBM interpolation info.
Definition at line 515 of file variables.h.
| Data Fields | ||
|---|---|---|
| IBMInfo | ibm_intp | |
| struct IBMListNode * | next | |
| struct IBMList |
Head of a linked list for IBM data.
Definition at line 521 of file variables.h.
| Data Fields | ||
|---|---|---|
| IBMListNode * | head | |
| struct SurfElmtInfo |
Information about a surface element for FSI calculations.
Definition at line 526 of file variables.h.
| struct FSInfo |
Holds all data related to the state and motion of a body in FSI.
Definition at line 536 of file variables.h.
| Data Fields | ||
|---|---|---|
| PetscReal | S_new[6] | |
| PetscReal | S_old[6] | |
| PetscReal | S_real[6] | |
| PetscReal | S_realm1[6] | |
| PetscReal | S_ang_n[6] | |
| PetscReal | S_ang_o[6] | |
| PetscReal | S_ang_r[6] | |
| PetscReal | S_ang_rm1[6] | |
| PetscReal | red_vel | |
| PetscReal | damp | |
| PetscReal | mu_s | |
| PetscReal | F_x | |
| PetscReal | F_y | |
| PetscReal | F_z | |
| PetscReal | A_tot | |
| PetscReal | F_x_old | |
| PetscReal | F_y_old | |
| PetscReal | F_z_old | |
| PetscReal | F_x_real | |
| PetscReal | F_y_real | |
| PetscReal | F_z_real | |
| PetscReal | M_x | |
| PetscReal | M_y | |
| PetscReal | M_z | |
| PetscReal | M_x_old | |
| PetscReal | M_y_old | |
| PetscReal | M_z_old | |
| PetscReal | M_x_real | |
| PetscReal | M_y_real | |
| PetscReal | M_z_real | |
| PetscReal | M_x_rm2 | |
| PetscReal | M_y_rm2 | |
| PetscReal | M_z_rm2 | |
| PetscReal | M_x_rm3 | |
| PetscReal | M_y_rm3 | |
| PetscReal | M_z_rm3 | |
| PetscReal | x_c | |
| PetscReal | y_c | |
| PetscReal | z_c | |
| PetscReal | a_c[3] | |
| PetscReal | Mdpdn_x | |
| PetscReal | Mdpdn_y | |
| PetscReal | Mdpdn_z | |
| PetscReal | Mdpdn_x_old | |
| PetscReal | Mdpdn_y_old | |
| PetscReal | Mdpdn_z_old | |
| PetscReal | Power | |
| PetscReal | clone | |
| PetscInt | pbc[3] | |
| PetscReal | I_inv[3][3] | |
| PetscReal | L_n[3] | |
| PetscReal | L_o[3] | |
| PetscReal | L_r[3] | |
| PetscReal | alpha[3] | |
| PetscReal | acc[3] | |
| PetscReal | R[3][3] | |
| PetscReal | q[4] | |
| PetscReal | q_r[4] | |
| PetscReal | dS[6] | |
| PetscReal | dS_o[6] | |
| PetscReal | atk | |
| PetscReal | atk_o | |
| SurfElmtInfo * | elmtinfo | |
| IBMInfo * | fsi_intp | |
| PetscReal | Max_xbc | |
| PetscReal | Min_xbc | |
| PetscReal | Max_ybc | |
| PetscReal | Min_ybc | |
| PetscReal | Max_zbc | |
| PetscReal | Min_zbc | |
| PetscInt | CV_ys | |
| PetscInt | CV_ye | |
| PetscInt | CV_zs | |
| PetscInt | CV_ze | |
| struct Cstart |
Defines prescribed body motion using splines.
Definition at line 566 of file variables.h.
| struct LESConfig |
Every user-selectable parameter of the LES closure.
Resolved once from the generated control file by CreateSimulationContext and read-only thereafter. The model selector itself stays on SimCtx::les, because dispatch and field availability are decided from it throughout the runtime.
Definition at line 664 of file variables.h.
| Data Fields | ||
|---|---|---|
| PetscInt | dynamic_frequency | Recompute the dynamic coefficient every N steps. |
| PetscReal | constant_cs | Fixed Cs for CONSTANT_SMAGORINSKY; unused by the dynamic model. |
| PetscReal | vreman_coefficient | Model constant c for VREMAN (Vreman 2004: 2.5 Cs^2). |
| PetscReal | wale_coefficient | Model constant C_w for WALE (Nicoud & Ducros 1999). |
| LESFilterWidthModel | filter_width_model | How the grid filter width Delta is derived per cell. |
| LESTestFilterKernel | test_filter_kernel | Discrete test-filter stencil. |
| PetscReal | test_filter_width_ratio | Test-to-grid ratio per filtered direction; alpha is its square for the box, ratio^(4/3) for Simpson. |
| LESAveragingMode | averaging_mode | Averaging set for the Germano contractions. |
| PetscBool | averaging_direction[3] | Averaged-over logical directions (xi, eta, zeta). |
| LESClipMode | clip_mode | Admissible range for the coefficient. |
| PetscReal | max_cs | Ceiling on Cs under LES_CLIP_CLAMP. |
| PetscReal | min_viscosity_ratio | Enforce nu + nu_t >= ratio * nu. |
| PetscReal | yoshizawa_ci | Yoshizawa constant for the reported SGS kinetic energy. |
| PetscBool | diagnostics_enabled | Append per-step coefficient statistics to the run log directory. |
| PetscInt | diagnostics_cadence | Steps between diagnostic rows. |
| struct LESDiagnosticsState |
Pre-clipping volume statistics captured by one dynamic-coefficient update.
The backscattering and limited fractions describe the coefficient field as the Germano contraction produced it. Clipping overwrites that state, and no stored field preserves it, so it is recorded here on the way past and consumed by LogLESDiagnostics.
Definition at line 689 of file variables.h.
| struct WallModelDiagnosticsState |
Near-wall statistics captured by one wall-model pass.
The wall model evaluates the wall distance and the friction velocity together at each corrected cell. y+ is the number that says whether the model is being asked to work in the range it is valid for, and it cannot be recovered afterwards from the corrected velocity field, which no longer carries the law that produced it. Recomputing the wall distance in the diagnostic would duplicate geometry the correction already has in hand, so it is accumulated on the way past and consumed by LogWallModelDiagnostics.
Definition at line 707 of file variables.h.
| struct MGCtx |
Context for Multigrid operations.
Definition at line 767 of file variables.h.
| Data Fields | ||
|---|---|---|
| UserCtx * | user | |
| PetscInt | thislevel | |
| DM | packer | |
| struct UserMG |
User-level context for managing the entire multigrid hierarchy.
Definition at line 774 of file variables.h.
| Data Fields | ||
|---|---|---|
| PetscInt | mglevels | |
| PetscInt | thislevel | |
| PetscBool | isc | |
| PetscBool | jsc | |
| PetscBool | ksc | |
| MGCtx * | mgctx | |
| DM | packer | |
| SNES | snespacker | |
| struct PostProcessParams |
Holds all configuration parameters for a post-processing run.
This is an enhanced version combining command-line and file-based settings.
Definition at line 793 of file variables.h.
| Data Fields | ||
|---|---|---|
| char | source_dir[PETSC_MAX_PATH_LEN] | |
| PetscInt | startTime | |
| PetscInt | endTime | |
| PetscInt | timeStep | |
| char | step_list_file[PETSC_MAX_PATH_LEN] | File listing the exact steps to process, one per line; empty uses the time controls. |
| PetscBool | outputParticles | |
| char | process_pipeline[1024] | |
| char | output_fields_instantaneous[1024] | |
| char | output_prefix[256] | |
| char | particle_pipeline[1024] | |
| char | particle_fields[1024] | |
| char | particle_output_prefix[256] | |
| PetscInt | particle_output_freq | |
| char | statistics_pipeline[1024] |
e.g. "ComputeMSD" |
| char | statistics_output_prefix[256] |
basename for CSV output, e.g. "Stats" |
| char | field_statistics_windows[1024] | Comma-separated window names to derive; empty disables the pipeline. |
| char | field_statistics_outputs[1024] | Comma-separated outputs: mean, reynolds_stress, rms, tke, flux, point_variance. |
| char | field_statistics_formats[1024] | Comma-separated formats: vtk for derived fields, csv for the convergence history. |
| char | field_statistics_output_prefix[PETSC_MAX_PATH_LEN] | Analysis prefix for CSV summaries; VTK continues to use output_prefix. |
| PetscBool | dimensionalize | Whether derived output leaves non-dimensional form, from global_operations.dimensionalize. |
| PetscInt | field_statistics_source_step | Committed step supplying the state; negative means the step being processed. |
| PetscBool | field_statistics_homogeneous[3] | Directions profiles merge over, in (i, j, k) order; none selected writes no profile. |
| PetscInt | field_statistics_ensemble_count | Recipe-defined single-instant windows, derived at every processed step. |
| struct PicurvWindow * | field_statistics_ensembles | |
| PetscBool * | field_statistics_ensemble_from_particles | Whether each ensemble samples the particles in a cell rather than the cell's state. |
| char | eulerianExt[8] | |
| char | particleExt[8] | |
| PetscInt | reference[3] | |
| PetscInt | da_procs[3] | Postprocessor MPI decomposition (i, j, k) from the recipe; PETSC_DECIDE where unset. |
| struct VTKFieldInfo |
Stores all necessary information for a single data array in a VTK file.
Definition at line 852 of file variables.h.
| Data Fields | ||
|---|---|---|
| char | name[64] | |
| PetscInt | num_components | |
| PetscScalar * | data | |
| struct VTKMetaData |
One VTK file being assembled collectively.
mx/my/mz and npoints describe the whole file and agree on every rank. The arrays hold only this rank's points: for a structured grid the box of local_size points starting at local_start (i fastest), for polydata the local_size[0] consecutive output points starting at local_start[0].
Definition at line 871 of file variables.h.
| Data Fields | ||
|---|---|---|
| VTKFileType | fileType | |
| PetscInt | mx | |
| PetscInt | my | |
| PetscInt | mz | |
| PetscInt | npoints | |
| PetscInt | local_start[3] | |
| PetscInt | local_size[3] | |
| PetscScalar * | coords | |
| VTKFieldInfo | point_data_fields[20] | |
| PetscInt | num_point_data_fields | |
| PetscInt * | connectivity | |
| PetscInt * | offsets | |
| struct ScalingCtx |
Definition at line 897 of file variables.h.
| Data Fields | ||
|---|---|---|
| PetscReal | L_ref | |
| PetscReal | U_ref | |
| PetscReal | rho_ref | |
| PetscReal | P_ref | |
| struct SimCtx |
The master context for the entire simulation.
This struct encapsulates all global configuration flags, physical parameters, simulation control settings, and top-level data objects. It replaces the numerous global variables from the legacy codebase, providing a single, explicit source of truth for the simulation's setup.
Definition at line 916 of file variables.h.
| Data Fields | ||
|---|---|---|
| PetscMPIInt | rank | |
| PetscMPIInt | size | |
| PetscInt | step | |
| PetscReal | ti | |
| PetscInt | StartStep | |
| PetscInt | StepsToRun | |
| PetscInt | tiout | |
| PetscBool | skipInitialCheckpoint | io.write_initial_checkpoint false: no initial/branch_start bundle. |
| PetscBool | skipFinalCheckpoint | io.write_final_checkpoint false: no end-of-run bundle. |
| PetscInt | particleConsoleOutputFreq | |
| PetscReal | StartTime | |
| PetscReal | dt | |
| PetscBool | OnlySetup | |
| PetscBool | continueMode | |
| PetscViewer | logviewer | |
| ExecutionMode | exec_mode | |
| char | eulerianSource[PETSC_MAX_PATH_LEN] | |
| char | restart_dir[PETSC_MAX_PATH_LEN] | |
| char | output_dir[PETSC_MAX_PATH_LEN] | |
| char | log_dir[PETSC_MAX_PATH_LEN] | |
| char | analysis_dir[PETSC_MAX_PATH_LEN] | |
| char | _io_context_buffer[PETSC_MAX_PATH_LEN] | |
| char * | current_io_directory | |
| char | checkpointGeometrySHA256[65] | |
| PetscBool | checkpointGeometryHashReady | |
| PetscBool | restartHistoryAvailable | |
| PetscInt | immersed | |
| PetscInt | movefsi | |
| PetscInt | rotatefsi | Refused at setup: immersed boundaries and moving bodies are not implemented. |
| PetscInt | invicid | |
| PetscInt | TwoD | |
| PetscInt | moveframe | |
| PetscInt | rotateframe | moveframe/rotateframe are refused at setup. |
| struct AnalyticalField * | analyticalField | The prescribed field's source, once read; see AnalyticalSolutionEngine(). |
| PetscInt | MHV | |
| PetscInt | LV | Heart-valve flux corrections for immersed bodies; refused at setup. |
| MomentumSolverType | mom_solver_type | |
| PetscInt | mom_max_pseudo_steps | |
| PetscReal | mom_atol | |
| PetscReal | mom_rtol | |
| PetscReal | mom_resid_atol | |
| PetscReal | mom_resid_rtol | |
| PetscReal | imp_stol | |
| PetscInt | mglevels | |
| PetscInt | mg_preItr | |
| PetscInt | mg_poItr | |
| PetscInt | poisson | |
| PetscInt | central | |
| PetscReal | ren | |
| PetscReal | pseudo_cfl | |
| PetscReal | cdisx | |
| PetscReal | cdisy | |
| PetscReal | cdisz | |
| PetscReal | pseudo_cfl_reduction_factor | |
| PetscReal | pseudo_cfl_growth_factor | |
| PetscReal | max_pseudo_cfl | |
| PetscReal | min_pseudo_cfl | |
| PetscReal | mom_dt_jameson_residual_norm_noise_allowance_factor | |
| PetscBool | no_pseudo_cfl_backtrack | |
| PetscReal | mom_ratio_ema_alpha | |
| PetscBool | mom_last_converged | |
| PetscInt | mom_max_unconverged_steps | |
| PetscInt | mom_unconverged_streak | |
| PetscReal | mom_last_lambda_max | |
| PetscBool | mom_nk_monitor_history | |
| PetscBool | ps_ksp_pic_monitor_true_residual | |
| PetscBool | initialConditionStaged | |
| InitialConditionField | initialConditionField | |
| char | initialConditionDirectory[PETSC_MAX_PATH_LEN] | |
| PetscBool | solutionConvergenceEnabled | |
| SolutionConvergenceMode | solutionConvergenceMode | |
| PetscInt | solutionConvergencePeriodSteps | |
| PetscInt | solutionConvergenceWindowSteps | |
| PetscInt | solutionConvergenceSamplesRecorded | |
| PetscReal * | solutionConvergenceMeanSpeedHistory | |
| PetscReal * | solutionConvergenceMeanKEHistory | |
| PetscBool | fieldStatisticsEnabled | |
| PetscInt | fieldStatisticsWindowCount | |
| struct PicurvWindow * | fieldStatisticsWindows | |
| PetscInt | statisticsConsoleOutputFreq | |
| PetscBool | fieldStatisticsContinue | |
| VerificationFieldConfig | verificationDiffusivity | |
| VerificationFieldConfig | verificationScalar | |
| PetscReal | Flux_in | |
| PetscReal | angle | |
| PetscReal | max_angle | |
| PetscReal | CMx_c | |
| PetscReal | CMy_c | |
| PetscReal | CMz_c | |
| PetscReal | psrc_x | |
| PetscReal | psrc_y | |
| PetscReal | psrc_z | Point source location for PARTICLE_INIT_POINT_SOURCE. |
| ScalingCtx | scaling | |
| PetscReal | wall_roughness_height | |
| PetscReal | schmidt_number | |
| PetscReal | Turbulent_schmidt_number | |
| PetscReal | iem_constant | IEM mixing constant C_IEM in Omega = C_IEM Gamma / Delta^2 (default 2.0). |
| PetscInt | block_number | |
| PetscInt | inletprofile | |
| PetscInt | i_periodic | |
| PetscInt | j_periodic | |
| PetscInt | k_periodic | |
| PetscInt | pseudo_periodic | |
| PetscBool | generate_grid | |
| char | grid_file[PETSC_MAX_PATH_LEN] | |
| PetscInt | da_procs_x | |
| PetscInt | da_procs_y | |
| PetscInt | da_procs_z | |
| PetscInt | num_bcs_files | |
| char ** | bcs_files | |
| PetscReal | FluxInSum | |
| PetscReal | FluxOutSum | |
| PetscReal | Fluxsum | |
| PetscReal | FarFluxInSum | |
| PetscReal | FarFluxOutSum | |
| PetscReal | drivingForceMagnitude | |
| PetscReal | forceScalingFactor | |
| PetscInt | drivingForceStep | |
| PetscReal | targetVolumetricFlux | |
| PetscBool | drivenFluxTargetLatched | |
| PetscReal | bulkVelocityCorrection | |
| PetscReal | boundaryVelocityCorrection | |
| PetscReal | drivenFluxMeasured | |
| PetscReal | drivenFluxArea | |
| PetscReal | AreaInSum | |
| PetscReal | AreaOutSum | |
| PetscInt | ccc | |
| PetscReal | ratio | |
| PetscInt | les | Active LES closure; an LESModelType value. |
| PetscInt | wallfunction | Enable wall functions on WALL faces. |
| PetscBool | inflowFluctuations | Some inlet adds synthetic fluctuations; their filter state is checkpointed. |
| PetscBool | inflowFluctuationsRestored | That state was read from the restart checkpoint. |
| PetscInt | les_gradient_model | Add the Clark gradient (tensor-diffusivity) term to the viscous flux. |
| LESConfig | les_config |
Parameters of the LES closure selected by les. |
| PetscInt | np | |
| PetscInt | particleRandomSeed | Base seed for every particle RNG stream (-particle_random_seed). |
| PetscInt | sourceRandomSeed | Seed of the draws in velocity and pressure sources (-source_random_seed). |
| DM | dm_swarm | |
| BoundingBox * | bboxlist | |
| ParticleInitializationType | ParticleInitialization | |
| InterpolationMethod | interpolationMethod | |
| char | particleRestartMode[16] | |
| PetscInt | particlesLostLastStep | Particles removed this step because their search failed. |
| PetscInt64 | particlesLostCumulative | |
| PetscReal | particlesLostScalarLastStep | Sum of Psi over the particles removed this step as LOST. |
| PetscInt | particlesExitedLastStep | Particles removed this step because they left the domain. |
| PetscInt64 | particlesExitedCumulative | |
| PetscReal | particlesExitedScalarLastStep | Sum of Psi over the particles that left the domain this step. |
| struct ParticleFieldPlan * | particleFieldPlan | Configured initial particle-field values, or NULL. |
| struct ParticleInlet * | particleInlets | Inlet faces that inject particles, or NULL. |
| PetscInt | particleInletCount |
Entries of particleInlets. |
| PetscInt | migrationPassesLastStep | |
| PetscInt | particlesMigratedLastStep | |
| PetscInt | occupiedCellCount | |
| PetscInt | particlesPerCellMin | Fewest particles in any cell after the step. |
| PetscInt | particlesPerCellMax | Most particles in any cell after the step. |
| PetscReal | particlesPerCellMean | Particles counted in cells divided by the cell count. |
| PetscReal | particleLoadImbalance | |
| SearchMetricsState | searchMetrics | |
| PetscReal | C_IEM | |
| IBMNodes * | ibm | |
| IBMVNodes * | ibmv | |
| FSInfo * | fsi | |
| UserMG | usermg | |
| char | allowedFile[PETSC_MAX_PATH_LEN] | |
| PetscBool | useCfg | |
| char ** | allowedFuncs | |
| PetscInt | nAllowed | |
| PetscInt | LoggingFrequency | |
| PetscInt64 * | tracePIDs | Sorted, distinct IDs of the particles whose every stage is reported (-picurv_trace_particles); NULL when none. |
| PetscInt | nTracePIDs | Number of entries in tracePIDs (at most PICURV_MAX_TRACED_PARTICLES). |
| PetscReal | poissonSourceImbalance | |
| PetscReal | MaxDiv | |
| PetscInt | MaxDivFlatArg | |
| PetscInt | MaxDivx | |
| PetscInt | MaxDivy | |
| PetscInt | MaxDivz | |
| char | profilingSelectedFuncsFile[PETSC_MAX_PATH_LEN] | |
| PetscBool | useProfilingSelectedFuncsCfg | |
| char ** | profilingSelectedFuncs | |
| PetscInt | nProfilingSelectedFuncs | |
| char ** | profilingHelpers | Helper functions whose timers are enabled (-profiling_helpers). |
| PetscInt | nProfilingHelpers | |
| PetscBool | profilingAllHelpers | -profiling_helpers all: every helper timer is enabled. |
| char | profilingTimestepMode[32] | |
| PetscBool | profilingFinalSummary | |
| PetscBool | verifyGhostUpdates | -picurv_verify_ghost_updates: test-only cross-checks of skipped or partial ghost updates, and of migration newcomers against a PID snapshot. |
| PetscBool | walltimeGuardEnabled | |
| PetscBool | walltimeGuardActive | |
| PetscInt | walltimeGuardWarmupSteps | |
| PetscReal | walltimeGuardMultiplier | |
| PetscReal | walltimeGuardMinSeconds | |
| PetscReal | walltimeGuardEstimatorAlpha | |
| PetscReal | walltimeGuardJobStartEpochSeconds | |
| PetscReal | walltimeGuardLimitSeconds | |
| PetscInt | walltimeGuardCompletedSteps | |
| PetscReal | walltimeGuardWarmupTotalSeconds | |
| PetscReal | walltimeGuardWarmupAverageSeconds | |
| PetscBool | walltimeGuardHasEWMA | |
| PetscReal | walltimeGuardEWMASeconds | |
| PetscReal | walltimeGuardLatestStepSeconds | |
| PetscBool | runtimeMemoryLogEnabled | Enable the rank-reduced runtime memory log (log_dir/Runtime_Memory.csv). |
| uint64_t | runCsvWritten[256] | Rank 0 only: path hashes of the CSV records this run has opened (see PicurvOpenRunCsv()). |
| PetscInt | runCsvWrittenCount | Entries of runCsvWritten in use. |
| PetscBool | runtimeMemoryLogHasPrevious | True after the first process-memory sample. |
| PetscReal | runtimeMemoryLogPreviousProcessMB | Previous local process memory sample in MB. |
| PetscReal | lastStepWallSeconds | Slowest rank's wall time of the last completed step (0 before one). |
| char | PostprocessingControlFile[PETSC_MAX_PATH_LEN] | |
| PostProcessParams * | pps | |
| PetscReal | r[101] | |
| PetscReal | tin[101] | |
| PetscReal | uinr[101][1001] | |
| struct UserCtx |
User-defined context containing data specific to a single computational grid level.
This is the primary data structure passed to low-level numerical and solver functions.
Definition at line 1157 of file variables.h.
| Data Fields | ||
|---|---|---|
| SimCtx * | simCtx | Back-pointer to the master simulation context. |
| DM | da | |
| DM | fda | |
| DM | fda6 | |
| DMDALocalInfo | info | |
| AO | ao | |
| PetscInt | IM | |
| PetscInt | JM | |
| PetscInt | KM | |
| PetscReal | Max_X | |
| PetscReal | Max_Y | |
| PetscReal | Max_Z | |
| PetscReal | Min_X | |
| PetscReal | Min_Y | |
| PetscReal | Min_Z | |
| BoundingBox | bbox | |
| RankNeighbors | neighbors | |
| PetscInt | GridOrientation | |
| PetscInt | isc | |
| PetscInt | jsc | |
| PetscInt | ksc | |
| PetscInt | _this | |
| PetscReal | rx | |
| PetscReal | ry | |
| PetscReal | rz | |
| PetscInt | cgrid | |
| Cmpnts | periodic_translation[3] | |
| PetscBool | periodic_translation_valid[3] | |
| BoundaryFaceConfig | boundary_faces[6] | |
| PetscBool | inletFaceDefined | |
| BCFace | identifiedInletBCFace | |
| BCS | Bcs | |
| Vec | Friction_Velocity | |
| Vec | lFriction_Velocity | |
| Vec | Wall_Stress | |
| Vec | lWall_Stress | |
| Vec | InflowFluctuation | |
| Vec | lInflowFluctuation | Inlet fluctuation filter state in the inlet faces' dummy planes. |
| Vec | Ucont | |
| Vec | lUcont | |
| Vec | Ucat | |
| Vec | lUcat | |
| Vec | P | |
| Vec | lP | |
| Vec | Phi | |
| Vec | lPhi | |
| Vec | Nvert | |
| Vec | lNvert | |
| Vec | Diffusivity | |
| Vec | lDiffusivity | |
| Vec | DiffusivityGradient | |
| Vec | lDiffusivityGradient | |
| Vec | Ucont_o | |
| Vec | lUcont_o | |
| Vec | Ucat_o | |
| Vec | P_o | |
| Vec | Nvert_o | |
| Vec | lNvert_o | |
| Vec | Ucont_rm1 | |
| Vec | lUcont_rm1 | |
| Vec | Rhs | |
| Vec | dUcont | |
| Vec | pUcont | |
| Vec | pRhs | |
| Vec * | solutionConvergencePeriodicUcatRef | |
| Vec * | solutionConvergencePeriodicPRef | |
| Vec | CellScalarAtCorner | |
| Vec | lCellScalarAtCorner | |
| Vec | CellVectorAtCorner | |
| Vec | lCellVectorAtCorner | |
| Vec | PostScalar | |
| Vec | lPostScalar | |
| Vec | PostScalarNodal | |
| Vec | PostVector | |
| Vec | lPostVector | |
| Vec | PostVectorNodal | |
| struct PicurvWindowStorage * | fieldStatisticsStorage | |
| Mat | A | |
| KSP | ksp | |
| MatNullSpace | nullsp | |
| Vec | B | |
| Vec | R | |
| Mat | MR | |
| Mat | MP | |
| struct MomentumNewtonKrylovContext * | momentumNewtonKrylov | |
| Vec | Coor | |
| Vec | lCoor | |
| Vec | Cent | |
| Vec | lCent | |
| Vec | Csi | |
| Vec | Eta | |
| Vec | Zet | |
| Vec | Aj | |
| Vec | lCsi | |
| Vec | lEta | |
| Vec | lZet | |
| Vec | lAj | |
| Vec | PlaneNormalI | |
| Vec | PlaneNormalJ | |
| Vec | PlaneNormalK | |
| Vec | lPlaneNormalI | |
| Vec | lPlaneNormalJ | |
| Vec | lPlaneNormalK | |
| Vec | PlaneCentroidI | |
| Vec | PlaneCentroidJ | |
| Vec | PlaneCentroidK | |
| Vec | lPlaneCentroidI | |
| Vec | lPlaneCentroidJ | |
| Vec | lPlaneCentroidK | |
| Vec | SearchCellSize | |
| Vec | lSearchCellSize | |
| Vec | DualPlaneNormalI | |
| Vec | DualPlaneNormalJ | |
| Vec | DualPlaneNormalK | |
| Vec | lDualPlaneNormalI | |
| Vec | lDualPlaneNormalJ | |
| Vec | lDualPlaneNormalK | |
| Vec | DualPlaneCentroidI | |
| Vec | DualPlaneCentroidJ | |
| Vec | DualPlaneCentroidK | |
| Vec | lDualPlaneCentroidI | |
| Vec | lDualPlaneCentroidJ | |
| Vec | lDualPlaneCentroidK | |
| Vec | Centx | |
| Vec | Centy | |
| Vec | Centz | |
| Vec | lCentx | |
| Vec | lCenty | |
| Vec | lCentz | |
| Vec | ICsi | |
| Vec | IEta | |
| Vec | IZet | |
| Vec | IAj | |
| Vec | lICsi | |
| Vec | lIEta | |
| Vec | lIZet | |
| Vec | lIAj | |
| Vec | JCsi | |
| Vec | JEta | |
| Vec | JZet | |
| Vec | JAj | |
| Vec | lJCsi | |
| Vec | lJEta | |
| Vec | lJZet | |
| Vec | lJAj | |
| Vec | KCsi | |
| Vec | KEta | |
| Vec | KZet | |
| Vec | KAj | |
| Vec | lKCsi | |
| Vec | lKEta | |
| Vec | lKZet | |
| Vec | lKAj | |
| Vec | Nu_t | |
| Vec | lNu_t | |
| Vec | CS | |
| Vec | lCs | |
| Vec | Distance | |
| LESDiagnosticsState | les_diagnostics | Pre-clipping statistics from the last dynamic update. |
| WallModelDiagnosticsState | wall_diagnostics | Near-wall statistics from the last wall-model pass. |
| PetscInt | wall_yplus_excursions | Consecutive diagnostic samples with the first cell outside the selected law's valid y+ range. |
| PetscBool | wall_yplus_max_reported | The local y+ maximum has already been reported above the law's range. |
| IBMNodes * | ibm | |
| IBMList * | ibmlist | |
| PetscInt | thislevel | |
| PetscInt | mglevels | |
| UserCtx * | user_f | |
| UserCtx * | user_c | |
| DM | swarm | |
| RankCellInfo * | RankCellInfoMap | |
| PetscInt | RankCellInfoProcs[3] | DMDA process grid (m, n, p) of RankCellInfoMap: rank i + m (j + n k). |
| Vec | ParticleCount | |
| Vec | lParticleCount | |
| Vec | Psi | |
| Vec | lPsi | |
| DM | post_swarm | |
| Vec | P_nodal | |
| Vec | Ucat_nodal | |
| Vec | Qcrit | |
| Vec | lQcrit | Cell-centred Q-criterion and its ghosted copy for nodal averaging. |
| Vec | Qcrit_nodal | Q-criterion averaged to grid nodes; the field a .vts can place correctly. |
| Vec | Psi_nodal | |
| #define PICURV_RELEASE_VERSION "0.0.0" |
Definition at line 32 of file variables.h.
| #define PICURV_BUILD_VERSION PICURV_RELEASE_VERSION |
Definition at line 35 of file variables.h.
| #define PICURV_GIT_COMMIT "unknown" |
Definition at line 38 of file variables.h.
| #define PICURV_BUILD_DIRTY "unknown" |
Definition at line 41 of file variables.h.
| #define PICURV_ALWAYS_INLINE inline |
Forces inlining of a per-cell or per-face kernel whose size defeats the compiler's inlining heuristics, so a call with constant arguments compiles to specialised straight-line code.
Definition at line 65 of file variables.h.
| #define PICURV_MAX_TRACED_PARTICLES 64 |
Most particle IDs one run can trace (-picurv_trace_particles).
Definition at line 69 of file variables.h.
| #define PICURV_SNAPSHOT_ROWS_PER_RANK 32 |
Most rows one rank contributes to a particle console snapshot (io.particle_log_interval samples IDs).
Definition at line 72 of file variables.h.
| #define PICURV_RUN_CSV_CAPACITY 256 |
Most distinct CSV records one run opens through PicurvOpenRunCsv(): about twenty, plus a few per block.
Definition at line 75 of file variables.h.
| #define COEF_TIME_ACCURACY 1.5 |
Coefficient controlling the temporal accuracy scheme (e.g., 1.5 for 2nd Order Backward Difference).
Definition at line 96 of file variables.h.
| #define RANK_NEIGHBOR_INDEX | ( | di, | |
| dj, | |||
| dk | |||
| ) | (9 * ((dk) + 1) + 3 * ((dj) + 1) + ((di) + 1)) |
Index in RankNeighbors::rank of the neighbour offset (di, dj, dk), each -1, 0 or 1.
Definition at line 250 of file variables.h.
| #define MAX_PIPELINE_LENGTH 1024 |
Definition at line 783 of file variables.h.
| #define MAX_FIELD_LIST_LENGTH 1024 |
Definition at line 784 of file variables.h.
| #define MAX_FILENAME_LENGTH 256 |
Definition at line 785 of file variables.h.
| #define MAX_POINT_DATA_FIELDS 20 |
Defines the maximum number of data fields for VTK point data.
Definition at line 787 of file variables.h.
| #define MAX_VTK_FIELD_NAME_LENGTH 64 |
Maximum length for VTK field names.
Definition at line 788 of file variables.h.
| #define mom_dt_rk4_residual_norm_noise_allowance_factor mom_dt_jameson_residual_norm_noise_allowance_factor |
Definition at line 1149 of file variables.h.
The master context for the entire simulation.
This struct encapsulates all global configuration flags, physical parameters, simulation control settings, and top-level data objects. It replaces the numerous global variables from the legacy codebase, providing a single, explicit source of truth for the simulation's setup.
Definition at line 112 of file variables.h.
User-defined context containing data specific to a single computational grid level.
This is the primary data structure passed to low-level numerical and solver functions.
Definition at line 118 of file variables.h.
| typedef struct BC_Param_s BC_Param |
Definition at line 119 of file variables.h.
| typedef struct BoundaryCondition BoundaryCondition |
The "virtual table" struct for a boundary condition handler object.
Definition at line 120 of file variables.h.
| typedef struct BoundaryFaceConfig BoundaryFaceConfig |
Holds the complete configuration for one of the six boundary faces.
Definition at line 121 of file variables.h.
Represents a collection of nodes forming a surface for the IBM.
Definition at line 122 of file variables.h.
Represents a collection of nodes forming a volume for the IBM.
Definition at line 123 of file variables.h.
Holds all data related to the state and motion of a body in FSI.
Definition at line 124 of file variables.h.
User-level context for managing the entire multigrid hierarchy.
Definition at line 125 of file variables.h.
| typedef struct BoundingBox BoundingBox |
Defines a 3D axis-aligned bounding box.
Definition at line 126 of file variables.h.
Defines the vertices of a single hexahedral grid cell.
Definition at line 127 of file variables.h.
Defines a particle's core properties for Lagrangian tracking.
Definition at line 128 of file variables.h.
| typedef struct RankNeighbors RankNeighbors |
The MPI ranks of the subdomains around this one, across faces, edges and corners.
In DMDAGetNeighbors() order, indexed by RANK_NEIGHBOR_INDEX(); entry 13 is this rank. A neighbour across a periodic axis is the wrapped rank (this rank when the axis has one rank); one beyond a non-periodic boundary is MPI_PROC_NULL.
Definition at line 129 of file variables.h.
| typedef struct RankCellInfo RankCellInfo |
A lean struct to hold the global cell ownership range for a single MPI rank.
Definition at line 130 of file variables.h.
| typedef struct MigrationInfo MigrationInfo |
Information needed to migrate a single particle between MPI ranks.
Definition at line 131 of file variables.h.
Defines prescribed body motion using splines.
Definition at line 132 of file variables.h.
Context for Multigrid operations.
Definition at line 133 of file variables.h.
| typedef struct PostProcessParams PostProcessParams |
Holds all configuration parameters for a post-processing run.
This is an enhanced version combining command-line and file-based settings.
Definition at line 134 of file variables.h.
| typedef struct VTKFieldInfo VTKFieldInfo |
Stores all necessary information for a single data array in a VTK file.
Definition at line 135 of file variables.h.
| typedef struct VTKMetaData VTKMetaData |
One VTK file being assembled collectively.
mx/my/mz and npoints describe the whole file and agree on every rank. The arrays hold only this rank's points: for a structured grid the box of local_size points starting at local_start (i fastest), for polydata the local_size[0] consecutive output points starting at local_start[0].
Definition at line 136 of file variables.h.
Holds interpolation and distance information for a single IBM point.
Definition at line 137 of file variables.h.
| typedef struct SurfElmtInfo SurfElmtInfo |
Information about a surface element for FSI calculations.
Definition at line 138 of file variables.h.
| typedef struct ScalingCtx ScalingCtx |
Definition at line 139 of file variables.h.
A symmetric second-order tensor stored by its six independent components.
The three missing components are recovered by symmetry: yx == xy, zx == xz, and zy == yz. Contractions must therefore double the off-diagonal terms, which is what SymTensorContract() exists to do in one place instead of at every call site. Used for strain rates and for the Germano identity's Leonard and model tensors.
One cell face as the particle search tests against it: a plane through the vertex mean.
| typedef struct CellFacePlanes CellFacePlanes |
The six face planes of one hexahedron, indexed by Face, and its characteristic size.
| typedef struct VerificationFieldConfig VerificationFieldConfig |
A verification-only prescribed field: an expression in physical x, y, z and t, enabled when set.
| typedef struct SearchMetricsState SearchMetricsState |
Aggregated per-timestep search instrumentation counters.
| typedef struct BoundaryFaceElements BoundaryFaceElements |
The elements of one boundary face that this rank owns: one per interior cell beside the face, addressed by the face's normal axis, its two tangential axes and their owned index ranges.
Filled by GetBoundaryFaceElements().
Element (p, q) sits at index layer along normal, lo[0] + p along a and lo[1] + q along b. layer indexes the face's own metric and flux: 0 on a negative face, where the dummy cell is that same index and the cell behind it is 1; m - 2 on a positive face, where the cell behind it is that index and the dummy cell is m - 1.
| typedef struct IBMListNode IBMListNode |
A linked list node containing IBM interpolation info.
Every user-selectable parameter of the LES closure.
Resolved once from the generated control file by CreateSimulationContext and read-only thereafter. The model selector itself stays on SimCtx::les, because dispatch and field availability are decided from it throughout the runtime.
| typedef struct LESDiagnosticsState LESDiagnosticsState |
Pre-clipping volume statistics captured by one dynamic-coefficient update.
The backscattering and limited fractions describe the coefficient field as the Germano contraction produced it. Clipping overwrites that state, and no stored field preserves it, so it is recorded here on the way past and consumed by LogLESDiagnostics.
| typedef struct WallModelDiagnosticsState WallModelDiagnosticsState |
Near-wall statistics captured by one wall-model pass.
The wall model evaluates the wall distance and the friction velocity together at each corrected cell. y+ is the number that says whether the model is being asked to work in the range it is valid for, and it cannot be recovered afterwards from the corrected velocity field, which no longer carries the law that produced it. Recomputing the wall distance in the diagnostic would duplicate geometry the correction already has in hand, so it is accumulated on the way past and consumed by LogWallModelDiagnostics.
Defines the state of a particle with respect to its location and migration status during the iterative SettleParticles() process.
Definition at line 186 of file variables.h.
| enum Face |
Enumerates the six faces of a cubic cell for distance calculations.
| Enumerator | |
|---|---|
| LEFT | |
| RIGHT | |
| BOTTOM | |
| TOP | |
| FRONT | |
| BACK | |
| NUM_FACES | |
Definition at line 196 of file variables.h.
Selects the authoritative velocity representation in a staged file IC.
| Enumerator | |
|---|---|
| IC_FIELD_UCAT | |
| IC_FIELD_UCONT | |
Definition at line 201 of file variables.h.
| enum BCFace |
Identifies the six logical faces of a structured computational block.
| Enumerator | |
|---|---|
| BC_FACE_NEG_X | |
| BC_FACE_POS_X | |
| BC_FACE_NEG_Y | |
| BC_FACE_POS_Y | |
| BC_FACE_NEG_Z | |
| BC_FACE_POS_Z | |
Definition at line 308 of file variables.h.
| enum BCType |
Defines the general mathematical/physical Category of a boundary.
| Enumerator | |
|---|---|
| WALLFUNCTION | |
| INTERFACE | |
| WALL | |
| MOVING_WALL | |
| OUTLET | |
| INLET | |
| FARFIELD | |
| PERIODIC | |
| CHARACTERISTIC_BC | |
| ANALYTICAL_VORTEX | |
| JUNCTION | |
| ANNULUS | |
| OGRID | |
| RHEOLOGY | |
Definition at line 316 of file variables.h.
What happens to a particle that crosses a domain-boundary face.
Definition at line 336 of file variables.h.
| enum BCHandlerType |
Defines the specific computational "strategy" for a boundary handler.
Definition at line 343 of file variables.h.
| enum BCPriorityType |
| Enumerator | |
|---|---|
| BC_PRIORITY_UNDEFINED | |
| BC_PRIORITY_INLET | |
| BC_PRIORITY_FARFIELD | |
| BC_PRIORITY_WALL | |
| BC_PRIORITY_OUTLET | |
Definition at line 359 of file variables.h.
| enum LESModelType |
Identifies the subgrid-scale closure evaluated during a timestep.
Add new enum values only when the parser, runtime dispatch, docs, and tests are updated in the same change.
| Enumerator | |
|---|---|
| NO_LES_MODEL | |
| CONSTANT_SMAGORINSKY | |
| DYNAMIC_SMAGORINSKY | |
| VREMAN | |
| WALE | |
Definition at line 583 of file variables.h.
| enum WallFunctionModel |
Selects the wall model applied on WALL faces.
The value doubles as the enable switch: WALL_FUNCTION_NONE disables the treatment, and every other value both enables it and names the law. Configured independently of the LES closure.
Add new enum values only when the parser, runtime dispatch, docs, and tests are updated in the same change.
| Enumerator | |
|---|---|
| WALL_FUNCTION_NONE | |
| WALL_FUNCTION_LOG_LAW | |
| WALL_FUNCTION_WERNER | |
| WALL_FUNCTION_CABOT | |
Definition at line 600 of file variables.h.
| enum LESFilterWidthModel |
Selects how a cell's grid filter width is derived from its metrics.
CUBE_ROOT_VOLUME is exact for a cube and progressively underestimates the width as a cell is stretched. The others use the cell's extents along its own grid directions: SCOTTI corrects the cube root for the cell's aspect ratios, and MAX_EDGE takes the longest extent. See ComputeCellFilterWidth.
| Enumerator | |
|---|---|
| LES_FILTER_WIDTH_CUBE_ROOT_VOLUME | |
| LES_FILTER_WIDTH_GEOMETRIC_MEAN | |
| LES_FILTER_WIDTH_MAX_EDGE | |
| LES_FILTER_WIDTH_SCOTTI | |
Definition at line 614 of file variables.h.
| enum LESTestFilterKernel |
Selects the discrete test-filter kernel used by the dynamic procedure.
SIMPSON_IK collapses onto the central eta-plane and is valid only when the xi and zeta directions are homogeneous; the ingress layer enforces that.
| Enumerator | |
|---|---|
| LES_TEST_FILTER_VOLUME_WEIGHTED_BOX | |
| LES_TEST_FILTER_SIMPSON_IK | |
Definition at line 626 of file variables.h.
| enum LESAveragingMode |
Selects the set over which the Germano contractions are averaged.
Lilly's least-squares closure assumes the model coefficient is constant across the averaging set, so the set should span directions in which the flow really is statistically homogeneous. LOCAL makes no such claim and is the only choice valid on arbitrary geometry. HOMOGENEOUS derives its directions from the periodic boundary pairs unless they are named explicitly.
| Enumerator | |
|---|---|
| LES_AVERAGING_LOCAL | |
| LES_AVERAGING_HOMOGENEOUS | |
| LES_AVERAGING_GLOBAL | |
Definition at line 639 of file variables.h.
| enum LESClipMode |
Selects the admissible range imposed on the dynamic model coefficient.
NONE keeps the coefficient signed, so subgrid-to-resolved energy transfer (backscatter) survives; stability then rests on the total-viscosity floor rather than on the coefficient's sign. The clipping modes discard the negative tail, which removes backscatter and biases the mean dissipation upward.
| Enumerator | |
|---|---|
| LES_CLIP_CLAMP | |
| LES_CLIP_CLIP_NEGATIVE | |
| LES_CLIP_NONE | |
Definition at line 652 of file variables.h.
| enum MomentumSolverType |
Enumerator to identify the implemented momentum solver strategies.
Add new enum values only when the parser, runtime dispatch, docs, and tests are updated in the same change.
| Enumerator | |
|---|---|
| MOMENTUM_SOLVER_EXPLICIT_RK | |
| MOMENTUM_SOLVER_DUALTIME_PICARD_JAMESON_RK | |
| MOMENTUM_SOLVER_NEWTON_KRYLOV | |
| MOMENTUM_SOLVER_DUALTIME_PICARD_RK4 |
|
Definition at line 729 of file variables.h.
Selects the runtime solution-convergence diagnostics mode.
| Enumerator | |
|---|---|
| SOLUTION_CONVERGENCE_STEADY_DETERMINISTIC | |
| SOLUTION_CONVERGENCE_PERIODIC_DETERMINISTIC | |
| SOLUTION_CONVERGENCE_STATISTICAL_STEADY | |
| SOLUTION_CONVERGENCE_TRANSIENT | |
Definition at line 738 of file variables.h.
Enumerator to identify the particle initialization strategy.
Definition at line 746 of file variables.h.
| enum InterpolationMethod |
Selects the grid-to-particle interpolation method.
| Enumerator | |
|---|---|
| INTERP_TRILINEAR | |
| INTERP_CORNER_AVERAGED | |
| INTERP_FACE_FLUX | |
Definition at line 760 of file variables.h.
| enum VTKFileType |
Enumerates the type of VTK file to be written.
| Enumerator | |
|---|---|
| VTK_STRUCTURED | |
| VTK_POLYDATA | |
Definition at line 859 of file variables.h.
| enum ExecutionMode |
Defines the execution mode of the application.
| Enumerator | |
|---|---|
| EXEC_MODE_SOLVER | |
| EXEC_MODE_POSTPROCESSOR | |
| EXEC_MODE_RESTART_CHECK | |
| EXEC_MODE_UNKNOWN | |
Definition at line 887 of file variables.h.
|
inlinestatic |
Whether the run carries particles: a seeded or restored population, or inlets that inject them.
| [in] | simCtx | Simulation context. |
Definition at line 1143 of file variables.h.