vtf-logo

EulerianCommShell.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00008 #if !defined(__elc_EulerianCommShell_h__)
00009 #define __elc_EulerianCommShell_h__
00010 
00011 // If we are debugging the whole elc package.
00012 #if defined(DEBUG_elc) && !defined(DEBUG_EulerianCommShell)
00013 #define DEBUG_EulerianCommShell
00014 #endif
00015 
00016 #ifdef DEBUG_EulerianCommShell
00017 #ifndef DEBUG_EulerianComm
00018 #define DEBUG_EulerianComm
00019 #endif
00020 #endif
00021 
00022 #include "EulerianComm.h"
00023 
00024 BEGIN_NAMESPACE_ELC
00025 
00026 
00028 
00053 template<int N, typename T = double>
00054 class EulerianCommShell :
00055   public EulerianComm<N,T> {
00056   //
00057   // Private types.
00058   //
00059   
00060 private:
00061   
00062   typedef EulerianComm<N,T> Base;
00063   typedef typename Base::Point Point;
00064   typedef typename Base::BBox BBox;
00065   typedef typename Base::MpiRequest MpiRequest;
00066   typedef typename Base::MpiStatus MpiStatus;
00067   typedef typename Base::IndexedFace IndexedFace;
00068   
00069   //
00070   // Public types.
00071   //
00072 
00073 public:
00074 
00076   typedef T Number;
00077 
00078   //
00079   // Using base members.
00080   //
00081 
00082 private:
00083 
00085   using Base::_comm;
00087   using Base::_mpiNumber;
00089   using Base::TagPressures;
00090 
00092   using Base::_identifiers;
00094   using Base::_pressures;
00096   using Base::_assembledConnectivities;
00098   using Base::_assembledPressures;
00100   using Base::_lagrangianData;
00101 
00102   //
00103   // Member data.
00104   //
00105 
00106 private:
00107 
00108   // MPI requests for the pressures sends.
00109   std::vector<MpiRequest> _pressureRequests;
00110 
00111   //
00112   // Not implemented.
00113   //
00114 
00115 private:
00116 
00117   // Default constructor not implemented.
00118   EulerianCommShell();
00119 
00120   // Copy constructor not implemented.
00121   EulerianCommShell(const EulerianCommShell&);
00122 
00123   // Assignment operator not implemented.
00124   EulerianCommShell&
00125   operator=(const EulerianCommShell&);
00126 
00127 public:
00128 
00129   //--------------------------------------------------------------------------
00131   // @{
00132 
00133 #ifdef ELC_USE_CPP_INTERFACE
00135 
00144   EulerianCommShell(const MPI::Comm& comm, const MPI::Intracomm& eulerian, 
00145                     const int lagrangianSize, const int lagrangianRoot,
00146                     VertexIdentifierStyle vertexIdentifierStyle) :
00147     Base(comm, eulerian, lagrangianSize, lagrangianRoot, vertexIdentifierStyle)
00148   {}
00149 #else
00151 
00160   EulerianCommShell(const MPI_Comm comm, const MPI_Comm eulerian, 
00161                     const int lagrangianSize, const int lagrangianRoot,
00162                     VertexIdentifierStyle vertexIdentifierStyle) :
00163     Base(comm, eulerian, lagrangianSize, lagrangianRoot, vertexIdentifierStyle)
00164   {}
00165 #endif
00166 
00168   virtual
00169   ~EulerianCommShell()
00170   {}
00171 
00172   // @}
00173   //--------------------------------------------------------------------------
00175   // @{
00176 
00178 
00182   virtual
00183   void
00184   sendPressure();
00185 
00187 
00190   virtual
00191   void
00192   waitForPressure();
00193 
00194   // @}
00195 
00196 protected:
00197 
00199   virtual
00200   void
00201   initializePressure();
00202 
00203 };
00204 
00205 
00206 END_NAMESPACE_ELC
00207 
00208 #define __elc_EulerianCommShell_ipp__
00209 #include "EulerianCommShell.ipp"
00210 #undef __elc_EulerianCommShell_ipp__
00211 
00212 #endif

Generated on Fri Aug 24 12:55:45 2007 for Eulerian-Lagrangian Coupling by  doxygen 1.4.7