www.mooseframework.org
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
SplitCHWRes Class Reference

SplitCHWRes creates the residual for the chemical potential in the split form of the Cahn-Hilliard equation with a scalar (isotropic) mobility. More...

#include <SplitCHWRes.h>

Inheritance diagram for SplitCHWRes:
[legend]

Public Member Functions

 SplitCHWRes (const InputParameters &parameters)
 

Protected Member Functions

virtual Real computeQpResidual ()
 
virtual Real computeQpJacobian ()
 
virtual Real computeQpWJacobian ()
 
virtual Real computeQpOffDiagJacobian (unsigned int jvar)
 

Protected Attributes

const MaterialPropertyName _mob_name
 
const MaterialProperty< Real > & _mob
 
const bool _is_coupled
 is the kernel used in a coupled form? More...
 
unsigned int _w_var
 int label for the chemical potential More...
 
const VariableGradient & _grad_w
 Variable value for the chemical potential. More...
 
std::vector< const MaterialProperty< Real > * > _dmobdarg
 derivatives of the mobility More...
 

Detailed Description

SplitCHWRes creates the residual for the chemical potential in the split form of the Cahn-Hilliard equation with a scalar (isotropic) mobility.

Definition at line 19 of file SplitCHWRes.h.

Constructor & Destructor Documentation

◆ SplitCHWRes()

SplitCHWRes::SplitCHWRes ( const InputParameters &  parameters)

Definition at line 24 of file SplitCHWRes.C.

24 : SplitCHWResBase<Real>(parameters) {}

Member Function Documentation

◆ computeQpJacobian()

Real SplitCHWResBase< Real >::computeQpJacobian ( )
protectedvirtualinherited

Definition at line 86 of file SplitCHWResBase.h.

87 {
88  return (_is_coupled && _w_var != _var.number()) ? 0.0 : computeQpWJacobian();
89 }

◆ computeQpOffDiagJacobian()

Real SplitCHWResBase< Real >::computeQpOffDiagJacobian ( unsigned int  jvar)
protectedvirtualinherited

Definition at line 100 of file SplitCHWResBase.h.

101 {
102  // c Off-Diagonal Jacobian
103  if (_w_var == jvar)
104  return computeQpWJacobian();
105 
106  // get the coupled variable jvar is referring to
107  const unsigned int cvar = mapJvarToCvar(jvar);
108 
109  return (*_dmobdarg[cvar])[_qp] * _phi[_j][_qp] * _grad_w[_qp] * _grad_test[_i][_qp];
110 }

◆ computeQpResidual()

Real SplitCHWResBase< Real >::computeQpResidual ( )
protectedvirtualinherited

Definition at line 79 of file SplitCHWResBase.h.

80 {
81  return _mob[_qp] * _grad_w[_qp] * _grad_test[_i][_qp];
82 }

◆ computeQpWJacobian()

Real SplitCHWResBase< Real >::computeQpWJacobian ( )
protectedvirtualinherited

Definition at line 93 of file SplitCHWResBase.h.

94 {
95  return _mob[_qp] * _grad_phi[_j][_qp] * _grad_test[_i][_qp];
96 }

Member Data Documentation

◆ _dmobdarg

std::vector<const MaterialProperty<Real > *> SplitCHWResBase< Real >::_dmobdarg
protectedinherited

derivatives of the mobility

Definition at line 54 of file SplitCHWResBase.h.

◆ _grad_w

const VariableGradient& SplitCHWResBase< Real >::_grad_w
protectedinherited

Variable value for the chemical potential.

Definition at line 51 of file SplitCHWResBase.h.

◆ _is_coupled

const bool SplitCHWResBase< Real >::_is_coupled
protectedinherited

is the kernel used in a coupled form?

Definition at line 45 of file SplitCHWResBase.h.

◆ _mob

const MaterialProperty<Real >& SplitCHWResBase< Real >::_mob
protectedinherited

Definition at line 42 of file SplitCHWResBase.h.

◆ _mob_name

const MaterialPropertyName SplitCHWResBase< Real >::_mob_name
protectedinherited

Definition at line 41 of file SplitCHWResBase.h.

◆ _w_var

unsigned int SplitCHWResBase< Real >::_w_var
protectedinherited

int label for the chemical potential

Definition at line 48 of file SplitCHWResBase.h.


The documentation for this class was generated from the following files:
SplitCHWResBase< Real >::computeQpWJacobian
virtual Real computeQpWJacobian()
Definition: SplitCHWResBase.h:93
SplitCHWResBase< Real >::_w_var
unsigned int _w_var
int label for the chemical potential
Definition: SplitCHWResBase.h:48
SplitCHWResBase< Real >::_dmobdarg
std::vector< const MaterialProperty< Real > * > _dmobdarg
derivatives of the mobility
Definition: SplitCHWResBase.h:54
SplitCHWResBase< Real >::_mob
const MaterialProperty< Real > & _mob
Definition: SplitCHWResBase.h:42
SplitCHWResBase< Real >
SplitCHWResBase< Real >::_is_coupled
const bool _is_coupled
is the kernel used in a coupled form?
Definition: SplitCHWResBase.h:45
SplitCHWResBase< Real >::_grad_w
const VariableGradient & _grad_w
Variable value for the chemical potential.
Definition: SplitCHWResBase.h:51