Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef __MEDSPLITTER_JointExchangeData_HXX__
00025 #define __MEDSPLITTER_JointExchangeData_HXX__
00026
00027 #include "MEDSPLITTER_Topology.hxx"
00028
00029 #include <map>
00030 #include <vector>
00031
00032 namespace MEDMEM
00033 {
00034 class MESH;
00035 class CONNECTZONE;
00036 class MEDSKYLINEARRAY;
00037 }
00038
00039 namespace MEDSPLITTER
00040 {
00046 class JointExchangeData
00047 {
00048 public:
00049
00050 JointExchangeData();
00051
00052
00053 void addCellCorrespondence(const MEDMEM::MESH* mesh_here,
00054 int domain_dist, int domain_here,
00055 int glob_dist, int glob_here,
00056 int loc_here, int loc_dist = -1 );
00057
00058
00059 int nbCellPairs() const { return _glob_to_locs_here_and_dist.size(); }
00060
00061
00062 void setMeshes( int domain_dist, const MEDMEM::MESH* mesh_dist,
00063 int domain_here, const MEDMEM::MESH* mesh_here);
00064
00065
00066 void setConnectivity( const int* glob_fused_nodes);
00067
00068 int distantDomain() const { return _dist_domain; }
00069 int localDomain() const { return _loc_domain; }
00070
00071
00072 int serialize (std::vector<int> & out_data) const;
00073 void deserialize(const std::vector<int> & in_data);
00074
00076 void setFisrtGlobalIdOfSubentity(int id) { _first_glob_sub_id = id; }
00077
00078
00079 MEDMEM::MEDSKYLINEARRAY* makeCellCorrespArray() const;
00080
00081
00082 MEDMEM::CONNECTZONE* makeConnectZone(TGeom2FacesByDomian& face_map);
00083
00084 private:
00085
00086
00087 typedef std::multimap<int, std::pair< int, int > > TGlob2LocsHD;
00088 TGlob2LocsHD _glob_to_locs_here_and_dist;
00089
00090 int _dist_domain, _loc_domain, _conn_here_size, _nb_cell_pairs, _first_glob_sub_id;
00091
00092 const MEDMEM::MESH* _dist_mesh;
00093 const MEDMEM::MESH* _loc_mesh;
00094
00095 std::vector<int> _global_conn_here, _global_conn_dist;
00096 std::vector<int> _local_conn_here, _local_conn_dist;
00097
00098 };
00099 }
00100 #endif