https://mooseframework.inl.gov
Loading...
Searching...
No Matches
MFEMHypreAME.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 "MFEMHypreAME.h"
13#include "MFEMProblem.h"
14
16
19{
21 params.addClassDescription("Hypre auxiliary-space Maxwell eigensolver to compute the lowest "
22 "eigenmodes of a generalized eigenvalue problem.");
23
24 return params;
25}
26
28 : Moose::MFEM::EigensolverBase(parameters)
29{
31}
32
33void
35{
36 _eigensolver = std::make_unique<mfem::HypreAME>(getMFEMProblem().getComm());
37
38 _eigensolver->SetNumModes(_num_modes);
39 _eigensolver->SetMaxIter(getParam<int>("l_max_its"));
40 _eigensolver->SetTol(getParam<mfem::real_t>("l_tol"));
41 _eigensolver->SetPrintLevel(getParam<int>("print_level"));
43}
44
45#endif
registerMooseObject("MooseApp", MFEMHypreAME)
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.
Class for the HypreAME eigensolver.
virtual void ConstructSolver() override
Override in derived classes to construct and set the solver options.
static InputParameters validParams()
MFEMHypreAME(const InputParameters &parameters)
std::unique_ptr< mfem::HypreAME > _eigensolver
Eigensolver to be used for the problem.
MFEMProblem & getMFEMProblem()
Return the owning MFEM problem.
Definition MFEMObject.h:45
static InputParameters validParams()
int _num_modes
Number of eigenmodes to compute.
void SetPreconditioner(T &solver)
Retrieves the preconditioner userobject if present, sets the member pointer to said object if still u...
MOOSE now contains C++17 code, so give a reasonable error message stating what the user can do to add...