Line data Source code
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 : 12 : InputParameters 13 827 : SplitCHBase::validParams() 14 : { 15 827 : InputParameters params = Kernel::validParams(); 16 : 17 827 : return params; 18 : } 19 : 20 443 : 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 39 53693084 : SplitCHBase::computeQpResidual() 40 : { 41 53693084 : Real f_prime_zero = computeDFDC(Residual); 42 53693084 : Real e_prime = computeDEDC(Residual); 43 : 44 53693084 : Real residual = (f_prime_zero + e_prime) * _test[_i][_qp]; 45 : 46 53693084 : return residual; 47 : } 48 : 49 : Real 50 155783090 : SplitCHBase::computeQpJacobian() 51 : { 52 155783090 : Real df_prime_zero_dc = computeDFDC(Jacobian); 53 155783090 : Real de_prime_dc = computeDEDC(Jacobian); 54 : 55 155783090 : Real jacobian = (df_prime_zero_dc + de_prime_dc) * _test[_i][_qp]; 56 : 57 155783090 : return jacobian; 58 : } 59 : 60 : Real 61 0 : SplitCHBase::computeQpOffDiagJacobian(unsigned int /*jvar*/) 62 : { 63 0 : return 0.0; 64 : } 65 : 66 0 : Real SplitCHBase::computeDFDC(PFFunctionType /*type*/) { return 0.0; } 67 : 68 209476174 : Real SplitCHBase::computeDEDC(PFFunctionType /*type*/) { return 0.0; }