Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 155974 | Differences between
and this patch

Collapse All | Expand All

(-)src5.1.3.orig/MED_SRC_5.1.3/src/MEDSPLITTER/Test/MEDSPLITTERTest_MESHCollection.cxx (-9 / +9 lines)
Lines 300-307 Link Here
300
  char maa_dist1[MED_TAILLE_NOM], jn1[MED_TAILLE_NOM];
300
  char maa_dist1[MED_TAILLE_NOM], jn1[MED_TAILLE_NOM];
301
  char desc2[MED_TAILLE_DESC], maa_dist2[MED_TAILLE_NOM], jn2[MED_TAILLE_NOM];
301
  char desc2[MED_TAILLE_DESC], maa_dist2[MED_TAILLE_NOM], jn2[MED_TAILLE_NOM];
302
  int dom1, dom2;
302
  int dom1, dom2;
303
  med_2_3::MEDjointInfo(fid1, meshname1, 1, jn1, desc1,(med_int*)&dom1, maa_dist1);
303
  med_2_3::MEDjointInfo(fid1, meshname1, 1, jn1, desc1,(med_2_3::med_int*)&dom1, maa_dist1);
304
  med_2_3::MEDjointInfo(fid2, meshname2, 1, jn2, desc2,(med_int*)&dom2, maa_dist2);
304
  med_2_3::MEDjointInfo(fid2, meshname2, 1, jn2, desc2,(med_2_3::med_int*)&dom2, maa_dist2);
305
	CPPUNIT_ASSERT(strcmp(jn1,"joint_2")==0);
305
	CPPUNIT_ASSERT(strcmp(jn1,"joint_2")==0);
306
	CPPUNIT_ASSERT(strcmp(jn2,"joint_1")==0);
306
	CPPUNIT_ASSERT(strcmp(jn2,"joint_1")==0);
307
  CPPUNIT_ASSERT_EQUAL(dom1,1);
307
  CPPUNIT_ASSERT_EQUAL(dom1,1);
Lines 467-474 Link Here
467
  char maa_dist1[MED_TAILLE_NOM], jn1[MED_TAILLE_NOM];
467
  char maa_dist1[MED_TAILLE_NOM], jn1[MED_TAILLE_NOM];
468
  char desc2[MED_TAILLE_DESC], maa_dist2[MED_TAILLE_NOM], jn2[MED_TAILLE_NOM];
468
  char desc2[MED_TAILLE_DESC], maa_dist2[MED_TAILLE_NOM], jn2[MED_TAILLE_NOM];
469
  int dom1, dom2;
469
  int dom1, dom2;
470
  med_2_3::MEDjointInfo(fid1, meshname1, 1, jn1, desc1, (med_int*)&dom1, maa_dist1);
470
  med_2_3::MEDjointInfo(fid1, meshname1, 1, jn1, desc1, (med_2_3::med_int*)&dom1, maa_dist1);
471
  med_2_3::MEDjointInfo(fid2, meshname2, 1, jn2, desc2, (med_int*)&dom2, maa_dist2);
471
  med_2_3::MEDjointInfo(fid2, meshname2, 1, jn2, desc2, (med_2_3::med_int*)&dom2, maa_dist2);
472
  CPPUNIT_ASSERT_EQUAL(dom1,1);
472
  CPPUNIT_ASSERT_EQUAL(dom1,1);
473
  CPPUNIT_ASSERT_EQUAL(dom2,0);
473
  CPPUNIT_ASSERT_EQUAL(dom2,0);
474
  
474
  
Lines 548-554 Link Here
548
  //testing cells global numbering
548
  //testing cells global numbering
549
  num = new med_2_3::med_int[2];
549
  num = new med_2_3::med_int[2];
550
  MEDglobalNumLire(fid1, meshname1, num, 2, typ_ent_loc, typ_geo_loc);
550
  MEDglobalNumLire(fid1, meshname1, num, 2, typ_ent_loc, typ_geo_loc);
551
  med_2_3::med_int* globcellref = new med_int[2];
551
  med_2_3::med_int* globcellref = new med_2_3::med_int[2];
552
  globcellref[0]=1;
552
  globcellref[0]=1;
553
  globcellref[1]=3;
553
  globcellref[1]=3;
554
  
554
  
Lines 775-782 Link Here
775
  char maa_dist2[MED_TAILLE_NOM], jn2[MED_TAILLE_NOM];
