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  

Good.cc

00001 #include "AdaptiveData.hpp"
00002 int debugRefine ;
00003 int main() {
00004   Wavelets WC("Interpolet",4) ;
00005   // boundary conditions for   A  and B:
00006   int i, bc1[2][2], bc2[2][2] ;
00007   for (i=0; i<2; i++) {
00008     bc1[i][0]=bc1[i][1]= -1; // no BC for A
00009     bc2[i][0]=bc2[i][1]= 0 ; // homogeneous Dirichlet for B
00010   }
00011   
00012   AdaptiveGrid<2> G(&WC) ;
00013   AdaptiveData<2> A(&G), B(&G), C(&G) ;
00014   G.SetPeriodicConditions(bc1) ;
00015 
00016   ConstFunction F ;
00017   double p=1.0 ;
00018   F.SetParameters(&p) ;
00019   // get multiscale represenation of f(x,y)=1
00020   A.SetFunction(&F)   ;
00021   
00022   // set multiscale representation of g(x,y)=0 
00023   B.Set(0.0) ;
00024   B.SetBoundaryConditions(bc2) ;
00025 
00026   // get representation in terms of the more general basis
00027   for (i=0; i<2; i++) B.ApplyOp(bc1[i], &B, i , PROJECTION) ;  
00028 
00029   // try to add
00030   C.Add(&A,&B) ;
00031 }

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