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 2236 : MFEMSuperLU::validParams() 19 : { 20 2236 : InputParameters params = Moose::MFEM::LinearSolverBase::validParams(); 21 2236 : params.addClassDescription("MFEM solver for performing direct solves of sparse systems in " 22 : "parallel using the SuperLU_DIST library."); 23 2236 : return params; 24 0 : } 25 : 26 69 : MFEMSuperLU::MFEMSuperLU(const InputParameters & parameters) 27 69 : : Moose::MFEM::LinearSolverBase(parameters) 28 : { 29 69 : ConstructSolver(); 30 69 : } 31 : 32 : void 33 69 : MFEMSuperLU::ConstructSolver() 34 : { 35 69 : auto solver = std::make_unique<Moose::MFEM::SuperLUSolver>(getMFEMProblem().getComm()); 36 138 : solver->iterative_mode = getParam<bool>("use_initial_guess"); 37 69 : _solver = std::move(solver); 38 69 : } 39 : 40 : void 41 2 : MFEMSuperLU::SetupLOR(mfem::ParBilinearForm &, mfem::Array<int> &) 42 : { 43 2 : if (_lor) 44 0 : mooseError("SuperLU solver does not support LOR solve"); 45 2 : } 46 : 47 : #endif