00001
00002
00003 #ifndef AMROC_PROBLEM_H
00004 #define AMROC_PROBLEM_H
00005
00006 #define DIM 3
00007 #define NEQUATIONS 10 // Euler equations for gases in 3D (5 fields),
00008
00009
00010
00011
00012 #define NVARS 7 // Fixup used only for vector of state and 2 scalars
00013
00014 #include "WENOProblem.h"
00015
00016
00017 #define OWN_GFMAMRSOLVER
00018 #include "WENOStdGFMProblem.h"
00019
00020 #define f_init_commongm FORTRAN_NAME(comblgm, COMBLGM)
00021
00022 extern "C" {
00023 void f_init_commongm(const INTEGER& dim, INTEGER* shape, DOUBLE* geom,
00024 INTEGER& maxlev, INTEGER* refine);
00025 }
00026
00027 class SolverSpecific :
00028 public AMRGFMSolver<VectorType,FixupType,FlagType,DIM> {
00029 typedef VectorType::InternalDataType DataType;
00030 typedef AMRGFMSolver<VectorType,FixupType,FlagType,DIM> base;
00031 typedef WENOF77GFMFileOutput<VectorType,FixupType,FlagType,DIM> output_type;
00032 public:
00033
00034 SolverSpecific(IntegratorSpecific& integ,
00035 base::initial_condition_type& init,
00036 base::boundary_conditions_type& bc) : base(integ, init, bc) {
00037 SetLevelTransfer(new F77LevelTransfer<VectorType,DIM>(f_prolong, f_restrict));
00038 #ifdef f_flgout
00039 SetFileOutput(new WENOF77GFMFileOutput<VectorType,FixupType,FlagType,DIM>(*this,f_flgout,f_bounds));
00040 #else
00041 SetFileOutput(new GFMFileOutput<VectorType,FixupType,FlagType,DIM>(*this));
00042 #endif
00043 SetFixup(new FixupSpecific());
00044 SetFlagging(new FlaggingSpecific(*this));
00045 AddGFM(new GhostFluidMethod<VectorType,DIM>(
00046 new F77GFMBoundary<VectorType,DIM>(f_ibndrfl,f_itrans),
00047 new F77GFMLevelSet<DataType,DIM>(f_lset)));
00048 }
00049
00050 ~SolverSpecific() {
00051 DeleteGFM(_GFM[0]);
00052 delete _Flagging;
00053 delete _Fixup;
00054 delete _FileOutput;
00055 delete _LevelTransfer;
00056 }
00057
00058 virtual void SetupData() {
00059 int dim = DIM;
00060 base::SetupData();
00061 f_init_commongm(dim,shape,geom,MaxLev,_RefineFactor);
00062 }
00063
00064
00065 };