Department of Scientific Computing   
Institute for Numerical Simulation   
University of Bonn   
Documentation
Download
Programming References
Bug Reports / Suggestions
FAQ
Authors
Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  

AdaptiveLevels.hpp

00001 //
00002 //  Univariate classes 
00003 //
00004 
00005 #ifndef _UNI_VARIAT_
00006 # define _UNI_VARIAT_
00007 
00008 # include<map>
00009 # include<pthread.h>
00010 
00011 #include "Adaptive1D.hpp"
00012 
00020 struct AdaptiveLevels {
00021 
00023         AdaptiveLevels() {;}
00024        ~AdaptiveLevels() {;}
00025  
00027          void Init() ;
00029          void Clear() ;
00031          void Delete() ;
00033          size_t     size() ;
00034 
00036   typedef map <int,long,intlt> AdaptiveL ;
00038   inline AdaptiveL *operator[](const unsigned int t)  { return a[t] ;}  
00040          AdaptiveL *a[LMAX+1] ;
00041 } ;
00042 
00044 struct AdaptiveLevelsIndex {
00045   int           dim  ;
00046   unsigned char l[DMAX-1] ; // DIM-1
00047   unsigned int  t[DMAX-1] ; // DIM-1
00048   
00050   AdaptiveLevelsIndex() {dim =-1;}
00052   void Init () {dim=-1;}
00054   void Clear() {dim=-1;}
00056   void Delete() {dim=-1;}
00057 
00058   void Print() ;
00059 } ;
00060 
00062 struct AdaptiveLevelsIndexCmp {
00063   bool operator()(const AdaptiveLevelsIndex *a,const AdaptiveLevelsIndex *b) const ;
00064 } ;
00065 
00066 struct AdaptiveLevelsPointer {
00067   size_t               s  ; // size of AdaptiveLevels *a
00068   AdaptiveLevels      *a  ;
00069   AdaptiveLevelsIndex *lt ; // dimension reduced level/spatial index 
00070                   AdaptiveLevelsPointer() ;
00071   void            Copy(AdaptiveLevelsPointer *alp) ;
00072 } ;
00073 
00074 int   AdaptiveLevelsPointercmp(const void *pa,const void *pb) ;
00075 
00076 struct SMPjob {
00077           SMPjob() ;
00078   size_t  leveloffset(int *l) ;
00079   void    set(int operation, int direction, int dim,
00080               AdaptiveLevelsPointer *alpstart, size_t num_alp,
00081               vector<double> **input,
00082               vector<double> **output,
00083               vector<double> **roespeed=NULL) ;
00084 
00085   bool    isfinished() ; // called by main program to check whether the job has been processed
00086   void    setpoll() ;
00087   bool    getpoll() ;
00088   void    clrpoll() ;
00089 
00090   struct  AdaptiveLevelsPointer *alp ; // first AdaptiveLevel
00091   size_t  nalp                       ; // number of AdaptiveLevel
00092 
00093   AdaptiveB  *AB1,*AB2 ;
00094   AdaptiveGS *AGS,*AG2 ;
00095 
00096   int       op, dir, DIM ;
00097   Wavelets *WC ;
00098 
00099   vector<double> **in, **out, **wenoroe ;
00100 
00101   bool finished, terminate, poll ;
00102 
00103   size_t           jobcount,requests ;
00104 
00105 } ;
00106 
00107 size_t IndexSetWriteToAdaptiveL(AdaptiveLevels::AdaptiveL *al,size_t *counter,struct IndexSet *I) ;
00108 void   ApplyUnivariateOperators(AdaptiveB *AB1, AdaptiveB *AB2, AdaptiveB **ABX, AdaptiveGS *AGS, AdaptiveGS *AG2, 
00109                                 int op, Wavelets *WC) ;
00110 
00111 void *ProcessSMPjob    (void *jb) ;
00112 void *ProcessSMPjobWENO(void *jb) ;
00113 
00114 void *PollProcessSMPjob(void *jb) ;
00115 
00116 #endif

Generated at Mon Aug 19 10:02:31 2002 for AWFD by doxygen1.2.8.1 written by Dimitri van Heesch, © 1997-2001