LCOV - code coverage report
Current view: top level - src/mfem/solvers - MFEMOperatorJacobiSmoother.C (source / functions) Hit Total Coverage
Test: idaholab/moose framework: #33187 (5aa0b2) with base d7c4bd Lines: 20 21 95.2 %
Date: 2026-06-30 12:18:20 Functions: 4 4 100.0 %
Legend: Lines: hit not hit

          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 "MFEMOperatorJacobiSmoother.h"
      13             : #include "MFEMProblem.h"
      14             : 
      15             : registerMooseObject("MooseApp", MFEMOperatorJacobiSmoother);
      16             : 
      17             : InputParameters
      18        2638 : MFEMOperatorJacobiSmoother::validParams()
      19             : {
      20        2638 :   InputParameters params = Moose::MFEM::LinearSolverBase::validParams();
      21        2638 :   params.addClassDescription("MFEM solver for performing Jacobi smoothing of the equation system.");
      22             : 
      23        2638 :   return params;
      24           0 : }
      25             : 
      26         270 : MFEMOperatorJacobiSmoother::MFEMOperatorJacobiSmoother(const InputParameters & parameters)
      27         270 :   : Moose::MFEM::LinearSolverBase(parameters)
      28             : {
      29         270 :   ConstructSolver();
      30         270 : }
      31             : 
      32             : void
      33         270 : MFEMOperatorJacobiSmoother::ConstructSolver()
      34             : {
      35         270 :   _solver = std::make_unique<mfem::OperatorJacobiSmoother>();
      36         540 :   _solver->iterative_mode = getParam<bool>("use_initial_guess");
      37         270 : }
      38             : 
      39             : void
      40          31 : MFEMOperatorJacobiSmoother::SetupLOR(mfem::ParBilinearForm & a, mfem::Array<int> & ess_bdr_markers)
      41             : {
      42          31 :   if (_lor)
      43             :   {
      44          31 :     CheckSpectralEquivalence(a);
      45          31 :     mfem::Array<int> ess_tdofs;
      46          31 :     a.ParFESpace()->GetEssentialTrueDofs(ess_bdr_markers, ess_tdofs);
      47          31 :     _solver.reset(new mfem::LORSolver<mfem::OperatorJacobiSmoother>(a, ess_tdofs));
      48          31 :   }
      49          31 : }
      50             : 
      51             : #endif

Generated by: LCOV version 1.14