https://mooseframework.inl.gov
TagVectorArrayVariableAux.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 
13 
16 {
18 
19  params.addRequiredParam<TagName>("vector_tag", "Tag Name this Aux works on");
20  params.addClassDescription(
21  "Couple a tagged vector, and return its evaluations at degree of freedom "
22  "indices corresponding to the coupled array variable.");
23  return params;
24 }
25 
27  : TagAuxBase<ArrayAuxKernel>(parameters), _v(coupledVectorTagArrayDofValue("v", "vector_tag"))
28 {
30 }
31 
32 void
34 {
35  const auto n_local_dofs = _var.numberOfDofs();
36  _local_sol.resize(n_local_dofs);
37  for (const auto i : make_range(n_local_dofs))
38  _local_sol(i) = _v[i];
40 }
const ArrayVariableValue & _v
The result of evaluating the supplied tagged vector at the degrees of freedom corresponding to the pr...
void compute() override
Computes the value and stores it in the solution vector.
virtual unsigned int numberOfDofs() const
Get the number of local DoFs.
registerMooseObject("MooseApp", TagVectorArrayVariableAux)
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...
DenseVector< OutputData > _local_sol
for holding local solution
Definition: AuxKernel.h:240
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
Couple a tagged vector, and return its evaluations at degree of freedom indices corresponding to the ...
MooseVariableField< ComputeValueType > & _var
This is a regular kernel so we cast to a regular MooseVariable.
Definition: AuxKernel.h:174
virtual void setDofValues(const DenseVector< OutputData > &values)=0
Set local DOF values and evaluate the values on quadrature points.
static InputParameters validParams()
Definition: TagAuxBase.h:45
ArrayMooseVariable * getArrayVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled array variable.
Definition: Coupleable.C:306
IntRange< T > make_range(T beg, T end)
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...
Base class for creating new auxiliary kernels and auxiliary boundary conditions.
Definition: AuxKernel.h:36
TagVectorArrayVariableAux(const InputParameters &parameters)
static InputParameters validParams()