|
DNDSR 0.2.1
Distributed Numeric Data Structure for CFV
|
Phase-0 regression tests for CFV Variational Reconstruction. More...
#include "doctest.h"#include "CFV/VariationalReconstruction.hpp"#include <array>#include <cmath>#include <iostream>#include <iomanip>#include <functional>#include <nlohmann/json.hpp>#include <map>#include <string>#include <vector>#include "CFV/VariationalReconstruction_LimiterProcedure.hxx"Go to the source code of this file.
Classes | |
| struct | LimiterTestCase |
Macros | |
| #define | DOCTEST_CONFIG_IMPLEMENT |
| #define | POLY_TEST(testName, method, polyFunc, polyDeg) |
Typedefs | |
| using | tVR = CFV::VariationalReconstruction< g_dim > |
| using | ScalarFunc = std::function< DNDS::real(const tPoint &)> |
Enumerations | |
| enum class | RecMethod { GaussGreen , VFV_P1_HQM , VFV_P2_HQM , VFV_P3_HQM , VFV_P1_Default , VFV_P2_Default , VFV_P3_Default } |
Functions | |
| int | main (int argc, char **argv) |
| POLY_TEST ("const", GaussGreen, [](const tPoint &) { return 1.0;}, 0) POLY_TEST(" const " | |
| const tPoint | POLY_TEST ("const", VFV_P2_HQM, [](const tPoint &) { return 1.0;}, 0) POLY_TEST(" const " |
| const tPoint const tPoint | POLY_TEST ("const", VFV_P1_Default, [](const tPoint &) { return 1.0;}, 0) POLY_TEST("linear" |
| POLY_TEST ("linear", VFV_P1_HQM, [](const tPoint &p) { return p[0]+2 *p[1];}, 1) POLY_TEST("linear" | |
| POLY_TEST ("linear", VFV_P3_HQM, [](const tPoint &p) { return p[0]+2 *p[1];}, 1) POLY_TEST("linear" | |
| POLY_TEST ("quad", VFV_P2_HQM, [](const tPoint &p) { return p[0] *p[0]+p[1] *p[1];}, 2) POLY_TEST("quad" | |
| POLY_TEST ("quad", VFV_P2_Default, [](const tPoint &p) { return p[0] *p[0]+p[1] *p[1];}, 2) POLY_TEST("cubic" | |
| POLY_TEST ("cubic", VFV_P3_Default, [](const tPoint &p) { return p[0] *p[0] *p[0]+p[0] *p[1] *p[1];}, 3) struct PeriodicTestCase | |
| TEST_CASE ("Periodic reconstruction convergence series") | |
| TEST_CASE ("VFV P2 HQM converges on IV10 base mesh") | |
| TEST_CASE ("DEBUG compare InterpolateFace vs Legacy face2cell") | |
| TEST_CASE ("Limiter procedure: reconstruction + smooth indicator + WBAP limiter") | |
Variables | |
| VFV_P1_HQM | |
| const tPoint | VFV_P3_HQM |
| const tPoint const tPoint | GaussGreen |
| const tPoint const tPoint const tPoint & | p { return p[0] + 2 * p[1] |
| VFV_P2_HQM | |
| VFV_P1_Default | |
Phase-0 regression tests for CFV Variational Reconstruction.
Parameterized over [mesh+function, reconstruction_method].
All iterative VR uses Jacobi iteration (SORInstead=false) so that golden values are deterministic across MPI partitionings (np=1,2,4).
Error metric: L1 pointwise error at 6th-degree quadrature points, divided by domain volume (so the dimension matches the field function).
Meshes:
Golden values captured from commit c774b89 on dev/harry_refac1.
Definition in file test_Reconstruction.cpp.
| #define DOCTEST_CONFIG_IMPLEMENT |
Definition at line 21 of file test_Reconstruction.cpp.
| #define POLY_TEST | ( | testName, | |
| method, | |||
| polyFunc, | |||
| polyDeg | |||
| ) |
Definition at line 454 of file test_Reconstruction.cpp.
| using ScalarFunc = std::function<DNDS::real(const tPoint &)> |
Definition at line 232 of file test_Reconstruction.cpp.
| using tVR = CFV::VariationalReconstruction<g_dim> |
Definition at line 41 of file test_Reconstruction.cpp.
|
strong |
| Enumerator | |
|---|---|
| GaussGreen | |
| VFV_P1_HQM | |
| VFV_P2_HQM | |
| VFV_P3_HQM | |
| VFV_P1_Default | |
| VFV_P2_Default | |
| VFV_P3_Default | |
Definition at line 128 of file test_Reconstruction.cpp.
| int main | ( | int | argc, |
| char ** | argv | ||
| ) |
| POLY_TEST | ( | "const" | , |
| GaussGreen | , | ||
| [] (const tPoint &) { return 1.0;} | , | ||
| 0 | |||
| ) | const |
| const tPoint const tPoint POLY_TEST | ( | "const" | , |
| VFV_P1_Default | , | ||
| [] (const tPoint &) { return 1.0;} | , | ||
| 0 | |||
| ) |
| const tPoint POLY_TEST | ( | "const" | , |
| VFV_P2_HQM | , | ||
| [] (const tPoint &) { return 1.0;} | , | ||
| 0 | |||
| ) | const |
| POLY_TEST | ( | "cubic" | , |
| VFV_P3_Default | , | ||
| [] (const tPoint &p) { return p[0] *p[0] *p[0]+p[0] *p[1] *p[1];} | , | ||
| 3 | |||
| ) |
Definition at line 505 of file test_Reconstruction.cpp.
| POLY_TEST | ( | "linear" | , |
| VFV_P1_HQM | , | ||
| [] (const tPoint &p) { return p[0]+2 *p[1];} | , | ||
| 1 | |||
| ) |
| POLY_TEST | ( | "linear" | , |
| VFV_P3_HQM | , | ||
| [] (const tPoint &p) { return p[0]+2 *p[1];} | , | ||
| 1 | |||
| ) |
| TEST_CASE | ( | "DEBUG compare InterpolateFace vs Legacy face2cell" | ) |
| TEST_CASE | ( | "Limiter procedure: reconstruction + smooth indicator + WBAP limiter" | ) |
| TEST_CASE | ( | "Periodic reconstruction convergence series" | ) |
| TEST_CASE | ( | "VFV P2 HQM converges on IV10 base mesh" | ) |
Definition at line 483 of file test_Reconstruction.cpp.
| const tPoint & p { return p[0] + 2 * p[1] |
Definition at line 483 of file test_Reconstruction.cpp.
| VFV_P1_Default |
Definition at line 491 of file test_Reconstruction.cpp.
| VFV_P1_HQM |
Definition at line 473 of file test_Reconstruction.cpp.
| VFV_P2_HQM |
Definition at line 487 of file test_Reconstruction.cpp.
| VFV_P3_HQM |
Definition at line 477 of file test_Reconstruction.cpp.