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 : #pragma once 13 : 14 : #include "libmesh/ignore_warnings.h" 15 : #include "mfem/miniapps/common/pfem_extras.hpp" 16 : #include "libmesh/restore_warnings.h" 17 : 18 : namespace Moose::MFEM 19 : { 20 : 21 : /// Patched version of mfem::ParMixedBilinearForm to extend support to cases where MFEM trial variable is defined on a submesh of the MFEM test variable 22 : class ParMixedBilinearForm : public mfem::ParMixedBilinearForm 23 : { 24 : 25 : public: 26 3133 : ParMixedBilinearForm(mfem::ParFiniteElementSpace * tr_fes, mfem::ParFiniteElementSpace * te_fes) 27 3133 : : mfem::ParMixedBilinearForm(tr_fes, te_fes) 28 : { 29 3133 : } 30 : 31 : ParMixedBilinearForm(mfem::ParFiniteElementSpace * tr_fes, 32 : mfem::ParFiniteElementSpace * te_fes, 33 : mfem::ParMixedBilinearForm * mbf) 34 : : mfem::ParMixedBilinearForm(tr_fes, te_fes, mbf) 35 : { 36 : } 37 : 38 : // Re-implementation of Assemble to maintain functionality when the trial variable is defined on a 39 : // submesh of the test variable. Defaults to mfem::ParMixedBilinearForm::Assemble otherwise. 40 : void Assemble(int skip_zeros = 1); 41 : // Custom implementation of Assemble for use when the trial variable is defined on a submesh of 42 : // the test variable 43 : void SubMeshTolerantAssemble(int skip_zeros); 44 : }; 45 : } // namespace Moose::MFEM 46 : 47 : #endif