vtf-logo

weno/applications/euler/2d/RampGFM/src/Problem.h

00001 // -*- C++ -*-
00002 
00003 // Copyright (C) 2003-2007 California Institute of Technology
00004 // Ralf Deiterding, ralf@amroc.net
00005 
00006 #ifndef AMROC_PROBLEM_H
00007 #define AMROC_PROBLEM_H
00008 
00009 #define DIM  2
00010   
00011 #include "WENOProblem.h"
00012 
00013 #define OWN_GFMAMRSOLVER
00014 #include "WENOStdGFMProblem.h"
00015 #include "StatCPTLevelSet.h"
00016 
00017 class SolverSpecific : 
00018   public AMRGFMSolver<VectorType,FixupType,FlagType,DIM> {
00019   typedef VectorType::InternalDataType DataType;
00020   typedef AMRGFMSolver<VectorType,FixupType,FlagType,DIM> base;
00021 public:
00022   SolverSpecific(IntegratorSpecific& integ, 
00023                  base::initial_condition_type& init,
00024                  base::boundary_conditions_type& bc) : base(integ, init, bc) {
00025     SetLevelTransfer(new F77LevelTransfer<VectorType,DIM>(f_prolong, f_restrict));
00026 #ifdef f_flgout
00027     SetFileOutput(new F77GFMFileOutput<VectorType,FixupType,FlagType,DIM>(*this,f_flgout)); 
00028 #else   
00029     SetFileOutput(new GFMFileOutput<VectorType,FixupType,FlagType,DIM>(*this)); 
00030 #endif
00031     SetFixup(new FixupSpecific());
00032     SetFlagging(new FlaggingSpecific(*this)); 
00033     AddGFM(new GhostFluidMethod<VectorType,DIM>(
00034               new F77GFMBoundary<VectorType,DIM>(f_ibndrfl,f_itrans),
00035               new StatCPTLevelSet<DataType,DIM>()));
00036   }  
00037  
00038   ~SolverSpecific() {
00039     DeleteGFM(_GFM[0]);
00040     delete _Flagging;
00041     delete _Fixup;