00001 // Copyright (C) 2007-2011 CEA/DEN, EDF R&D 00002 // 00003 // This library is free software; you can redistribute it and/or 00004 // modify it under the terms of the GNU Lesser General Public 00005 // License as published by the Free Software Foundation; either 00006 // version 2.1 of the License. 00007 // 00008 // This library is distributed in the hope that it will be useful, 00009 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00010 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00011 // Lesser General Public License for more details. 00012 // 00013 // You should have received a copy of the GNU Lesser General Public 00014 // License along with this library; if not, write to the Free Software 00015 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00016 // 00017 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com 00018 // 00019 00020 #ifndef __EXPLICITCOINCIDENTDEC_HXX__ 00021 #define __EXPLICITCOINCIDENTDEC_HXX__ 00022 00023 #include "DisjointDEC.hxx" 00024 #include "ExplicitMapping.hxx" 00025 #include "ExplicitTopology.hxx" 00026 00027 #include <map> 00028 00029 namespace ParaMEDMEM 00030 { 00031 class BlockTopology; 00032 00033 class ExplicitCoincidentDEC : public DisjointDEC 00034 { 00035 public: 00036 ExplicitCoincidentDEC(); 00037 virtual ~ExplicitCoincidentDEC(); 00038 void synchronize(); 00039 void broadcastTopology(BlockTopology*&, int tag); 00040 void broadcastTopology(const ExplicitTopology* toposend, ExplicitTopology* toporecv, int tag); 00041 void transferMappingToSource(); 00042 void prepareSourceDE(); 00043 void prepareTargetDE(); 00044 void recvData(); 00045 void sendData(); 00046 private: 00047 ExplicitTopology* _toposource; 00048 ExplicitTopology* _topotarget; 00049 ProcessorGroup* _targetgroup; 00050 ProcessorGroup* _sourcegroup; 00051 int* _sendcounts; 00052 int* _recvcounts; 00053 int* _senddispls; 00054 int* _recvdispls; 00055 double* _recvbuffer; 00056 double* _sendbuffer; 00057 std::map<int,std::pair<int,int> > _distant_elems; 00058 ExplicitMapping _explicit_mapping; 00059 }; 00060 } 00061 00062 #endif