C unit tests for solver-side analytical and LES helper kernels. More...
#include "test_support.h"#include "verification_sources.h"#include "AnalyticalSolutions.h"#include "BodyForces.h"#include "Filter.h"#include "les.h"#include "solvers.h"#include "momentumsolvers.h"Go to the source code of this file.
Functions | |
| static PetscErrorCode | TestLESTestFilterPaths (void) |
| Tests LES test-filter helper paths for representative cases. | |
| static PetscErrorCode | TestAnalyticalScalarVerificationHelpers (void) |
| Tests analytical scalar verification helper routines. | |
| static PetscErrorCode | UseAnalyticalSource (SimCtx *simCtx, const char *u, const char *v, const char *w, const char *pressure) |
| Selects an analytical field: the options a case's source becomes. | |
| static PetscErrorCode | TestAnalyticalSolutionEngineFollowsItsSource (void) |
Tests that the field is the source: zero, then uniform with its face fluxes and boundary values, and that a source without t is evaluated once. | |
| static PetscErrorCode | TestAnalyticalSolutionEngineTaylorGreenSamples (void) |
| Tests exact Taylor-Green samples on selected Eulerian interior and boundary points. | |
| static PetscErrorCode | TestAnalyticalBoundaryValuesAreAtFaceCentres (void) |
| Tests that a boundary value is the source at its own face's centre on both sides: a + face's value lives in the dummy layer, one past the layer of its flux and centre. | |
| static PetscErrorCode | TestAnalyticalSolutionForParticlesEvaluatesTheSource (void) |
| Tests the source evaluated at particle positions, and the fields it cannot be evaluated for. | |
| static PetscErrorCode | TestComputeEddyViscosityLESDeterministicField (void) |
| Tests deterministic LES eddy-viscosity computation on a linear velocity field. | |
| static PetscErrorCode | TestFlowSolverRejectsUnsupportedMomentumSolverType (void) |
| Tests FlowSolver guardrails for unsupported momentum solver selections. | |
| static PetscErrorCode | TestDrivenChannelFlowSource (void) |
| Tests driven-channel flow source-term evaluation. | |
| static PetscErrorCode | MomFillLocalCmpnts (DM fda, Vec lvec, PetscReal x, PetscReal y, PetscReal z) |
| Fills a local Cmpnts vector (ghosts included) with a uniform vector value. | |
| static PetscErrorCode | MomFillLocalScalar (DM da, Vec lvec, PetscReal v) |
| Fills a local scalar vector (ghosts included) with a uniform value. | |
| static PetscErrorCode | MomSetLocalScalarCell (DM da, Vec lvec, PetscInt ci, PetscInt cj, PetscInt ck, PetscReal v) |
| Sets a single local-scalar cell value (e.g. | |
| static PetscErrorCode | TestMomentumBDFCoefficient (void) |
| static PetscErrorCode | MomMakeUnitGridP (SimCtx **simCtx, UserCtx **user, PetscInt n, PetscBool px, PetscBool py, PetscBool pz, BCType bc) |
| static PetscErrorCode | MomMakeUnitGrid (SimCtx **simCtx, UserCtx **user, PetscInt n, BCType bc) |
| static PetscErrorCode | TestMomentumStabilityCenteredConvection (void) |
| static PetscErrorCode | TestMomentumStabilityQuickInterior (void) |
| static PetscErrorCode | TestMomentumStabilityQuickBoundary (void) |
| static PetscErrorCode | TestMomentumStabilityViscousLongitudinal (void) |
| static PetscErrorCode | TestMomentumStabilityViscousScalesWithNu (void) |
| static PetscErrorCode | TestMomentumStabilityLESEddyViscosity (void) |
| static PetscErrorCode | TestMomentumStabilityOneSidedViscous (void) |
| static PetscErrorCode | TestMomentumStabilityReadOnly (void) |
| static PetscErrorCode | MomSetCartesianMetrics (UserCtx *user, PetscReal dx, PetscReal dy, PetscReal dz) |
| Sets uniform Cartesian metrics for spacing (dx,dy,dz) on all cell and face arrays. | |
| static PetscErrorCode | MomFillUcontXRamp (DM fda, Vec lvec, PetscReal slope) |
| Fills lUcont.x as a linear ramp slope*i (nonzero discrete contravariant divergence). | |
| static PetscErrorCode | MomFillUcatShearY (DM fda, Vec lvec, PetscReal gamma) |
| Fills lUcat as a linear shear u=(gamma*j,0,0) so |grad u|_inf = gamma. | |
| static PetscErrorCode | TestMomentumStabilityAnisotropicViscous (void) |
| static PetscErrorCode | TestMomentumStabilityDirectionalQuick (void) |
| static PetscErrorCode | TestMomentumStabilityOneSidedDirections (void) |
| static PetscErrorCode | TestMomentumStabilityActiveRowMask (void) |
| static PetscErrorCode | TestMomentumStabilityValidation (void) |
| static PetscErrorCode | TestMomentumStabilityCandidateBCDivergence (void) |
| static PetscErrorCode | TestMomentumStabilityCandidateDShear (void) |
| static PetscErrorCode | TestMomentumStabilityWallSuppression (void) |
| static PetscErrorCode | TestMomentumStabilityReadOnlyExact (void) |
| static PetscErrorCode | TestMomentumActiveRowsHelper (void) |
| static PetscErrorCode | TestMomentumStabilityErrorReentry (void) |
| static PetscErrorCode | TestMomentumBDFResidualCombination (void) |
| int | main (int argc, char **argv) |
| Runs the unit-solver PETSc test binary. | |
C unit tests for solver-side analytical and LES helper kernels.
Definition in file test_solver_kernels.c.
|
static |
Tests LES test-filter helper paths for representative cases.
Definition at line 19 of file test_solver_kernels.c.
|
static |
Tests analytical scalar verification helper routines.
Definition at line 55 of file test_solver_kernels.c.
|
static |
Selects an analytical field: the options a case's source becomes.
Definition at line 115 of file test_solver_kernels.c.
|
static |
Tests that the field is the source: zero, then uniform with its face fluxes and boundary values, and that a source without t is evaluated once.
Definition at line 132 of file test_solver_kernels.c.
|
static |
Tests exact Taylor-Green samples on selected Eulerian interior and boundary points.
Definition at line 194 of file test_solver_kernels.c.
|
static |
Tests that a boundary value is the source at its own face's centre on both sides: a + face's value lives in the dummy layer, one past the layer of its flux and centre.
Definition at line 267 of file test_solver_kernels.c.
|
static |
Tests the source evaluated at particle positions, and the fields it cannot be evaluated for.
Definition at line 301 of file test_solver_kernels.c.
|
static |
Tests deterministic LES eddy-viscosity computation on a linear velocity field.
Definition at line 350 of file test_solver_kernels.c.
|
static |
Tests FlowSolver guardrails for unsupported momentum solver selections.
Definition at line 408 of file test_solver_kernels.c.
|
static |
Tests driven-channel flow source-term evaluation.
Definition at line 431 of file test_solver_kernels.c.
|
static |
Fills a local Cmpnts vector (ghosts included) with a uniform vector value.
| fda | Vector DM owning lvec. |
| lvec | Local Cmpnts vector to fill. |
| x,y,z | Uniform component values. |
Definition at line 497 of file test_solver_kernels.c.
|
static |
Fills a local scalar vector (ghosts included) with a uniform value.
| da | Scalar DM owning lvec. |
| lvec | Local scalar vector to fill. |
| v | Uniform value. |
Definition at line 518 of file test_solver_kernels.c.
|
static |
Sets a single local-scalar cell value (e.g.
to mark one nvert solid).
| da | Scalar DM owning lvec. |
| lvec | Local scalar vector. |
| ci,cj,ck | Cell indices to set. |
| v | Value to assign. |
Definition at line 540 of file test_solver_kernels.c.
|
static |
Definition at line 556 of file test_solver_kernels.c.
|
static |
Definition at line 587 of file test_solver_kernels.c.
|
static |
Definition at line 613 of file test_solver_kernels.c.
|
static |
Definition at line 622 of file test_solver_kernels.c.
|
static |
Definition at line 640 of file test_solver_kernels.c.
|
static |
Definition at line 655 of file test_solver_kernels.c.
|
static |
Definition at line 670 of file test_solver_kernels.c.
|
static |
Definition at line 685 of file test_solver_kernels.c.
|
static |
Definition at line 698 of file test_solver_kernels.c.
|
static |
Definition at line 712 of file test_solver_kernels.c.
|
static |
Definition at line 729 of file test_solver_kernels.c.
|
static |
Sets uniform Cartesian metrics for spacing (dx,dy,dz) on all cell and face arrays.
| user | Test user context. |
| dx,dy,dz | Cartesian cell spacings. |
Definition at line 759 of file test_solver_kernels.c.
|
static |
Fills lUcont.x as a linear ramp slope*i (nonzero discrete contravariant divergence).
| fda | Vector DM. |
| lvec | Local Cmpnts vector. |
| slope | Ramp slope. |
Definition at line 783 of file test_solver_kernels.c.
|
static |
Fills lUcat as a linear shear u=(gamma*j,0,0) so |grad u|_inf = gamma.
| fda | Vector DM. |
| lvec | Local Cmpnts vector. |
| gamma | Shear rate. |
Definition at line 804 of file test_solver_kernels.c.
|
static |
Definition at line 820 of file test_solver_kernels.c.
|
static |
Definition at line 834 of file test_solver_kernels.c.
|
static |
Definition at line 849 of file test_solver_kernels.c.
|
static |
Definition at line 877 of file test_solver_kernels.c.
|
static |
Definition at line 901 of file test_solver_kernels.c.
|
static |
Definition at line 925 of file test_solver_kernels.c.
|
static |
Definition at line 940 of file test_solver_kernels.c.
|
static |
Definition at line 961 of file test_solver_kernels.c.
|
static |
Definition at line 978 of file test_solver_kernels.c.
|
static |
Definition at line 1008 of file test_solver_kernels.c.
|
static |
Definition at line 1034 of file test_solver_kernels.c.
|
static |
Definition at line 1065 of file test_solver_kernels.c.
| int main | ( | int | argc, |
| char ** | argv | ||
| ) |
Runs the unit-solver PETSc test binary.
Definition at line 1114 of file test_solver_kernels.c.