775
  char maa_dist2[MED_TAILLE_NOM], jn2[MED_TAILLE_NOM];
776
  int dom1, dom2;
776
  int dom1, dom2;
777
//  med_2_3::med_int dom1, dom2;
777
//  med_2_3::med_int dom1, dom2;
778
  med_2_3::MEDjointInfo(fid1, meshname1, 1, jn1, desc1, (med_int*)&dom1, maa_dist1);
778
  med_2_3::MEDjointInfo(fid1, meshname1, 1, jn1, desc1, (med_2_3::med_int*)&dom1, maa_dist1);
779
  med_2_3::MEDjointInfo(fid2, meshname2, 1, jn2, desc2, (med_int*)&dom2, maa_dist2);
779
  med_2_3::MEDjointInfo(fid2, meshname2, 1, jn2, desc2, (med_2_3::med_int*)&dom2, maa_dist2);
780
  CPPUNIT_ASSERT_EQUAL(dom1,1);
780
  CPPUNIT_ASSERT_EQUAL(dom1,1);
781
  CPPUNIT_ASSERT_EQUAL(dom2,0);
781
  CPPUNIT_ASSERT_EQUAL(dom2,0);
782
782
Lines 1143-1150 Link Here
1143
  char maa_dist1[MED_TAILLE_NOM+1], jn1[MED_TAILLE_NOM+1];
1143
  char maa_dist1[MED_TAILLE_NOM+1], jn1[MED_TAILLE_NOM+1];
1144
  char desc2[MED_TAILLE_DESC+1], maa_dist2[MED_TAILLE_NOM+1], jn2[MED_TAILLE_NOM+1];
1144
  char desc2[MED_TAILLE_DESC+1], maa_dist2[MED_TAILLE_NOM+1], jn2[MED_TAILLE_NOM+1];
1145
  int dom1, dom2;
1145
  int dom1, dom2;
1146
  med_2_3::MEDjointInfo(fid1, meshname1, 1, jn1, desc1, (med_int*)&dom1, maa_dist1);
1146
  med_2_3::MEDjointInfo(fid1, meshname1, 1, jn1, desc1, (med_2_3::med_int*)&dom1, maa_dist1);
1147
  med_2_3::MEDjointInfo(fid2, meshname2, 1, jn2, desc2, (med_int*)&dom2, maa_dist2);
1147
  med_2_3::MEDjointInfo(fid2, meshname2, 1, jn2, desc2, (med_2_3::med_int*)&dom2, maa_dist2);
1148
  CPPUNIT_ASSERT_EQUAL(dom1,1);
1148
  CPPUNIT_ASSERT_EQUAL(dom1,1);
1149
  CPPUNIT_ASSERT_EQUAL(dom2,0);  
1149
  CPPUNIT_ASSERT_EQUAL(dom2,0);  
(-)src5.1.3.orig/MED_SRC_5.1.3/src/MEDWrapper/V2_2/MED_V2_2_Wrapper.cxx (-1 / +1 lines)
Lines 95-101 Link Here
95
  void
95
  void
96
  GetVersionRelease<eV2_2>(TInt& majeur, TInt& mineur, TInt& release)
96
  GetVersionRelease<eV2_2>(TInt& majeur, TInt& mineur, TInt& release)
97
  {
97
  {
98
    MEDversionDonner(&majeur, &mineur, &release);
98
    MEDversionDonner((med_int*)&majeur, (med_int*)&mineur, (med_int*)&release);
99
  }
99
  }
100
100
101
  template<>
101
  template<>
(-)src5.1.3.orig/MED_SRC_5.1.3/src/MEDSPLITTER/MEDSPLITTER_MESHCollectionDriver.cxx (-11 / +11 lines)
Lines 189-195 Link Here
189
        
189
        
190
      int ncorr = med_2_3::MEDjointInfo(fid,meshname, ijoint+1, name, 
190
      int ncorr = med_2_3::MEDjointInfo(fid,meshname, ijoint+1, name, 
191
                joint_description,
191
                joint_description,
192
                (med_int*)&distant, name_distant);
192
                (med_2_3::med_int*)&distant, name_distant);
193
  
193
  
194
      for (int ic=0; ic<ncorr; ic++)
194
      for (int ic=0; ic<ncorr; ic++)
