www.mooseframework.org
SplitCHBase.C
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://www.mooseframework.org
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 "SplitCHBase.h"
11 
14 {
16 
17  return params;
18 }
19 
20 SplitCHBase::SplitCHBase(const InputParameters & parameters) : Kernel(parameters) {}
21 
22 /*Real //Example of what the virtual function should look like
23 SplitCHBase::computeDFDC(PFFunctionType type)
24 {
25  switch (type)
26  {
27  case Residual:
28  return _u[_qp]*_u[_qp]*_u[_qp] - _u[_qp]; // return Residual value
29 
30  case Jacobian:
31  return (3.0*_u[_qp]*_u[_qp] - 1.0)*_phi[_j][_qp]; //return Jacobian value
32 
33  }
34 
35  mooseError("Invalid type passed in");
36 }*/
37 
38 Real
40 {
41  Real f_prime_zero = computeDFDC(Residual);
42  Real e_prime = computeDEDC(Residual);
43 
44  Real residual = (f_prime_zero + e_prime) * _test[_i][_qp];
45 
46  return residual;
47 }
48 
49 Real
51 {
52  Real df_prime_zero_dc = computeDFDC(Jacobian);
53  Real de_prime_dc = computeDEDC(Jacobian);
54 
55  Real jacobian = (df_prime_zero_dc + de_prime_dc) * _test[_i][_qp];
56 
57  return jacobian;
58 }
59 
60 Real
62 {
63  return 0.0;
64 }
65 
66 Real SplitCHBase::computeDFDC(PFFunctionType /*type*/) { return 0.0; }
67 
68 Real SplitCHBase::computeDEDC(PFFunctionType /*type*/) { return 0.0; }
SplitCHBase(const InputParameters &parameters)
Definition: SplitCHBase.C:20
virtual Real computeQpResidual()
Definition: SplitCHBase.C:39
static InputParameters validParams()
virtual Real computeQpOffDiagJacobian(unsigned int jvar)
Definition: SplitCHBase.C:61
virtual Real computeDEDC(PFFunctionType type)
Definition: SplitCHBase.C:68
virtual Real computeQpJacobian()
Definition: SplitCHBase.C:50
const VariableTestValue & _test
static InputParameters validParams()
Definition: SplitCHBase.C:13
unsigned int _i
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
virtual Real computeDFDC(PFFunctionType type)
Definition: SplitCHBase.C:66
unsigned int _qp