MFEM  v4.3.0
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-2021, Lawrence Livermore National Security, LLC. Produced
2 // at the Lawrence Livermore National Laboratory. All Rights reserved. See files
3 // LICENSE and NOTICE for details. LLNL-CODE-806117.
4 //
5 // This file is part of the MFEM library. For more information and source code
6 // availability visit https://mfem.org.
7 //
8 // MFEM is free software; you can redistribute it and/or modify it under the
9 // terms of the BSD-3 license. We welcome feedback and contributions, see file
10 // CONTRIBUTING.md for details.
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 Type 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  /// @deprecated Use GetNFaces(void) and GetNFaceVertices(int) instead.
50  MFEM_DEPRECATED virtual int GetNFaces(int &nFaceVertices) const
51  { nFaceVertices = 0; return 0; }
52 
53  virtual int GetNFaces() const { return 0; }
54 
55  virtual int GetNFaceVertices(int) const { return 0; }
56 
57  virtual const int *GetFaceVertices(int fi) const { return NULL; }
58 
59  virtual Element *Duplicate(Mesh *m) const
60  { return new Point (indices, attribute); }
61 
62  virtual ~Point() { }
63 };
64 
65 class PointFiniteElement;
66 extern PointFiniteElement PointFE;
67 
68 }
69 
70 #endif
virtual MFEM_DEPRECATED int GetNFaces(int &nFaceVertices) const
Definition: point.hpp:50
virtual const int * GetEdgeVertices(int ei) const
Definition: point.hpp:47
virtual Type GetType() const
Return element&#39;s type.
Definition: point.hpp:36
PointFiniteElement PointFE
Definition: point.cpp:30
virtual int GetNVertices() const
Definition: point.hpp:43
Type
Constants for the classes derived from Element.
Definition: element.hpp:41
virtual int GetNFaces() const
Definition: point.hpp:53
virtual Element * Duplicate(Mesh *m) const
Definition: point.hpp:59
int attribute
Element&#39;s attribute (specifying material property, etc).
Definition: element.hpp:33
virtual const int * GetFaceVertices(int fi) const
Definition: point.hpp:57
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:62
Abstract data type element.
Definition: element.hpp:28
virtual int GetNFaceVertices(int) const
Definition: point.hpp:55
virtual int * GetVertices()
Definition: point.hpp:41