1 // Copyright (C) 2007-2008 CEA/DEN, EDF R&D
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License.
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 // Lesser General Public License for more details.
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
19 #ifndef __MXN_MAPPING_HXX__
20 #define __MXN_MAPPING_HXX__
22 #include "MEDCouplingFieldDouble.hxx"
23 #include "MPIAccessDEC.hxx"
24 #include "DECOptions.hxx"
33 class MxN_Mapping : public DECOptions
37 MxN_Mapping(const ProcessorGroup& source_group, const ProcessorGroup& target_group, const DECOptions& dec_options);
38 virtual ~MxN_Mapping();
39 void addElementFromSource(int distant_proc, int distant_elem);
40 void prepareSendRecv();
41 void sendRecv(MEDCouplingFieldDouble& field);
42 void sendRecv(double* field, MEDCouplingFieldDouble& field) const ;
43 void reverseSendRecv(double* field, MEDCouplingFieldDouble& field) const ;
45 MPIAccessDEC* getAccessDEC(){ return _access_DEC; }
47 ProcessorGroup* _union_group;
48 MPIAccessDEC * _access_DEC;
50 std::vector<std::pair<int,int> > _sending_ids;
51 std::vector<int> _recv_ids;
52 std::vector<int> _send_proc_offsets;
53 std::vector<int> _recv_proc_offsets;
56 std::ostream & operator<< (std::ostream &,const AllToAllMethod &);