195
        {
195
        {
Lines 209-215 Link Here
209
      {
209
      {
210
      
210
      
211
        med_2_3::MEDjointLire(fid, meshname, name,
211
        med_2_3::MEDjointLire(fid, meshname, name,
212
            (med_int*)node_corresp,ncouples,
212
            (med_2_3::med_int*)node_corresp,ncouples,
213
            cor_typent_local,  cor_typgeo_local,
213
            cor_typent_local,  cor_typgeo_local,
214
            cor_typent_dist, cor_typgeo_dist
214
            cor_typent_dist, cor_typgeo_dist
215
            );
215
            );
Lines 247-253 Link Here
247
        if (!m_collection->isDimensionOK(type,m_collection->getMeshDimension())) continue;
247
        if (!m_collection->isDimensionOK(type,m_collection->getMeshDimension())) continue;
248
        int ntype = (m_collection->getMesh())[idomain]->getNumberOfElementsWithPoly(MED_EN::MED_CELL,type);
248
        int ntype = (m_collection->getMesh())[idomain]->getNumberOfElementsWithPoly(MED_EN::MED_CELL,type);
249
        if (ntype==0) continue;
249
        if (ntype==0) continue;
250
        med_2_3::MEDglobalNumLire(fid,meshname, (med_int*)array+offset, ntype,
250
        med_2_3::MEDglobalNumLire(fid,meshname, (med_2_3::med_int*)array+offset, ntype,
251
                med_2_3::MED_MAILLE, (med_2_3::med_geometrie_element)type);
251
                med_2_3::MED_MAILLE, (med_2_3::med_geometrie_element)type);
252
        offset+=ntype;
252
        offset+=ntype;
253
      }
253
      }
Lines 259-265 Link Here
259
  int nnode= (m_collection->getMesh())[idomain]->getNumberOfNodes();
259
  int nnode= (m_collection->getMesh())[idomain]->getNumberOfNodes();
260
  {
260
  {
261
  int* array=new int[nnode];
261
  int* array=new int[nnode];
262
  med_2_3::MEDglobalNumLire(fid,meshname, (med_int*)array, nnode,
262
  med_2_3::MEDglobalNumLire(fid,meshname, (med_2_3::med_int*)array, nnode,
263
          med_2_3::MED_NOEUD, med_2_3::MED_POINT1); 
263
          med_2_3::MED_NOEUD, med_2_3::MED_POINT1); 
264
  nodeglobal[idomain]=array;
264
  nodeglobal[idomain]=array;
265
  } 
265
  } 
Lines 280-286 Link Here
280
    
280
    
281
    int ntype = (m_collection->getMesh())[idomain]->getNumberOfElementsWithPoly(MED_EN::MED_FACE,type);
281
    int ntype = (m_collection->getMesh())[idomain]->getNumberOfElementsWithPoly(MED_EN::MED_FACE,type);
282
    if (ntype==0) continue;
282
    if (ntype==0) continue;
283
    med_2_3::MEDglobalNumLire(fid,meshname, (med_int*)array+offset, ntype,
283
    med_2_3::MEDglobalNumLire(fid,meshname, (med_2_3::med_int*)array+offset, ntype,
284
            med_2_3::MED_MAILLE, (med_2_3::med_geometrie_element)type);
284
            med_2_3::MED_MAILLE, (med_2_3::med_geometrie_element)type);
285
    offset+=ntype;
285
    offset+=ntype;
286
        }
286
        }
Lines 348-354 Link Here
348
             jointSort(node_corresp, nbnodes, false);
348
             jointSort(node_corresp, nbnodes, false);
349
          
349
          
350
        error=
350
        error=
351
    med_2_3::MEDjointEcr(fid, mesh_name, joint_name, (med_int*)node_corresp, nbnodes,
351
    med_2_3::MEDjointEcr(fid, mesh_name, joint_name, (med_2_3::med_int*)node_corresp, nbnodes,
352
             med_2_3::MED_NOEUD, med_2_3::MED_POINT1,med_2_3::MED_NOEUD, med_2_3::MED_POINT1);
352
             med_2_3::MED_NOEUD, med_2_3::MED_POINT1,med_2_3::MED_NOEUD, med_2_3::MED_POINT1);
353
        if (error==-1) cout << "erreur creation de joint "<<endl;
353
        if (error==-1) cout << "erreur creation de joint "<<endl;
354
        
354
        
Lines 388-394 Link Here
388
					if (!m_collection->isDimensionOK(type,m_collection->getMeshDimension())) continue;
388
					if (!m_collection->isDimensionOK(type,m_collection->getMeshDimension())) continue;
