00001
00002
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
00018 AdaptiveGrid<2> G(&WC,false) ;
00019 AdaptiveData<2> D(&G) ;
00020 D.SetRefine() ;
00021
00022 D.FromUniform (&A, L) ;
00023
00024
00025 std::cout << "The AdaptiveGrid has " << G.Size() << " degrees of freedom\n" ;
00026 std::cout << "The various levels contain the following numbers of degrees of freedom\n" ;
00027 G.PrintCounterArray() ;
00028
00029
00030
00031
00032
00033
00034 AdaptivityCriterion R(AdaptivityCriterion::L2_THRESHOLD,1e-4) ;
00035 G.Refine(&D,&R) ;
00036
00037
00038 std::cout << "The AdaptiveGrid has " << G.Size() << " degrees of freedom\n" ;
00039 std::cout << "The various levels contain the following numbers of degrees of freedom\n" ;
00040 G.PrintCounterArray() ;
00041
00042
00043 D.WriteSparse("../../Data/Test/C1.adp") ;
00044 D.WriteUDF("../../Data/Test/C1",&A) ;
00045 D.WriteUDF("../../Data/Test/A1",&A,&D) ;
00046
00047 }