+ ConnectZone* cz = _collection->getCZ()[i];
+ if ( !cz ||
+ cz->getLocalDomainNumber() != idomain )
+ continue;
+ {
+ std::ostringstream oss;
+ oss << "joint_" << cz->getDistantDomainNumber();
+ cz->setName( oss.str() );
+ }
+ {
+ std::ostringstream oss;
+ oss << "connect_zone_" << i;
+ cz->setDescription( oss.str() );
+ }
+
+ MCAuto< MEDFileJoint>
+ joint = MEDFileJoint::New( cz->getName(), finalMeshName,
+ finalMeshName, cz->getDistantDomainNumber() );
+ joint->setDescription( cz->getDescription() );
+ joints->pushJoint( joint );
+
+ MCAuto< MEDFileJointOneStep> j1st = MEDFileJointOneStep::New();
+ joint->pushStep( j1st );
+
+ const MEDCouplingSkyLineArray * nodeCorr = cz->getNodeCorresp();
+ if ( nodeCorr )
+ {
+ MCAuto< MEDFileJointCorrespondence >
+ corr = MEDFileJointCorrespondence::New( nodeCorr->getValueArray() );
+ j1st->pushCorrespondence( corr );
+ }
+
+ std::vector< std::pair< int,int > > types = cz->getEntities();
+ INTERP_KERNEL::NormalizedCellType t1, t2;
+ for ( size_t it = 0; it < types.size(); ++it )
+ {
+ const MEDCouplingSkyLineArray * cellCorr =
+ cz->getEntityCorresp( types[it].first, types[it].second );
+ if ( cellCorr && cellCorr->getNumberOf() > 0 )
+ {
+ t1 = INTERP_KERNEL::NormalizedCellType( types[it].first );
+ t2 = INTERP_KERNEL::NormalizedCellType( types[it].second );
+ MCAuto< MEDFileJointCorrespondence>
+ corr = MEDFileJointCorrespondence::New( cellCorr->getValueArray(), t1, t2 );
+ j1st->pushCorrespondence( corr );
+ }
+ }