Added and verified support for 64bit labels
To compile with 64bit labels set WM_LABEL_SIZE=64 in ~/OpenFOAM/dev/prefs.sh source ~/.bashrc then Allwmake in OpenFOAM-dev. This will build into for example OpenFOAM-dev/platforms/linux64ClangDPInt64Opt If WM_LABEL_SIZE is unset or set to 32: WM_LABEL_SIZE=32 the build would be placed into OpenFOAM-dev/platforms/linux64ClangDPInt32Opt Thus both 32bit and 64bit label builds can coexist without problem.
This commit is contained in:
@ -115,7 +115,7 @@ private:
|
||||
{
|
||||
typedef typename Triangulation::Geom_traits Gt;
|
||||
|
||||
typedef std::pair<const typename Triangulation::Point*, int>
|
||||
typedef std::pair<const typename Triangulation::Point*, label>
|
||||
Point_3;
|
||||
|
||||
struct Less_x_3
|
||||
|
||||
@ -450,7 +450,7 @@ Foam::DelaunayMesh<Triangulation>::createMesh
|
||||
}
|
||||
|
||||
label faceI = 0;
|
||||
labelList verticesOnTriFace(3, -1);
|
||||
labelList verticesOnTriFace(3, label(-1));
|
||||
face newFace(verticesOnTriFace);
|
||||
|
||||
for
|
||||
@ -461,7 +461,7 @@ Foam::DelaunayMesh<Triangulation>::createMesh
|
||||
)
|
||||
{
|
||||
const Cell_handle c1(fit->first);
|
||||
const int oppositeVertex = fit->second;
|
||||
const label oppositeVertex = fit->second;
|
||||
const Cell_handle c2(c1->neighbor(oppositeVertex));
|
||||
|
||||
// Do not output if face has neither opposite vertex as an internal
|
||||
|
||||
@ -287,7 +287,7 @@ void Foam::DistributedDelaunayMesh<Triangulation>::findProcessorBoundaryCells
|
||||
// Cell_handle cit = *vcit;
|
||||
//
|
||||
// // Index of infinite vertex in this cell.
|
||||
// int i = cit->index(Triangulation::infinite_vertex());
|
||||
// label i = cit->index(Triangulation::infinite_vertex());
|
||||
//
|
||||
// Cell_handle c = cit->neighbor(i);
|
||||
//
|
||||
@ -333,7 +333,7 @@ void Foam::DistributedDelaunayMesh<Triangulation>::findProcessorBoundaryCells
|
||||
if (Triangulation::is_infinite(cit))
|
||||
{
|
||||
// Index of infinite vertex in this cell.
|
||||
int i = cit->index(Triangulation::infinite_vertex());
|
||||
label i = cit->index(Triangulation::infinite_vertex());
|
||||
|
||||
Cell_handle c = cit->neighbor(i);
|
||||
|
||||
|
||||
@ -497,7 +497,7 @@ void Foam::searchableSurfaceControl::cellSizeFunctionVertices
|
||||
List<pointIndexHit> infoList(1, pointIndexHit());
|
||||
|
||||
vectorField normals(1);
|
||||
labelList region(1, -1);
|
||||
labelList region(1, label(-1));
|
||||
|
||||
forAll(points, pI)
|
||||
{
|
||||
|
||||
@ -43,7 +43,6 @@ SourceFiles
|
||||
|
||||
#include "CGALTriangulation3Ddefs.H"
|
||||
#include "uint.H"
|
||||
#include "ulong.H"
|
||||
#include "searchableSurfaces.H"
|
||||
#include "conformationSurfaces.H"
|
||||
#include "cellShapeControl.H"
|
||||
|
||||
@ -172,7 +172,7 @@ void Foam::conformalVoronoiMesh::calcTetMesh
|
||||
|
||||
label faceI = 0;
|
||||
|
||||
labelList verticesOnTriFace(3, -1);
|
||||
labelList verticesOnTriFace(3, label(-1));
|
||||
|
||||
face newFace(verticesOnTriFace);
|
||||
|
||||
@ -184,7 +184,7 @@ void Foam::conformalVoronoiMesh::calcTetMesh
|
||||
)
|
||||
{
|
||||
const Cell_handle c1(fit->first);
|
||||
const int oppositeVertex = fit->second;
|
||||
const label oppositeVertex = fit->second;
|
||||
const Cell_handle c2(c1->neighbor(oppositeVertex));
|
||||
|
||||
if (c1->hasFarPoint() && c2->hasFarPoint())
|
||||
@ -347,7 +347,7 @@ Foam::label Foam::conformalVoronoiMesh::mergeIdenticalDualVertices
|
||||
)
|
||||
{
|
||||
const Cell_handle c1(fit->first);
|
||||
const int oppositeVertex = fit->second;
|
||||
const label oppositeVertex = fit->second;
|
||||
const Cell_handle c2(c1->neighbor(oppositeVertex));
|
||||
|
||||
if (is_infinite(c1) || is_infinite(c2))
|
||||
@ -1070,7 +1070,7 @@ Foam::labelHashSet Foam::conformalVoronoiMesh::checkPolyMeshQuality
|
||||
|
||||
// Check for cells with one internal face only
|
||||
|
||||
labelList nInternalFaces(pMesh.nCells(), 0);
|
||||
labelList nInternalFaces(pMesh.nCells(), label(0));
|
||||
|
||||
for (label fI = 0; fI < pMesh.nInternalFaces(); fI++)
|
||||
{
|
||||
@ -1737,7 +1737,7 @@ void Foam::conformalVoronoiMesh::createFacesOwnerNeighbourAndPatches
|
||||
|
||||
const label nPatches = patchNames.size();
|
||||
|
||||
labelList procNeighbours(nPatches, -1);
|
||||
labelList procNeighbours(nPatches, label(-1));
|
||||
forAll(procNeighbours, patchI)
|
||||
{
|
||||
if (patchDicts[patchI].found("neighbProcNo"))
|
||||
@ -2580,7 +2580,7 @@ void Foam::conformalVoronoiMesh::removeUnusedPoints
|
||||
|
||||
label pointI = 0;
|
||||
|
||||
labelList oldToNew(pts.size(), -1);
|
||||
labelList oldToNew(pts.size(), label(-1));
|
||||
|
||||
// Move all of the used points to the start of the pointField and
|
||||
// truncate it
|
||||
@ -2637,7 +2637,7 @@ Foam::labelList Foam::conformalVoronoiMesh::removeUnusedCells
|
||||
|
||||
label cellI = 0;
|
||||
|
||||
labelList oldToNew(cellUsed.size(), -1);
|
||||
labelList oldToNew(cellUsed.size(), label(-1));
|
||||
|
||||
// Move all of the used cellCentres to the start of the pointField and
|
||||
// truncate it
|
||||
|
||||
@ -922,7 +922,7 @@ void Foam::conformalVoronoiMesh::createMultipleEdgePointGroup
|
||||
const List<extendedFeatureEdgeMesh::sideVolumeType>& normalVolumeTypes =
|
||||
feMesh.normalVolumeTypes();
|
||||
|
||||
labelList nNormalTypes(4, 0);
|
||||
labelList nNormalTypes(4, label(0));
|
||||
|
||||
forAll(edNormalIs, edgeNormalI)
|
||||
{
|
||||
|
||||
@ -90,7 +90,7 @@ inline Foam::scalar Foam::conformalVoronoiMesh::averageAnyCellSize
|
||||
label nProducts = 0;
|
||||
|
||||
const Cell_handle c(fit->first);
|
||||
const int oppositeVertex = fit->second;
|
||||
const label oppositeVertex = fit->second;
|
||||
|
||||
for (label i = 0; i < 3; i++)
|
||||
{
|
||||
@ -456,7 +456,7 @@ inline Foam::List<Foam::label> Foam::conformalVoronoiMesh::processorsAttached
|
||||
DynamicList<label> procsAttached(8);
|
||||
|
||||
const Cell_handle c1(fit->first);
|
||||
const int oppositeVertex = fit->second;
|
||||
const label oppositeVertex = fit->second;
|
||||
const Cell_handle c2(c1->neighbor(oppositeVertex));
|
||||
|
||||
FixedList<label, 4> c1Procs(CGAL::indexedCellOps::processorsAttached(c1));
|
||||
@ -486,7 +486,7 @@ inline bool Foam::conformalVoronoiMesh::isParallelDualEdge
|
||||
) const
|
||||
{
|
||||
const Cell_handle c1(fit->first);
|
||||
const int oppositeVertex = fit->second;
|
||||
const label oppositeVertex = fit->second;
|
||||
|
||||
return
|
||||
(
|
||||
|
||||
@ -542,7 +542,7 @@ void Foam::conformalVoronoiMesh::reorderPoints
|
||||
Info<< incrIndent << indent << "Reordering points into internal/external"
|
||||
<< endl;
|
||||
|
||||
labelList oldToNew(points.size(), 0);
|
||||
labelList oldToNew(points.size(), label(0));
|
||||
|
||||
// Find points that are internal
|
||||
for (label fI = nInternalFaces; fI < faces.size(); ++fI)
|
||||
@ -645,8 +645,8 @@ void Foam::conformalVoronoiMesh::reorderProcessorPatches
|
||||
// }
|
||||
|
||||
// Rotation on new faces.
|
||||
labelList rotation(faces.size(), 0);
|
||||
labelList faceMap(faces.size(), -1);
|
||||
labelList rotation(faces.size(), label(0));
|
||||
labelList faceMap(faces.size(), label(-1));
|
||||
|
||||
PstreamBuffers pBufs(Pstream::nonBlocking);
|
||||
|
||||
@ -692,8 +692,8 @@ void Foam::conformalVoronoiMesh::reorderProcessorPatches
|
||||
const label patchStartFace =
|
||||
readLabel(patchDicts[patchI].lookup("startFace"));
|
||||
|
||||
labelList patchFaceMap(nPatchFaces, -1);
|
||||
labelList patchFaceRotation(nPatchFaces, 0);
|
||||
labelList patchFaceMap(nPatchFaces, label(-1));
|
||||
labelList patchFaceRotation(nPatchFaces, label(0));
|
||||
|
||||
bool changed = refCast<const processorPolyPatch>(pp).order
|
||||
(
|
||||
|
||||
@ -83,7 +83,7 @@ bool Foam::conformalVoronoiMesh::distributeBackground(const Triangulation& mesh)
|
||||
|
||||
meshSearch cellSearch(bMesh, polyMesh::FACEPLANES);
|
||||
|
||||
labelList cellVertices(bMesh.nCells(), 0);
|
||||
labelList cellVertices(bMesh.nCells(), label(0));
|
||||
|
||||
for
|
||||
(
|
||||
|
||||
@ -218,7 +218,7 @@ Foam::labelList Foam::conformalVoronoiMesh::calcCellZones
|
||||
const pointField& cellCentres
|
||||
) const
|
||||
{
|
||||
labelList cellToSurface(cellCentres.size(), -1);
|
||||
labelList cellToSurface(cellCentres.size(), label(-1));
|
||||
|
||||
const PtrList<surfaceZonesInfo>& surfZones =
|
||||
geometryToConformTo().surfZones();
|
||||
@ -327,7 +327,7 @@ void Foam::conformalVoronoiMesh::calcFaceZones
|
||||
const labelList& faceOwner = mesh.faceOwner();
|
||||
const labelList& faceNeighbour = mesh.faceNeighbour();
|
||||
|
||||
labelList neiFaceOwner(mesh.nFaces() - mesh.nInternalFaces(), -1);
|
||||
labelList neiFaceOwner(mesh.nFaces() - mesh.nInternalFaces(), label(-1));
|
||||
|
||||
const polyBoundaryMesh& patches = mesh.boundaryMesh();
|
||||
|
||||
|
||||
@ -83,7 +83,7 @@ bool Foam::featurePointConformer::createSpecialisedFeaturePoint
|
||||
const labelListList& edgeNormals = feMesh.edgeNormals();
|
||||
|
||||
label concaveEdgeI = -1;
|
||||
labelList convexEdgesI(2, -1);
|
||||
labelList convexEdgesI(2, label(-1));
|
||||
label nConvex = 0;
|
||||
|
||||
forAll(pEds, i)
|
||||
@ -521,7 +521,7 @@ bool Foam::featurePointConformer::createSpecialisedFeaturePoint
|
||||
const labelListList& edgeNormals = feMesh.edgeNormals();
|
||||
|
||||
label convexEdgeI = -1;
|
||||
labelList concaveEdgesI(2, -1);
|
||||
labelList concaveEdgesI(2, label(-1));
|
||||
label nConcave = 0;
|
||||
|
||||
forAll(pEds, i)
|
||||
|
||||
@ -97,7 +97,7 @@ class indexedCell
|
||||
// < 0 && > ctFar : the (global) index of a dual point on a processor
|
||||
// face
|
||||
|
||||
int index_;
|
||||
Foam::label index_;
|
||||
|
||||
//- The number of times that this Delaunay cell has been limited
|
||||
// during filtering
|
||||
@ -154,9 +154,9 @@ public:
|
||||
|
||||
// Member Functions
|
||||
|
||||
inline int& cellIndex();
|
||||
inline Foam::label& cellIndex();
|
||||
|
||||
inline int cellIndex() const;
|
||||
inline Foam::label cellIndex() const;
|
||||
|
||||
#ifdef CGAL_INEXACT
|
||||
inline const Foam::point& dual();
|
||||
|
||||
@ -94,14 +94,14 @@ CGAL::indexedCell<Gt, Cb>::indexedCell
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
template<class Gt, class Cb>
|
||||
int& CGAL::indexedCell<Gt, Cb>::cellIndex()
|
||||
Foam::label& CGAL::indexedCell<Gt, Cb>::cellIndex()
|
||||
{
|
||||
return index_;
|
||||
}
|
||||
|
||||
|
||||
template<class Gt, class Cb>
|
||||
int CGAL::indexedCell<Gt, Cb>::cellIndex() const
|
||||
Foam::label CGAL::indexedCell<Gt, Cb>::cellIndex() const
|
||||
{
|
||||
return index_;
|
||||
}
|
||||
|
||||
@ -112,7 +112,7 @@ class indexedVertex
|
||||
//- The index for this Delaunay vertex. For referred vertices, the
|
||||
// index is negative for vertices that are the outer (slave) of point
|
||||
// pairs
|
||||
int index_;
|
||||
Foam::label index_;
|
||||
|
||||
//- Number of the processor that owns this vertex
|
||||
int processor_;
|
||||
@ -154,7 +154,7 @@ public:
|
||||
inline indexedVertex
|
||||
(
|
||||
const Point& p,
|
||||
int index,
|
||||
Foam::label index,
|
||||
vertexType type,
|
||||
int processor
|
||||
);
|
||||
@ -162,7 +162,7 @@ public:
|
||||
inline indexedVertex
|
||||
(
|
||||
const Foam::point& p,
|
||||
int index,
|
||||
Foam::label index,
|
||||
vertexType type,
|
||||
int processor
|
||||
);
|
||||
@ -174,9 +174,9 @@ public:
|
||||
|
||||
// Member Functions
|
||||
|
||||
inline int& index();
|
||||
inline Foam::label& index();
|
||||
|
||||
inline int index() const;
|
||||
inline Foam::label index() const;
|
||||
|
||||
inline vertexType& type();
|
||||
|
||||
|
||||
@ -91,7 +91,7 @@ template<class Gt, class Vb>
|
||||
inline CGAL::indexedVertex<Gt, Vb>::indexedVertex
|
||||
(
|
||||
const Point& p,
|
||||
int index,
|
||||
Foam::label index,
|
||||
vertexType type,
|
||||
int processor
|
||||
)
|
||||
@ -110,7 +110,7 @@ template<class Gt, class Vb>
|
||||
inline CGAL::indexedVertex<Gt, Vb>::indexedVertex
|
||||
(
|
||||
const Foam::point& p,
|
||||
int index,
|
||||
Foam::label index,
|
||||
vertexType type,
|
||||
int processor
|
||||
)
|
||||
@ -154,14 +154,14 @@ inline CGAL::indexedVertex<Gt, Vb>::indexedVertex(Cell_handle f)
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
template<class Gt, class Vb>
|
||||
inline int& CGAL::indexedVertex<Gt, Vb>::index()
|
||||
inline Foam::label& CGAL::indexedVertex<Gt, Vb>::index()
|
||||
{
|
||||
return index_;
|
||||
}
|
||||
|
||||
|
||||
template<class Gt, class Vb>
|
||||
inline int CGAL::indexedVertex<Gt, Vb>::index() const
|
||||
inline Foam::label CGAL::indexedVertex<Gt, Vb>::index() const
|
||||
{
|
||||
return index_;
|
||||
}
|
||||
|
||||
@ -299,7 +299,7 @@ bool Foam::autoDensity::fillBox
|
||||
{
|
||||
const conformationSurfaces& geometry = geometryToConformTo();
|
||||
|
||||
unsigned int initialSize = initialPoints.size();
|
||||
label initialSize = initialPoints.size();
|
||||
|
||||
scalar maxCellSize = -GREAT;
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2013 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2013-2014 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -113,7 +113,7 @@ Foam::searchableBoxFeatures::features() const
|
||||
surfacePoints[treeBoundBox::edges[eI].end()]
|
||||
- surfacePoints[treeBoundBox::edges[eI].start()];
|
||||
|
||||
normalDirections[eI] = labelList(2, 0);
|
||||
normalDirections[eI] = labelList(2, label(0));
|
||||
for (label j = 0; j < 2; ++j)
|
||||
{
|
||||
const vector cross =
|
||||
|
||||
@ -131,7 +131,7 @@ Foam::searchablePlateFeatures::features() const
|
||||
surface().points()()[edges[eI].end()]
|
||||
- surface().points()()[edges[eI].start()];
|
||||
|
||||
normalDirections[eI] = labelList(2, 0);
|
||||
normalDirections[eI] = labelList(2, label(0));
|
||||
for (label j = 0; j < 2; ++j)
|
||||
{
|
||||
const vector cross =
|
||||
|
||||
@ -28,7 +28,6 @@ License
|
||||
#include "transform.H"
|
||||
#include "IFstream.H"
|
||||
#include "uint.H"
|
||||
#include "ulong.H"
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user