www.mooseframework.org
ACGrGrBase.C
Go to the documentation of this file.
1 /****************************************************************/
2 /* MOOSE - Multiphysics Object Oriented Simulation Environment */
3 /* */
4 /* All contents are licensed under LGPL V2.1 */
5 /* See LICENSE for full restrictions */
6 /****************************************************************/
7 #include "ACGrGrBase.h"
8 
9 template <>
10 InputParameters
12 {
13  InputParameters params = ACBulk<Real>::validParams();
14  params.addRequiredCoupledVar("v",
15  "Array of coupled order paramter names for other order parameters");
16  return params;
17 }
18 
19 ACGrGrBase::ACGrGrBase(const InputParameters & parameters)
20  : ACBulk<Real>(parameters),
21  _op_num(coupledComponents("v")),
22  _vals(_op_num),
23  _vals_var(_op_num),
24  _mu(getMaterialProperty<Real>("mu"))
25 {
26  // Loop through grains and load coupled variables into the arrays
27  for (unsigned int i = 0; i < _op_num; ++i)
28  {
29  _vals[i] = &coupledValue("v", i);
30  _vals_var[i] = coupled("v", i);
31  }
32 }
ACGrGrBase(const InputParameters &parameters)
Definition: ACGrGrBase.C:19
const unsigned int _op_num
Definition: ACGrGrBase.h:29
std::vector< unsigned int > _vals_var
Definition: ACGrGrBase.h:32
InputParameters validParams< ACGrGrBase >()
Definition: ACGrGrBase.C:11
This is the Allen-Cahn equation base class that implements the bulk or local energy term of the equat...
Definition: ACBulk.h:22
std::vector< const VariableValue * > _vals
Definition: ACGrGrBase.h:31
static InputParameters validParams()
Definition: ACBulk.h:72