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 : #ifdef MOOSE_MFEM_ENABLED 11 : 12 : #include "NLDiffusionIntegrator.h" 13 : 14 : namespace Moose::MFEM 15 : { 16 308 : NLDiffusionIntegrator::NLDiffusionIntegrator(mfem::Coefficient & k, 17 : mfem::Coefficient & dk_du, 18 : const mfem::GridFunction * gf, 19 308 : const mfem::IntegrationRule * ir) 20 308 : : _diffusion_integ(k, ir), 21 308 : _grad_trial(gf), 22 308 : _neg_grad_trial(_neg_one, _grad_trial), 23 308 : _neg_dk_du_grad_trial(dk_du, _neg_grad_trial), 24 616 : _weak_div_integ(_neg_grad_trial) 25 : { 26 308 : _sum.AddIntegrator(&_diffusion_integ); 27 308 : _sum.AddIntegrator(&_weak_div_integ); 28 308 : } 29 : 30 : void 31 49760 : NLDiffusionIntegrator::AssembleElementVector(const mfem::FiniteElement & el, 32 : mfem::ElementTransformation & Tr, 33 : const mfem::Vector & elfun, 34 : mfem::Vector & elvect) 35 : { 36 49760 : _diffusion_integ.AssembleElementVector(el, Tr, elfun, elvect); 37 49760 : } 38 : 39 : void 40 32960 : NLDiffusionIntegrator::AssembleElementGrad(const mfem::FiniteElement & el, 41 : mfem::ElementTransformation & Tr, 42 : const mfem::Vector & elfun, 43 : mfem::DenseMatrix & elmat) 44 : { 45 32960 : _sum.AssembleElementGrad(el, Tr, elfun, elmat); 46 32960 : } 47 : } 48 : 49 : #endif