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 1219 : SplitCHBase::validParams() 14 : { 15 1219 : InputParameters params = Kernel::validParams(); 16 : 17 1219 : return params; 18 : } 19 : 20 639 : 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 66138759 : SplitCHBase::computeQpResidual() 40 : { 41 66138759 : Real f_prime_zero = computeDFDC(Residual); 42 66138759 : Real e_prime = computeDEDC(Residual); 43 : 44 66138759 : Real residual = (f_prime_zero + e_prime) * _test[_i][_qp]; 45 : 46 66138759 : return residual; 47 : } 48 : 49 : Real 50 188829336 : SplitCHBase::computeQpJacobian() 51 : { 52 188829336 : Real df_prime_zero_dc = computeDFDC(Jacobian); 53 188829336 : Real de_prime_dc = computeDEDC(Jacobian); 54 : 55 188829336 : Real jacobian = (df_prime_zero_dc + de_prime_dc) * _test[_i][_qp]; 56 : 57 188829336 : 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 254968095 : Real SplitCHBase::computeDEDC(PFFunctionType /*type*/) { return 0.0; }