10#ifdef MOOSE_MFEM_ENABLED
19 params.
addParam<std::string>(
"submesh",
20 "Submesh to output variables on. Leave blank to use base mesh.");
21 params.
addParam<std::vector<VariableName>>(
22 "show", {},
"A list of variables that should be included in the collection.");
23 params.
addParam<std::vector<VariableName>>(
24 "hide", {},
"A list of variables that should NOT be included in the collection.");
30 _problem_data(static_cast<
MFEMProblem *>(_problem_ptr)->getProblemData()),
31 _pmesh(parameters.isParamValid(
"submesh")
32 ? _problem_data.submeshes.GetRef(getParam<
std::string>(
"submesh"))
33 : const_cast<
mfem::ParMesh &>(*_problem_data.pmesh.get())),
34 _shown(getParam<
std::vector<VariableName>>(
"show")),
35 _hidden(getParam<
std::vector<VariableName>>(
"hide"))
50 else if (dc.GetMesh() == gf_ptr->FESpace()->GetMesh())
51 dc.RegisterField(gf_name, gf_ptr.get());
55 " is not defined on the same mesh as the output DataCollection.");
64 else if (dc.GetMesh() == gf_ptr->FESpace()->GetMesh())
66 dc.RegisterField(gf_name +
"_real", &gf_ptr->real());
67 dc.RegisterField(gf_name +
"_imag", &gf_ptr->imag());
72 " is not defined on the same mesh as the output DataCollection.");
void mooseInfo(Args &&... args)
Emit an informational message with the given stringified, concatenated args.
An outputter with filename support.
unsigned int getFileNumber()
Return the current file number for this outputter.
static InputParameters validParams()
std::string _file_base
The base filename from the input paramaters.
virtual void setFileBaseInternal(const std::string &file_base)
Internal function that sets the file_base.
unsigned int & _file_num
A file number counter, initialized to 0 (this must be controlled by the child class,...
void output() override
Write out data.
const std::vector< VariableName > & _hidden
List of variables to hide.
void registerFields()
Register fields (GridFunctions) to be saved in the DataCollection.
virtual mfem::DataCollection & getDataCollection()=0
MFEMProblemData & _problem_data
Reference to the MFEMProblemData struct storing the output variables.
MFEMDataCollection(const InputParameters ¶meters)
const std::vector< VariableName > & _shown
List of variables to show.
void setFileBaseInternal(const std::string &file_base) override
Update the DataCollection path when the internal file base path is set.
static InputParameters validParams()
virtual Real time() override
Get the output time.
Moose::MFEM::ComplexGridFunctions cmplx_gridfunctions
Moose::MFEM::GridFunctions gridfunctions