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_QUADRILATERAL 00013 #define MFEM_QUADRILATERAL 00014 00016 class Quadrilateral : public Element 00017 { 00018 protected: 00019 int indices[4]; 00020 static const int edges[4][2]; 00021 00022 public: 00023 00024 Quadrilateral() : Element(Geometry::SQUARE) {} 00025 00027 Quadrilateral(const int *ind, int attr = 1); 00028 00030 Quadrilateral(int ind1, int ind2, int ind3, int ind4, int attr = 1); 00031 00033 int GetType() const { return Element::QUADRILATERAL; } 00034 00036 virtual void SetVertices(const int *ind); 00037 00039 virtual void GetVertices(Array<int> &v) const; 00040 00041 virtual int *GetVertices() { return indices; } 00042 00043 virtual int GetNVertices() const { return 4; } 00044 00045 virtual int GetNEdges() const { return(4); } 00046 00047 virtual const int *GetEdgeVertices(int ei) const 00048 { return(edges[ei]); } 00049 00050 virtual Element *Duplicate(Mesh *m) const 00051 { return new Quadrilateral(indices, attribute); } 00052 00053 virtual ~Quadrilateral() { } 00054 }; 00055 00056 extern BiLinear2DFiniteElement QuadrilateralFE; 00057 00058 #endif