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