vtf-logo

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

00001 // -*- C++ -*-
00002 
00003 #ifndef AMROC_PROBLEM_H
00004 #define AMROC_PROBLEM_H
00005 
00006 #define DIM  2
00007 #define NEQUATIONS 9   // Euler equations for gases (5 fields), 
00008                        // +2 fields for passive scalars
00009                        // +1 feild for temperature
00010                        // +1 feild to output dcflag and 
00011                        // +0 fieldsgske (No LES here)
00012 #define NVARS 7        // Fixup used only for vector of state and 2 scalars
00013 
00014 #define OWN_AMRSOLVER
00015   
00016 #include "WENOProblem.h"
00017 #include "WENOStdProblem.h"
00018 
00019 #ifdef OWN_AMRSOLVER
00020 
00021 #define f_init_commongm FORTRAN_NAME(comblgm, COMBLGM)
00022 
00023 extern "C" {
00024   void f_init_commongm(const INTEGER& meqn, INTEGER* shape, DOUBLE* geom);
00025 }
00026 
00027 class SolverSpecific : 
00028   public AMRSolver<VectorType,FixupType,FlagType,DIM> {
00029   typedef AMRSolver<VectorType,FixupType,FlagType,DIM> base;
00030   typedef WENOFixup<VectorType,FixupType,DIM> weno_fixup_type;
00031   typedef WENOIntegrator<VectorType,DIM> weno_integ_type;
00032 public:
00033   SolverSpecific(IntegratorSpecific& integ, 
00034                  base::initial_condition_type& init,
00035                  base::boundary_conditions_type& bc) :
00036     AMRSolver<VectorType,FixupType,FlagType,DIM>(integ, init, bc) {
00037     SetLevelTransfer(new F77LevelTransfer<VectorType,DIM>(f_prolong, f_restrict));
00038 #ifdef f_flgout
00039     SetFileOutput(new F77FileOutput<VectorType,DIM>(f_flgout)); 
00040 #else   
00041     SetFileOutput(new FileOutput<VectorType,DIM>()); 
00042 #endif
00043     SetFixup(new FixupSpecific());
00044     SetFlagging(new FlaggingSpecific(*this)); 
00045   }
00046 
00047     
00048   virtual void SetupData() {
00049     base::SetupData();
00050     f_init_commongm(DIM,shape,geom);
00051   }
00052 
00053   ~SolverSpecific() {
00054     delete _LevelTransfer;
00055     delete _Flagging;
00056     delete _Fixup;
00057     delete _FileOutput;
00058   }
00059 }; 
00060 #endif 
00061