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  

PD.cc

00001 // Example for adaptive/non-adaptive evaluation of partial derivatives
00002 // You must run the WT and AD  examples first!!!!
00003 
00004 # include "UniformData.hpp"
00005 # include "AdaptiveData.hpp"
00006 # include "Function.hpp"
00007 
00008 int debugRefine ;
00009 
00010 int main() {
00011  Wavelets WC("Interpolet",4) ;
00012  
00013  int L[2]={7,7}, a[2]={0},e[2]={1<<L[0],1<<L[1]} ;
00014  UniformData<2> A(a,e,&WC) ; 
00015  A.ReadUDF("../../Data/Test/C") ;
00016  
00017  // adaptive data structures
00018  AdaptiveGrid<2> G(&WC,false) ; // the grid
00019  AdaptiveData<2> D(&G)        ; // the data (must be linked to a grid) 
00020  D.SetRefine() ;                // D shall be refined whenever the grid is refined
00021 
00022  G.ReadSparse ("../../Data/Test/C1.adp") ; // initialize the AdaptiveGrid to enable the following AdaptiveData::ReadSparse() operation
00023  D.ReadSparse ("../../Data/Test/C1.adp") ; // read wavelet coefficients in adaptive data structure, this initializes G 
00024 
00025  // evaluation of \partial_x by means of a 4th order finite difference scheme
00026  A.ApplyOp(A.Ext.BC[0], &A, 0, FD14) ; // on uniform grids, overwrite original wavelet coefficients
00027  D.ApplyOp(D.Ext.BC[0], &D, 0, FD14) ; // adaptive case, overwrite original wavelet coefficients
00028   
00029  // write nodal values of result 
00030  A.WriteUDF ("../../Data/Test/Ax",&A) ;      // compute & write nodal values 
00031  D.WriteUDF ("../../Data/Test/A1x",&A,&D) ;  // compute & write nodal values on uniform write nodal values on 128x128 grid
00032 }

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