vtf-logo

ClpStdGFMProblem.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 // Copyright (C) 2002 Ralf Deiterding
00004 // Brandenburgische Universitaet Cottbus
00005 //
00006 // Copyright (C) 2003-2007 California Institute of Technology
00007 // Ralf Deiterding, ralf@amroc.net
00008 
00009 #ifndef AMROC_CLP_STD_GFM_PROBLEM_H
00010 #define AMROC_CLP_STD_GFM_PROBLEM_H
00011 
00019 #define OWN_AMRSOLVER
00020 #include "ClpStdProblem.h"
00021 
00022 #include "AMRGFMSolver.h"
00023 #include "F77Interfaces/F77GFMLevelSet.h"
00024 #include "F77Interfaces/F77GFMBoundary.h"
00025 #include "F77Interfaces/F77GFMFileOutput.h"
00026 
00027 #ifndef OWN_GFMAMRSOLVER
00028 class SolverSpecific : 
00029   public AMRGFMSolver<VectorType,FixupType,FlagType,DIM> {
00030   typedef VectorType::InternalDataType DataType;
00031   typedef AMRGFMSolver<VectorType,FixupType,FlagType,DIM> base;
00032 public:
00033   SolverSpecific(IntegratorSpecific& integ, 
00034                  base::initial_condition_type& init,
00035                  base::boundary_conditions_type& bc) : base(integ, init, bc) {
00036     SetLevelTransfer(new F77LevelTransfer<VectorType,DIM>(f_prolong, f_restrict));
00037 #ifdef f_flgout
00038     SetFileOutput(new F77GFMFileOutput<VectorType,FixupType,FlagType,DIM>(*this,f_flgout)); 
00039 #else   
00040     SetFileOutput(new GFMFileOutput<VectorType,FixupType,FlagType,DIM>(*this)); 
00041 #endif
00042     SetFixup(new FixupSpecific(integ));
00043     SetFlagging(new FlaggingSpecific(*this)); 
00044     AddGFM(new GhostFluidMethod<VectorType,DIM>(
00045               new F77GFMBoundary<VectorType,DIM>(f_ibndrfl,f_itrans),
00046               new F77GFMLevelSet<DataType,DIM>(f_lset)));
00047   }  
00048  
00049   ~SolverSpecific() {
00050     DeleteGFM(_GFM[0]);
00051     delete _Flagging;
00052     delete _Fixup;
00053   }
00054 }; 
00055 #endif
00056 
00057 #endif