26#if defined(__has_include)
27# if __has_include("picurv_build_identity.h")
28# include "picurv_build_identity.h"
31#ifndef PICURV_RELEASE_VERSION
32#define PICURV_RELEASE_VERSION "0.0.0"
34#ifndef PICURV_GIT_COMMIT
35#define PICURV_GIT_COMMIT "unknown"
37#ifndef PICURV_BUILD_DIRTY
38#define PICURV_BUILD_DIRTY "unknown"
50#include "petscdmswarm.h"
59#if defined(__cplusplus)
75#define COEF_TIME_ACCURACY 1.5
744#define MAX_PIPELINE_LENGTH 1024
745#define MAX_FIELD_LIST_LENGTH 1024
746#define MAX_FILENAME_LENGTH 256
748#define MAX_POINT_DATA_FIELDS 20
749#define MAX_VTK_FIELD_NAME_LENGTH 64
1066#define mom_dt_rk4_residual_norm_noise_allowance_factor mom_dt_jameson_residual_norm_noise_allowance_factor
1148 Vec
Cent,
lCent,
Csi,
Eta,
Zet,
Aj,
lCsi,
lEta,
lZet,
lAj,
GridSpace,
lGridSpace;
Independent accumulator state for one window on one block.
Runtime state of one window.
The "virtual table" struct for a boundary condition handler object.
PetscErrorCode(* PostStep)(BoundaryCondition *self, BCContext *ctx, PetscReal *local_inflow, PetscReal *local_outflow)
PetscErrorCode(* PreStep)(BoundaryCondition *self, BCContext *ctx, PetscReal *local_inflow, PetscReal *local_outflow)
PetscErrorCode(* Destroy)(BoundaryCondition *self)
PetscErrorCode(* Initialize)(BoundaryCondition *self, BCContext *ctx)
PetscErrorCode(* UpdateUbcs)(BoundaryCondition *self, BCContext *ctx)
PetscErrorCode(* Apply)(BoundaryCondition *self, BCContext *ctx)
LESModelType
Identifies the subgrid-scale closure evaluated during a timestep.
PetscReal icVelocityPhysical
const PetscReal * global_outflow_sum
PetscBool mom_nk_monitor_history
Vec Qcrit_nodal
Q-criterion averaged to grid nodes; the field a .vts can place correctly.
PetscInt fieldStatisticsWindowCount
char statistics_output_prefix[256]
basename for CSV output, e.g.
BCType
Defines the general mathematical/physical Category of a boundary.
PetscReal yoshizawa_ci
Yoshizawa constant for the reported SGS kinetic energy.
#define MAX_POINT_DATA_FIELDS
Defines the maximum number of data fields for VTK point data.
PetscBool inletFaceDefined
PetscReal wall_viscosity_sum
Sum of the effective wall eddy viscosity.
PetscBool profilingFinalSummary
char particle_output_prefix[256]
PetscReal y_bp_in[101][3270]
PetscInt dynamic_frequency
Recompute the dynamic coefficient every N steps.
char profilingTimestepFile[PETSC_MAX_PATH_LEN]
PetscInt LV
Heart-valve flux corrections for immersed bodies; refused at setup.
PetscReal Turbulent_schmidt_number
BoundaryFaceConfig boundary_faces[6]
PetscInt64 searchLocatedCount
PetscReal z_bp_in[101][3270]
LESFilterWidthModel filter_width_model
How the grid filter width Delta is derived per cell.
PetscInt statisticsConsoleOutputFreq
PetscInt num_point_data_fields
PetscReal contraction_mm
Volume-weighted sum of M_ij M_ij over fluid cells.
PetscInt64 searchLostCount
BCFace identifiedInletBCFace
PetscReal targetVolumetricFlux
Vec * solutionConvergencePeriodicPRef
PetscBool walltimeGuardActive
LESTestFilterKernel test_filter_kernel
Discrete test-filter stencil.
PetscReal mom_last_lambda_max
PetscReal walltimeGuardWarmupTotalSeconds
LESConfig les_config
Parameters of the LES closure selected by les.
PetscReal forceScalingFactor
PetscReal pseudo_cfl_reduction_factor
InitialConditionMode initialConditionMode
SimCtx * simCtx
Back-pointer to the master simulation context.
ParticleInitializationType
Enumerator to identify the particle initialization strategy.
@ PARTICLE_INIT_SURFACE_RANDOM
Random placement on the inlet face.
@ PARTICLE_INIT_SURFACE_EDGES
Deterministic placement at inlet face edges.
@ PARTICLE_INIT_POINT_SOURCE
All particles at a fixed (psrc_x,psrc_y,psrc_z) — for validation.
@ PARTICLE_INIT_VOLUME
Random volumetric distribution across the domain.
ParticleLocationStatus
Defines the state of a particle with respect to its location and migration status during the iterativ...
PetscReal * solutionConvergenceMeanSpeedHistory
PetscBool walltimeGuardHasEWMA
FlowDirection flowDirection
PetscBool runtimeMemoryLogEnabled
Enable the rank-reduced runtime memory log.
PetscBool dimensionalize
Whether derived output leaves non-dimensional form, from global_operations.dimensionalize.
PetscReal boundaryVelocityCorrection
PetscInt64 boundaryClampCount
PetscBool valid
Set once a dynamic update has populated this state.
PetscInt particlesLostLastStep
char field_statistics_output_prefix[PETSC_MAX_PATH_LEN]
Analysis prefix for CSV summaries; VTK continues to use output_prefix.
#define MAX_FIELD_LIST_LENGTH
PetscReal walltimeGuardMinSeconds
char allowedFile[PETSC_MAX_PATH_LEN]
Vec * solutionConvergencePeriodicUcatRef
PetscInt64 traversalStepsSum
PetscInt wall_yplus_excursions
Consecutive diagnostic samples with the first cell outside the selected law's valid y+ range.
PetscBool mom_last_converged
BCHandlerType
Defines the specific computational "strategy" for a boundary handler.
@ BC_HANDLER_PERIODIC_GEOMETRIC
@ BC_HANDLER_INLET_PARABOLIC
@ BC_HANDLER_INLET_CONSTANT_VELOCITY
@ BC_HANDLER_PERIODIC_DRIVEN_INITIAL_FLUX
@ BC_HANDLER_INTERFACE_OVERSET
@ BC_HANDLER_PERIODIC_DRIVEN_CONSTANT_FLUX
@ BC_HANDLER_INLET_PROFILE_FROM_FILE
@ BC_HANDLER_OUTLET_CONSERVATION
@ BC_HANDLER_FARFIELD_NONREFLECTING
@ BC_HANDLER_OUTLET_PRESSURE
@ BC_HANDLER_SYMMETRY_PLANE
PetscReal friction_velocity_sq
Sum of u_tau^2, for the RMS.
#define MAX_PIPELINE_LENGTH
PetscReal iem_constant
IEM mixing constant C_IEM in Omega = C_IEM Gamma / Delta^2 (default 2.0).
BCHandlerType handler_type
PetscInt solutionConvergenceSamplesRecorded
Cmpnts max_coords
Maximum x, y, z coordinates of the bounding box.
PetscReal poissonSourceImbalance
PetscBool drivenFluxTargetLatched
Cmpnts diffusivitygradient
PetscReal uinr[101][1001]
char step_list_file[PETSC_MAX_PATH_LEN]
File listing the exact steps to process, one per line; empty uses the time controls.
PetscInt64 searchPopulation
char output_dir[PETSC_MAX_PATH_LEN]
PetscBool solutionConvergenceEnabled
PetscReal * solutionConvergenceMeanKEHistory
PetscReal walltimeGuardLatestStepSeconds
char runtimeMemoryLogFile[PETSC_MAX_PATH_LEN]
File name written under log_dir.
PetscBool runtimeMemoryLogStarted
True after rank 0 writes the log header.
PetscInt occupiedCellCount
LESClipMode
Selects the admissible range imposed on the dynamic model coefficient.
char profilingTimestepMode[32]
const PetscReal * global_farfield_outflow_sum
PetscReal bulkVelocityCorrection
LESTestFilterKernel
Selects the discrete test-filter kernel used by the dynamic procedure.
@ LES_TEST_FILTER_SIMPSON_IK
@ LES_TEST_FILTER_VOLUME_WEIGHTED_BOX
WallFunctionModel
Selects the wall model applied on WALL faces.
PetscInt currentSettlementPass
PetscBool fieldStatisticsEnabled
PetscReal x_bp_in[101][3270]
PetscReal max_cs
Ceiling on Cs under LES_CLIP_CLAMP.
LESClipMode clip_mode
Admissible range for the coefficient.
PetscBool no_pseudo_cfl_backtrack
#define MAX_FILENAME_LENGTH
LESDiagnosticsState les_diagnostics
Pre-clipping statistics from the last dynamic update.
Cmpnts min_coords
Minimum x, y, z coordinates of the bounding box.
PetscInt rotatefsi
Refused at setup: immersed boundaries and moving bodies are not implemented.
Vec Ubcs
Physical Cartesian velocity at boundary faces. Full 3D array but only boundary-face entries are meani...
MomentumSolverType
Enumerator to identify the implemented momentum solver strategies.
@ MOMENTUM_SOLVER_DUALTIME_PICARD_JAMESON_RK
@ MOMENTUM_SOLVER_EXPLICIT_RK
@ MOMENTUM_SOLVER_NEWTON_KRYLOV
@ MOMENTUM_SOLVER_DUALTIME_PICARD_RK4
PetscInt solutionConvergencePeriodSteps
PetscReal wall_distance_sum
Sum of the first-cell wall distance.
PetscBool averaging_direction[3]
Averaged-over logical directions (xi, eta, zeta).
PetscReal wale_coefficient
Model constant C_w for WALE (Nicoud & Ducros 1999).
char * current_io_directory
PetscMPIInt destination_rank
char grid_file[PETSC_MAX_PATH_LEN]
char statistics_pipeline[1024]
e.g.
struct IBMListNode * next
PetscInt64 bboxGuessFallbackCount
InterpolationMethod interpolationMethod
PetscReal friction_velocity_min
Smallest u_tau this rank corrected.
RankCellInfo * RankCellInfoMap
PetscReal limited_volume
Fluid volume whose coefficient the clip modified.
PetscReal psrc_z
Point source location for PARTICLE_INIT_POINT_SOURCE.
PetscReal fluid_volume
Total fluid volume sampled.
const PetscReal * global_inflow_sum
char field_statistics_formats[1024]
Comma-separated formats: vtk for derived fields, csv for the convergence history.
VerificationScalarConfig verificationScalar
char output_fields_instantaneous[1024]
char profilingSelectedFuncsFile[PETSC_MAX_PATH_LEN]
ParticleLocationStatus location_status
char analysis_dir[PETSC_MAX_PATH_LEN]
char particleRestartMode[16]
PetscInt64 bboxGuessSuccessCount
struct PicurvWindow * fieldStatisticsWindows
char log_dir[PETSC_MAX_PATH_LEN]
PetscReal friction_velocity_max
Largest u_tau this rank corrected.
PetscReal contraction_lm
Volume-weighted sum of L_ij M_ij over fluid cells.
PetscInt walltimeGuardCompletedSteps
PetscInt64 maxParticlePassDepth
char source_dir[PETSC_MAX_PATH_LEN]
PetscInt les_gradient_model
Add the Clark gradient (tensor-diffusivity) term to the viscous flux.
PetscInt64 maxTraversalSteps
char particle_pipeline[1024]
Cmpnts AnalyticalUniformVelocity
char eulerianSource[PETSC_MAX_PATH_LEN]
PetscBool walltimeGuardEnabled
PetscBool checkpointGeometryHashReady
PetscReal y_plus_sum
Sum of u_tau * y / nu over corrected cells.
PetscReal wall_roughness_height
PetscBool useProfilingSelectedFuncsCfg
PetscReal friction_velocity_sum
Sum of u_tau over corrected cells.
PetscInt walltimeGuardWarmupSteps
ParticleInitializationType ParticleInitialization
PetscReal mom_dt_jameson_residual_norm_noise_allowance_factor
InterpolationMethod
Selects the grid-to-particle interpolation method.
PetscInt diagnostics_cadence
Steps between diagnostic rows.
PetscReal min_viscosity_ratio
Enforce nu + nu_t >= ratio * nu.
PetscInt wallfunction
Enable wall functions on WALL faces.
PetscInt drivingForceStep
struct list List
Head of a generic C-style linked list.
LESAveragingMode
Selects the set over which the Germano contractions are averaged.
@ LES_AVERAGING_HOMOGENEOUS
PetscReal drivenFluxMeasured
PetscBool runtimeMemoryLogHasPrevious
True after the first process-memory sample.
char ** profilingSelectedFuncs
const PetscReal * global_farfield_inflow_sum
PetscBool diagnostics_enabled
Append per-step coefficient statistics to the run log directory.
PetscReal constant_cs
Fixed Cs for CONSTANT_SMAGORINSKY; unused by the dynamic model.
PetscInt cells
Number of cells this rank corrected.
PetscInt solutionConvergenceWindowSteps
char process_pipeline[1024]
PetscInt particle_output_freq
PetscReal test_filter_width_ratio
Test-to-grid ratio per filtered direction; alpha is its square for the box, ratio^(4/3) for Simpson.
FlowDirection
Primary flow direction for streamwise IC and Poiseuille modes.
char particle_fields[1024]
PetscReal pseudo_cfl_growth_factor
PetscBool outputParticles
PetscReal y_plus_max
Largest first-cell y+ this rank corrected.
PetscInt particlesLostCumulative
VTKFieldInfo point_data_fields[20]
PetscInt nProfilingSelectedFuncs
PetscInt particlesMigratedLastStep
PetscInt particleRandomSeed
Base seed for every particle RNG stream (-particle_random_seed).
char initialConditionDirectory[PETSC_MAX_PATH_LEN]
LESAveragingMode averaging_mode
Averaging set for the Germano contractions.
struct PicurvWindowStorage * fieldStatisticsStorage
char AnalyticalSolutionType[PETSC_MAX_PATH_LEN]
PetscReal walltimeGuardWarmupAverageSeconds
InitialConditionMode
Selects the algorithm used to populate a fresh Eulerian velocity field.
@ IC_MODE_CONSTANT_CARTESIAN
@ IC_MODE_CONSTANT_STREAMWISE
PetscInt particleConsoleOutputFreq
Cmpnts InitialConstantContra
SearchMetricsState searchMetrics
char checkpointGeometrySHA256[65]
PetscReal runtimeMemoryLogPreviousProcessMB
Previous local process memory sample in MB.
PetscReal walltimeGuardEWMASeconds
PetscReal vreman_coefficient
Model constant c for VREMAN (Vreman 2004: 2.5 Cs^2).
PetscInt mom_max_pseudo_steps
PetscRandom BrownianMotionRNG
PetscInt migrationPassesLastStep
InitialConditionField
Selects the authoritative velocity representation in a staged file IC.
ExecutionMode
Defines the execution mode of the application.
@ EXEC_MODE_POSTPROCESSOR
char _io_context_buffer[PETSC_MAX_PATH_LEN]
PetscInt field_statistics_source_step
Committed step supplying the state; negative means the step being processed.
PetscReal walltimeGuardLimitSeconds
Cmpnts periodic_translation[3]
Face
Enumerates the six faces of a cubic cell for distance calculations.
PetscBool ps_ksp_pic_monitor_true_residual
PetscReal walltimeGuardEstimatorAlpha
PetscInt les
Active LES closure; an LESModelType value.
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.
Vec lQcrit
Cell-centred Q-criterion and its ghosted copy for nodal averaging.
struct list_node Node_List
A generic C-style linked list node for indices.
SolutionConvergenceMode
Selects the runtime solution-convergence diagnostics mode.
@ SOLUTION_CONVERGENCE_TRANSIENT
@ SOLUTION_CONVERGENCE_PERIODIC_DETERMINISTIC
@ SOLUTION_CONVERGENCE_STATISTICAL_STEADY
@ SOLUTION_CONVERGENCE_STEADY_DETERMINISTIC
PetscBool periodic_translation_valid[3]
PetscReal mom_ratio_ema_alpha
SolutionConvergenceMode solutionConvergenceMode
PetscReal particlesLostScalarLastStep
Sum of Psi over the particles removed this step.
PetscInt64 searchAttempts
InitialConditionField initialConditionField
PetscReal backscatter_volume
Fluid volume whose raw coefficient was negative.
PetscBool restartHistoryAvailable
PetscReal walltimeGuardMultiplier
PetscInt rotateframe
moveframe/rotateframe are refused at setup.
MomentumSolverType mom_solver_type
PetscInt64 maxTraversalFailCount
char PostprocessingControlFile[PETSC_MAX_PATH_LEN]
char restart_dir[PETSC_MAX_PATH_LEN]
VerificationDiffusivityConfig verificationDiffusivity
PetscReal walltimeGuardJobStartEpochSeconds
#define MAX_VTK_FIELD_NAME_LENGTH
Maximum length for VTK field names.
LESFilterWidthModel
Selects how a cell's grid filter width is derived from its metrics.
@ LES_FILTER_WIDTH_SCOTTI
@ LES_FILTER_WIDTH_GEOMETRIC_MEAN
@ LES_FILTER_WIDTH_CUBE_ROOT_VOLUME
@ LES_FILTER_WIDTH_MAX_EDGE
PetscInt LoggingFrequency
Cmpnts vertices[8]
Coordinates of the eight vertices of the cell.
PetscReal drivingForceMagnitude
PetscReal particleLoadImbalance
struct ParticleFieldPlan * particleFieldPlan
Configured initial particle-field values, or NULL.
PetscBool fieldStatisticsContinue
Vec Uch
Characteristic velocity for boundary conditions.
BCFace
Identifies the six logical faces of a structured computational block.
WallModelDiagnosticsState wall_diagnostics
Near-wall statistics from the last wall-model pass.
BoundaryCondition * handler
VTKFileType
Enumerates the type of VTK file to be written.
Provides execution context for a boundary condition handler.
Boundary condition data used by the BC pipeline and ghost cell machinery.
A node in a linked list for storing key-value parameters from the bcs.dat file.
Holds the complete configuration for one of the six boundary faces.
Defines a 3D axis-aligned bounding box.
Defines the vertices of a single hexahedral grid cell.
A 3D point or vector with PetscScalar components.
A 2D point or vector with PetscScalar components.
A 2D vector of PETSc real numbers (for geometry/coordinates).
Defines prescribed body motion using splines.
Holds all data related to the state and motion of a body in FSI.
Holds interpolation and distance information for a single IBM point.
Head of a linked list for IBM data.
A linked list node containing IBM interpolation info.
Represents a collection of nodes forming a surface for the IBM.
Represents a collection of nodes forming a volume for the IBM.
Every user-selectable parameter of the LES closure.
Pre-clipping volume statistics captured by one dynamic-coefficient update.
Context for Multigrid operations.
Information needed to migrate a single particle between MPI ranks.
Defines a particle's core properties for Lagrangian tracking.
Holds all configuration parameters for a post-processing run.
A lean struct to hold the global cell ownership range for a single MPI rank.
Stores the MPI ranks of neighboring subdomains.
Aggregated per-timestep search instrumentation counters.
The master context for the entire simulation.
Information about a surface element for FSI calculations.
A symmetric second-order tensor stored by its six independent components.
User-defined context containing data specific to a single computational grid level.
User-level context for managing the entire multigrid hierarchy.
Stores all necessary information for a single data array in a VTK file.
Verification-only analytical diffusivity override settings.
Verification-only analytical scalar override settings.
Near-wall statistics captured by one wall-model pass.
Head of a generic C-style linked list.
A generic C-style linked list node for indices.
A generic C-style linked list node for integers.