00001
00002
00008 #if !defined(__elc_EulerianCommBoundary_h__)
00009 #define __elc_EulerianCommBoundary_h__
00010
00011
00012 #if defined(DEBUG_elc) && !defined(DEBUG_EulerianCommBoundary)
00013 #define DEBUG_EulerianCommBoundary
00014 #endif
00015
00016 #ifdef DEBUG_EulerianCommBoundary
00017 #ifndef DEBUG_EulerianComm
00018 #define DEBUG_EulerianComm
00019 #endif
00020 #endif
00021
00022 #include "EulerianComm.h"
00023
00024 BEGIN_NAMESPACE_ELC
00025
00027
00049 template<int N, typename T = double>
00050 class EulerianCommBoundary :
00051 public EulerianComm<N,T> {
00052
00053
00054
00055
00056 private:
00057
00058 typedef EulerianComm<N,T> Base;
00059 typedef typename Base::Point Point;
00060 typedef typename Base::BBox BBox;
00061 typedef typename Base::MpiRequest MpiRequest;
00062 typedef typename Base::MpiStatus MpiStatus;
00063 typedef typename Base::IndexedFace IndexedFace;
00064
00065
00066
00067
00068
00069 public:
00070
00072 typedef T Number;
00073
00074
00075
00076
00077
00078 private:
00079
00081 using Base::_comm;
00083 using Base::_mpiNumber;
00085 using Base::TagPressures;
00086
00088 using Base::_identifiers;
00090 using Base::_pressures;
00092 using Base::_identifierToIndex;
00094 using Base::_assembledPositions;
00096 using Base::_assembledPressures;
00098 using Base::_lagrangianData;
00099
00100
00101
00102
00103
00104 private:
00105
00106
00107 std::vector<MpiRequest> _pressureRequests;
00108
00109
00110
00111
00112
00113 private:
00114
00115
00116 EulerianCommBoundary();
00117
00118
00119 EulerianCommBoundary(const EulerianCommBoundary&);
00120
00121
00122 EulerianCommBoundary&
00123 operator=(const EulerianCommBoundary&);
00124
00125 public:
00126
00127
00129
00130
00131 #ifdef ELC_USE_CPP_INTERFACE
00132
00133
00142 EulerianCommBoundary(const MPI::Comm& comm, const MPI::Intracomm& eulerian,
00143 const int lagrangianSize, const int lagrangianRoot,
00144 VertexIdentifierStyle vertexIdentifierStyle) :
00145 Base(comm, eulerian, lagrangianSize, lagrangianRoot, vertexIdentifierStyle)
00146 {}
00147 #else
00148
00149
00158 EulerianCommBoundary(const MPI_Comm comm, const MPI_Comm eulerian,
00159 const int lagrangianSize, const int lagrangianRoot,
00160 VertexIdentifierStyle vertexIdentifierStyle) :
00161 Base(comm, eulerian, lagrangianSize, lagrangianRoot, vertexIdentifierStyle)
00162 {}
00163 #endif
00164
00166 virtual
00167 ~EulerianCommBoundary()
00168 {}
00169
00170
00171
00173
00174
00176
00179 virtual
00180 void
00181 sendPressure();
00182
00184
00187 virtual
00188 void
00189 waitForPressure();
00190
00191
00192
00193 protected:
00194
00196 virtual
00197 void
00198 initializePressure();
00199
00200 };
00201
00202
00203 END_NAMESPACE_ELC
00204
00205 #define __elc_EulerianCommBoundary_ipp__
00206 #include "EulerianCommBoundary.ipp"
00207 #undef __elc_EulerianCommBoundary_ipp__
00208
00209 #endif