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 MFEM_ENABLED 11 : 12 : #include "MFEMOperatorJacobiSmoother.h" 13 : #include "MFEMProblem.h" 14 : 15 : registerMooseObject("MooseApp", MFEMOperatorJacobiSmoother); 16 : 17 : InputParameters 18 8698 : MFEMOperatorJacobiSmoother::validParams() 19 : { 20 8698 : InputParameters params = MFEMSolverBase::validParams(); 21 8698 : params.addClassDescription("MFEM solver for performing Jacobi smoothing of the equation system."); 22 : 23 8698 : return params; 24 0 : } 25 : 26 34 : MFEMOperatorJacobiSmoother::MFEMOperatorJacobiSmoother(const InputParameters & parameters) 27 34 : : MFEMSolverBase(parameters) 28 : { 29 34 : constructSolver(parameters); 30 34 : } 31 : 32 : void 33 34 : MFEMOperatorJacobiSmoother::constructSolver(const InputParameters &) 34 : { 35 34 : _solver = std::make_unique<mfem::OperatorJacobiSmoother>(); 36 34 : } 37 : 38 : void 39 40 : MFEMOperatorJacobiSmoother::updateSolver(mfem::ParBilinearForm & a, mfem::Array<int> & tdofs) 40 : { 41 40 : if (_lor) 42 : { 43 20 : if (!checkSpectralEquivalence(a)) 44 0 : mooseError("Low-Order-Refined solver requires the FESpace closed_basis to be GaussLobatto " 45 : "and the open-basis to be IntegratedGLL for ND and RT elements."); 46 : 47 20 : _solver.reset(new mfem::LORSolver<mfem::OperatorJacobiSmoother>(a, tdofs)); 48 : } 49 40 : } 50 : 51 : #endif