00001
00002
00003
00004
00005
00006 #ifndef AMROC_BALANS_STD_PROBLEM_H
00007 #define AMROC_BALANS_STD_PROBLEM_H
00008
00014 class IntegratorSpecific :
00015 public BalansIntegrator<VectorType,DIM> {
00016 public:
00017 IntegratorSpecific() :
00018 #ifdef f_flgout
00019 BalansIntegrator<VectorType,DIM>(f_balansstep,f_check) {}
00020 #else
00021 BalansIntegrator<VectorType,DIM>(f_balansstep) {}
00022 #endif
00023 };
00024
00025 class FixupSpecific :
00026 public AMRFixup<VectorType,FixupType,DIM> {
00027 public:
00028 FixupSpecific() : AMRFixup<VectorType,FixupType,DIM>() {}
00029 };
00030
00031 class InitialConditionSpecific :
00032 public F77InitialCondition<VectorType,DIM> {
00033 public:
00034 InitialConditionSpecific() :
00035 F77InitialCondition<VectorType,DIM>(f_initial) {}
00036 };
00037
00038 class BoundaryConditionsSpecific :
00039 public F77BoundaryConditions<VectorType,DIM> {
00040 public:
00041 BoundaryConditionsSpecific() :
00042 F77BoundaryConditions<VectorType,DIM>(f_boundary) {}
00043 };
00044
00045 #ifndef OWN_FLAGGING
00046 class FlaggingSpecific :
00047 public AMRFlagging<VectorType,FixupType,FlagType,DIM> {
00048 typedef AMRFlagging<VectorType,FixupType,FlagType,DIM> base;
00049 public:
00050 FlaggingSpecific(base::solver_type& solver) : base(solver) {
00051 base::AddCriterion(new FlagRegions<VectorType,FlagType,DIM>());
00052 base::AddCriterion(new ByValue<VectorType,FlagType,DIM>());
00053 base::AddCriterion(new ScaledGradient<VectorType,FlagType,DIM>());
00054 base::AddCriterion(new LimiterType<VectorType,FlagType,DIM>());
00055 base::AddCriterion(new AbsoluteError<VectorType,FixupType,FlagType,DIM>(solver));
00056 base::AddCriterion(new RelativeError<VectorType,FixupType,FlagType,DIM>(solver));
00057 #ifdef f_flgout
00058 base::AddCriterion(new F77ByValue<VectorType,FlagType,DIM>(f_flgout));
00059 base::AddCriterion(new F77ScaledGradient<VectorType,FlagType,DIM>(f_flgout));
00060 base::AddCriterion(new F77LimiterType<VectorType,FlagType,DIM>(f_flgout));
00061 base::AddCriterion(new F77AbsoluteError<VectorType,FixupType,FlagType,DIM>(solver,f_flgout));
00062 base::AddCriterion(new F77RelativeError<VectorType,FixupType,FlagType,DIM>(solver,f_flgout));
00063 #endif
00064 }
00065
00066 ~FlaggingSpecific() { DeleteAllCriterions(); }
00067
00068 virtual void init() {
00069 base::init();
00070 base::AddCriterion(new UnflagRegions<VectorType,FlagType,DIM>());
00071 }
00072 };
00073 #endif
00074
00075 #ifndef OWN_AMRSOLVER
00076 class SolverSpecific :
00077 public AMRSolver<VectorType,FixupType,FlagType,DIM> {
00078 typedef AMRSolver<VectorType,FixupType,FlagType,DIM> base;
00079 public:
00080 SolverSpecific(IntegratorSpecific& integ,
00081 base::initial_condition_type& init,
00082 base::boundary_conditions_type& bc) :
00083 AMRSolver<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(AMRSolver<VectorType,FixupType,FlagType,DIM>& solver) :
00107 SolverControl(solver) {}
00108 };
00109
00110
00111 #endif