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 MFEM_ENABLED 11 : 12 : #pragma once 13 : #include "EquationSystem.h" 14 : #include "MFEMContainers.h" 15 : #include "CoefficientManager.h" 16 : #include "MFEMSolverBase.h" 17 : #include <fstream> 18 : #include <iostream> 19 : #include <memory> 20 : 21 : /// Base problem data struct. 22 : struct MFEMProblemData 23 : { 24 : public: 25 264 : MFEMProblemData() = default; 26 264 : virtual ~MFEMProblemData() { ode_solver.reset(); }; 27 : 28 : std::shared_ptr<mfem::ParMesh> pmesh{nullptr}; 29 : Moose::MFEM::SubMeshes submeshes; 30 : Moose::MFEM::CoefficientManager coefficients; 31 : 32 : std::unique_ptr<mfem::ODESolver> ode_solver{nullptr}; 33 : mfem::BlockVector f; 34 : 35 : std::shared_ptr<Moose::MFEM::EquationSystem> eqn_system{nullptr}; 36 : std::shared_ptr<mfem::NewtonSolver> nonlinear_solver{nullptr}; 37 : 38 : std::shared_ptr<MFEMSolverBase> jacobian_solver{nullptr}; 39 : 40 : Moose::MFEM::FECollections fecs; 41 : Moose::MFEM::FESpaces fespaces; 42 : Moose::MFEM::GridFunctions gridfunctions; 43 : 44 : MPI_Comm comm; 45 : int myid; 46 : int num_procs; 47 : }; 48 : 49 : #endif