https://mooseframework.inl.gov
MFEMSimplifiedFESpace.C
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 #include "MFEMSimplifiedFESpace.h"
13 #include "MFEMProblem.h"
14 
17 {
19  params.addClassDescription("Base class for the simplified interfaces to build MFEM finite "
20  "element spaces. It provides the common parameters.");
21  MooseEnum fec_order(
22  "CONSTANT FIRST SECOND THIRD FOURTH FIFTH SIXTH SEVENTH EIGHTH NINTH TENTH ELEVENTH TWELFTH"
23  "THIRTEENTH FOURTEENTH FIFTEENTH SIXTEENTH SEVENTEENTH EIGHTTEENTH NINETEENTH TWENTIETH "
24  "TWENTYFIRST TWENTYSECOND TWENTYTHIRD TWENTYFOURTH TWENTYFIFTH TWENTYSIXTH TWENTYSEVENTH "
25  "TWENTYEIGHTH TWENTYNINTH THIRTIETH THIRTYFIRST THIRTYSECOND THIRTYTHIRD THIRTYFOURTH "
26  "THIRTYFIFTH THIRTYSIXTH THIRTYSEVENTH THIRTYEIGHTH THIRTYNINTH FORTIETH FORTYFIRST"
27  "FORTYSECOND FORTYTHIRD",
28  "FIRST",
29  true);
30  params.addParam<MooseEnum>("fec_order", fec_order, "Order of the FE shape function to use.");
31  return params;
32 }
33 
35  : MFEMFESpace(parameters), _fec_order(parameters.get<MooseEnum>("fec_order"))
36 {
37 }
38 
39 int
41 {
42  return getMFEMProblem().mesh().getMFEMParMesh().Dimension();
43 }
44 
45 #endif
virtual MFEMMesh & mesh() override
Overwritten mesh() method from base MooseMesh to retrieve the correct mesh type, in this case MFEMMes...
Definition: MFEMProblem.C:480
T * get(const std::unique_ptr< T > &u)
The MooseUtils::get() specializations are used to support making forwards-compatible code changes fro...
Definition: MooseUtils.h:1146
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
static InputParameters validParams()
Definition: MFEMFESpace.C:16
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type It sho...
Definition: MooseEnum.h:33
Constructs and stores an mfem::ParFiniteElementSpace object.
Definition: MFEMFESpace.h:22
MFEMSimplifiedFESpace(const InputParameters &parameters)
mfem::ParMesh & getMFEMParMesh()
Accessors for the _mfem_par_mesh object.
Definition: MFEMMesh.h:47
MFEMProblem & getMFEMProblem()
Returns a reference to the MFEMProblem instance.
static InputParameters validParams()
void addClassDescription(const std::string &doc_string)
This method adds a description of the class that will be displayed in the input file syntax dump...
void addParam(const std::string &name, const S &value, const std::string &doc_string)
These methods add an optional parameter and a documentation string to the InputParameters object...
int getProblemDim() const
Returns the dimension of the problem (i.e., the highest dimension of the reference elements in the me...