00001
00002
00003
00004
00005
00006 #ifndef AMROC_CLP_STD_ELC_GFM_PROBLEM_H
00007 #define AMROC_CLP_STD_ELC_GFM_PROBLEM_H
00008
00016 #define OWN_GFMAMRSOLVER
00017 #include "ClpStdGFMProblem.h"
00018 #include "AMRELCGFMSolver.h"
00019
00020 #ifndef OWN_ELCGFMAMRSOLVER
00021 class FluidSolverSpecific :
00022 public AMRELCGFMSolver<VectorType,FixupType,FlagType,DIM> {
00023 typedef VectorType::InternalDataType DataType;
00024 typedef AMRELCGFMSolver<VectorType,FixupType,FlagType,DIM> base;
00025 typedef F77GFMFileOutput<VectorType,FixupType,FlagType,DIM> output_type;
00026 public:
00027 FluidSolverSpecific() : base(_IntegratorSpecific, _InitialConditionSpecific,
00028 _BoundaryConditionsSpecific) {
00029 SetLevelTransfer(new F77LevelTransfer<VectorType,DIM>(f_prolong, f_restrict));
00030 SetFileOutput(new output_type(*this,f_flgout));
00031 SetFixup(new FixupSpecific(_IntegratorSpecific));
00032 SetFlagging(new FlaggingSpecific(*this));
00033 AddGFM(new GhostFluidMethod<VectorType,DIM>(
00034 new F77ELCGFMBoundary<VectorType,DIM>(f_ibndrfl,f_itrans,*this),
00035 new CPTLevelSet<DataType,DIM>()));
00036 SetCoupleGFM(0);
00037 }
00038
00039 ~FluidSolverSpecific() {
00040 DeleteGFM(_GFM[0]);
00041 delete _Flagging;
00042 delete _Fixup;
00043 }
00044
00045 virtual void SendBoundaryData() {
00046 START_WATCH
00047 for (register int l=0; l<=FineLevel(base::GH()); l++) {
00048 int Time = CurrentTime(base::GH(),l);
00049 ((output_type*) _FileOutput)->Transform(base::U(), base::Work(), Time,
00050 l, base::Dim()+4, base::t[l]);
00051 if (CurrentTime(base::GH(),base::CouplingLevel) != Time)
00052 ((output_type*) _FileOutput)->Transform(base::U(), base::Work(), Time+TimeStep(base::U(),l),
00053 l, base::Dim()+4, base::t[l]+base::dt[l]);
00054 }
00055 END_WATCH(FLUID_CPL_PRESSURE_CALCULATE)
00056 base::SendBoundaryData();
00057 }
00058
00059 protected:
00060 IntegratorSpecific _IntegratorSpecific;
00061 InitialConditionSpecific _InitialConditionSpecific;
00062 BoundaryConditionsSpecific _BoundaryConditionsSpecific;
00063 };
00064
00065 #endif
00066
00067 #endif