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  

WT.cc

00001 // Example for non-adaptive wavelet transforms
00002 
00003 # include "UniformData.hpp"
00004 # include "Function.hpp"
00005 
00006 int debugRefine ;
00007 
00008 int main() {
00009  Wavelets WC("Interpolet",4) ;
00010  
00011  int L=7 ;                         // maximal level of refinement
00012  int i,a[2]={0},e[2]={1<<L,1<<L} ; // dimensions of the grid
00013  int BC[2][2] ;
00014  for (i=0; i<2; i++) BC[i][0]=BC[i][1]=-1 ; //boundary condition identifiers
00015 
00016  UniformData<2> A(a,e,&WC), B(a,e,&WC), C(a,e,&WC) ; // allocation of uniform grid with 129x129 points
00017 
00018  GeneralRadialFunction<2> F ; //  a predefined very spiky function
00019  double p[4]={0.5,1e-8 , 3./9 , 4./9} ; 
00020  F.SetParameters(p)         ;
00021  
00022  A.SetBoundaryConditions(BC)  ;
00023  A.SetFunction(&F,false,true) ;  // A contains the nodal values of F on the 129x129 grid
00024                                  // more precisely: A contains the scaling function coefficients of the 
00025                                  // Interpolant of F w.r.t. to the 129x129 grid 
00026                                  // The scaling functions are defined just on the interval and 
00027                                  // don't have any homogeneous boundary conditions
00028 
00029  // compute the coefficients for the isotropic Meyer-wavelets
00030  B.MRATransform(&A) ;
00031 
00032  // compute the coefficients for the anisotropic wavelets, by a tensor product transform
00033  for (i=0; i<2; i++) C.ApplyOp((i==0) ? &A : &C, i,  TRANSFORM) ;
00034 
00035  // write
00036  A.WriteUDF("../../Data/Test/A") ;
00037  B.WriteUDF("../../Data/Test/B") ;
00038  C.WriteUDF("../../Data/Test/C") ;
00039 }

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