double *originPtr = new double[_spaceDim];
double *dxyzPtr = new double[_spaceDim];
- int *nodeStrctPtr = new int[_spaceDim];
+ mcIdType *nodeStrctPtr = new mcIdType[_spaceDim];
for(int i=0;i<_spaceDim;i++)
{
for (unsigned int i=0;i<faceGroups.size();i++ )
{
string groupName=faceGroups[i];
- vector<int> nonEmptyGrp(medmesh->getGrpNonEmptyLevels(groupName));
+ vector<long int> nonEmptyGrp(medmesh->getGrpNonEmptyLevels(groupName));
//We check if the group has a relative dimension equal to -1
//before call to the function getGroup(-1,groupName.c_str())
- vector<int>::iterator it = find(nonEmptyGrp.begin(), nonEmptyGrp.end(), -1);
+ vector<long int>::iterator it = find(nonEmptyGrp.begin(), nonEmptyGrp.end(), -1);
if (it != nonEmptyGrp.end())
{
cout<<"Boundary face group named "<< groupName << " found"<<endl;
for (unsigned int i=0;i<nodeGroups.size();i++ )
{
string groupName=nodeGroups[i];
- DataArrayInt * nodeGroup=medmesh->getNodeGroupArr( groupName );
- const int *nodeids=nodeGroup->getConstPointer();
+ DataArrayInt64 * nodeGroup=medmesh->getNodeGroupArr( groupName );
+ const mcIdType *nodeids=nodeGroup->getConstPointer();
if(nodeids!=NULL)
{
Mesh::setMesh( void )
//----------------------------------------------------------------------
{
- DataArrayInt *desc = DataArrayInt::New();
- DataArrayInt *descI = DataArrayInt::New();
- DataArrayInt *revDesc = DataArrayInt::New();
- DataArrayInt *revDescI = DataArrayInt::New();
+ DataArrayInt64 *desc = DataArrayInt64::New();
+ DataArrayInt64 *descI = DataArrayInt64::New();
+ DataArrayInt64 *revDesc = DataArrayInt64::New();
+ DataArrayInt64 *revDescI = DataArrayInt64::New();
MEDCouplingUMesh* mu = _mesh->buildUnstructured();
mu->unPolyze();
MEDCouplingUMesh* mu2=mu->buildDescendingConnectivity2(desc,descI,revDesc,revDescI);//mesh of dimension N-1 containing the cell interfaces
- const int *tmp = desc->getConstPointer();
- const int *tmpI=descI->getConstPointer();
+ const long int *tmp = desc->getConstPointer();
+ const long int *tmpI=descI->getConstPointer();
- const int *tmpA =revDesc->getConstPointer();
- const int *tmpAI=revDescI->getConstPointer();
+ const long int *tmpA =revDesc->getConstPointer();
+ const long int *tmpAI=revDescI->getConstPointer();
//const int *work=tmp+tmpI[id];//corresponds to buildDescendingConnectivity
DataArrayDouble *coo = mu->getCoords() ;
const double *cood=coo->getConstPointer();
- DataArrayInt *revNode =DataArrayInt::New();
- DataArrayInt *revNodeI=DataArrayInt::New();
+ DataArrayInt64 *revNode =DataArrayInt64::New();
+ DataArrayInt64 *revNodeI=DataArrayInt64::New();
mu->getReverseNodalConnectivity(revNode,revNodeI) ;
- const int *tmpN =revNode->getConstPointer();
- const int *tmpNI=revNodeI->getConstPointer();
+ const long int *tmpN =revNode->getConstPointer();
+ const long int *tmpNI=revNodeI->getConstPointer();
- DataArrayInt *revCell =DataArrayInt::New();
- DataArrayInt *revCellI=DataArrayInt::New();
+ DataArrayInt64 *revCell =DataArrayInt64::New();
+ DataArrayInt64 *revCellI=DataArrayInt64::New();
mu2->getReverseNodalConnectivity(revCell,revCellI) ;
- const int *tmpC =revCell->getConstPointer();
- const int *tmpCI=revCellI->getConstPointer();
+ const long int *tmpC =revCell->getConstPointer();
+ const long int *tmpCI=revCellI->getConstPointer();
- const DataArrayInt *nodal = mu2->getNodalConnectivity() ;
- const DataArrayInt *nodalI = mu2->getNodalConnectivityIndex() ;
- const int *tmpNE =nodal->getConstPointer();
- const int *tmpNEI=nodalI->getConstPointer();
+ const DataArrayInt64 *nodal = mu2->getNodalConnectivity() ;
+ const DataArrayInt64 *nodalI = mu2->getNodalConnectivityIndex() ;
+ const long int *tmpNE =nodal->getConstPointer();
+ const long int *tmpNEI=nodalI->getConstPointer();
_numberOfCells = mu->getNumberOfCells() ;
_cells = new Cell[_numberOfCells] ;
_indexFacePeriodicSet=false;
//Definition used if _meshDim =3 to determine the edges
- DataArrayInt *desc2 =DataArrayInt::New();
- DataArrayInt *descI2=DataArrayInt::New();
- DataArrayInt *revDesc2 =DataArrayInt::New();
- DataArrayInt *revDescI2=DataArrayInt::New();
- DataArrayInt *revNode2 =DataArrayInt::New();
- DataArrayInt *revNodeI2=DataArrayInt::New();
- const int *tmpN2 ;
- const int *tmpNI2;
+ DataArrayInt64 *desc2 =DataArrayInt64::New();
+ DataArrayInt64 *descI2=DataArrayInt64::New();
+ DataArrayInt64 *revDesc2 =DataArrayInt64::New();
+ DataArrayInt64 *revDescI2=DataArrayInt64::New();
+ DataArrayInt64 *revNode2 =DataArrayInt64::New();
+ DataArrayInt64 *revNodeI2=DataArrayInt64::New();
+ const long int *tmpN2 ;
+ const long int *tmpNI2;
MEDCouplingUMesh* mu3;
if (_meshDim == 1)
{
for( int id=0;id<_numberOfCells;id++ )
{
- const int *work=tmp+tmpI[id];
+ const long int *work=tmp+tmpI[id];
int nbFaces=tmpI[id+1]-tmpI[id];
int nbVertices=mu->getNumberOfNodesInCell(id) ;
Cell ci( nbVertices, nbFaces, surf[id], Point(coorBary[id], 0.0, 0.0) ) ;
- std::vector<int> nodeIdsOfCell ;
+ std::vector<long int> nodeIdsOfCell ;
mu->getNodeIdsOfCell(id,nodeIdsOfCell) ;
for( int el=0;el<nbVertices;el++ )
{
for( int id(0), k(0); id<_numberOfNodes; id++, k+=_spaceDim)
{
Point p(cood[k], 0.0, 0.0) ;
- const int *workc=tmpN+tmpNI[id];
+ const long int *workc=tmpN+tmpNI[id];
int nbCells=tmpNI[id+1]-tmpNI[id];
- const int *workf=tmpC+tmpCI[id];
+ const long int *workf=tmpC+tmpCI[id];
int nbFaces=tmpCI[id+1]-tmpCI[id];
- const int *workn=tmpA+tmpAI[id];
+ const long int *workn=tmpA+tmpAI[id];
int nbNeighbourNodes=tmpAI[id+1]-tmpAI[id];
Node vi( nbCells, nbFaces, nbNeighbourNodes, p ) ;
for(int id(0), k(0); id<_numberOfFaces; id++, k+=_spaceDim)
{
Point p(cood[k], 0.0, 0.0) ;
- const int *workc=tmpA+tmpAI[id];
+ const long int *workc=tmpA+tmpAI[id];
int nbCells=tmpAI[id+1]-tmpAI[id];
- const int *workv=tmpNE+tmpNEI[id]+1;
+ const long int *workv=tmpNE+tmpNEI[id]+1;
Face fi( 1, nbCells, 1.0, p, 1.0, 0.0, 0.0) ;
fi.addNodeId(0,workv[0]) ;
/*Building mesh cells */
for(int id(0), k(0); id<_numberOfCells; id++, k+=_spaceDim)
{
- const int *work=tmp+tmpI[id];
+ const long int *work=tmp+tmpI[id];
int nbFaces=tmpI[id+1]-tmpI[id];
int nbVertices=mu->getNumberOfNodesInCell(id) ;
Cell ci( nbVertices, nbFaces, surf[id], p ) ;
/* Filling cell nodes */
- std::vector<int> nodeIdsOfCell ;
+ std::vector<long int> nodeIdsOfCell ;
mu->getNodeIdsOfCell(id,nodeIdsOfCell) ;
for( int el=0;el<nbVertices;el++ )
ci.addNodeId(el,nodeIdsOfCell[el]) ;
for( int el=0;el<nbFaces;el++ )
{
int faceIndex=(abs(work[el])-1);//=work[el] since Fortran type numbering was used, and negative sign means anticlockwise numbering
- const int *workv=tmpNE+tmpNEI[faceIndex]+1;
+ const long int *workv=tmpNE+tmpNEI[faceIndex]+1;
int nbNodes= tmpNEI[faceIndex+1]-tmpNEI[faceIndex]-1;
if(nbNodes!=2)//We want to compute the normal to a straight line, not a curved interface composed of more thant 2 points
{
for (int d=0; d<_spaceDim; d++)
coorBarySegXyz[d] = coorBarySeg[k+d];
Point p(coorBarySegXyz[0],coorBarySegXyz[1],coorBarySegXyz[2]) ;
- const int *workc=tmpA+tmpAI[id];
+ const long int *workc=tmpA+tmpAI[id];
int nbCells=tmpAI[id+1]-tmpAI[id];
if (nbCells>2 && _spaceDim==_meshDim)
if (nbCells==1)
_boundaryFaceIds.push_back(id);
- const int *workv=tmpNE+tmpNEI[id]+1;
+ const long int *workv=tmpNE+tmpNEI[id]+1;
int nbNodes= tmpNEI[id+1]-tmpNEI[id]-1;
Face fi;
coorP[d] = cood[k+d];
Point p(coorP[0],coorP[1],coorP[2]) ;
- const int *workc=tmpN+tmpNI[id];
+ const long int *workc=tmpN+tmpNI[id];
int nbCells=tmpNI[id+1]-tmpNI[id];
- const int *workf=tmpC+tmpCI[id];
+ const long int *workf=tmpC+tmpCI[id];
int nbFaces=tmpCI[id+1]-tmpCI[id];
- const int *workn;
+ const long int *workn;
int nbNeighbourNodes;
if (_meshDim == 1)
{
double *originPtr = new double[_spaceDim];
double *dxyzPtr = new double[_spaceDim];
- int *nodeStrctPtr = new int[_spaceDim];
+ mcIdType *nodeStrctPtr = new mcIdType[_spaceDim];
originPtr[0]=xmin;
nodeStrctPtr[0]=nx+1;
delete [] dxyzPtr;
delete [] nodeStrctPtr;
- DataArrayInt *desc=DataArrayInt::New();
- DataArrayInt *descI=DataArrayInt::New();
- DataArrayInt *revDesc=DataArrayInt::New();
- DataArrayInt *revDescI=DataArrayInt::New();
+ DataArrayInt64 *desc=DataArrayInt64::New();
+ DataArrayInt64 *descI=DataArrayInt64::New();
+ DataArrayInt64 *revDesc=DataArrayInt64::New();
+ DataArrayInt64 *revDescI=DataArrayInt64::New();
MEDCouplingUMesh* mu=_mesh->buildUnstructured();
MEDCouplingUMesh *mu2=mu->buildDescendingConnectivity(desc,descI,revDesc,revDescI);
- const int *tmp=desc->getConstPointer();
- const int *tmpI=descI->getConstPointer();
+ const long int *tmp=desc->getConstPointer();
+ const long int *tmpI=descI->getConstPointer();
- const int *tmpA =revDesc->getConstPointer();
- const int *tmpAI=revDescI->getConstPointer();
+ const long int *tmpA =revDesc->getConstPointer();
+ const long int *tmpAI=revDescI->getConstPointer();
_eltsTypes=mu->getAllGeoTypesSorted();
Point p(coorBary[id],0.0,0.0) ;
Cell ci( nbVertices, nbVertices, lon[id], p ) ;
- std::vector<int> nodeIdsOfCell ;
+ std::vector<long int> nodeIdsOfCell ;
mu->getNodeIdsOfCell(id,nodeIdsOfCell) ;
for( int el=0;el<nbVertices;el++ )
{
double xn = (cood[nodeIdsOfCell[nbVertices-1]] - cood[nodeIdsOfCell[0]] > 0.0) ? -1.0 : 1.0;
int nbFaces=tmpI[id+1]-tmpI[id];
- const int *work=tmp+tmpI[id];
+ const long int *work=tmp+tmpI[id];
for( int el=0;el<nbFaces;el++ )
{
}
//Suppress the following since tmpN=tmpA
- DataArrayInt *revNode=DataArrayInt::New();
- DataArrayInt *revNodeI=DataArrayInt::New();
+ DataArrayInt64 *revNode=DataArrayInt64::New();
+ DataArrayInt64 *revNodeI=DataArrayInt64::New();
mu->getReverseNodalConnectivity(revNode,revNodeI) ;
- const int *tmpN=revNode->getConstPointer();
- const int *tmpNI=revNodeI->getConstPointer();
+ const long int *tmpN=revNode->getConstPointer();
+ const long int *tmpNI=revNodeI->getConstPointer();
for( int id=0;id<_numberOfNodes;id++ )
{
std::vector<double> coo ;
mu->getCoordinatesOfNode(id,coo);
Point p(coo[0],0.0,0.0) ;
- const int *workc=tmpN+tmpNI[id];
+ const long int *workc=tmpN+tmpNI[id];
int nbCells=tmpNI[id+1]-tmpNI[id];
int nbFaces=1;
- const int *workn=tmpA+tmpAI[id];
+ const long int *workn=tmpA+tmpAI[id];
int nbNeighbourNodes=tmpAI[id+1]-tmpAI[id];
Node vi( nbCells, nbFaces, nbNeighbourNodes, p ) ;
MEDCouplingUMesh * mesh1d = MEDCouplingUMesh::New(meshName, 1);
mesh1d->allocateCells(nx - 1);
double * coords = new double[nx];
- int * nodal_con = new int[2];
+ long int * nodal_con = new long int[2];
coords[0]=points[0];
for(int i=0; i<nx- 1 ; i++)
{
_mesh=mesh1d;
- DataArrayInt *desc=DataArrayInt::New();
- DataArrayInt *descI=DataArrayInt::New();
- DataArrayInt *revDesc=DataArrayInt::New();
- DataArrayInt *revDescI=DataArrayInt::New();
+ DataArrayInt64 *desc=DataArrayInt64::New();
+ DataArrayInt64 *descI=DataArrayInt64::New();
+ DataArrayInt64 *revDesc=DataArrayInt64::New();
+ DataArrayInt64 *revDescI=DataArrayInt64::New();
MEDCouplingUMesh* mu=_mesh->buildUnstructured();
MEDCouplingUMesh *mu2=mu->buildDescendingConnectivity(desc,descI,revDesc,revDescI);
Point p(coorBary[id],0.0,0.0) ;
Cell ci( nbVertices, nbVertices, lon[id], p ) ;
- std::vector<int> nodeIdsOfCell ;
+ std::vector<long int> nodeIdsOfCell ;
mu->getNodeIdsOfCell(id,nodeIdsOfCell) ;
for( int el=0;el<nbVertices;el++ )
{
//Suppress the following since tmpN=tmpA
- DataArrayInt *revNode=DataArrayInt::New();
- DataArrayInt *revNodeI=DataArrayInt::New();
+ DataArrayInt64 *revNode=DataArrayInt64::New();
+ DataArrayInt64 *revNodeI=DataArrayInt64::New();
mu->getReverseNodalConnectivity(revNode,revNodeI) ;
- const int *tmpN=revNode->getConstPointer();
- const int *tmpNI=revNodeI->getConstPointer();
+ const long int *tmpN=revNode->getConstPointer();
+ const long int *tmpNI=revNodeI->getConstPointer();
_numberOfNodes = mu->getNumberOfNodes() ;
_nodes = new Node[_numberOfNodes] ;
std::vector<double> coo ;
mu->getCoordinatesOfNode(id,coo);
Point p(coo[0],0.0,0.0) ;
- const int *workc=tmpN+tmpNI[id];
+ const long int *workc=tmpN+tmpNI[id];
int nbCells=tmpNI[id+1]-tmpNI[id];
int nbFaces=1;
- const int *workn=tmpN+tmpNI[id];
+ const long int *workn=tmpN+tmpNI[id];
int nbNeighbourNodes=tmpNI[id+1]-tmpNI[id];
Node vi( nbCells, nbFaces, nbNeighbourNodes, p ) ;
int nbVertices=1;
double *originPtr = new double[_spaceDim];
double *dxyzPtr = new double[_spaceDim];
- int *nodeStrctPtr = new int[_spaceDim];
+ mcIdType *nodeStrctPtr = new mcIdType[_spaceDim];
originPtr[0]=xmin;
originPtr[1]=ymin;
double *originPtr = new double[_spaceDim];
double *dxyzPtr = new double[_spaceDim];
- int *nodeStrctPtr = new int[_spaceDim];
+ mcIdType *nodeStrctPtr = new mcIdType[_spaceDim];
originPtr[0]=xmin;
originPtr[1]=ymin;
return _dxyz;
}
-std::vector<int>
+std::vector<long int>
Mesh::getCellGridStructure() const
{
if(!_isStructured)
return _nodeGroupNames;
}
-vector<MEDCoupling::DataArrayInt *>
+vector<MEDCoupling::DataArrayInt64 *>
Mesh::getNodeGroups( void ) const
{
return _nodeGroups;