https://mooseframework.inl.gov
ADPhaseFieldCoupledDoubleWellPotential.C
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://www.mooseframework.inl.gov
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 
11 
13 
16 {
18  params.addClassDescription("Double well potential for Cahn-Hilliard advection.");
19  params.addRequiredCoupledVar("c", "phase field variable");
20  params.addRequiredParam<Real>("prefactor", "prefactor for double well potential");
21  return params;
22 }
23 
25  const InputParameters & parameters)
26  : ADKernelValue(parameters), _c(adCoupledValue("c")), _prefactor(getParam<Real>("prefactor"))
27 
28 {
29 }
30 
31 ADReal
33 {
34  return _prefactor * _c[_qp] * (_c[_qp] * _c[_qp] - 1);
35 }
static InputParameters validParams()
DualNumber< Real, DNDerivativeType, true > ADReal
void addRequiredParam(const std::string &name, const std::string &doc_string)
registerMooseObject("PhaseFieldApp", ADPhaseFieldCoupledDoubleWellPotential)
ADPhaseFieldCoupledDoubleWellPotential(const InputParameters &parameters)
void addRequiredCoupledVar(const std::string &name, const std::string &doc_string)
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
Coupled Double well Potential with a prefactor psi * (psi^2 - 1)
void addClassDescription(const std::string &doc_string)
unsigned int _qp