|
PICurv 0.1.0
A Parallel Particle-In-Cell Solver for Curvilinear LES
|
C unit tests for the weighted centered-moment kernels. More...
Go to the source code of this file.
Functions | |
| static PetscErrorCode | TestConstantFieldHasExactlyZeroVariance (void) |
| A constant signal must produce exactly zero variance, not merely small. | |
| static PetscErrorCode | TestKnownScalarMoments (void) |
| Known scalar moments for equal and unequal weights. | |
| static PetscErrorCode | TestKnownTwoSampleCovariance (void) |
| Known two-sample covariance through the co-moment update. | |
| static PetscErrorCode | TestSixSymmetricVelocityComponents (void) |
| All six symmetric components of a three-sample vector self-product. | |
| static PetscErrorCode | TestCoMomentOfSelfMatchesSecondMoment (void) |
| A co-moment of a signal with itself must reproduce the scalar second moment bitwise. | |
| static PetscErrorCode | TestHighMeanLowFluctuationPrecision (void) |
| High mean with small fluctuation, where a naive sum-of-squares cancels catastrophically. | |
| static PetscErrorCode | TestMergeEqualsSequential (void) |
| Merging two partitions must reproduce a single sequential accumulation. | |
| static PetscErrorCode | TestNonPositiveWeightRejected (void) |
| Non-positive weights are rejected rather than silently corrupting the accumulator. | |
| int | main (int argc, char **argv) |
| Entry point for the centered-moment kernel suite. | |
C unit tests for the weighted centered-moment kernels.
Covers the Stage 1 acceptance items in Field Statistics Phase 2 Implementation Specification section 13: constant fields yielding exactly zero covariance, known two- and three-sample moments across all six symmetric velocity components, high-mean/low-fluctuation precision, and merge-equals-sequential.
Definition in file test_statistics_moments.c.
|
static |
A constant signal must produce exactly zero variance, not merely small.
Definition at line 17 of file test_statistics_moments.c.
|
static |
Known scalar moments for equal and unequal weights.
Definition at line 43 of file test_statistics_moments.c.
|
static |
Known two-sample covariance through the co-moment update.
Definition at line 76 of file test_statistics_moments.c.
|
static |
All six symmetric components of a three-sample vector self-product.
Component order is the fixed upper-triangular row-major order required by the accumulator contract: (xx, xy, xz, yy, yz, zz).
Definition at line 99 of file test_statistics_moments.c.
|
static |
A co-moment of a signal with itself must reproduce the scalar second moment bitwise.
Definition at line 135 of file test_statistics_moments.c.
|
static |
High mean with small fluctuation, where a naive sum-of-squares cancels catastrophically.
Samples 1e8-1 and 1e8+1 have variance exactly 1. Accumulating raw second sums would compute a difference of two values near 2e16, whose spacing exceeds the answer, so the centered update is what makes this recoverable.
Definition at line 163 of file test_statistics_moments.c.
|
static |
Merging two partitions must reproduce a single sequential accumulation.
Definition at line 186 of file test_statistics_moments.c.
|
static |
Non-positive weights are rejected rather than silently corrupting the accumulator.
Definition at line 237 of file test_statistics_moments.c.
| int main | ( | int | argc, |
| char ** | argv | ||
| ) |
Entry point for the centered-moment kernel suite.
Definition at line 273 of file test_statistics_moments.c.