https://mooseframework.inl.gov
Loading...
Searching...
No Matches
SplitCHBase.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 "SplitCHBase.h"
11
14{
16
17 return params;
18}
19
20SplitCHBase::SplitCHBase(const InputParameters & parameters) : Kernel(parameters) {}
21
22/*Real //Example of what the virtual function should look like
23SplitCHBase::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
38Real
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
49Real
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
60Real
62{
63 return 0.0;
64}
65
66Real
68{
69 return 0.0;
70}
71
72Real
74{
75 return 0.0;
76}
unsigned int _qp
unsigned int _i
const VariableTestValue & _test
static InputParameters validParams()
virtual Real computeQpJacobian()
Definition SplitCHBase.C:50
static InputParameters validParams()
Definition SplitCHBase.C:13
virtual Real computeQpOffDiagJacobian(unsigned int jvar)
Definition SplitCHBase.C:61
virtual Real computeDEDC(PFFunctionType type)
Definition SplitCHBase.C:73
virtual Real computeDFDC(PFFunctionType type)
Definition SplitCHBase.C:67
virtual Real computeQpResidual()
Definition SplitCHBase.C:39
SplitCHBase(const InputParameters &parameters)
Definition SplitCHBase.C:20