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  

Operations.cc

00001 //
00002 // 
00003 //
00004 
00005 #include "Adaptive1D.hpp"
00006 
00007 void ApplyUnivariateOperators(AdaptiveB *AB1, AdaptiveB *AB2, AdaptiveB **ABX, AdaptiveGS *AGS, AdaptiveGS *AG2,
00008                               int op, Wavelets *WC) {
00009 
00010   // apply 1D operator
00011   switch (op) {
00012     case FIRSTDERIVATIVE: case STIFFNESS: case DIV: case GRAD:  {
00013       AGS->IndexSetForAdaptiveGSOp(AB1 , WC) ;
00014       AB2->ApplyOp   (AB1 , op , WC , AGS , AG2) ;
00015       *ABX=AB2 ;
00016     }
00017     break ;
00018 
00019     case INVERSETRANSFORM: {
00020       AGS->IndexSetForAdaptiveGS2(AB1 , WC) ;
00021       AGS->FromAdaptiveB         (AB1 , WC) ;
00022       if (!AB1->islifting)        AB2->LoadFromInterpoletGS       (AGS , WC) ;
00023       else                        AB2->LoadFromLiftingInterpoletGS(AGS , WC) ;
00024       *ABX=AB2 ;
00025     }
00026     break ;
00027     case TRANSFORM: {
00028       AGS->IndexSetForAdaptiveGS2(AB1 , WC) ;
00029       AGS->RestoreFromInterpoletBasis(AB1 , WC) ;
00030       AB2->FromAdaptiveGS3(AGS , WC) ;
00031       *ABX=AB2 ;
00032     }
00033     break ;
00034     case INTERPOLET2LIFTING: {
00035       AB1->islifting=false ;
00036       AGS->IndexSetForAdaptiveGS2(AB1 , WC) ;
00037       AGS->FromAdaptiveB         (AB1 , WC) ;
00038 
00039       AB2->islifting=true ;
00040       AB2->FromAdaptiveGS3       (AGS , WC) ;
00041       *ABX=AB2 ;
00042     }
00043     break ;
00044     case LIFTING2INTERPOLET: {
00045       AB1->islifting=true ;
00046       AGS->IndexSetForAdaptiveGS2(AB1 , WC) ;
00047       AGS->FromAdaptiveB         (AB1 , WC) ;
00048 
00049       AB2->islifting=false ;
00050       AB2->FromAdaptiveGS3       (AGS , WC) ;
00051       *ABX=AB2 ;
00052     }
00053     break ;
00054     case FD12:    case FD22:   case FD24: case FD14: case FD16: 
00055     case GRADFD4: case DIVFD4: case FD11: {
00056       AGS->IndexSetForAdaptiveGSFD(AB1, &WC->FDOperators[WC->FDOp(op)],  WC) ;
00057       AB2->ApplyFD(AB1 , op , WC , AGS) ;
00058       *ABX=AB2 ;
00059     }
00060     break ;
00061     case FD14II: case FD24II: case FD12II: case FD22II: {
00062       AB2->ApplyFD2(AB1 , op , WC , AGS) ;
00063       *ABX=AB2 ;
00064      }
00065     break ;
00066     case RESTRICTPRESSURE: {
00067       AB1->RestrictPressure() ;
00068       *ABX=AB1 ;
00069     }
00070     break ;
00071     case DIVGRAD: {
00072       AGS->IndexSetForAdaptiveGSOp(AB1 ,  WC ) ;
00073       AB2->ApplyOp   (AB1 , GRAD , WC , AGS, AG2) ;
00074 
00075       AGS->IndexSetForAdaptiveGSOp(AB1 , WC ) ;
00076       AB1->ApplyOp   (AB2 , DIV  , WC , AGS, AG2) ;
00077       *ABX=AB1 ;
00078     }
00079     break ;
00080     case DIVGRADNOSTAB: {
00081       AGS->IndexSetForAdaptiveGSOp(AB1 , WC ) ;
00082       AB2->ApplyOp   (AB1 , FIRSTDERIVATIVE , WC , AGS , AG2) ;
00083 
00084       AGS->IndexSetForAdaptiveGSOp(AB1 , WC ) ;
00085       AB1->ApplyOp   (AB2 , FIRSTDERIVATIVE , WC , AGS , AG2) ;
00086       *ABX=AB1 ;
00087     }
00088     break ;
00089     case DIVGRADFD4: {
00090       AGS->IndexSetForAdaptiveGSFD(AB1, &WC->FDOperators[WC->FDOp(GRADFD4)],  WC) ;
00091       AB2->ApplyFD(AB1 , GRADFD4 , WC , AGS) ;
00092       AB1->ApplyFD(AB2 , DIVFD4  , WC , AGS) ;
00093       *ABX=AB1 ;
00094     }
00095     break ;
00096     case DIVGRADFD4NOSTAB: {
00097       AGS->IndexSetForAdaptiveGSFD(AB1, &WC->FDOperators[WC->FDOp(FD14)],  WC) ;
00098       AB2->ApplyFD(AB1 , FD14 , WC , AGS) ;
00099       AB1->ApplyFD(AB2 , FD14 , WC , AGS) ;
00100       *ABX=AB1 ;
00101     }
00102     break ;
00103     /*
00104       case PROJECTIONINVERSETRANSFORM: { ; }
00105       break ;
00106     */
00107     default: assert(0) ;
00108   }
00109 }

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