|
PICurv 0.1.0
A Parallel Particle-In-Cell Solver for Curvilinear LES
|
C unit tests for runtime, particle, wall, and walltime-guard helpers. More...
#include "test_support.h"#include "BC_Handlers.h"#include "ParticleMotion.h"#include "ParticlePhysics.h"#include "ParticleSwarm.h"#include "interpolation.h"#include "initialcondition.h"#include "les.h"#include "runloop.h"#include "setup.h"#include "wallfunction.h"#include "walkingsearch.h"Go to the source code of this file.
Functions | |
| static PetscErrorCode | SyncRuntimeFieldGhosts (UserCtx *user) |
| Synchronizes the minimal runtime fixture's global fields into their persistent local ghosts. | |
| static PetscErrorCode | SeedSingleParticle (UserCtx *user, PetscInt ci, PetscInt cj, PetscInt ck, PetscReal x, PetscReal y, PetscReal z, PetscReal wx, PetscReal wy, PetscReal wz, PetscInt status_value) |
| Seeds one localized swarm particle with the cell, position, weight, and status data used by runtime tests. | |
| static PetscErrorCode | TestDistributeParticlesRemainderHandling (void) |
| Tests particle distribution remainder handling across ranks. | |
| static PetscErrorCode | TestIsParticleInsideBoundingBoxBasicCases (void) |
| Tests basic particle-inside-bounding-box classification cases. | |
| static PetscErrorCode | TestUpdateParticleWeightsComputesExpectedRatios (void) |
| Tests particle weight updates against expected ratios. | |
| static PetscErrorCode | TestUpdateParticlePositionWithoutBrownianContribution (void) |
| Tests particle position updates without Brownian forcing. | |
| static PetscErrorCode | TestUpdateParticlePositionDiffusivityGradientOnly (void) |
| Tests particle position updates driven only by diffusivity-gradient drift. | |
| static PetscErrorCode | TestUpdateParticleFieldIEMRelaxation (void) |
| Tests IEM relaxation updates for particle-carried fields. | |
| static PetscErrorCode | TestSetInitialInteriorFieldIgnoresNonUcontRequest (void) |
| Tests that non-Ucont requests do not modify interior field initialization. | |
| static PetscErrorCode | TestSetInitialInteriorFieldCartesianConstantSetsContravariantFlux (void) |
| Tests cartesian Constant IC: Cart2Contra sets contravariant flux via metric dot product. | |
| static PetscErrorCode | TestSetInitialInteriorFieldCurvilinearConstantViaFlowDirection (void) |
| Tests curvilinear Constant IC: flow_direction selects the streamwise axis. | |
| static PetscErrorCode | TestSetInitialInteriorFieldZeroClearsInterior (void) |
| Tests zero IC clears physical-cell contravariant velocity. | |
| static PetscErrorCode | TestSetInitialInteriorFieldPoiseuilleProfile (void) |
| Tests Poiseuille IC follows the discrete cross-stream profile and reaches zero at edges. | |
| static PetscErrorCode | TestCart2ContraConvertsCartesianField (void) |
| Tests spatially varying Cartesian-field conversion to contravariant fluxes. | |
| static PetscErrorCode | TestCart2ContraUsesFinalizedPeriodicUcat (void) |
| Verifies periodic Ucat endpoints are repaired before Cart2Contra terminal faces. | |
| static PetscErrorCode | TestPopulateInitialUcontLoadsStagedUcat (void) |
| Tests loading a staged Ucat file IC and converting it to Ucont. | |
| static PetscErrorCode | TestPopulateInitialUcontLoadsStagedUcont (void) |
| Tests loading a staged Ucont file IC without Cartesian conversion. | |
| static PetscErrorCode | TestInterpolateAllFieldsToSwarmConstantFields (void) |
| Tests direct interpolation from Eulerian fields to one localized swarm particle. | |
| static PetscErrorCode | TestInterpolateAllFieldsToSwarmCornerAveragedConstantFields (void) |
| Tests the corner-averaged (legacy) interpolation path on constant fields. | |
| static PetscErrorCode | TestScatterAllParticleFieldsToEulerFieldsAveragesPsi (void) |
| Tests particle-to-grid scattering using known cell occupancy and scalar values. | |
| static PetscErrorCode | TestCalculateParticleCountPerCellCountsGlobalCellIDs (void) |
| Tests particle counting by geometric cell IDs using the production +1 storage shift. | |
| static PetscErrorCode | TestResetAllParticleStatusesLeavesLostParticlesUntouched (void) |
| Tests localized particle-status reset behavior for restart of the location workflow. | |
| static PetscErrorCode | TestCheckAndRemoveOutOfBoundsParticlesRemovesEscapedParticle (void) |
| Tests direct removal of particles that leave every rank bounding box. | |
| static PetscErrorCode | TestCheckAndRemoveLostParticlesRemovesLostEntries (void) |
| Tests direct removal of particles already marked LOST by the location workflow. | |
| static PetscErrorCode | TestCalculateBrownianDisplacementDeterministicSeed (void) |
| Tests Brownian displacement generation against a duplicated seeded RNG stream. | |
| static PetscErrorCode | TestUpdateAllParticlePositionsMovesSwarmEntries (void) |
| Tests swarm-wide particle position updates using the same transport path as the runtime loop. | |
| static PetscErrorCode | TestLocateAllParticlesInGridPriorCellFastPath (void) |
| Tests the location orchestrator fast path when a particle already carries a valid prior cell. | |
| static PetscErrorCode | TestLocateAllParticlesInGridGuessPathResolvesLocalParticle (void) |
| Tests the guess-then-verify orchestrator path for a local particle with an unknown prior cell. | |
| static PetscErrorCode | TestLocateParticleOrFindMigrationTargetCountsReSearch (void) |
| Verifies that later settlement passes increment re-search metrics. | |
| static PetscErrorCode | TestWallNoSlipAndFreeSlipHelpers (void) |
| Tests no-slip and free-slip wall helper kernels. | |
| static PetscErrorCode | TestWallModelScalarHelpers (void) |
| Tests wall-model scalar helper kernels. | |
| static PetscErrorCode | TestWallModelVelocityHelpers (void) |
| Tests closed-form and iterative wall-model velocity helpers against inverse reconstructions. | |
| static PetscErrorCode | TestWallFunctionVectorWrappers (void) |
| Tests the vector wall-function wrappers on a tangential reference flow. | |
| static PetscErrorCode | TestValidateDrivenFlowConfigurationNoDrivenHandlers (void) |
| Tests driven-flow validation when no driven handlers are present. | |
| static PetscErrorCode | TestComputeSmagorinskyConstantConstantModel (void) |
| Tests the constant Smagorinsky model helper path. | |
| static PetscErrorCode | TestMinimalFixtureMirrorsProductionDMLayout (void) |
| Tests that the shared minimal fixture mirrors the production DA contract. | |
| static PetscErrorCode | TestMinimalFixtureRegistersProductionSwarmFields (void) |
| Tests that the shared swarm fixture registers the production field set. | |
| static PetscErrorCode | TestUpdateSolverHistoryVectorsShiftsStates (void) |
| Tests solver history-vector shifting between time levels. | |
| static PetscErrorCode | TestGetOwnedCellRangeSingleRankAccounting (void) |
| Tests owned-cell range accounting on a single MPI rank. | |
| static PetscErrorCode | TestComputeAndStoreNeighborRanksSingleRank (void) |
| Tests neighbor-rank discovery on a single MPI rank. | |
| static PetscErrorCode | TestRuntimeWalltimeGuardParsesPositiveSeconds (void) |
| Tests parsing of positive runtime walltime metadata values. | |
| static PetscErrorCode | TestRuntimeWalltimeGuardEstimatorHelpers (void) |
| Tests walltime-guard estimator helper calculations. | |
| static PetscErrorCode | TestRuntimeWalltimeGuardTriggerDecision (void) |
| Tests runtime walltime-guard shutdown trigger decisions. | |
| int | main (int argc, char **argv) |
| Runs the unit-runtime PETSc test binary. | |
C unit tests for runtime, particle, wall, and walltime-guard helpers.
Definition in file test_runtime_kernels.c.
|
static |
Synchronizes the minimal runtime fixture's global fields into their persistent local ghosts.
Definition at line 23 of file test_runtime_kernels.c.
|
static |
Seeds one localized swarm particle with the cell, position, weight, and status data used by runtime tests.
Definition at line 44 of file test_runtime_kernels.c.
|
static |
Tests particle distribution remainder handling across ranks.
Definition at line 88 of file test_runtime_kernels.c.
|
static |
Tests basic particle-inside-bounding-box classification cases.
Definition at line 107 of file test_runtime_kernels.c.
|
static |
Tests particle weight updates against expected ratios.
Definition at line 136 of file test_runtime_kernels.c.
|
static |
Tests particle position updates without Brownian forcing.
Definition at line 159 of file test_runtime_kernels.c.
|
static |
Tests particle position updates driven only by diffusivity-gradient drift.
Definition at line 193 of file test_runtime_kernels.c.
|
static |
Tests IEM relaxation updates for particle-carried fields.
Definition at line 227 of file test_runtime_kernels.c.
|
static |
Tests that non-Ucont requests do not modify interior field initialization.
Definition at line 253 of file test_runtime_kernels.c.
|
static |
Tests cartesian Constant IC: Cart2Contra sets contravariant flux via metric dot product.
The minimal runtime fixture uses identity face metrics. UniformCart2Contra therefore maps (u,v,w)=(0,0,2) directly to a Zeta flux of 2.
Definition at line 274 of file test_runtime_kernels.c.
|
static |
Tests curvilinear Constant IC: flow_direction selects the streamwise axis.
icVelocityPhysical=2.0, FLOW_DIR_POS_ZETA. The minimal runtime fixture uses identity face metrics, so ucont.z = 2.0. Xi and Eta components are left at zero regardless of InitialConstantContra.
Definition at line 306 of file test_runtime_kernels.c.
|
static |
Tests zero IC clears physical-cell contravariant velocity.
Definition at line 338 of file test_runtime_kernels.c.
|
static |
Tests Poiseuille IC follows the discrete cross-stream profile and reaches zero at edges.
Definition at line 363 of file test_runtime_kernels.c.
|
static |
Tests spatially varying Cartesian-field conversion to contravariant fluxes.
Definition at line 393 of file test_runtime_kernels.c.
|
static |
Verifies periodic Ucat endpoints are repaired before Cart2Contra terminal faces.
Definition at line 425 of file test_runtime_kernels.c.
|
static |
Tests loading a staged Ucat file IC and converting it to Ucont.
Definition at line 455 of file test_runtime_kernels.c.
|
static |
Tests loading a staged Ucont file IC without Cartesian conversion.
Definition at line 492 of file test_runtime_kernels.c.
|
static |
Tests direct interpolation from Eulerian fields to one localized swarm particle.
Definition at line 522 of file test_runtime_kernels.c.
|
static |
Tests the corner-averaged (legacy) interpolation path on constant fields.
Definition at line 574 of file test_runtime_kernels.c.
|
static |
Tests particle-to-grid scattering using known cell occupancy and scalar values.
Definition at line 627 of file test_runtime_kernels.c.
|
static |
Tests particle counting by geometric cell IDs using the production +1 storage shift.
Definition at line 662 of file test_runtime_kernels.c.
|
static |
Tests localized particle-status reset behavior for restart of the location workflow.
Definition at line 693 of file test_runtime_kernels.c.
|
static |
Tests direct removal of particles that leave every rank bounding box.
Definition at line 724 of file test_runtime_kernels.c.
|
static |
Tests direct removal of particles already marked LOST by the location workflow.
Definition at line 755 of file test_runtime_kernels.c.
|
static |
Tests Brownian displacement generation against a duplicated seeded RNG stream.
Definition at line 787 of file test_runtime_kernels.c.
|
static |
Tests swarm-wide particle position updates using the same transport path as the runtime loop.
Definition at line 820 of file test_runtime_kernels.c.
|
static |
Tests the location orchestrator fast path when a particle already carries a valid prior cell.
Definition at line 885 of file test_runtime_kernels.c.
|
static |
Tests the guess-then-verify orchestrator path for a local particle with an unknown prior cell.
Definition at line 943 of file test_runtime_kernels.c.
|
static |
Verifies that later settlement passes increment re-search metrics.
Definition at line 1001 of file test_runtime_kernels.c.
|
static |
Tests no-slip and free-slip wall helper kernels.
Definition at line 1042 of file test_runtime_kernels.c.
|
static |
Tests wall-model scalar helper kernels.
Definition at line 1065 of file test_runtime_kernels.c.
|
static |
Tests closed-form and iterative wall-model velocity helpers against inverse reconstructions.
Definition at line 1089 of file test_runtime_kernels.c.
|
static |
Tests the vector wall-function wrappers on a tangential reference flow.
Definition at line 1123 of file test_runtime_kernels.c.
|
static |
Tests driven-flow validation when no driven handlers are present.
Definition at line 1159 of file test_runtime_kernels.c.
|
static |
Tests the constant Smagorinsky model helper path.
Definition at line 1174 of file test_runtime_kernels.c.
|
static |
Tests that the shared minimal fixture mirrors the production DA contract.
Definition at line 1203 of file test_runtime_kernels.c.
|
static |
Tests that the shared swarm fixture registers the production field set.
Definition at line 1232 of file test_runtime_kernels.c.
|
static |
Tests solver history-vector shifting between time levels.
Definition at line 1283 of file test_runtime_kernels.c.
|
static |
Tests owned-cell range accounting on a single MPI rank.
Definition at line 1315 of file test_runtime_kernels.c.
|
static |
Tests neighbor-rank discovery on a single MPI rank.
Definition at line 1343 of file test_runtime_kernels.c.
|
static |
Tests parsing of positive runtime walltime metadata values.
Definition at line 1366 of file test_runtime_kernels.c.
|
static |
Tests walltime-guard estimator helper calculations.
Definition at line 1383 of file test_runtime_kernels.c.
|
static |
Tests runtime walltime-guard shutdown trigger decisions.
Definition at line 1409 of file test_runtime_kernels.c.
| int main | ( | int | argc, |
| char ** | argv | ||
| ) |
Runs the unit-runtime PETSc test binary.
Definition at line 1431 of file test_runtime_kernels.c.