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 : #pragma once 13 : #include "FileOutput.h" 14 : #include "MFEMProblem.h" 15 : 16 : /** 17 : * Class for output information saved in MFEM DataCollections 18 : */ 19 : class MFEMDataCollection : public FileOutput 20 : { 21 : public: 22 : static InputParameters validParams(); 23 : MFEMDataCollection(const InputParameters & parameters); 24 : virtual mfem::DataCollection & getDataCollection() = 0; 25 : 26 : protected: 27 : void registerFields(); 28 : void output() override; 29 : /** 30 : * Whether the grid functions need to be explicitly read on the host before output. This seems to 31 : * be required for Conduit data output whereas other formats handle the host read themselves 32 : */ 33 563 : virtual bool gridFunctionsNeedHostRead() const { return false; } 34 : 35 : /// Reference to the MFEMProblemData struct storing the output variables. 36 : MFEMProblemData & _problem_data; 37 : /// Mesh set of output variables are defined on. May differ from main problem mesh if SubMesh 38 : /// variables are in use. 39 : mfem::ParMesh & _pmesh; 40 : }; 41 : 42 : #endif