//
// Reading global numbering
//
- int ncell=_mesh->getNumberOfElements(MED_EN::MED_CELL,MED_EN::MED_ALL_ELEMENTS);
+ int ncell=_mesh->getNumberOfElementsWithPoly(MED_EN::MED_CELL,MED_EN::MED_ALL_ELEMENTS);
int * array=new int[ncell];
int offset=0;
MESSAGE("Reading cell global numbering for mesh "<< domain_id);
{
MED_EN::medGeometryElement type=*iter;
if (type/100 != _mesh->getMeshDimension()) continue;
- int ntype = _mesh->getNumberOfElements(MED_EN::MED_CELL,type);
+ int ntype = _mesh->getNumberOfElementsWithPoly(MED_EN::MED_CELL,type);
if (ntype==0) continue;
med_2_3::MEDglobalNumLire(fid,meshname, array+offset, ntype,
med_2_3::MED_MAILLE, (med_2_3::med_geometrie_element)type);
_nodeglobal=array;
MESSAGE("Reading face global numbering for mesh "<<domain_id);
- int nbface=_mesh->getNumberOfElements(MED_EN::MED_FACE,MED_EN::MED_ALL_ELEMENTS);
+ int nbface=_mesh->getNumberOfElementsWithPoly(MED_EN::MED_FACE,MED_EN::MED_ALL_ELEMENTS);
array=new int[nbface];
currentEntity = MED_EN::meshEntities.find(MED_EN::MED_FACE);
offset=0;
{
MED_EN::medGeometryElement type=*iter;
if (type/100 != _mesh->getMeshDimension()-1) continue;
- int ntype = _mesh->getNumberOfElements(MED_EN::MED_FACE,type);
+ int ntype = _mesh->getNumberOfElementsWithPoly(MED_EN::MED_FACE,type);
if (ntype==0) continue;
med_2_3::MEDglobalNumLire(fid,meshname, array+offset, ntype,
med_2_3::MED_FACE, (med_2_3::med_geometrie_element)type);
ParaMESH::ParaMESH(MEDMEM::MESH& subdomain_mesh, const ProcessorGroup& proc_group, const string& name):
_mesh(&subdomain_mesh),
_my_domain_id(proc_group.myRank()),
- _block_topology (new BlockTopology(proc_group, subdomain_mesh.getNumberOfElements(MED_EN::MED_CELL,MED_EN::MED_ALL_ELEMENTS))),
+ _block_topology (new BlockTopology(proc_group, subdomain_mesh.getNumberOfElementsWithPoly(MED_EN::MED_CELL,MED_EN::MED_ALL_ELEMENTS))),
_has_mesh_ownership(false)
{
ostringstream stream;
stream<<name<<"_"<<_my_domain_id+1;
_name=stream.str();
- _cellglobal = new int[subdomain_mesh.getNumberOfElements(MED_EN::MED_CELL, MED_EN::MED_ALL_ELEMENTS)];
+ int nbCells = subdomain_mesh.getNumberOfElementsWithPoly(MED_EN::MED_CELL, MED_EN::MED_ALL_ELEMENTS);
+ _cellglobal = new int[nbCells];
int offset = _block_topology->localToGlobal(make_pair(_my_domain_id,0));
- for (int i=0; i<subdomain_mesh.getNumberOfElements(MED_EN::MED_CELL, MED_EN::MED_ALL_ELEMENTS); i++)
+ for (int i=0; i<nbCells; i++)
{
_cellglobal[i]=offset+i;
}