https://mooseframework.inl.gov
Loading...
Searching...
No Matches
TestNumericalFlux1D.h
Go to the documentation of this file.
1//* This file is part of the MOOSE framework
2//* https://mooseframework.inl.gov
3//*
4//* All rights reserved, see COPYRIGHT for full restrictions
5//* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6//*
7//* Licensed under LGPL 2.1, please see LICENSE for details
8//* https://www.gnu.org/licenses/lgpl-2.1.html
9
10#pragma once
11
12#include "MooseObjectUnitTest.h"
13#include "NumericalFlux1D.h"
14
19{
20public:
22
23protected:
27 virtual const NumericalFlux1D & createFluxObject() = 0;
28
35 virtual std::vector<ADReal> computeConservativeSolution(const std::vector<ADReal> & W,
36 const ADReal & A) const = 0;
37
44 virtual std::vector<ADReal> computeFluxFromPrimitive(const std::vector<ADReal> & W,
45 const ADReal & A) const = 0;
46
50 virtual std::vector<std::pair<std::vector<ADReal>, std::vector<ADReal>>>
52
56 virtual std::vector<std::vector<ADReal>> getPrimitiveSolutionsConsistencyTest() const = 0;
57
61 void testConsistency();
62
66 void testSymmetry();
67};
DualNumber< Real, DNDerivativeType, true > ADReal
Abstract base class for computing and caching internal or boundary fluxes for 1D conservation law sys...
Base class for testing NumericalFlux1D objects.
virtual std::vector< ADReal > computeConservativeSolution(const std::vector< ADReal > &W, const ADReal &A) const =0
Computes the conservative solution from the primitive solution.
virtual const NumericalFlux1D & createFluxObject()=0
Creates the flux object to be tested.
virtual std::vector< std::pair< std::vector< ADReal >, std::vector< ADReal > > > getPrimitiveSolutionsSymmetryTest() const =0
Gets a vector of pairs of primitive solution vectors to use for symmetry test.
void testConsistency()
Runs the consistency test(s)
virtual std::vector< ADReal > computeFluxFromPrimitive(const std::vector< ADReal > &W, const ADReal &A) const =0
Computes the 1D flux vector from the primitive solution.
virtual std::vector< std::vector< ADReal > > getPrimitiveSolutionsConsistencyTest() const =0
Gets a vector of primitive solution vectors to use for consistency test.
void testSymmetry()
Runs the symmetry test(s)