MFEM  v3.4
Finite element discretization library
 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.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_POINT
13 #define MFEM_POINT
14 
15 #include "../config/config.hpp"
16 #include "element.hpp"
17 
18 namespace mfem
19 {
20 
21 /// Data type point element
22 class Point : public Element
23 {
24 protected:
25  int indices[1];
26 
27 public:
29 
31 
32  /// Constructs point by specifying the indices and the attribute.
33  Point( const int *ind, int attr = -1 );
34 
35  /// Return element's type.
36  virtual int GetType() const { return Element::POINT; }
37 
38  /// Returns the indices of the element's vertices.
39  virtual void GetVertices( Array<int> &v ) const;
40 
41  virtual int * GetVertices () { return indices; }
42 
43  virtual int GetNVertices() const { return 1; }
44 
45  virtual int GetNEdges() const { return (0); }
46 
47  virtual const int *GetEdgeVertices(int ei) const { return NULL; }
48 
49  virtual int GetNFaces(int &nFaceVertices) const
50  { nFaceVertices = 0; return 0; }
51 
52  virtual const int *GetFaceVertices(int fi) const { return NULL; }
53 
54  virtual Element *Duplicate(Mesh *m) const
55  { return new Point (indices, attribute); }
56 
57  virtual ~Point() { }
58 };
59 
60 class PointFiniteElement;
61 extern PointFiniteElement PointFE;
62 
63 }
64 
65 #endif
virtual const int * GetEdgeVertices(int ei) const
Definition: point.hpp:47
virtual int GetNFaces(int &nFaceVertices) const
Definition: point.hpp:49
PointFiniteElement PointFE
Definition: point.cpp:30
virtual int GetNVertices() const
Definition: point.hpp:43
virtual int GetType() const
Return element&#39;s type.
Definition: point.hpp:36
virtual Element * Duplicate(Mesh *m) const
Definition: point.hpp:54
int attribute
Element&#39;s attribute (specifying material property, etc).
Definition: element.hpp:32
virtual const int * GetFaceVertices(int fi) const
Definition: point.hpp:52
int indices[1]
Definition: point.hpp:25
virtual int GetNEdges() const
Definition: point.hpp:45
Geometry::Constants< Geometry::POINT > geom_t
Definition: point.hpp:28
Data type point element.
Definition: point.hpp:22
virtual ~Point()
Definition: point.hpp:57
Abstract data type element.
Definition: element.hpp:27
virtual int * GetVertices()
Definition: point.hpp:41