https://mooseframework.inl.gov
Loading...
Searching...
No Matches
MFEMVariable.h
Go to the documentation of this file.
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
14#include "MFEMObject.h"
15
20{
21public:
23
25
27 std::shared_ptr<mfem::ParGridFunction> getGridFunction() const { return _gridfunction; }
28
30 const VariableName & getTimeDerivativeName() const { return _time_derivative_name; }
31
34
35protected:
37 std::shared_ptr<mfem::ParFiniteElementSpace> _par_fespace;
38 bool _is_scalar = false;
39
40private:
42 const std::shared_ptr<mfem::ParGridFunction> buildGridFunction();
43
45 std::shared_ptr<mfem::ParGridFunction> _gridfunction = nullptr;
46
48 const VariableName _time_derivative_name;
49};
50
51#endif
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system.
Thin base for MFEM objects backed directly by MooseObject instead of UserObject.
Definition MFEMObject.h:30
Constructs and stores an mfem::ParGridFunction object.
std::shared_ptr< mfem::ParGridFunction > _gridfunction
Stores the constructed gridfunction.
const std::shared_ptr< mfem::ParGridFunction > buildGridFunction()
Constructs the gridfunction.
const VariableName _time_derivative_name
Optional name of the time derivative to associate with this variable in transient problems.
const VariableName & getTimeDerivativeName() const
Returns the variable name corresponding to the time derivative of the MFEMVariable.
std::shared_ptr< mfem::ParFiniteElementSpace > _par_fespace
The underlying MFEM FESpace - always populated regardless of which parameter was used.
std::shared_ptr< mfem::ParGridFunction > getGridFunction() const
Returns a shared pointer to the constructed gridfunction.
void declareCoefficients()
Declare default coefficients associated with this gridfunction.
static InputParameters validParams()
const InputParameters & parameters() const
Get the parameters of the object.
Definition MooseBase.h:131