389
					int ntype = (m_collection->getMesh())[idomain]->getNumberOfElementsWithPoly(MED_EN::MED_CELL,type);
389
					int ntype = (m_collection->getMesh())[idomain]->getNumberOfElementsWithPoly(MED_EN::MED_CELL,type);
390
					if (ntype==0) continue;
390
					if (ntype==0) continue;
391
					med_2_3::MEDglobalNumEcr(fid,meshchar, (med_int*)array+offset, ntype,
391
					med_2_3::MEDglobalNumEcr(fid,meshchar, (med_2_3::med_int*)array+offset, ntype,
392
																	 med_2_3::MED_MAILLE, (med_2_3::med_geometrie_element)type);
392
																	 med_2_3::MED_MAILLE, (med_2_3::med_geometrie_element)type);
393
					offset+=ntype;
393
					offset+=ntype;
394
          
394
          
Lines 426-432 Link Here
426
					
426
					
427
					int ntype = (m_collection->getMesh())[idomain]->getNumberOfElementsWithPoly(constituent_entity,type);
427
					int ntype = (m_collection->getMesh())[idomain]->getNumberOfElementsWithPoly(constituent_entity,type);
428
					if (ntype==0) continue;
428
					if (ntype==0) continue;
429
					med_2_3::MEDglobalNumEcr(fid,meshchar, (med_int*)array+offset, ntype,
429
					med_2_3::MEDglobalNumEcr(fid,meshchar, (med_2_3::med_int*)array+offset, ntype,
430
																	 med_2_3::MED_MAILLE, (med_2_3::med_geometrie_element)type);
430
																	 med_2_3::MED_MAILLE, (med_2_3::med_geometrie_element)type);
431
					
431
					
432
					offset+=ntype;
432
					offset+=ntype;
Lines 443-449 Link Here
443
      
443
      
444
			m_collection->getTopology()->getNodeList(idomain,array);
444
			m_collection->getTopology()->getNodeList(idomain,array);
445
			
445
			
446
			med_2_3::MEDglobalNumEcr(fid,meshchar, (med_int*)array, nnode,
446
			med_2_3::MEDglobalNumEcr(fid,meshchar, (med_2_3::med_int*)array, nnode,
447
															 med_2_3::MED_NOEUD, med_2_3::MED_POINT1);
447
															 med_2_3::MED_NOEUD, med_2_3::MED_POINT1);
448
			
448
			
449
			delete[] array;
449
			delete[] array;
Lines 507-513 Link Here
507
							corresp.push_back(value[icol]);
507
							corresp.push_back(value[icol]);
508
						}
508
						}
509
				int size_joint = corresp.size()/2;
509
				int size_joint = corresp.size()/2;
510
				med_2_3::MEDjointEcr(fid, mesh_name, joint_name, (med_int*)&corresp[0], 
510
				med_2_3::MEDjointEcr(fid, mesh_name, joint_name, (med_2_3::med_int*)&corresp[0], 
511
														 size_joint, med_2_3::MED_MAILLE,
511
														 size_joint, med_2_3::MED_MAILLE,
512
														 (med_2_3::med_geometrie_element)local_type    ,med_2_3::MED_MAILLE, 
512
														 (med_2_3::med_geometrie_element)local_type    ,med_2_3::MED_MAILLE, 
513
														 (med_2_3::med_geometrie_element)distant_type    );
513
														 (med_2_3::med_geometrie_element)distant_type    );
Lines 541-547 Link Here
541
					med_2_3::med_geometrie_element distant_geo_elem=(med_2_3::med_geometrie_element)iter->first.second;
541
					med_2_3::med_geometrie_element distant_geo_elem=(med_2_3::med_geometrie_element)iter->first.second;
542
					int size_joint=size/2;
542
					int size_joint=size/2;
543
					//med_2_3::med_err error =
543
					//med_2_3::med_err error =
544
					med_2_3::MEDjointEcr(fid, mesh_name, joint_name, (med_int*)corresp, size_joint, med_2_3::MED_MAILLE,
544
					med_2_3::MEDjointEcr(fid, mesh_name, joint_name, (med_2_3::med_int*)corresp, size_joint, med_2_3::MED_MAILLE,
545
															 local_geo_elem,med_2_3::MED_MAILLE, distant_geo_elem);
545
															 local_geo_elem,med_2_3::MED_MAILLE, distant_geo_elem);
546
					delete[] corresp;
546
					delete[] corresp;
547
				}
547
				}

Return to bug 155974