https://mooseframework.inl.gov
Loading...
Searching...
No Matches
MFEMSuperLU.C
Go to the documentation of this file.
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
16
19{
21 params.addClassDescription("MFEM solver for performing direct solves of sparse systems in "
22 "parallel using the SuperLU_DIST library.");
23 return params;
24}
25
27 : Moose::MFEM::LinearSolverBase(parameters)
28{
30}
31
32void
34{
35 auto solver = std::make_unique<Moose::MFEM::SuperLUSolver>(getMFEMProblem().getComm());
36 solver->iterative_mode = getParam<bool>("use_initial_guess");
37 _solver = std::move(solver);
38}
39
40#endif
registerMooseObject("MooseApp", MFEMSuperLU)
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system.
void addClassDescription(const std::string &doc_string)
This method adds a description of the class that will be displayed in the input file syntax dump.
MFEMProblem & getMFEMProblem()
Return the owning MFEM problem.
Definition MFEMObject.h:45
Wrapper for Moose::MFEM::SuperLUSolver.
Definition MFEMSuperLU.h:46
static InputParameters validParams()
Definition MFEMSuperLU.C:18
void ConstructSolver() override
Override in derived classes to construct and set the solver options.
Definition MFEMSuperLU.C:33
MFEMSuperLU(const InputParameters &parameters)
Definition MFEMSuperLU.C:26
static InputParameters validParams()
std::unique_ptr< mfem::Solver > _solver
Solver to be used for the problem.
MOOSE now contains C++17 code, so give a reasonable error message stating what the user can do to add...