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 "MFEMSuperLU.h" 13 : #include "MFEMProblem.h" 14 : 15 : registerMooseObject("MooseApp", MFEMSuperLU); 16 : 17 : InputParameters 18 2234 : MFEMSuperLU::validParams() 19 : { 20 2234 : InputParameters params = MFEMSolverBase::validParams(); 21 2234 : params.addClassDescription("MFEM solver for performing direct solves of sparse systems in " 22 : "parallel using the SuperLU_DIST library."); 23 2234 : return params; 24 0 : } 25 : 26 68 : MFEMSuperLU::MFEMSuperLU(const InputParameters & parameters) : MFEMSolverBase(parameters) 27 : { 28 68 : constructSolver(); 29 68 : } 30 : 31 : void 32 68 : MFEMSuperLU::constructSolver() 33 : { 34 68 : auto solver = std::make_unique<Moose::MFEM::SuperLUSolver>(getMFEMProblem().getComm()); 35 68 : _solver = std::move(solver); 36 68 : } 37 : 38 : void 39 45 : MFEMSuperLU::updateSolver(mfem::ParBilinearForm &, mfem::Array<int> &) 40 : { 41 45 : if (_lor) 42 0 : mooseError("SuperLU solver does not support LOR solve"); 43 45 : } 44 : 45 : #endif