00001
00002
00003
00004
00005
00006 #ifndef AMROC_MHD_STD_PROBLEM_H
00007 #define AMROC_MHD_STD_PROBLEM_H
00008
00016 typedef SchemeType::VectorType VectorType;
00017 typedef VectorType FixupType;
00018
00019 #ifndef OWN_SCHEME
00020 class SchemeSpecific : public SchemeType {
00021 public:
00022 SchemeSpecific() : SchemeType() {}
00023 };
00024 #endif
00025
00026 #ifndef OWN_INTEGRATOR
00027 class IntegratorSpecific : public SchemeIntegrator<SchemeType,DIM> {
00028 public:
00029 IntegratorSpecific(SchemeType &scheme) : SchemeIntegrator<SchemeType,DIM>(scheme) {}
00030 };
00031 #endif
00032
00033 #ifndef OWN_FIXUP
00034 class FixupSpecific :
00035 public AMRFixup<VectorType,FixupType,DIM> {
00036 public:
00037 FixupSpecific() : AMRFixup<VectorType,FixupType,DIM>() {}
00038 };
00039 #endif
00040
00041 #ifndef OWN_INITIALCONDITION
00042 class InitialConditionSpecific : public SchemeInitialCondition<SchemeType,DIM> {
00043 public:
00044 InitialConditionSpecific(SchemeType &scheme) : SchemeInitialCondition<SchemeType,DIM>(scheme) {}
00045 };
00046 #endif
00047
00048 #ifndef OWN_BOUNDARYCONDITION
00049 class BoundaryConditionsSpecific : public SchemeBoundaryConditions<SchemeType,DIM> {
00050 public:
00051 BoundaryConditionsSpecific(SchemeType &scheme) : SchemeBoundaryConditions<SchemeType,DIM>(scheme) {}
00052 };
00053 #endif
00054
00055 #ifndef OWN_FLAGGING
00056 class FlaggingSpecific :
00057 public AMRFlagging<VectorType,FixupType,FlagType,DIM> {
00058 typedef AMRFlagging<VectorType,FixupType,FlagType,DIM> base;
00059 public:
00060 FlaggingSpecific(base::solver_type& solver) : base(solver) {
00061 base::AddCriterion(new FlagRegions<VectorType,FlagType,DIM>());
00062 base::AddCriterion(new ByValue<VectorType,FlagType,DIM>());
00063 base::AddCriterion(new ScaledGradient<VectorType,FlagType,DIM>());
00064 base::AddCriterion(new LimiterType<VectorType,FlagType,DIM>());
00065 base::AddCriterion(new MRPrediction<VectorType,FlagType,DIM>());
00066 base::AddCriterion(new MRVectorPrediction<VectorType,FlagType,DIM>());
00067 base::AddCriterion(new AbsoluteError<VectorType,FixupType,FlagType,DIM>(solver));
00068 base::AddCriterion(new RelativeError<VectorType,FixupType,FlagType,DIM>(solver));
00069 }
00070
00071 ~FlaggingSpecific() { DeleteAllCriterions(); }
00072
00073 virtual void init() {
00074 base::init();
00075 base::AddCriterion(new UnflagRegions<VectorType,FlagType,DIM>());
00076 }
00077 };
00078 #endif
00079
00080 #ifndef OWN_AMRSOLVER
00081 class SolverSpecific :
00082 public AMRSolver<VectorType,FixupType,FlagType,DIM> {
00083 typedef AMRSolver<VectorType,FixupType,FlagType,DIM> base;
00084 public:
00085 SolverSpecific(IntegratorSpecific& integ,
00086 base::initial_condition_type& init,
00087 base::boundary_conditions_type& bc) : base(integ, init, bc) {
00088 SetLevelTransfer(new F77LevelTransfer<VectorType,DIM>(f_prolong, f_restrict));
00089 SetFileOutput(new SchemeFileOutput<SchemeType,DIM>(integ.Scheme()));
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 #ifndef OWN_SOLVERCONTROL
00104 class SolverControlSpecific :
00105 public SolverControl {
00106 typedef SolverControl base;
00107 public:
00108 SolverControlSpecific(AMRSolver<VectorType,FixupType,FlagType,DIM>& solver) :
00109 base(solver) {}
00110 };
00111 #endif
00112
00113
00114 #endif