https://mooseframework.inl.gov
SplitCHMath.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 "SplitCHMath.h"
11 
12 registerMooseObject("PhaseFieldApp", SplitCHMath);
13 
16 {
18  params.addClassDescription("Simple demonstration split formulation Cahn-Hilliard Kernel using an "
19  "algebraic double-well potential");
20  return params;
21 }
22 
23 SplitCHMath::SplitCHMath(const InputParameters & parameters) : SplitCHCRes(parameters) {}
24 
25 Real
27 {
28  switch (type)
29  {
30  case Residual:
31  return _u[_qp] * _u[_qp] * _u[_qp] - _u[_qp]; // return Residual value
32 
33  case Jacobian:
34  return (3.0 * _u[_qp] * _u[_qp] - 1.0) * _phi[_j][_qp]; // return Jacobian value
35  }
36 
37  mooseError("Invalid type passed in");
38 }
The couple, SplitCHMath and SplitCHWRes, splits the CH equation by replacing chemical potential with ...
Definition: SplitCHMath.h:17
static InputParameters validParams()
Definition: SplitCHMath.C:15
static InputParameters validParams()
Definition: SplitCHCRes.C:13
virtual Real computeDFDC(PFFunctionType type)
Definition: SplitCHMath.C:26
SplitCHMath(const InputParameters &parameters)
Definition: SplitCHMath.C:23
const std::string & type() const
unsigned int _j
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
void mooseError(Args &&... args) const
void addClassDescription(const std::string &doc_string)
The couple, SplitCHCRes and SplitCHWRes, splits the CH equation by replacing chemical potential with ...
Definition: SplitCHCRes.h:17
const VariablePhiValue & _phi
registerMooseObject("PhaseFieldApp", SplitCHMath)
const VariableValue & _u
unsigned int _qp