00001
00002
00003 #ifndef AMROC_PROBLEM_H
00004 #define AMROC_PROBLEM_H
00005
00006 #define DIM 1
00007
00008 #define OWN_AMRSOLVER
00009
00010 #include "WENOProblem.h"
00011 #include "WENOStdProblem.h"
00012
00013 #define f_init_commongm FORTRAN_NAME(comblgm, COMBLGM)
00014
00015 extern "C" {
00016 void f_init_commongm(const INTEGER& meqn, DOUBLE* geom);
00017 }
00018
00019 class SolverSpecific :
00020 public AMRSolver<VectorType,FixupType,FlagType,DIM> {
00021 typedef AMRSolver<VectorType,FixupType,FlagType,DIM> base;
00022 typedef WENOFixup<VectorType,FixupType,DIM> weno_fixup_type;
00023 typedef WENOIntegrator<VectorType,DIM> weno_integ_type;
00024 public:
00025 SolverSpecific(IntegratorSpecific& integ,
00026 base::initial_condition_type& init,
00027 base::boundary_conditions_type& bc) :
00028 AMRSolver<VectorType,FixupType,FlagType,DIM>(integ, init, bc) {
00029 SetLevelTransfer(new F77LevelTransfer<VectorType,DIM>(f_prolong, f_restrict));
00030 #ifdef f_flgout
00031 SetFileOutput(new F77FileOutput<VectorType,DIM>(f_flgout));
00032 #else
00033 SetFileOutput(new FileOutput<VectorType,DIM>());
00034 #endif
00035 SetFixup(new FixupSpecific());
00036 SetFlagging(new FlaggingSpecific(*this));
00037 }
00038
00039 ~SolverSpecific() {
00040 delete _LevelTransfer;
00041 delete _Flagging;
00042 delete _Fixup;
00043 delete _FileOutput;
00044 }
00045
00046 virtual void SetupData() {
00047 base::SetupData();
00048 f_init_commongm(DIM,geom);
00049 }
00050