https://mooseframework.inl.gov
MFEMOperatorJacobiSmoother.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 
13 #include "MFEMProblem.h"
14 
16 
19 {
21  params.addClassDescription("MFEM solver for performing Jacobi smoothing of the equation system.");
22 
23  return params;
24 }
25 
27  : Moose::MFEM::LinearSolverBase(parameters)
28 {
30 }
31 
32 void
34 {
35  _solver = std::make_unique<mfem::OperatorJacobiSmoother>();
36  _solver->iterative_mode = getParam<bool>("use_initial_guess");
37 }
38 
39 void
40 MFEMOperatorJacobiSmoother::SetupLOR(mfem::ParBilinearForm & a, mfem::Array<int> & tdofs)
41 {
42  if (_lor)
43  {
45  _solver.reset(new mfem::LORSolver<mfem::OperatorJacobiSmoother>(a, tdofs));
46  }
47 }
48 
49 #endif
Wrapper for mfem::OperatorJacobiSmoother solver.
std::unique_ptr< mfem::Solver > _solver
Solver to be used for the problem.
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
void ConstructSolver() override
Override in derived classes to construct and set the solver options.
static InputParameters validParams()
bool _lor
Variable defining whether to use LOR solver.
void SetupLOR(mfem::ParBilinearForm &a, mfem::Array< int > &tdofs) override
Updates the solver with the bilinear form in case LOR solve is required.
static InputParameters validParams()
registerMooseObject("MooseApp", MFEMOperatorJacobiSmoother)
MFEMOperatorJacobiSmoother(const InputParameters &parameters)
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...
MOOSE now contains C++17 code, so give a reasonable error message stating what the user can do to add...
virtual void CheckSpectralEquivalence(mfem::ParBilinearForm &blf) const
Checks for the correct configuration of quadrature bases for LOR spectral equivalence.