[bugfix]: 64-bit label bugfix some how got overwritten by cfMesh update.
This commit is contained in:
parent
7fee1a978c
commit
e8a0078301
9 changed files with 36 additions and 17 deletions
|
@ -150,6 +150,25 @@ inline Foam::DynList<T, staticSize>::DynList(const label s)
|
||||||
# endif
|
# endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#if WM_LABEL_SIZE == 64
|
||||||
|
template<class T, Foam::label staticSize>
|
||||||
|
inline Foam::DynList<T, staticSize>::DynList(const int s)
|
||||||
|
:
|
||||||
|
dataPtr_(nullptr),
|
||||||
|
nAllocated_(0),
|
||||||
|
staticData_(),
|
||||||
|
nextFree_(0)
|
||||||
|
{
|
||||||
|
setSize(s);
|
||||||
|
|
||||||
|
# ifdef DEBUG
|
||||||
|
checkAllocation();
|
||||||
|
# endif
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
template<class T, Foam::label staticSize>
|
template<class T, Foam::label staticSize>
|
||||||
inline Foam::DynList<T, staticSize>::DynList(const label s, const T& val)
|
inline Foam::DynList<T, staticSize>::DynList(const label s, const T& val)
|
||||||
:
|
:
|
||||||
|
|
|
@ -58,8 +58,10 @@ void decomposeCells::findAddressingForCell
|
||||||
const faceListPMG& faces = mesh_.faces();
|
const faceListPMG& faces = mesh_.faces();
|
||||||
forAll(faceEdges, feI)
|
forAll(faceEdges, feI)
|
||||||
{
|
{
|
||||||
faceEdges[feI].setSize(faces[c[feI]].size());
|
DynList<label, 8>& fEdges = faceEdges[feI];
|
||||||
faceEdges[feI] = -1;
|
|
||||||
|
fEdges.setSize(faces[c[feI]].size());
|
||||||
|
fEdges = label(-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
forAll(c, fI)
|
forAll(c, fI)
|
||||||
|
|
|
@ -1221,7 +1221,7 @@ inline bool doTrianglesOverlap
|
||||||
x /= (mag(x) + VSMALL);
|
x /= (mag(x) + VSMALL);
|
||||||
vector y = vec ^ x;
|
vector y = vec ^ x;
|
||||||
|
|
||||||
DynList<point2D, 6> poly2D(3);
|
DynList<point2D, 6> poly2D(label(3));
|
||||||
poly2D[0] = point2D((tri0.a() - origin) & x, (tri0.a() - origin) & y);
|
poly2D[0] = point2D((tri0.a() - origin) & x, (tri0.a() - origin) & y);
|
||||||
poly2D[1] = point2D((tri0.b() - origin) & x, (tri0.b() - origin) & y);
|
poly2D[1] = point2D((tri0.b() - origin) & x, (tri0.b() - origin) & y);
|
||||||
poly2D[2] = point2D((tri0.c() - origin) & x, (tri0.c() - origin) & y);
|
poly2D[2] = point2D((tri0.c() - origin) & x, (tri0.c() - origin) & y);
|
||||||
|
|
|
@ -354,7 +354,7 @@ void partTriMesh::createBufferLayers()
|
||||||
{
|
{
|
||||||
const parTriFace& tri = receivedTrias[i];
|
const parTriFace& tri = receivedTrias[i];
|
||||||
|
|
||||||
DynList<label, 3> triPointLabels(3);
|
DynList<label, 3> triPointLabels(label(3));
|
||||||
for(label j=0;j<3;++j)
|
for(label j=0;j<3;++j)
|
||||||
{
|
{
|
||||||
const label gpI = tri.globalLabelOfPoint(j);
|
const label gpI = tri.globalLabelOfPoint(j);
|
||||||
|
|
|
@ -136,7 +136,7 @@ void meshOctree::setOctantVectorsAndPositions()
|
||||||
//- set vrtLeavesPos_
|
//- set vrtLeavesPos_
|
||||||
for(label vrtI=0;vrtI<8;++vrtI)
|
for(label vrtI=0;vrtI<8;++vrtI)
|
||||||
{
|
{
|
||||||
FixedList<label, 3> vc(0);
|
FixedList<label, 3> vc(label(0));
|
||||||
|
|
||||||
if( vrtI & 1 )
|
if( vrtI & 1 )
|
||||||
vc[0] += 1;
|
vc[0] += 1;
|
||||||
|
|
|
@ -138,7 +138,7 @@ void meshOctreeAutomaticRefinement::setMaxRefLevel()
|
||||||
{
|
{
|
||||||
finished = false;
|
finished = false;
|
||||||
|
|
||||||
const scalar lSize = size / pow(2, label(maxRefLevel_));
|
const scalar lSize = size / pow(2.0, label(maxRefLevel_));
|
||||||
|
|
||||||
if( lSize < cs )
|
if( lSize < cs )
|
||||||
{
|
{
|
||||||
|
|
|
@ -87,12 +87,12 @@ void meshOctreeCreator::setRootCubeSizeAndRefParameters()
|
||||||
{
|
{
|
||||||
finished = false;
|
finished = false;
|
||||||
|
|
||||||
const scalar lSize = size / Foam::pow(2, label(globalRefLevel_));
|
const scalar lSize = size / pow(label(2), label(globalRefLevel_));
|
||||||
|
|
||||||
if( lSize < (maxSize * (1.0-SMALL)) )
|
if( lSize < (maxSize * (1.0-SMALL)) )
|
||||||
{
|
{
|
||||||
const scalar bbSize =
|
const scalar bbSize =
|
||||||
0.5 * maxSize * Foam::pow(2, label(globalRefLevel_));
|
0.5 * maxSize * pow(label(2), label(globalRefLevel_));
|
||||||
rootBox.max() = c + point(bbSize, bbSize, bbSize);
|
rootBox.max() = c + point(bbSize, bbSize, bbSize);
|
||||||
rootBox.min() = c - point(bbSize, bbSize, bbSize);
|
rootBox.min() = c - point(bbSize, bbSize, bbSize);
|
||||||
finished = true;
|
finished = true;
|
||||||
|
@ -136,7 +136,7 @@ void meshOctreeCreator::setRootCubeSizeAndRefParameters()
|
||||||
{
|
{
|
||||||
finished = false;
|
finished = false;
|
||||||
|
|
||||||
const scalar lSize = maxSize / Foam::pow(2, addLevel);
|
const scalar lSize = maxSize / Foam::pow(label(2), addLevel);
|
||||||
|
|
||||||
if( lSize <= cs )
|
if( lSize <= cs )
|
||||||
{
|
{
|
||||||
|
@ -233,7 +233,7 @@ void meshOctreeCreator::setRootCubeSizeAndRefParameters()
|
||||||
{
|
{
|
||||||
finished = false;
|
finished = false;
|
||||||
|
|
||||||
const scalar lSize = maxSize / Foam::pow(2, addLevel);
|
const scalar lSize = maxSize / Foam::pow(label(2), addLevel);
|
||||||
|
|
||||||
if( lSize <= cs )
|
if( lSize <= cs )
|
||||||
{
|
{
|
||||||
|
@ -311,7 +311,7 @@ void meshOctreeCreator::setRootCubeSizeAndRefParameters()
|
||||||
{
|
{
|
||||||
finished = false;
|
finished = false;
|
||||||
|
|
||||||
const scalar lSize = maxSize / Foam::pow(2, addLevel);
|
const scalar lSize = maxSize / Foam::pow(label(2), addLevel);
|
||||||
|
|
||||||
if( lSize <= cs )
|
if( lSize <= cs )
|
||||||
{
|
{
|
||||||
|
@ -383,7 +383,7 @@ void meshOctreeCreator::setRootCubeSizeAndRefParameters()
|
||||||
{
|
{
|
||||||
finished = false;
|
finished = false;
|
||||||
|
|
||||||
const scalar lSize = maxSize / Foam::pow(2, nLevel);
|
const scalar lSize = maxSize / Foam::pow(label(2), nLevel);
|
||||||
|
|
||||||
if( lSize <= cs )
|
if( lSize <= cs )
|
||||||
{
|
{
|
||||||
|
|
|
@ -75,7 +75,7 @@ void meshUntangler::cutRegion::findNewFaces()
|
||||||
<< " consisting of edges " << f << endl;
|
<< " consisting of edges " << f << endl;
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
pointUsage = 0;
|
pointUsage = label(0);
|
||||||
|
|
||||||
DynList<label, 8> newFace;
|
DynList<label, 8> newFace;
|
||||||
|
|
||||||
|
@ -147,7 +147,7 @@ void meshUntangler::cutRegion::findNewFaces()
|
||||||
//- find edges which form the faceInPlane
|
//- find edges which form the faceInPlane
|
||||||
DynList<label, 128> edgeUsage;
|
DynList<label, 128> edgeUsage;
|
||||||
edgeUsage.setSize(cEdges.size());
|
edgeUsage.setSize(cEdges.size());
|
||||||
edgeUsage = 0;
|
edgeUsage = label(0);
|
||||||
forAll(cFaces, fI)
|
forAll(cFaces, fI)
|
||||||
{
|
{
|
||||||
const DynList<label, 8>& f = cFaces[fI];
|
const DynList<label, 8>& f = cFaces[fI];
|
||||||
|
|
|
@ -29,8 +29,6 @@ Description
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "error.H"
|
#include "error.H"
|
||||||
#include "objectRegistry.H"
|
|
||||||
#include "foamTime.H"
|
|
||||||
#include "polyMeshGenModifier.H"
|
#include "polyMeshGenModifier.H"
|
||||||
#include "edgeExtractor.H"
|
#include "edgeExtractor.H"
|
||||||
#include "meshSurfaceEngine.H"
|
#include "meshSurfaceEngine.H"
|
||||||
|
@ -1529,7 +1527,7 @@ bool edgeExtractor::checkConcaveEdgeCells()
|
||||||
|
|
||||||
DynList<label, 2> nFacesInPatch;
|
DynList<label, 2> nFacesInPatch;
|
||||||
nFacesInPatch.setSize(2);
|
nFacesInPatch.setSize(2);
|
||||||
nFacesInPatch = 0;
|
nFacesInPatch = label(0);
|
||||||
|
|
||||||
DynList<bool, 2> hasPatchPoints;
|
DynList<bool, 2> hasPatchPoints;
|
||||||
hasPatchPoints.setSize(2);
|
hasPatchPoints.setSize(2);
|
||||||
|
|
Reference in a new issue