https://mooseframework.inl.gov
Loading...
Searching...
No Matches
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
13
16{
18 params.addClassDescription("Simple demonstration split formulation Cahn-Hilliard Kernel using an "
19 "algebraic double-well potential");
20 return params;
21}
22
23SplitCHMath::SplitCHMath(const InputParameters & parameters) : SplitCHCRes(parameters) {}
24
25Real
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}
registerMooseObject("PhaseFieldApp", SplitCHMath)
void addClassDescription(const std::string &doc_string)
unsigned int _qp
unsigned int _j
const VariablePhiValue & _phi
const VariableValue & _u
const std::string & type() const
void mooseError(Args &&... args) const
The couple, SplitCHCRes and SplitCHWRes, splits the CH equation by replacing chemical potential with ...
Definition SplitCHCRes.h:18
static InputParameters validParams()
Definition SplitCHCRes.C:13
The couple, SplitCHMath and SplitCHWRes, splits the CH equation by replacing chemical potential with ...
Definition SplitCHMath.h:18
virtual Real computeDFDC(PFFunctionType type)
Definition SplitCHMath.C:26
static InputParameters validParams()
Definition SplitCHMath.C:15
SplitCHMath(const InputParameters &parameters)
Definition SplitCHMath.C:23