![]() |
00001 // Copyright (C) 2003 Johan Hoffman and Anders Logg. 00002 // Licensed under the GNU GPL Version 2. 00003 // 00004 // Updates by Johan Jansson 2003 00005 00006 #ifndef __RECURSIVE_TIME_SLAB_H 00007 #define __RECURSIVE_TIME_SLAB_H 00008 00009 #include <dolfin/NewArray.h> 00010 #include <dolfin/TimeSlab.h> 00011 00012 namespace dolfin { 00013 00014 class Element; 00015 class Adaptivity; 00016 class Partition; 00017 class RHS; 00018 class Solution; 00019 class FixedPointIteration; 00020 00022 00023 class RecursiveTimeSlab : public TimeSlab { 00024 public: 00025 00027 RecursiveTimeSlab(real t0, real t1, Solution& u, RHS& f, 00028 Adaptivity& adaptivity, FixedPointIteration& fixpoint, 00029 Partition& partition, int offset); 00030 00032 ~RecursiveTimeSlab(); 00033 00035 bool accept(RHS& f, real TOL); 00036 00038 void countElementGroups(unsigned int& size); 00039 00041 void addElementGroups(NewArray<ElementGroup*>& groups, unsigned int& pos); 00042 00044 void show(unsigned int depth = 0) const; 00045 00046 private: 00047 00048 // Create new time slab 00049 void create(Solution& u, RHS& f, Adaptivity& adaptivity, 00050 FixedPointIteration& fixpoint, 00051 Partition& partition, int offset); 00052 00053 // Create list of time slabs within the time slab 00054 void createTimeSlabs(Solution& u, RHS& f, Adaptivity& adaptivity, 00055 FixedPointIteration& fixpoint, 00056 Partition& partition, int offset); 00057 00058 // Create list of elements within the time slab 00059 void createElements(Solution& u, RHS& f, Adaptivity& adaptivity, 00060 FixedPointIteration& fixpoint, 00061 Partition& partition, int offset, int end); 00062 00063 // Compute residuals and new time steps 00064 void computeResiduals(RHS& f, Adaptivity& adaptivity); 00065 00066 //--- Time slab data --- 00067 00068 // List of time slabs within this time slab 00069 NewArray<TimeSlab*> timeslabs; 00070 00071 }; 00072 00073 } 00074 00075 #endif
Documentation automatically generated with Doxygen on 10 Sep 2004.