www.mooseframework.org
DoubleWellPotential.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 "DoubleWellPotential.h"
11 
14 {
16  params.addClassDescription(
17  "Simple demonstration Allen-Cahn Kernel using an algebraic double-well potential");
18  params.addParam<MaterialPropertyName>("mob_name", "L", "The mobility used with the kernel");
19 
20  return params;
21 }
22 
24  : ACBulk<Real>(parameters)
25 {
26 }
27 
28 Real
30 {
31  switch (type)
32  {
33  case Residual:
34  return _u[_qp] * _u[_qp] * _u[_qp] - _u[_qp];
35 
36  case Jacobian:
37  return _phi[_j][_qp] * (3.0 * _u[_qp] * _u[_qp] - 1.0);
38  }
39 
40  mooseError("Invalid type passed in");
41 }
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
void mooseError(Args &&... args)
virtual Real computeDFDOP(PFFunctionType type)
This is the Allen-Cahn equation base class that implements the bulk or local energy term of the equat...
Definition: ACBulk.h:24
static InputParameters validParams()
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
void addClassDescription(const std::string &doc_string)
DoubleWellPotential(const InputParameters &parameters)
static InputParameters validParams()