https://mooseframework.inl.gov
DiscreteLineSegmentInterfaceTestAux.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 
11 
12 registerMooseObject("ThermalHydraulicsTestApp", DiscreteLineSegmentInterfaceTestAux);
13 
16 {
19 
20  MooseEnum test_type("axial_coord radial_coord axial_section_index axial_element_index");
21  params.addRequiredParam<MooseEnum>("test_type", test_type, "Type of test");
22 
23  params.addClassDescription("Tests DiscreteLineSegmentInterface.");
24 
25  return params;
26 }
27 
29  : AuxKernel(params), DiscreteLineSegmentInterface(this), _test_type(getParam<MooseEnum>("test_type"))
30 {
31 }
32 
33 Real
35 {
36  const Point p = isNodal() ? *_current_node : _q_point[_qp];
37 
38  if (_test_type == "axial_coord")
39  return computeAxialCoordinate(p);
40  else if (_test_type == "radial_coord")
41  return computeRadialCoordinate(p);
42  else if (_test_type == "axial_section_index")
43  return getAxialSectionIndex(p);
44  else if (_test_type == "axial_element_index")
45  return getAxialElementIndex(p);
46  else
47  mooseError("Invalid 'test_type'.");
48 }
Defines a discretized line segment in 3D space.
Real computeAxialCoordinate(const Point &p) const
unsigned int getAxialSectionIndex(const Point &p) const
const Node *const & _current_node
void addRequiredParam(const std::string &name, const std::string &doc_string)
DiscreteLineSegmentInterfaceTestAux(const InputParameters &params)
const MooseEnum & _test_type
Which interface to test.
registerMooseObject("ThermalHydraulicsTestApp", DiscreteLineSegmentInterfaceTestAux)
Real computeRadialCoordinate(const Point &p) const
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
unsigned int getAxialElementIndex(const Point &p_center) const
void mooseError(Args &&... args) const
void addClassDescription(const std::string &doc_string)
static InputParameters validParams()
const MooseArray< Point > & _q_point