https://mooseframework.inl.gov
ExtraElementIDAux.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 "ExtraElementIDAux.h"
11 
13 registerMooseObjectRenamed("MooseApp", ElemExtraIDAux, "01/30/2022 24:00", ExtraElementIDAux);
14 
17 {
19  params.addRequiredParam<std::vector<ExtraElementIDName>>("extra_id_name",
20  "The extra ID name in the mesh");
21  params.addClassDescription("Puts element extra IDs into an aux variable.");
22  return params;
23 }
24 
26  : AuxKernel(parameters), _id(getElementID("extra_id_name"))
27 {
28  if (isNodal())
29  paramError("variable", "This AuxKernel only supports Elemental fields");
30 }
31 
32 Real
34 {
35  return (_id == DofObject::invalid_id) ? -1.0 : _id;
36 }
virtual Real computeValue() override
Compute and return the value of the aux variable.
void paramError(const std::string &param, Args... args) const
Emits an error prefixed with the file and line number of the given param (from the input file) along ...
Definition: MooseBase.h:435
const dof_id_type & _id
ExtraElementIDAux(const InputParameters &parameters)
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
static InputParameters validParams()
void addRequiredParam(const std::string &name, const std::string &doc_string)
This method adds a parameter and documentation string to the InputParameters object that will be extr...
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
registerMooseObjectRenamed("MooseApp", ElemExtraIDAux, "01/30/2022 24:00", ExtraElementIDAux)
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...
static InputParameters validParams()
Definition: AuxKernel.C:27
registerMooseObject("MooseApp", ExtraElementIDAux)
Base class for creating new auxiliary kernels and auxiliary boundary conditions.
Definition: AuxKernel.h:36
bool isNodal() const
Nodal or elemental kernel?
Definition: AuxKernel.h:86