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 "VectorCoupledTimeDerivative.h" 11 : 12 : registerMooseObject("MooseApp", VectorCoupledTimeDerivative); 13 : 14 : InputParameters 15 14340 : VectorCoupledTimeDerivative::validParams() 16 : { 17 14340 : InputParameters params = VectorKernel::validParams(); 18 14340 : params.addClassDescription( 19 : "Time derivative Kernel that acts on a coupled vector variable. Weak form: " 20 : "$(\\vec{\\psi}_i, \\frac{\\partial \\vec{v_h}}{\\partial t})$."); 21 14340 : params.addRequiredCoupledVar("v", "Coupled vector variable"); 22 14340 : return params; 23 0 : } 24 : 25 39 : VectorCoupledTimeDerivative::VectorCoupledTimeDerivative(const InputParameters & parameters) 26 : : VectorKernel(parameters), 27 39 : _v_dot(coupledVectorDot("v")), 28 39 : _dv_dot(coupledVectorDotDu("v")), 29 78 : _v_var(coupled("v")) 30 : { 31 39 : } 32 : 33 : Real 34 1700000 : VectorCoupledTimeDerivative::computeQpResidual() 35 : { 36 1700000 : return _test[_i][_qp] * _v_dot[_qp]; 37 : } 38 : 39 : Real 40 345600 : VectorCoupledTimeDerivative::computeQpJacobian() 41 : { 42 345600 : return 0.0; 43 : } 44 : 45 : Real 46 345600 : VectorCoupledTimeDerivative::computeQpOffDiagJacobian(unsigned int jvar) 47 : { 48 345600 : if (jvar == _v_var) 49 345600 : return _test[_i][_qp] * _phi[_j][_qp] * _dv_dot[_qp]; 50 : 51 0 : return 0.0; 52 : }