00001
00002
00003 #ifndef AMROC_PROBLEM_H
00004 #define AMROC_PROBLEM_H
00005
00006 #define DIM 1
00007
00008 #include "WENOProblem.h"
00009 #define OWN_AMRSOLVER
00010 #include "WENOStdProblem.h"
00011
00012 #define f_init_commongm FORTRAN_NAME(comblgm, COMBLGM)
00013
00014 extern "C" {
00015 void f_init_commongm(const INTEGER& meqn, INTEGER* shape, DOUBLE* geom);
00016 }
00017
00018 class SolverSpecific :
00019 public AMRSolver<VectorType,FixupType,FlagType,DIM> {
00020 typedef AMRSolver<VectorType,FixupType,FlagType,DIM> base;
00021 typedef WENOFixup<VectorType,FixupType,DIM> weno_fixup_type;
00022 typedef WENOIntegrator<VectorType,DIM> weno_integ_type;
00023 typedef F77FileOutput<VectorType,DIM> output_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
00040 virtual void SetupData() {
00041 base::SetupData();
00042 f_init_commongm(DIM,shape,geom);
00043 }
00044
00045 ~SolverSpecific() {
00046 delete _LevelTransfer;
00047 delete _Flagging;
00048 delete _Fixup;
00049 delete _FileOutput;