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

CHParsed uses the Free Energy function and derivatives provided by a DerivativeParsedMaterial. More...

#include <SplitCHParsed.h>

Inheritance diagram for SplitCHParsed:
[legend]

Public Member Functions

 SplitCHParsed (const InputParameters &parameters)
 
virtual void initialSetup ()
 

Protected Member Functions

virtual Real computeDFDC (PFFunctionType type)
 
virtual Real computeQpOffDiagJacobian (unsigned int jvar)
 

Private Attributes

const unsigned int _nvar
 
const MaterialProperty< Real > & _dFdc
 
const MaterialProperty< Real > & _d2Fdc2
 
std::vector< const MaterialProperty< Real > * > _d2Fdcdarg
 

Detailed Description

CHParsed uses the Free Energy function and derivatives provided by a DerivativeParsedMaterial.

This is the split operator variant.

See also
CHParsed

Definition at line 26 of file SplitCHParsed.h.

Constructor & Destructor Documentation

SplitCHParsed::SplitCHParsed ( const InputParameters &  parameters)

Definition at line 22 of file SplitCHParsed.C.

23  : DerivativeMaterialInterface<JvarMapKernelInterface<SplitCHCRes>>(parameters),
24  _nvar(_coupled_moose_vars.size()),
25  _dFdc(getMaterialPropertyDerivative<Real>("f_name", _var.name())),
26  _d2Fdc2(getMaterialPropertyDerivative<Real>("f_name", _var.name(), _var.name()))
27 {
28  // reserve space for derivatives
29  _d2Fdcdarg.resize(_nvar);
30 
31  // Iterate over all coupled variables
32  for (unsigned int i = 0; i < _nvar; ++i)
33  _d2Fdcdarg[i] =
34  &getMaterialPropertyDerivative<Real>("f_name", _var.name(), _coupled_moose_vars[i]->name());
35 }
const MaterialProperty< Real > & _d2Fdc2
Definition: SplitCHParsed.h:40
const MaterialProperty< Real > & _dFdc
Definition: SplitCHParsed.h:39
std::vector< const MaterialProperty< Real > * > _d2Fdcdarg
Definition: SplitCHParsed.h:42
const unsigned int _nvar
Definition: SplitCHParsed.h:38

Member Function Documentation

Real SplitCHParsed::computeDFDC ( PFFunctionType  type)
protectedvirtual

Definition at line 50 of file SplitCHParsed.C.

51 {
52  switch (type)
53  {
54  case Residual:
55  return _dFdc[_qp];
56 
57  case Jacobian:
58  return _d2Fdc2[_qp] * _phi[_j][_qp];
59  }
60 
61  mooseError("Internal error");
62 }
const MaterialProperty< Real > & _d2Fdc2
Definition: SplitCHParsed.h:40
const MaterialProperty< Real > & _dFdc
Definition: SplitCHParsed.h:39
Real SplitCHParsed::computeQpOffDiagJacobian ( unsigned int  jvar)
protectedvirtual

Definition at line 65 of file SplitCHParsed.C.

66 {
67  if (jvar == _w_var)
69 
70  // get the coupled variable jvar is referring to
71  const unsigned int cvar = mapJvarToCvar(jvar);
72 
73  return (*_d2Fdcdarg[cvar])[_qp] * _phi[_j][_qp] * _test[_i][_qp];
74 }
std::vector< const MaterialProperty< Real > * > _d2Fdcdarg
Definition: SplitCHParsed.h:42
virtual Real computeQpOffDiagJacobian(unsigned int jvar)
Definition: SplitCHCRes.C:68
void SplitCHParsed::initialSetup ( )
virtual

We are only interested if the necessary non-linear variables are coupled, as those are thge ones used in constructing the Jacobian. The AuxVariables do not have Jacobian entries.

Definition at line 38 of file SplitCHParsed.C.

39 {
45  validateNonlinearCoupling<Real>("f_name", _var.name());
46  validateDerivativeMaterialPropertyBase<Real>("f_name");
47 }

Member Data Documentation

const MaterialProperty<Real>& SplitCHParsed::_d2Fdc2
private

Definition at line 40 of file SplitCHParsed.h.

Referenced by computeDFDC().

std::vector<const MaterialProperty<Real> *> SplitCHParsed::_d2Fdcdarg
private

Definition at line 42 of file SplitCHParsed.h.

Referenced by computeQpOffDiagJacobian(), and SplitCHParsed().

const MaterialProperty<Real>& SplitCHParsed::_dFdc
private

Definition at line 39 of file SplitCHParsed.h.

Referenced by computeDFDC().

const unsigned int SplitCHParsed::_nvar
private

Definition at line 38 of file SplitCHParsed.h.

Referenced by SplitCHParsed().


The documentation for this class was generated from the following files: