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 "HFEMDiffusion.h" 11 : 12 : registerMooseObject("MooseApp", HFEMDiffusion); 13 : 14 : InputParameters 15 28734 : HFEMDiffusion::validParams() 16 : { 17 28734 : InputParameters params = DGLowerDKernel::validParams(); 18 28734 : params.addClassDescription("Imposes the constraints on internal sides with HFEM."); 19 28734 : return params; 20 0 : } 21 : 22 105 : HFEMDiffusion::HFEMDiffusion(const InputParameters & parameters) : DGLowerDKernel(parameters) {} 23 : 24 : Real 25 880640 : HFEMDiffusion::computeQpResidual(Moose::DGResidualType type) 26 : { 27 880640 : switch (type) 28 : { 29 440320 : case Moose::Element: 30 440320 : return -_lambda[_qp] * _test[_i][_qp]; 31 : 32 440320 : case Moose::Neighbor: 33 440320 : return _lambda[_qp] * _test_neighbor[_i][_qp]; 34 : } 35 0 : return 0; 36 : } 37 : 38 : Real 39 24576 : HFEMDiffusion::computeLowerDQpResidual() 40 : { 41 24576 : return (_u_neighbor[_qp] - _u[_qp]) * _test_lambda[_i][_qp]; 42 : } 43 : 44 16588800 : Real HFEMDiffusion::computeQpJacobian(Moose::DGJacobianType) { return 0; } 45 : 46 : Real 47 892928 : HFEMDiffusion::computeLowerDQpJacobian(Moose::ConstraintJacobianType type) 48 : { 49 892928 : switch (type) 50 : { 51 220160 : case Moose::LowerPrimary: 52 220160 : return -_test_lambda[_i][_qp] * _phi[_j][_qp]; 53 : 54 220160 : case Moose::LowerSecondary: 55 220160 : return _test_lambda[_i][_qp] * _phi_neighbor[_j][_qp]; 56 : 57 220160 : case Moose::PrimaryLower: 58 220160 : return -_phi_lambda[_j][_qp] * _test[_i][_qp]; 59 : 60 220160 : case Moose::SecondaryLower: 61 220160 : return _phi_lambda[_j][_qp] * _test_neighbor[_i][_qp]; 62 : 63 12288 : default: 64 12288 : break; 65 : } 66 : 67 12288 : return 0; 68 : }