18 params.
addClassDescription(
"Lagrange multiplier kernel to constrain the sum of all switching " 19 "functions in a multiphase system. This kernel acts on the Lagrange " 20 "multiplier variable.");
21 params.
addParam<std::vector<MaterialPropertyName>>(
"h_names",
"Switching function materials");
23 params.
addParam<
Real>(
"epsilon", 1e-9,
"Shift factor to avoid a zero pivot");
30 _h_names(getParam<
std::vector<MaterialPropertyName>>(
"h_names")),
31 _num_h(_h_names.size()),
34 _eta_map(getParameterJvarMap(
"etas")),
35 _epsilon(getParam<
Real>(
"epsilon"))
39 paramError(
"etas",
"Need to pass in as many etas as h_names");
42 for (std::size_t i = 0; i <
_num_h; ++i)
44 _h[i] = &getMaterialPropertyByName<Real>(
_h_names[i]);
56 for (std::size_t i = 0; i <
_num_h; ++i)
75 for (std::size_t i = 0; i <
_num_h; ++i)
static InputParameters validParams()
virtual Real computeQpResidual()
static InputParameters validParams()
VariableName coupledName(const std::string &var_name, unsigned int comp=0) const
Real _epsilon
shift factor
virtual Real computeQpOffDiagJacobian(unsigned int)
SwitchingFunctionConstraintLagrange is a constraint kernel that acts on the lambda lagrange multiplie...
const VariableTestValue & _test
registerMooseObject("PhaseFieldApp", SwitchingFunctionConstraintLagrange)
SwitchingFunctionConstraintLagrange(const InputParameters ¶meters)
unsigned int _num_h
number of switching functions
void paramError(const std::string ¶m, Args... args) const
unsigned int mapJvarToCvar(unsigned int jvar)
virtual Real computeQpJacobian()
std::vector< std::vector< const MaterialProperty< Real > * > > _dh
Switching function derivatives.
std::vector< MaterialPropertyName > _h_names
Switching function names.
unsigned int coupledComponents(const std::string &var_name) const
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
std::vector< const MaterialProperty< Real > * > _h
Switching functions.
const JvarMap & _eta_map
map for getting the "etas" index from jvar
static const std::complex< double > j(0, 1)
Complex number "j" (also known as "i")
const VariablePhiValue & _phi