https://mooseframework.inl.gov
Loading...
Searching...
No Matches
MFEMSuperLU.h
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#pragma once
13
15
16namespace Moose::MFEM
17{
18
22class SuperLUSolver : public mfem::SuperLUSolver
23{
24public:
25 SuperLUSolver(MPI_Comm comm, int npdep = 1)
26 : mfem::SuperLUSolver(comm), _s_superlu(std::make_unique<mfem::SuperLUSolver>(comm, npdep))
27 {
28 }
29 void SetOperator(const mfem::Operator & op) override
30 {
31 _a_superlu = std::make_unique<mfem::SuperLURowLocMatrix>(op);
32 _s_superlu->SetOperator(*_a_superlu.get());
33 }
34 void Mult(const mfem::Vector & x, mfem::Vector & y) const override { _s_superlu->Mult(x, y); }
35
36private:
37 std::unique_ptr<mfem::SuperLURowLocMatrix> _a_superlu{nullptr};
38 std::unique_ptr<mfem::SuperLUSolver> _s_superlu{nullptr};
39};
40} // namespace Moose::MFEM
41
46{
47public:
49
51
52 void ConstructSolver() override;
53};
54
55#endif
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system.
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
const InputParameters & parameters() const
Get the parameters of the object.
Definition MooseBase.h:131
Base class for linear MFEM solvers and preconditioners.
Wrapper for mfem::SuperLUSolver that creates a SuperLURowLocMatrix from the operator when set.
Definition MFEMSuperLU.h:23
std::unique_ptr< mfem::SuperLURowLocMatrix > _a_superlu
Definition MFEMSuperLU.h:37
std::unique_ptr< mfem::SuperLUSolver > _s_superlu
Definition MFEMSuperLU.h:38
void SetOperator(const mfem::Operator &op) override
Definition MFEMSuperLU.h:29
void Mult(const mfem::Vector &x, mfem::Vector &y) const override
Definition MFEMSuperLU.h:34
SuperLUSolver(MPI_Comm comm, int npdep=1)
Definition MFEMSuperLU.h:25
Utilities for converting between vector(s) of libMesh Points and MFEM Vector(s).