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 "AddMFEMSolverAction.h" 13 : #include "MFEMProblem.h" 14 : 15 : registerMooseAction("MooseApp", AddMFEMSolverAction, "add_mfem_solver"); 16 : 17 : InputParameters 18 49823 : AddMFEMSolverAction::validParams() 19 : { 20 49823 : InputParameters params = MooseObjectAction::validParams(); 21 49823 : params.addClassDescription("Add a Moose::MFEM linear or nonlinear solver object."); 22 49823 : return params; 23 0 : } 24 : 25 1044 : AddMFEMSolverAction::AddMFEMSolverAction(const InputParameters & parameters) 26 1044 : : MooseObjectAction(parameters) 27 : { 28 1044 : } 29 : 30 : void 31 1044 : AddMFEMSolverAction::act() 32 : { 33 1044 : if (_problem->feBackend() == Moose::FEBackend::MFEM) 34 1044 : static_cast<MFEMProblem &>(*_problem).addMFEMSolver(_type, _name, _moose_object_pars); 35 1044 : } 36 : 37 : #endif