https://mooseframework.inl.gov
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 
10 #include "NaNInterfaceTestKernel.h"
12 
13 registerMooseObject("FluidPropertiesTestApp", NaNInterfaceTestKernel);
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 
35 Real
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 }
static InputParameters validParams()
virtual Real computeQpResidual() override
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
Fluid properties for testing NaNInterface.
Kernel to test NaNInterface using NaNInterfaceTestFluidProperties.
const NaNInterfaceTestFluidProperties & _nan_interface_test_fp
Test fluid properties.
registerMooseObject("FluidPropertiesTestApp", NaNInterfaceTestKernel)
NaNInterfaceTestKernel(const InputParameters &parameters)
void addRequiredParam(const std::string &name, const std::string &doc_string)
std::vector< Real > returnNaNVector() const
Returns a NaN vector of size 2.
virtual Real p_from_v_e(Real v, Real e) const override
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
void addClassDescription(const std::string &doc_string)
static InputParameters validParams()