https://mooseframework.inl.gov
ElementIntegerAux.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 "ElementIntegerAux.h"
11 
13 
16 {
18  params.addClassDescription("Creates a field showing the element integer.");
19  params.addParam<std::vector<ExtraElementIDName>>("integer_names",
20  "Element integers to be retrieved");
21  return params;
22 }
23 
25  : AuxKernel(parameters), _id(getElementID("integer_names"))
26 {
27  if (isNodal())
28  mooseError("ElementIntegerAux must be for an elemental variable");
29 }
30 
31 Real
33 {
34  return _id;
35 }
registerMooseObject("MooseApp", ElementIntegerAux)
static InputParameters validParams()
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
virtual Real computeValue() override
Compute and return the value of the aux variable.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const dof_id_type & _id
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
void addClassDescription(const std::string &doc_string)
This method adds a description of the class that will be displayed in the input file syntax dump...
void addParam(const std::string &name, const S &value, const std::string &doc_string)
These methods add an optional parameter and a documentation string to the InputParameters object...
static InputParameters validParams()
Definition: AuxKernel.C:27
ElementIntegerAux(const InputParameters &parameters)
bool isNodal() const
Nodal or elemental kernel?
Definition: AuxKernel.h:86