vtf-logo

clawpack/applications/euler/2d/DoubleWedge/src/Problem.h

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