00001
00002
00003
00004
00005
00006 #ifndef AMROC_WENO_STD_PROBLEM_H
00007 #define AMROC_WENO_STD_PROBLEM_H
00008
00017 class IntegratorSpecific :
00018 public WENOIntegrator<VectorType,DIM> {
00019 public:
00020 IntegratorSpecific() :
00021 WENOIntegrator<VectorType,DIM>(f_rkstep,f_bounds,f_check) {}
00022 };
00023
00024 class FixupSpecific :
00025 public WENOFixup<VectorType,FixupType,DIM> {
00026 public:
00027 FixupSpecific() : WENOFixup<VectorType,FixupType,DIM>() {}
00028 };
00029
00030 #ifndef OWN_INITIALCONDITION
00031 class InitialConditionSpecific :
00032 public F77InitialCondition<VectorType,DIM> {
00033 public:
00034 InitialConditionSpecific() :
00035 F77InitialCondition<VectorType,DIM>(f_initial) {}
00036 };
00037 #endif
00038
00039 class BoundaryConditionsSpecific :
00040 public F77BoundaryConditions<VectorType,DIM> {
00041 public:
00042 BoundaryConditionsSpecific() :
00043 F77BoundaryConditions<VectorType,DIM>(f_boundary) {}
00044 };
00045
00046 #ifndef OWN_FLAGGING
00047 class FlaggingSpecific :
00048 public AMRFlagging<VectorType,FixupType,FlagType,DIM> {
00049 typedef AMRFlagging<VectorType,FixupType,FlagType,DIM> base;
00050 public:
00051 FlaggingSpecific(base::solver_type& solver) : base(solver) {
00052 base::AddCriterion(new FlagRegions<VectorType,FlagType,DIM>());
00053 base::AddCriterion(new ByValue<VectorType,FlagType,DIM>());
00054 base::AddCriterion(new ScaledGradient<VectorType,FlagType,DIM>());
00055 base::AddCriterion(new LimiterType<VectorType,FlagType,DIM>());
00056 base::AddCriterion(new AbsoluteError<VectorType,FixupType,FlagType,DIM>(solver));
00057 base::AddCriterion(new RelativeError<VectorType,FixupType,FlagType,DIM>(solver));
00058 #ifdef f_flgout
00059 base::AddCriterion(new F77ByValue<VectorType,FlagType,DIM>(f_flgout));
00060 base::AddCriterion(new F77ScaledGradient<VectorType,FlagType,DIM>(f_flgout));
00061 base::AddCriterion(new F77LimiterType<VectorType,FlagType,DIM>(f_flgout));
00062 base::AddCriterion(new F77AbsoluteError<VectorType,FixupType,FlagType,DIM>(solver,f_flgout));
00063 base::AddCriterion(new F77RelativeError<VectorType,FixupType,FlagType,DIM>(solver,f_flgout));
00064 #endif
00065 }
00066
00067 ~FlaggingSpecific() { DeleteAllCriterions(); }
00068
00069 virtual void init() {
00070 base::init();
00071 base::AddCriterion(new UnflagRegions<VectorType,FlagType,DIM>());
00072 }
00073 };
00074 #endif
00075
00076 #ifndef OWN_AMRSOLVER
00077 class SolverSpecific :
00078 public AMRSolver<VectorType,FixupType,FlagType,DIM> {
00079 typedef AMRSolver<VectorType,FixupType,FlagType,DIM> base;
00080 typedef WENOFixup<VectorType,FixupType,DIM> weno_fixup_type;
00081 typedef WENOIntegrator<VectorType,DIM> weno_integ_type;
00082 public:
00083 SolverSpecific(IntegratorSpecific& integ,
00084 base::initial_condition_type& init,
00085 base::boundary_conditions_type& bc) :
00086 AMRSolver<VectorType,FixupType,FlagType,DIM>(integ, init, bc) {
00087 SetLevelTransfer(new F77LevelTransfer<VectorType,DIM>(f_prolong, f_restrict));
00088 #ifdef f_flgout
00089 SetFileOutput(new WENOF77FileOutput<VectorType,DIM>(f_flgout,f_bounds));
00090 #else
00091 SetFileOutput(new FileOutput<VectorType,DIM>());
00092 #endif
00093 SetFixup(new FixupSpecific());
00094 SetFlagging(new FlaggingSpecific(*this));
00095 }
00096
00097 ~SolverSpecific() {
00098 delete _LevelTransfer;
00099 delete _Flagging;
00100 delete _Fixup;
00101 delete _FileOutput;
00102 }
00103 };
00104 #endif
00105
00106 class SolverControlSpecific :
00107 public SolverControl {
00108 public:
00109 SolverControlSpecific(AMRSolver<VectorType,FixupType,FlagType,DIM>& solver) :
00110 SolverControl(solver) {}
00111 };
00112
00113
00114 #endif