MFEM  v3.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
point.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.googlecode.com.
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_POINT
13 #define MFEM_POINT
14 
15 #include "../config/config.hpp"
16 #include "element.hpp"
17 
18 namespace mfem
19 {
20 
22 class Point : public Element
23 {
24 protected:
25  int indices[1];
26 
27 public:
28 
30 
32  Point( const int *ind, int attr = -1 );
33 
35  virtual int GetType() const { return Element::POINT; }
36 
38  virtual void GetVertices( Array<int> &v ) const;
39 
40  virtual int * GetVertices () { return indices; }
41 
42  virtual int GetNVertices() const { return 1; }
43 
44  virtual int GetNEdges() const { return(0); }
45 
46  virtual const int *GetEdgeVertices(int ei) const { return NULL; }
47 
48  virtual int GetNFaces(int &nFaceVertices) const
49  { nFaceVertices = 0; return 0; }
50 
51  virtual const int *GetFaceVertices(int fi) const { return NULL; }
52 
53  virtual Element *Duplicate(Mesh *m) const
54  { return new Point (indices, attribute); }
55 
56  virtual ~Point() { }
57 };
58 
59 extern PointFiniteElement PointFE;
60 
61 }
62 
63 #endif
virtual const int * GetEdgeVertices(int ei) const
Definition: point.hpp:46
virtual int GetNFaces(int &nFaceVertices) const
Definition: point.hpp:48
PointFiniteElement PointFE
Definition: point.cpp:28
virtual int GetNVertices() const
Definition: point.hpp:42
virtual int GetType() const
Return element&#39;s type.
Definition: point.hpp:35
virtual Element * Duplicate(Mesh *m) const
Definition: point.hpp:53
int attribute
Element&#39;s attribute (specifying material property, etc).
Definition: element.hpp:32
virtual const int * GetFaceVertices(int fi) const
Definition: point.hpp:51
int indices[1]
Definition: point.hpp:25
virtual int GetNEdges() const
Definition: point.hpp:44
Data type point element.
Definition: point.hpp:22
virtual ~Point()
Definition: point.hpp:56
Abstract data type element.
Definition: element.hpp:27
virtual int * GetVertices()
Definition: point.hpp:40