www.mooseframework.org
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
AccumulateAux Class Reference

Accumulate values from one auxiliary variable into another. More...

#include <AccumulateAux.h>

Inheritance diagram for AccumulateAux:
[legend]

Public Member Functions

 AccumulateAux (const InputParameters &parameters)
 

Static Public Member Functions

static InputParameters validParams ()
 

Protected Member Functions

virtual Real computeValue ()
 

Protected Attributes

std::vector< const VariableValue * > _values
 

Detailed Description

Accumulate values from one auxiliary variable into another.

Definition at line 23 of file AccumulateAux.h.

Constructor & Destructor Documentation

◆ AccumulateAux()

AccumulateAux::AccumulateAux ( const InputParameters &  parameters)

Definition at line 26 of file AccumulateAux.C.

27  : AuxKernel(parameters), _values(coupledComponents("accumulate_from_variable"))
28 {
29  for (MooseIndex(_values) i = 0; i < _values.size(); ++i)
30  _values[i] = &coupledValue("accumulate_from_variable", i);
31 }

Member Function Documentation

◆ computeValue()

Real AccumulateAux::computeValue ( )
protectedvirtual

Definition at line 34 of file AccumulateAux.C.

35 {
36  Real ret = _u_old[_qp];
37  for (const auto & value : _values)
38  ret += (*value)[_qp];
39  return ret;
40 }

◆ validParams()

InputParameters AccumulateAux::validParams ( )
static

Definition at line 17 of file AccumulateAux.C.

18 {
19  InputParameters params = AuxKernel::validParams();
20  params.addRequiredCoupledVar(
21  "accumulate_from_variable",
22  "Variable whose values are to be accumulated into the current variable");
23  return params;
24 }

Member Data Documentation

◆ _values

std::vector<const VariableValue *> AccumulateAux::_values
protected

Definition at line 34 of file AccumulateAux.h.

Referenced by AccumulateAux(), and computeValue().


The documentation for this class was generated from the following files:
AccumulateAux::_values
std::vector< const VariableValue * > _values
Definition: AccumulateAux.h:34
validParams
InputParameters validParams()