www.mooseframework.org
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)
 

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 24 of file AccumulateAux.h.

Constructor & Destructor Documentation

◆ AccumulateAux()

AccumulateAux::AccumulateAux ( const InputParameters &  parameters)

Definition at line 25 of file AccumulateAux.C.

26  : AuxKernel(parameters), _values(coupledComponents("accumulate_from_variable"))
27 {
28  for (auto i = beginIndex(_values); i < _values.size(); ++i)
29  _values[i] = &coupledValue("accumulate_from_variable", i);
30 }
std::vector< const VariableValue * > _values
Definition: AccumulateAux.h:33

Member Function Documentation

◆ computeValue()

Real AccumulateAux::computeValue ( )
protectedvirtual

Definition at line 33 of file AccumulateAux.C.

34 {
35  Real ret = _u_old[_qp];
36  for (const auto & value : _values)
37  ret += (*value)[_qp];
38  return ret;
39 }
std::vector< const VariableValue * > _values
Definition: AccumulateAux.h:33

Member Data Documentation

◆ _values

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

Definition at line 33 of file AccumulateAux.h.

Referenced by AccumulateAux(), and computeValue().


The documentation for this class was generated from the following files: