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