www.mooseframework.org
SplitCHBase.C
Go to the documentation of this file.
1 /****************************************************************/
2 /* MOOSE - Multiphysics Object Oriented Simulation Environment */
3 /* */
4 /* All contents are licensed under LGPL V2.1 */
5 /* See LICENSE for full restrictions */
6 /****************************************************************/
7 #include "SplitCHBase.h"
8 
9 template <>
10 InputParameters
12 {
13  InputParameters params = validParams<Kernel>();
14 
15  return params;
16 }
17 
18 SplitCHBase::SplitCHBase(const InputParameters & parameters) : Kernel(parameters) {}
19 
20 /*Real //Example of what the virtual function should look like
21 SplitCHBase::computeDFDC(PFFunctionType type)
22 {
23  switch (type)
24  {
25  case Residual:
26  return _u[_qp]*_u[_qp]*_u[_qp] - _u[_qp]; // return Residual value
27 
28  case Jacobian:
29  return (3.0*_u[_qp]*_u[_qp] - 1.0)*_phi[_j][_qp]; //return Jacobian value
30 
31  }
32 
33  mooseError("Invalid type passed in");
34 }*/
35 
36 Real
38 {
39  Real f_prime_zero = computeDFDC(Residual);
40  Real e_prime = computeDEDC(Residual);
41 
42  Real residual = (f_prime_zero + e_prime) * _test[_i][_qp];
43 
44  return residual;
45 }
46 
47 Real
49 {
50  Real df_prime_zero_dc = computeDFDC(Jacobian);
51  Real de_prime_dc = computeDEDC(Jacobian);
52 
53  Real jacobian = (df_prime_zero_dc + de_prime_dc) * _test[_i][_qp];
54 
55  return jacobian;
56 }
57 
58 Real
60 {
61  return 0.0;
62 }
63 
64 Real SplitCHBase::computeDFDC(PFFunctionType /*type*/) { return 0.0; }
65 
66 Real SplitCHBase::computeDEDC(PFFunctionType /*type*/) { return 0.0; }
SplitCHBase(const InputParameters &parameters)
Definition: SplitCHBase.C:18
virtual Real computeQpResidual()
Definition: SplitCHBase.C:37
virtual Real computeQpOffDiagJacobian(unsigned int jvar)
Definition: SplitCHBase.C:59
virtual Real computeDEDC(PFFunctionType type)
Definition: SplitCHBase.C:66
virtual Real computeQpJacobian()
Definition: SplitCHBase.C:48
InputParameters validParams< SplitCHBase >()
Definition: SplitCHBase.C:11
virtual Real computeDFDC(PFFunctionType type)
Definition: SplitCHBase.C:64