https://mooseframework.inl.gov
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 MFEM_ENABLED
11 
12 #pragma once
13 
14 #include "MFEMFESpace.h"
15 #include "MFEMGeneralUserObject.h"
16 
21 {
22 public:
24 
26 
28  inline std::shared_ptr<mfem::ParGridFunction> getGridFunction() const { return _gridfunction; }
29 
31  inline const MFEMFESpace & getFESpace() const { return _fespace; }
32 
33 protected:
35 
36 private:
38  const std::shared_ptr<mfem::ParGridFunction> buildGridFunction();
39 
41  const std::shared_ptr<mfem::ParGridFunction> _gridfunction{nullptr};
42 };
43 
44 #endif
const MFEMFESpace & _fespace
Definition: MFEMVariable.h:34
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
const std::shared_ptr< mfem::ParGridFunction > _gridfunction
Stores the constructed gridfunction.
Definition: MFEMVariable.h:41
Constructs and stores an mfem::ParGridFunction object.
Definition: MFEMVariable.h:20
MFEMVariable(const InputParameters &parameters)
Definition: MFEMVariable.C:35
const std::shared_ptr< mfem::ParGridFunction > buildGridFunction()
Constructs the gridfunction.
Definition: MFEMVariable.C:44
const MFEMFESpace & getFESpace() const
Returns a reference to the fespace used by the gridfunction.
Definition: MFEMVariable.h:31
std::shared_ptr< mfem::ParGridFunction > getGridFunction() const
Returns a shared pointer to the constructed gridfunction.
Definition: MFEMVariable.h:28
Constructs and stores an mfem::ParFiniteElementSpace object.
Definition: MFEMFESpace.h:22
static InputParameters validParams()
Definition: MFEMVariable.C:21
const InputParameters & parameters() const
Get the parameters of the object.