www.mooseframework.org
SplitCHMath.C
Go to the documentation of this file.
1 /****************************************************************/
2 /* MOOSE - Multiphysics Object Oriented Simulation Environment */
3 /* */
4 /* All contents are licensed under LGPL V2.1 */
5 /* See LICENSE for full restrictions */
6 /****************************************************************/
7 #include "SplitCHMath.h"
8 
9 template <>
10 InputParameters
12 {
13  InputParameters params = validParams<SplitCHCRes>();
14  params.addClassDescription("Simple demonstration split formulation Cahn-Hilliard Kernel using an "
15  "algebraic double-well potential");
16  return params;
17 }
18 
19 SplitCHMath::SplitCHMath(const InputParameters & parameters) : SplitCHCRes(parameters) {}
20 
21 Real
23 {
24  switch (type)
25  {
26  case Residual:
27  return _u[_qp] * _u[_qp] * _u[_qp] - _u[_qp]; // return Residual value
28 
29  case Jacobian:
30  return (3.0 * _u[_qp] * _u[_qp] - 1.0) * _phi[_j][_qp]; // return Jacobian value
31  }
32 
33  mooseError("Invalid type passed in");
34 }
virtual Real computeDFDC(PFFunctionType type)
Definition: SplitCHMath.C:22
SplitCHMath(const InputParameters &parameters)
Definition: SplitCHMath.C:19
InputParameters validParams< SplitCHCRes >()
Definition: SplitCHCRes.C:11
InputParameters validParams< SplitCHMath >()
Definition: SplitCHMath.C:11
The couple, SplitCHCRes and SplitCHWRes, splits the CH equation by replacing chemical potential with ...
Definition: SplitCHCRes.h:19