https://mooseframework.inl.gov
DoubleWellPotential.C
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://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 
10 #include "DoubleWellPotential.h"
11 
13 
16 {
18  params.addClassDescription(
19  "Simple demonstration Allen-Cahn Kernel using an algebraic double-well potential");
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 }
registerMooseObject("PhaseFieldApp", DoubleWellPotential)
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
Algebraic double well potential.
static InputParameters validParams()
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
void addClassDescription(const std::string &doc_string)
static InputParameters validParams()
Definition: ACBulk.h:69
DoubleWellPotential(const InputParameters &parameters)