C unit tests for metric tensors, face geometry, and length-scale helpers. More...
Go to the source code of this file.
Functions | |
| static PetscErrorCode | TestInvertCovariantMetricTensorDiagonal (void) |
| Tests inversion of a diagonal covariant metric tensor. | |
| static PetscErrorCode | TestMetricVelocityContravariantIdentity (void) |
| Tests contravariant velocity computation for identity metrics. | |
| static PetscErrorCode | TestMetricVelocityContravariantScaledAxes (void) |
| Tests contravariant velocity computation for scaled axes. | |
| static PetscErrorCode | TestCalculateFaceNormalAndAreaAxisAligned (void) |
| Tests face-normal and face-area calculation on an axis-aligned cell. | |
| static PetscErrorCode | TestComputeCellCharacteristicLengthScaleAxisAligned (void) |
| Tests characteristic length-scale computation on an axis-aligned cell. | |
| static PetscErrorCode | TestComputeCellCharacteristicLengthScaleWallResolvedCell (void) |
| Tests the length scales of a wall-resolved cell, whose metrics are tiny. | |
| static PetscErrorCode | TestMetricJacobianIsCellVolumeForParallelepiped (void) |
| Tests that MetricJacobian returns the physical Jacobian of a sheared, scaled cell, whose determinant is its volume. | |
| static PetscErrorCode | TestDegenerateCellIsRefused (void) |
| Tests that a degenerate cell is still refused, and that the refusal propagates. | |
| static PetscErrorCode | TestFacePlanesMatchPerCellPlanes (void) |
| Tests that the shared per-face planes reproduce each cell's own planes and are observable. | |
| int | main (int argc, char **argv) |
| Runs the unit-metric PETSc test binary. | |
C unit tests for metric tensors, face geometry, and length-scale helpers.
Definition in file test_metric.c.
|
static |
Tests inversion of a diagonal covariant metric tensor.
Definition at line 13 of file test_metric.c.
|
static |
Tests contravariant velocity computation for identity metrics.
Definition at line 33 of file test_metric.c.
|
static |
Tests contravariant velocity computation for scaled axes.
Definition at line 54 of file test_metric.c.
|
static |
Tests face-normal and face-area calculation on an axis-aligned cell.
Definition at line 75 of file test_metric.c.
|
static |
Tests characteristic length-scale computation on an axis-aligned cell.
Definition at line 105 of file test_metric.c.
|
static |
Tests the length scales of a wall-resolved cell, whose metrics are tiny.
The determinant of the face-area vectors is the square of the cell volume for an orthogonal cell, so it falls as the sixth power of the spacing. The cell here is one from the Humphrey wall-resolved grid: 4.73e-4 x 4.73e-4 x 3.05e-2, whose determinant is about 4.7e-17. An absolute singularity floor rejected it and left the length scales uninitialized, which reached the solver as a NaN eddy viscosity rather than as an error.
Definition at line 129 of file test_metric.c.
|
static |
Tests that MetricJacobian returns the physical Jacobian of a sheared, scaled cell, whose determinant is its volume.
Definition at line 148 of file test_metric.c.
|
static |
Tests that a degenerate cell is still refused, and that the refusal propagates.
Definition at line 177 of file test_metric.c.
|
static |
Tests that the shared per-face planes reproduce each cell's own planes and are observable.
On the fixture's uniform grid every face is planar, so a grid cell's gathered planes and a dual cell's must give the per-cell distances CalculateDistancesToCellFaces() computes from the same vertices, to rounding; the catalog's diagnostics must accept them.
Definition at line 199 of file test_metric.c.
| int main | ( | int | argc, |
| char ** | argv | ||
| ) |
Runs the unit-metric PETSc test binary.
Definition at line 253 of file test_metric.c.