MFEM v2.0
|
00001 // Copyright (c) 2010, Lawrence Livermore National Security, LLC. Produced at 00002 // the Lawrence Livermore National Laboratory. LLNL-CODE-443211. All Rights 00003 // reserved. See file COPYRIGHT for details. 00004 // 00005 // This file is part of the MFEM library. For more information and source code 00006 // availability see http://mfem.googlecode.com. 00007 // 00008 // MFEM is free software; you can redistribute it and/or modify it under the 00009 // terms of the GNU Lesser General Public License (as published by the Free 00010 // Software Foundation) version 2.1 dated February 1999. 00011 00012 #ifndef MFEM_POINT 00013 #define MFEM_POINT 00014 00016 class Point : public Element 00017 { 00018 protected: 00019 int indices[1]; 00020 00021 public: 00022 00023 Point() : Element(Geometry::POINT) {} 00024 00026 Point( const int *ind, int attr = -1 ); 00027 00029 virtual int GetType() const { return Element::POINT; } 00030 00032 virtual void GetVertices( Array<int> &v ) const; 00033 00034 virtual int * GetVertices () { return indices; } 00035 00036 virtual int GetNVertices() const { return 1; } 00037 00038 virtual int GetNEdges() const { return(0); } 00039 00040 virtual const int *GetEdgeVertices(int ei) const { return(NULL); } 00041 00042 virtual Element *Duplicate(Mesh *m) const 00043 { return new Point (indices, attribute); } 00044 00045 virtual ~Point() { } 00046 }; 00047 00048 extern PointFiniteElement PointFE; 00049 00050 #endif