https://mooseframework.inl.gov
TagVectorAux.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 "TagVectorAux.h"
11 
13 
16 {
18  params.addRequiredParam<TagName>("vector_tag", "Tag Name this Aux works on");
19  params.addClassDescription("Couple a tag vector, and return its nodal value");
20  return params;
21 }
22 
24  : TagAuxBase<AuxKernel>(parameters),
25  _v(coupledVectorTagValue("v", "vector_tag")),
26  _v_var(*getFieldVar("v", 0))
27 {
29 }
30 
31 Real
33 {
34  return _scaled ? _v[_qp] : _v[_qp] / _v_var.scalingFactor();
35 }
registerMooseObject("MooseApp", TagVectorAux)
virtual Real computeValue() override
Compute and return the value of the aux variable.
Definition: TagVectorAux.C:32
The value of a tagged vector for a given node and a given variable is coupled to the current AuxVaria...
Definition: TagAuxBase.h:21
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
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...
void checkCoupledVariable(const MooseVariableBase *input_var, const MooseVariableFieldBase *aux_var)
check the aux variable acting on this auxkernl has the consistent properties with the input coupled v...
Definition: TagAuxBase.h:68
static InputParameters validParams()
Definition: TagVectorAux.C:15
The value of a tagged vector for a given node and a given variable is coupled to the current AuxVaria...
Definition: TagVectorAux.h:19
TagVectorAux(const InputParameters &parameters)
Definition: TagVectorAux.C:23
MooseVariableField< Real > & _var
This is a regular kernel so we cast to a regular MooseVariable.
Definition: AuxKernel.h:174
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const VariableValue & _v
Definition: TagVectorAux.h:29
static InputParameters validParams()
Definition: TagAuxBase.h:45
const MooseVariableBase & _v_var
Definition: TagVectorAux.h:30
unsigned int _qp
Quadrature point index.
Definition: AuxKernel.h:230
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 scalingFactor(const std::vector< Real > &factor)
Set the scaling factor for this variable.