vtf-logo

WENOStdGFMProblem.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 // Copyright (C) 2003-2007 California Institute of Technology
00004 // Ralf Deiterding, ralf@amroc.net
00005 
00006 #ifndef AMROC_WENO_STD_GFM_PROBLEM_H
00007 #define AMROC_WENO_STD_GFM_PROBLEM_H
00008 
00016 #define OWN_AMRSOLVER
00017 #include "WENOStdProblem.h"
00018 
00019 #include "AMRGFMSolver.h"
00020 #include "F77Interfaces/F77GFMLevelSet.h"
00021 #include "F77Interfaces/F77GFMBoundary.h"
00022 #include "WENOF77GFMFileOutput.h"
00023 
00024 #ifndef OWN_GFMAMRSOLVER
00025 class SolverSpecific : 
00026   public AMRGFMSolver<VectorType,FixupType,FlagType,DIM> {
00027   typedef VectorType::InternalDataType DataType;
00028   typedef AMRGFMSolver<VectorType,FixupType,FlagType,DIM> base;
00029   typedef WENOFixup<VectorType,FixupType,DIM> weno_fixup_type;
00030   typedef WENOIntegrator<VectorType,DIM> weno_integ_type;
00031 
00032 public:
00033   SolverSpecific(IntegratorSpecific& integ, 
00034                  base::initial_condition_type& init,
00035                  base::boundary_conditions_type& bc) : base(integ, init, bc) {
00036     SetLevelTransfer(new F77LevelTransfer<VectorType,DIM>(f_prolong, f_restrict));
00037 #ifdef f_flgout
00038     SetFileOutput(new WENOF77GFMFileOutput<VectorType,FixupType,FlagType,DIM>(*this,f_flgout,f_bounds)); 
00039 #else   
00040     SetFileOutput(new GFMFileOutput<VectorType,FixupType,FlagType,DIM>(*this)); 
00041 #endif
00042     SetFixup(new FixupSpecific());
00043     SetFlagging(new FlaggingSpecific(*this)); 
00044     AddGFM(new GhostFluidMethod<VectorType,DIM>(
00045               new F77GFMBoundary<VectorType,DIM>(f_ibndrfl,f_itrans),
00046               new F77GFMLevelSet<DataType,DIM>(f_lset)));
00047   }  
00048   
00049   ~SolverSpecific() {
00050     DeleteGFM(_GFM[0]);
00051     delete _Flagging;
00052     delete _Fixup;
00053   }
00054 }; 
00055 #endif
00056 
00057 #endif