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_STABLE3D 00013 #define MFEM_STABLE3D 00014 00015 #include "mem_alloc.hpp" 00016 00017 class STable3DNode 00018 { 00019 public: 00020 STable3DNode *Prev; 00021 int Column, Floor, Number; 00022 }; 00023 00025 class STable3D 00026 { 00027 private: 00028 int Size, NElem; 00029 STable3DNode **Rows; 00030 00031 #ifdef MFEM_USE_MEMALLOC 00032 MemAlloc <STable3DNode, 1024> NodesMem; 00033 #endif 00034 00035 public: 00036 explicit STable3D (int nr); 00037 00038 int Push (int r, int c, int f); 00039 00040 int operator() (int r, int c, int f) const; 00041 00042 int Index (int r, int c, int f) const; 00043 00044 int Push4 (int r, int c, int f, int t); 00045 00046 int operator() (int r, int c, int f, int t) const; 00047 00048 int NumberOfElements() { return NElem; }; 00049 00050 ~STable3D (); 00051 }; 00052 00053 #endif