https://mooseframework.inl.gov
Loading...
Searching...
No Matches
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{
19 "Simple demonstration Allen-Cahn Kernel using an algebraic double-well potential");
20 return params;
21}
22
24 : ACBulk<Real>(parameters)
25{
26}
27
28Real
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)
This is the Allen-Cahn equation base class that implements the bulk or local energy term of the equat...
Definition ACBulk.h:25
static InputParameters validParams()
Definition ACBulk.h:69
Algebraic double well potential.
DoubleWellPotential(const InputParameters &parameters)
virtual Real computeDFDOP(PFFunctionType type)
static InputParameters validParams()
void addClassDescription(const std::string &doc_string)