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

(-)MED_SRC_5.1.2.old/src/MEDSPLITTER/MEDSPLITTER_MESHCollectionDriver.cxx (-11 / +11 lines)
Lines 182-188 Link Here
182
  med_2_3::med_int njoint = med_2_3::MEDnJoint(fid, meshname);
182
  med_2_3::med_int njoint = med_2_3::MEDnJoint(fid, meshname);
183
  for (int ijoint=0; ijoint<njoint; ijoint++)
183
  for (int ijoint=0; ijoint<njoint; ijoint++)
184
    {
184
    {
185
      int distant;
185
      med_2_3::med_int distant;
186
      char joint_description[MED_TAILLE_DESC];
186
      char joint_description[MED_TAILLE_DESC];
187
      char name[MED_TAILLE_NOM];
187
      char name[MED_TAILLE_NOM];
188
      char name_distant[MED_TAILLE_NOM];
188
      char name_distant[MED_TAILLE_NOM];
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
            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, 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, 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, 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, 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, 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, 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, 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 499-505 Link Here
499
		{
499
		{
500
				MED_EN::medGeometryElement local_type =  (m_collection->getMesh())[idomain]->getElementType(entity,1);
500
				MED_EN::medGeometryElement local_type =  (m_collection->getMesh())[idomain]->getElementType(entity,1);
501
				MED_EN::medGeometryElement distant_type = (m_collection->getMesh())[idistant]->getElementType(entity,1);
501
				MED_EN::medGeometryElement distant_type = (m_collection->getMesh())[idistant]->getElementType(entity,1);
502
				vector<int> corresp;
502
				vector<med_2_3::med_int> corresp;
503
				for (int i=0; i<nbcells; i++)
503
				for (int i=0; i<nbcells; i++)
504
					for (int icol = index[i]-1; icol<index[i+1]-1; icol++)
504
					for (int icol = index[i]-1; icol<index[i+1]-1; icol++)
505
						{
505
						{
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, 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
				}
(-)MED_SRC_5.1.2.old/src/MEDSPLITTER/Test/MEDSPLITTERTest_MESHCollection.cxx (-12 / +12 lines)
Lines 299-311 Link Here
299
  char desc1[MED_TAILLE_DESC];
299
  char desc1[MED_TAILLE_DESC];
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
  med_2_3::med_int dom1, dom2;
303
  med_2_3::MEDjointInfo(fid1, meshname1, 1, jn1, desc1, &dom1, maa_dist1);
303
  med_2_3::MEDjointInfo(fid1, meshname1, 1, jn1, desc1, &dom1, maa_dist1);
304
  med_2_3::MEDjointInfo(fid2, meshname2, 1, jn2, desc2, &dom2, maa_dist2);
304
  med_2_3::MEDjointInfo(fid2, meshname2, 1, jn2, desc2, &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((int)dom1,1);
308
  CPPUNIT_ASSERT_EQUAL(dom2,0);
308
  CPPUNIT_ASSERT_EQUAL((int)dom2,0);
309
  
309
  
310
  // testing node-node correspondency
310
  // testing node-node correspondency
311
  med_2_3::med_entite_maillage typ_ent_loc=med_2_3::MED_NOEUD;
311
  med_2_3::med_entite_maillage typ_ent_loc=med_2_3::MED_NOEUD;
Lines 466-476 Link Here
466
  char desc1[MED_TAILLE_DESC];
466
  char desc1[MED_TAILLE_DESC];
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
  med_2_3::med_int dom1, dom2;
470
  med_2_3::MEDjointInfo(fid1, meshname1, 1, jn1, desc1, &dom1, maa_dist1);
470
  med_2_3::MEDjointInfo(fid1, meshname1, 1, jn1, desc1, &dom1, maa_dist1);
471
  med_2_3::MEDjointInfo(fid2, meshname2, 1, jn2, desc2, &dom2, maa_dist2);
471
  med_2_3::MEDjointInfo(fid2, meshname2, 1, jn2, desc2, &dom2, maa_dist2);
472
  CPPUNIT_ASSERT_EQUAL(dom1,1);
472
  CPPUNIT_ASSERT_EQUAL((int)dom1,1);
473
  CPPUNIT_ASSERT_EQUAL(dom2,0);
473
  CPPUNIT_ASSERT_EQUAL((int)dom2,0);
474
  
474
  
475
  // testing node-node correspondency
475
  // testing node-node correspondency
476
  med_2_3::med_entite_maillage typ_ent_loc=med_2_3::MED_NOEUD;
476
  med_2_3::med_entite_maillage typ_ent_loc=med_2_3::MED_NOEUD;
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 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 777-784 Link Here
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, &dom1, maa_dist1);
778
  med_2_3::MEDjointInfo(fid1, meshname1, 1, jn1, desc1, &dom1, maa_dist1);
779
  med_2_3::MEDjointInfo(fid2, meshname2, 1, jn2, desc2, &dom2, maa_dist2);
779
  med_2_3::MEDjointInfo(fid2, meshname2, 1, jn2, desc2, &dom2, maa_dist2);
780
  CPPUNIT_ASSERT_EQUAL(dom1,1);
780
  CPPUNIT_ASSERT_EQUAL((int)dom1,1);
781
  CPPUNIT_ASSERT_EQUAL(dom2,0);
781
  CPPUNIT_ASSERT_EQUAL((int)dom2,0);
782
782
783
  // testing node-node correspondency
783
  // testing node-node correspondency
784
  med_2_3::med_entite_maillage typ_ent_loc=med_2_3::MED_NOEUD;
784
  med_2_3::med_entite_maillage typ_ent_loc=med_2_3::MED_NOEUD;
Lines 1142-1152 Link Here
1142
  char desc1[MED_TAILLE_DESC+1];
1142
  char desc1[MED_TAILLE_DESC+1];
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
  med_2_3::med_int dom1, dom2;
1146
  med_2_3::MEDjointInfo(fid1, meshname1, 1, jn1, desc1, &dom1, maa_dist1);
1146
  med_2_3::MEDjointInfo(fid1, meshname1, 1, jn1, desc1, &dom1, maa_dist1);
1147
  med_2_3::MEDjointInfo(fid2, meshname2, 1, jn2, desc2, &dom2, maa_dist2);
1147
  med_2_3::MEDjointInfo(fid2, meshname2, 1, jn2, desc2, &dom2, maa_dist2);
1148
  CPPUNIT_ASSERT_EQUAL(dom1,1);
1148
  CPPUNIT_ASSERT_EQUAL((int)dom1,1);
1149
  CPPUNIT_ASSERT_EQUAL(dom2,0);
1149
  CPPUNIT_ASSERT_EQUAL((int)dom2,0);
1150
  
1150
  
1151
1151
1152
	int nbEdgesFamilies1= med_2_3::MEDnFam(fid1, meshname1);
1152
	int nbEdgesFamilies1= med_2_3::MEDnFam(fid1, meshname1);

Return to bug 155974