https://mooseframework.inl.gov
Loading...
Searching...
No Matches
NaNInterfaceTestKernel.C
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
12
14
17{
19
20 params.addRequiredParam<UserObjectName>("nan_interface_test_fp",
21 "NaNInterfaceTestFluidProperties user object name");
22 params.addParam<bool>("test_vector_version", false, "Test getNaNVector? Else, test getNaN");
23
24 params.addClassDescription("Kernel to test NaNInterface using NaNInterfaceTestFluidProperties");
25
26 return params;
27}
28
30 : Kernel(parameters),
31 _nan_interface_test_fp(getUserObject<NaNInterfaceTestFluidProperties>("nan_interface_test_fp"))
32{
33}
34
35Real
37{
38 if (getParam<bool>("test_vector_version"))
39 {
40 const std::vector<Real> nan_vector = _nan_interface_test_fp.returnNaNVector();
41 return nan_vector[0];
42 }
43 else
45}
registerMooseObject("FluidPropertiesTestApp", NaNInterfaceTestKernel)
void addRequiredParam(const std::string &name, const std::string &doc_string)
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
void addClassDescription(const std::string &doc_string)
static InputParameters validParams()
Fluid properties for testing NaNInterface.
std::vector< Real > returnNaNVector() const
Returns a NaN vector of size 2.
virtual Real p_from_v_e(Real v, Real e) const override
Kernel to test NaNInterface using NaNInterfaceTestFluidProperties.
virtual Real computeQpResidual() override
NaNInterfaceTestKernel(const InputParameters &parameters)
const NaNInterfaceTestFluidProperties & _nan_interface_test_fp
Test fluid properties.
static InputParameters validParams()