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