10 #ifdef MOOSE_MFEM_ENABLED 20 params.
addClassDescription(
"Output for controlling export to an mfem::ParaViewDataCollection.");
21 params.
addParam<
unsigned int>(
"refinements",
23 "Number of uniform refinements for oversampling " 24 "(refinement levels beyond any uniform " 26 params.
addParam<
bool>(
"high_order_output",
28 "Sets whether or not to output the data as " 29 "high-order elements (false by default)." 30 "Reading high-order data requires ParaView" 32 params.
addParam<std::vector<MFEMScalarCoefficientName>>(
33 "scalar_coefficients",
35 "Optional set of scalar coefficient names to evaluate and include in output.");
36 params.
addParam<std::vector<MFEMVectorCoefficientName>>(
37 "vector_coefficients",
39 "Optional set of vector coefficient names to evaluate and include in output.");
41 MooseEnum vtk_format(
"ASCII BINARY BINARY32",
"BINARY",
true);
45 "Select VTK data format to use, choosing between BINARY, BINARY32, and ASCII.");
51 _pv_dc((_file_base +
std::string(
"/Run") +
std::to_string(getFileNumber())).c_str(), &_pmesh),
52 _scalar_coefficient_names(
53 getParam<
std::vector<MFEMScalarCoefficientName>>(
"scalar_coefficients")),
54 _vector_coefficient_names(
55 getParam<
std::vector<MFEMVectorCoefficientName>>(
"vector_coefficients")),
56 _high_order_output(getParam<bool>(
"high_order_output")),
57 _refinements(getParam<unsigned
int>(
"refinements")),
58 _vtk_format(parameters.
get<
MooseEnum>(
"vtk_format").getEnum<mfem::VTKFormat>())
71 std::vector<MFEMScalarCoefficientName> & scalar_coefficient_names)
73 for (
const auto & scalar_coefficient_name : scalar_coefficient_names)
75 std::string coef_name(scalar_coefficient_name +
"_coef");
83 std::vector<MFEMVectorCoefficientName> & vector_coefficient_names)
85 for (
const auto & vector_coefficient_name : vector_coefficient_names)
87 std::string vec_coef_name(vector_coefficient_name +
"_coef");
88 _pv_dc.RegisterVCoeffField(
void registerScalarCoefficients(std::vector< MFEMScalarCoefficientName > &scalar_coefficient_names)
Register user-specified scalar coefficients to the DataCollection.
mfem::VectorCoefficient & getVectorCoefficient(const std::string &name)
Return a vector coefficient with the given name or, if that doesn't exists, try interpreting the name...
MFEMProblemData & _problem_data
Reference to the MFEMProblemData struct storing the output variables.
Class for output information saved in MFEM DataCollections.
static InputParameters validParams()
Moose::MFEM::CoefficientManager coefficients
mfem::ParaViewDataCollection _pv_dc
std::vector< MFEMVectorCoefficientName > _vector_coefficient_names
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type It sho...
void registerVectorCoefficients(std::vector< MFEMVectorCoefficientName > &vector_coefficient_names)
Register user-specified vector coefficients to the DataCollection.
const bool _high_order_output
void registerFields()
Register fields (GridFunctions) to be saved in the DataCollection.
std::vector< MFEMScalarCoefficientName > _scalar_coefficient_names
mfem::Coefficient & getScalarCoefficient(const std::string &name)
Return a scalar coefficient with the given name or, if that doesn't exists, try interpreting the name...
const unsigned int _refinements
static InputParameters validParams()
Class for output information saved in MFEM ParaViewDataCollections.
const mfem::VTKFormat _vtk_format
MFEMParaViewDataCollection(const InputParameters ¶meters)
void ErrorVector unsigned int
registerMooseObject("MooseApp", MFEMParaViewDataCollection)
const Elem & get(const ElemType type_in)