www.mooseframework.org
ACGrGrBase.C
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://www.mooseframework.org
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 "ACGrGrBase.h"
11 
12 template <>
13 InputParameters
15 {
16  InputParameters params = ACBulk<Real>::validParams();
17  params.addRequiredCoupledVar("v",
18  "Array of coupled order parameter names for other order parameters");
19  return params;
20 }
21 
22 ACGrGrBase::ACGrGrBase(const InputParameters & parameters)
23  : ACBulk<Real>(parameters),
24  _op_num(coupledComponents("v")),
25  _vals(_op_num),
26  _vals_var(_op_num),
27  _mu(getMaterialProperty<Real>("mu"))
28 {
29  // Loop through grains and load coupled variables into the arrays
30  for (unsigned int i = 0; i < _op_num; ++i)
31  {
32  _vals[i] = &coupledValue("v", i);
33  _vals_var[i] = coupled("v", i);
34  }
35 }
ACGrGrBase::_vals
std::vector< const VariableValue * > _vals
Definition: ACGrGrBase.h:33
ACBulk
This is the Allen-Cahn equation base class that implements the bulk or local energy term of the equat...
Definition: ACBulk.h:24
validParams< ACGrGrBase >
InputParameters validParams< ACGrGrBase >()
Definition: ACGrGrBase.C:14
ACGrGrBase::ACGrGrBase
ACGrGrBase(const InputParameters &parameters)
Definition: ACGrGrBase.C:22
ACGrGrBase::_op_num
const unsigned int _op_num
Definition: ACGrGrBase.h:31
ACGrGrBase::_vals_var
std::vector< unsigned int > _vals_var
Definition: ACGrGrBase.h:34
ACBulk::validParams
static InputParameters validParams()
Definition: ACBulk.h:74
ACGrGrBase.h