MFEM  v4.0
Finite element discretization library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
wedge.hpp
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 #ifndef MFEM_WEDGE
13 #define MFEM_WEDGE
14 
15 #include "../config/config.hpp"
16 #include "element.hpp"
17 
18 namespace mfem
19 {
20 
21 /// Data type Wedge element
22 class Wedge : public Element
23 {
24 protected:
25  int indices[6];
26 
27 public:
29 
30  Wedge() : Element(Geometry::PRISM) { }
31 
32  /// Constructs wedge by specifying the indices and the attribute.
33  Wedge(const int *ind, int attr = 1);
34 
35  /// Constructs wedge by specifying the indices and the attribute.
36  Wedge(int ind1, int ind2, int ind3, int ind4, int ind5, int ind6,
37  int attr = 1);
38 
39  /// Return element's type.
40  virtual Type GetType() const { return Element::WEDGE; }
41 
42  /// Set the vertices according to the given input.
43  virtual void SetVertices(const int *ind);
44 
45  /// Returns the indices of the element's vertices.
46  virtual void GetVertices(Array<int> &v) const;
47 
48  virtual int *GetVertices() { return indices; }
49 
50  virtual int GetNVertices() const { return 6; }
51 
52  virtual int GetNEdges() const { return 9; }
53 
54  virtual const int *GetEdgeVertices(int ei) const
55  { return geom_t::Edges[ei]; }
56 
57  virtual int GetNFaces(int &nFaceVertices) const;
58 
59  virtual int GetNFaceVerticess(int fi) const
60  { return ( ( fi < 2 ) ? 3 : 4); }
61 
62  virtual const int *GetFaceVertices(int fi) const
63  { return geom_t::FaceVert[fi]; }
64 
65  virtual Element *Duplicate(Mesh *m) const
66  { return new Wedge(indices, attribute); }
67 
68  virtual ~Wedge() { }
69 };
70 
71 // Defined in fe.cpp to ensure construction after 'mfem::poly1d'.
72 extern class H1_WedgeElement WedgeFE;
73 
74 }
75 
76 #endif
virtual int GetNFaceVerticess(int fi) const
Definition: wedge.hpp:59
virtual ~Wedge()
Definition: wedge.hpp:68
virtual int GetNEdges() const
Definition: wedge.hpp:52
static const int FaceVert[NumFaces][MaxFaceVert]
Definition: geom.hpp:222
static const int Edges[NumEdges][2]
Definition: geom.hpp:218
Data type Wedge element.
Definition: wedge.hpp:22
virtual const int * GetFaceVertices(int fi) const
Definition: wedge.hpp:62
virtual Type GetType() const
Return element&#39;s type.
Definition: wedge.hpp:40
virtual int GetNFaces(int &nFaceVertices) const
Definition: wedge.cpp:59
Type
Constants for the classes derived from Element.
Definition: element.hpp:41
Geometry::Constants< Geometry::PRISM > geom_t
Definition: wedge.hpp:28
virtual Element * Duplicate(Mesh *m) const
Definition: wedge.hpp:65
virtual void SetVertices(const int *ind)
Set the vertices according to the given input.
Definition: wedge.cpp:42
class H1_WedgeElement WedgeFE
int attribute
Element&#39;s attribute (specifying material property, etc).
Definition: element.hpp:33
virtual const int * GetEdgeVertices(int ei) const
Definition: wedge.hpp:54
int indices[6]
Definition: wedge.hpp:25
virtual int * GetVertices()
Definition: wedge.hpp:48
virtual int GetNVertices() const
Definition: wedge.hpp:50
Abstract data type element.
Definition: element.hpp:28