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.");
const std::vector< VariableName > & _hidden
List of variables to hide.
virtual void setFileBaseInternal(const std::string &file_base)
Internal function that sets the file_base.
void mooseInfo(Args &&... args) const
KOKKOS_INLINE_FUNCTION const T * find(const T &target, const T *const begin, const T *const end)
Find a value in an array.
Moose::MFEM::ComplexGridFunctions cmplx_gridfunctions
virtual Real time() override
Get the output time.
MFEMProblemData & _problem_data
Reference to the MFEMProblemData struct storing the output variables.
unsigned int getFileNumber()
Return the current file number for this outputter.
std::string _file_base
The base filename from the input paramaters.
const std::vector< VariableName > & _shown
List of variables to show.
static InputParameters validParams()
void registerFields()
Register fields (GridFunctions) to be saved in the DataCollection.
MFEMDataCollection(const InputParameters ¶meters)
static InputParameters validParams()
void output() override
Write out data.
unsigned int & _file_num
A file number counter, initialized to 0 (this must be controlled by the child class, see Exodus)
An outputter with filename support.
virtual mfem::DataCollection & getDataCollection()=0
Moose::MFEM::GridFunctions gridfunctions
void setFileBaseInternal(const std::string &file_base) override
Update the DataCollection path when the internal file base path is set.
const Elem & get(const ElemType type_in)