https://mooseframework.inl.gov
Loading...
Searching...
No Matches
MFEMFESpaceHierarchy.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#include "libmesh/ignore_warnings.h"
16#include "mfem/fem/fespacehierarchy.hpp"
17#include "libmesh/restore_warnings.h"
18
35{
36public:
38
40
42 std::shared_ptr<mfem::ParFiniteElementSpaceHierarchy> getHierarchyShared() const
43 {
44 return _hierarchy;
45 }
46
48 mfem::ParFiniteElementSpaceHierarchy & getHierarchy() const { return *_hierarchy; }
49
50 bool isScalar() const { return _is_scalar; }
51
52 bool isVector() const { return !isScalar(); }
53
54private:
55 void buildHierarchy();
56
58 std::shared_ptr<mfem::ParFiniteElementSpaceHierarchy> _hierarchy;
59
62 std::vector<std::unique_ptr<mfem::FiniteElementCollection>> _level_fecs;
63
64 bool _is_scalar = false;
65};
66
67#endif
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system.
Builds and owns a mfem::ParFiniteElementSpaceHierarchy from a base FESpace by applying a sequence of ...
static InputParameters validParams()
mfem::ParFiniteElementSpaceHierarchy & getHierarchy() const
Returns a reference to the ParFiniteElementSpaceHierarchy.
std::shared_ptr< mfem::ParFiniteElementSpaceHierarchy > getHierarchyShared() const
Returns a shared_ptr to the ParFiniteElementSpaceHierarchy. Safe for co-ownership.
std::shared_ptr< mfem::ParFiniteElementSpaceHierarchy > _hierarchy
The hierarchy - shared_ptr so that MFEMGeometricMultigridSolver and ProblemData can co-own.
std::vector< std::unique_ptr< mfem::FiniteElementCollection > > _level_fecs
FECs for p-refined levels.
Thin base for MFEM objects backed directly by MooseObject instead of UserObject.
Definition MFEMObject.h:30
const InputParameters & parameters() const
Get the parameters of the object.
Definition MooseBase.h:131