00001
00002
00003
00004
00005
00006
00007
00008
00009 #ifndef AMROC_CLP_STD_PROBLEM_H
00010 #define AMROC_CLP_STD_PROBLEM_H
00011
00020 #ifndef OWN_INTEGRATOR
00021 # if DIM == 1
00022 class IntegratorSpecific :
00023 public ClpIntegrator<VectorType,AuxType,DIM> {
00024 public:
00025 IntegratorSpecific() :
00026 ClpIntegrator<VectorType,AuxType,DIM>(NEQUSED,NWAVES,f_normalflux,
00027 f_check,f_setaux,f_source) {}
00028 };
00029 # else
00030 class IntegratorSpecific :
00031 public ClpIntegrator<VectorType,AuxType,DIM> {
00032 public:
00033 IntegratorSpecific() :
00034 ClpIntegrator<VectorType,AuxType,DIM>(NEQUSED,NWAVES,f_normalflux,f_transverseflux,
00035 f_check,f_setaux,f_source) {}
00036 };
00037 # endif
00038 #endif
00039
00040 #ifndef OWN_FIXUP
00041 class FixupSpecific :
00042 public ClpFixup<VectorType,FixupType,AuxType,DIM> {
00043 public:
00044 FixupSpecific(ClpIntegrator<VectorType,AuxType,DIM>& integ) :
00045 ClpFixup<VectorType,FixupType,AuxType,DIM>(integ) {}
00046 };
00047 #endif
00048
00049 #ifndef OWN_INITIALCONDITION
00050 class InitialConditionSpecific :
00051 public F77InitialCondition<VectorType,DIM> {
00052 public:
00053 InitialConditionSpecific() :
00054 F77InitialCondition<VectorType,DIM>(f_initial) {}
00055 };
00056 #endif
00057
00058 #ifndef OWN_BOUNDARYCONDITION
00059 class BoundaryConditionsSpecific :
00060 public F77BoundaryConditions<VectorType,DIM> {
00061 public:
00062 BoundaryConditionsSpecific() :
00063 F77BoundaryConditions<VectorType,DIM>(f_boundary) {}
00064 };
00065 #endif
00066
00067 #ifndef OWN_FLAGGING
00068 class FlaggingSpecific :
00069 public AMRFlagging<VectorType,FixupType,FlagType,DIM> {
00070 typedef AMRFlagging<VectorType,FixupType,FlagType,DIM> base;
00071 public:
00072 FlaggingSpecific(base::solver_type& solver) : base(solver) {
00073 base::AddCriterion(new FlagRegions<VectorType,FlagType,DIM>());
00074 base::AddCriterion(new ByValue<VectorType,FlagType,DIM>());
00075 base::AddCriterion(new ScaledGradient<VectorType,FlagType,DIM>());
00076 base::AddCriterion(new LimiterType<VectorType,FlagType,DIM>());
00077 base::AddCriterion(new AbsoluteError<VectorType,FixupType,FlagType,DIM>(solver));
00078 base::AddCriterion(new RelativeError<VectorType,FixupType,FlagType,DIM>(solver));
00079 #ifdef f_flgout
00080 base::AddCriterion(new F77ByValue<VectorType,FlagType,DIM>(f_flgout));
00081 base::AddCriterion(new F77ScaledGradient<VectorType,FlagType,DIM>(f_flgout));
00082 base::AddCriterion(new F77LimiterType<VectorType,FlagType,DIM>(f_flgout));
00083 base::AddCriterion(new F77AbsoluteError<VectorType,FixupType,FlagType,DIM>(solver,f_flgout));
00084 base::AddCriterion(new F77RelativeError<VectorType,FixupType,FlagType,DIM>(solver,f_flgout));
00085 #endif
00086 }
00087
00088 ~FlaggingSpecific() { DeleteAllCriterions(); }
00089
00090 virtual void init() {
00091 base::init();
00092 base::AddCriterion(new UnflagRegions<VectorType,FlagType,DIM>());
00093 }
00094 };
00095 #endif
00096
00097 #ifndef OWN_AMRSOLVER
00098 class SolverSpecific :
00099 public AMRSolver<VectorType,FixupType,FlagType,DIM> {
00100 typedef AMRSolver<VectorType,FixupType,FlagType,DIM> base;
00101 public:
00102 SolverSpecific(IntegratorSpecific& integ,
00103 base::initial_condition_type& init,
00104 base::boundary_conditions_type& bc) :
00105 AMRSolver<VectorType,FixupType,FlagType,DIM>(integ, init, bc) {
00106 SetLevelTransfer(new F77LevelTransfer<VectorType,DIM>(f_prolong, f_restrict));
00107 #ifdef f_flgout
00108 SetFileOutput(new F77FileOutput<VectorType,DIM>(f_flgout));
00109 #else
00110 SetFileOutput(new FileOutput<VectorType,DIM>());
00111 #endif
00112 SetFixup(new FixupSpecific(integ));
00113 SetFlagging(new FlaggingSpecific(*this));
00114 }
00115
00116 ~SolverSpecific() {
00117 delete _LevelTransfer;
00118 delete _Flagging;
00119 delete _Fixup;
00120 delete _FileOutput;
00121 }
00122 };
00123 #endif
00124
00125 #ifndef OWN_SOLVERCONTROL
00126 class SolverControlSpecific :
00127 public SolverControl {
00128 public:
00129 SolverControlSpecific(AMRSolver<VectorType,FixupType,FlagType,DIM>& solver) :
00130 SolverControl(solver) {}
00131 };
00132 #endif
00133
00134
00135 #endif