![]() |
00001 // Copyright (C) 2003 Johan Hoffman and Anders Logg. 00002 // Licensed under the GNU GPL Version 2. 00003 00004 #ifndef __ELEMENT_BLOCK_H 00005 #define __ELEMENT_BLOCK_H 00006 00007 #include <dolfin/NewArray.h> 00008 #include <dolfin/Component.h> 00009 #include <dolfin/Element.h> 00010 00011 namespace dolfin { 00012 00015 00016 class ElementBlock { 00017 public: 00018 00020 ElementBlock(int N); 00021 00023 ~ElementBlock(); 00024 00026 Element* createElement(Element::Type type, unsigned int q, unsigned int index, 00027 real t0, real t1); 00028 00030 Element* element(unsigned int, real t); 00031 00033 Element* first(unsigned int i); 00034 00036 Element* last(unsigned int i); 00037 00039 unsigned int size() const; 00040 00042 unsigned int bytes() const; 00043 00045 real starttime() const; 00046 00048 real endtime() const; 00049 00051 real dist(real t0, real t1) const; 00052 00054 bool within(real t) const; 00055 00056 friend class ElementTmpFile; 00057 00058 private: 00059 00060 // Update interval 00061 void update(real t0, real t1); 00062 00063 // List of components 00064 NewArray<Component> components; 00065 00066 // Interval 00067 real t0, t1; 00068 00069 // True if this block is empty 00070 bool empty; 00071 00072 // Number of bytes (approximately) used by this block 00073 unsigned int _bytes; 00074 00075 }; 00076 00077 } 00078 00079 #endif
Documentation automatically generated with Doxygen on 10 Sep 2004.