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 __OVERLAPDEC_HXX__ 00021 #define __OVERLAPDEC_HXX__ 00022 00023 #include "DEC.hxx" 00024 #include "InterpolationOptions.hxx" 00025 00026 #include <mpi.h> 00027 00028 namespace ParaMEDMEM 00029 { 00030 class OverlapInterpolationMatrix; 00031 class ProcessorGroup; 00032 class ParaFIELD; 00033 00034 class OverlapDEC : public DEC, public INTERP_KERNEL::InterpolationOptions 00035 { 00036 public: 00037 OverlapDEC(const std::set<int>& procIds,const MPI_Comm& world_comm=MPI_COMM_WORLD); 00038 virtual ~OverlapDEC(); 00039 void sendRecvData(bool way=true); 00040 void sendData(); 00041 void recvData(); 00042 void synchronize(); 00043 void attachSourceLocalField(ParaFIELD *field, bool ownPt=false); 00044 void attachTargetLocalField(ParaFIELD *field, bool ownPt=false); 00045 ProcessorGroup *getGrp() { return _group; } 00046 bool isInGroup() const; 00047 private: 00048 bool _own_group; 00049 OverlapInterpolationMatrix* _interpolation_matrix; 00050 ProcessorGroup *_group; 00051 private: 00052 ParaFIELD *_source_field; 00053 bool _own_source_field; 00054 ParaFIELD *_target_field; 00055 bool _own_target_field; 00056 }; 00057 } 00058 00059 #endif