MFEM  v3.2
Finite element discretization library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
fem_extras.cpp
Go to the documentation of this file.
1 // Copyright (c) 2010, Lawrence Livermore National Security, LLC. Produced at
2 // the Lawrence Livermore National Laboratory. LLNL-CODE-443211. All Rights
3 // reserved. See file COPYRIGHT for details.
4 //
5 // This file is part of the MFEM library. For more information and source code
6 // availability see http://mfem.org.
7 //
8 // MFEM is free software; you can redistribute it and/or modify it under the
9 // terms of the GNU Lesser General Public License (as published by the Free
10 // Software Foundation) version 2.1 dated February 1999.
11 
12 #include "fem_extras.hpp"
13 
14 using namespace std;
15 
16 namespace mfem
17 {
18 
19 namespace miniapps
20 {
21 
22 H1_FESpace::H1_FESpace(Mesh *m,
23  const int p, const int space_dim, const int type,
24  int vdim, int order)
25  : FiniteElementSpace(m, new H1_FECollection(p,space_dim,type),vdim,order)
26 {
27  FEC_ = this->FiniteElementSpace::fec;
28 }
29 
31 {
32  delete FEC_;
33 }
34 
35 ND_FESpace::ND_FESpace(Mesh *m, const int p, const int space_dim,
36  int vdim, int order)
37  : FiniteElementSpace(m, new ND_FECollection(p,space_dim),vdim,order)
38 {
39  FEC_ = this->FiniteElementSpace::fec;
40 }
41 
43 {
44  delete FEC_;
45 }
46 
47 RT_FESpace::RT_FESpace(Mesh *m, const int p, const int space_dim,
48  int vdim, int order)
49  : FiniteElementSpace(m, new RT_FECollection(p-1,space_dim),vdim,order)
50 {
51  FEC_ = this->FiniteElementSpace::fec;
52 }
53 
55 {
56  delete FEC_;
57 }
58 
59 } // namespace miniapps
60 
61 } // namespace mfem
RT_FESpace(Mesh *m, const int p, const int space_dim, int vdim=1, int order=Ordering::byNODES)
Definition: fem_extras.cpp:47
ND_FESpace(Mesh *m, const int p, const int space_dim, int vdim=1, int order=Ordering::byNODES)
Definition: fem_extras.cpp:35
const FiniteElementCollection * fec
Definition: fespace.hpp:66
Arbitrary order H(div)-conforming Raviart-Thomas finite elements.
Definition: fe_coll.hpp:179
Arbitrary order H(curl)-conforming Nedelec finite elements.
Definition: fe_coll.hpp:231
Arbitrary order H1-conforming (continuous) finite elements.
Definition: fe_coll.hpp:77