diff --git a/src/OpenFOAM/meshes/polyMesh/globalMeshData/globalMeshData.H b/src/OpenFOAM/meshes/polyMesh/globalMeshData/globalMeshData.H index 3a3c234821556864222c212cb55c8eab8beacc9d..1f9c51ac9f6a8398f913193faa6cd53e61c961d8 100644 --- a/src/OpenFOAM/meshes/polyMesh/globalMeshData/globalMeshData.H +++ b/src/OpenFOAM/meshes/polyMesh/globalMeshData/globalMeshData.H @@ -323,8 +323,6 @@ class globalMeshData // its own master. Maybe store as well? void calcGlobalCoPointSlaves() const; - const labelListList& globalCoPointSlaves() const; - const mapDistribute& globalCoPointSlavesMap() const; //- Disallow default bitwise copy construct @@ -547,6 +545,11 @@ public: //- Is my edge same orientation as master edge const PackedBoolList& globalEdgeOrientation() const; + // Collocated point to collocated point + + const labelListList& globalCoPointSlaves() const; + const mapDistribute& globalCoPointSlavesMap() const; + // Coupled point to boundary faces. These are uncoupled boundary // faces only but include empty patches. diff --git a/src/OpenFOAM/meshes/polyMesh/globalMeshData/globalPoints.C b/src/OpenFOAM/meshes/polyMesh/globalMeshData/globalPoints.C index 7ecd1b84a13f924311e71813cd5239e9410de66b..b4333fc3a78f5bd236c11ac86e322772d86c3385 100644 --- a/src/OpenFOAM/meshes/polyMesh/globalMeshData/globalPoints.C +++ b/src/OpenFOAM/meshes/polyMesh/globalMeshData/globalPoints.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -339,6 +339,31 @@ bool Foam::globalPoints::storeInitialInfo } +void Foam::globalPoints::printProcPoint +( + const labelList& patchToMeshPoint, + const labelPair& pointInfo +) const +{ + label procI = globalIndexAndTransform::processor(pointInfo); + label index = globalIndexAndTransform::index(pointInfo); + label trafoI = globalIndexAndTransform::transformIndex(pointInfo); + + Pout<< " proc:" << procI; + Pout<< " localpoint:"; + Pout<< index; + Pout<< " through transform:" + << trafoI << " bits:" + << globalTransforms_.decodeTransformIndex(trafoI); + + if (procI == Pstream::myProcNo()) + { + label meshPointI = localToMeshPoint(patchToMeshPoint, index); + Pout<< " at:" << mesh_.points()[meshPointI]; + } +} + + void Foam::globalPoints::printProcPoints ( const labelList& patchToMeshPoint, @@ -347,23 +372,7 @@ void Foam::globalPoints::printProcPoints { forAll(pointInfo, i) { - label procI = globalIndexAndTransform::processor(pointInfo[i]); - label index = globalIndexAndTransform::index(pointInfo[i]); - label trafoI = globalIndexAndTransform::transformIndex(pointInfo[i]); - - Pout<< " proc:" << procI; - Pout<< " localpoint:"; - Pout<< index; - Pout<< " through transform:" - << trafoI << " bits:" - << globalTransforms_.decodeTransformIndex(trafoI); - - if (procI == Pstream::myProcNo()) - { - label meshPointI = localToMeshPoint(patchToMeshPoint, index); - Pout<< " at:" << mesh_.points()[meshPointI]; - } - + printProcPoint(patchToMeshPoint, pointInfo[i]); Pout<< endl; } } diff --git a/src/OpenFOAM/meshes/polyMesh/globalMeshData/globalPoints.H b/src/OpenFOAM/meshes/polyMesh/globalMeshData/globalPoints.H index daef012fe70d5b3b31349488ebfe3a5493ff43e9..de7a6b88d0f8b358f47c61761d640314ac410fae 100644 --- a/src/OpenFOAM/meshes/polyMesh/globalMeshData/globalPoints.H +++ b/src/OpenFOAM/meshes/polyMesh/globalMeshData/globalPoints.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -206,6 +206,12 @@ class globalPoints ); //- Debug printing + void printProcPoint + ( + const labelList& patchToMeshPoint, + const labelPair& pointInfo + ) const; + void printProcPoints ( const labelList& patchToMeshPoint, diff --git a/src/finiteVolume/interpolation/volPointInterpolation/volPointInterpolate.C b/src/finiteVolume/interpolation/volPointInterpolation/volPointInterpolate.C index 1e0aa90e4109ca4437d1703eed90973a84fd3380..0f2b751bbdcd86d46b43873dcf3e45dbc72d36a8 100644 --- a/src/finiteVolume/interpolation/volPointInterpolation/volPointInterpolate.C +++ b/src/finiteVolume/interpolation/volPointInterpolation/volPointInterpolate.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -51,8 +51,8 @@ void volPointInterpolation::syncUntransformedData const indirectPrimitivePatch& cpp = gmd.coupledPatch(); const labelList& meshPoints = cpp.meshPoints(); - const mapDistribute& slavesMap = gmd.globalPointSlavesMap(); - const labelListList& slaves = gmd.globalPointSlaves(); + const mapDistribute& slavesMap = gmd.globalCoPointSlavesMap(); + const labelListList& slaves = gmd.globalCoPointSlaves(); List<Type> elems(slavesMap.constructSize()); forAll(meshPoints, i) @@ -105,8 +105,8 @@ void volPointInterpolation::pushUntransformedData const indirectPrimitivePatch& cpp = gmd.coupledPatch(); const labelList& meshPoints = cpp.meshPoints(); - const mapDistribute& slavesMap = gmd.globalPointSlavesMap(); - const labelListList& slaves = gmd.globalPointSlaves(); + const mapDistribute& slavesMap = gmd.globalCoPointSlavesMap(); + const labelListList& slaves = gmd.globalCoPointSlaves(); List<Type> elems(slavesMap.constructSize()); forAll(meshPoints, i) @@ -155,14 +155,14 @@ void volPointInterpolation::addSeparated refCast<coupledPointPatchField<Type> > (pf.boundaryField()[patchI]).initSwapAddSeparated ( - Pstream::blocking, //Pstream::nonBlocking, + Pstream::nonBlocking, pf.internalField() ); } } // Block for any outstanding requests - //Pstream::waitRequests(); + Pstream::waitRequests(); forAll(pf.boundaryField(), patchI) { @@ -171,7 +171,7 @@ void volPointInterpolation::addSeparated refCast<coupledPointPatchField<Type> > (pf.boundaryField()[patchI]).swapAddSeparated ( - Pstream::blocking, //Pstream::nonBlocking, + Pstream::nonBlocking, pf.internalField() ); } @@ -306,7 +306,6 @@ void volPointInterpolation::interpolateBoundaryField } // Sum collocated contributions - //mesh().globalData().syncPointData(pfi, plusEqOp<Type>()); syncUntransformedData(pfi, plusEqOp<Type>()); // And add separated contributions @@ -314,9 +313,7 @@ void volPointInterpolation::interpolateBoundaryField // Push master data to slaves. It is possible (not sure how often) for // a coupled point to have its master on a different patch so - // to make sure just push master data to slaves. Reuse the syncPointData - // structure. - //mesh().globalData().syncPointData(pfi, nopEqOp<Type>()); + // to make sure just push master data to slaves. pushUntransformedData(pfi); diff --git a/src/finiteVolume/interpolation/volPointInterpolation/volPointInterpolation.C b/src/finiteVolume/interpolation/volPointInterpolation/volPointInterpolation.C index cb47e0a101c8dd554968c4e9ec5875776dcdfd5c..87305f2fa80f2fa5b6a210d2bef08f1137f76f7e 100644 --- a/src/finiteVolume/interpolation/volPointInterpolation/volPointInterpolation.C +++ b/src/finiteVolume/interpolation/volPointInterpolation/volPointInterpolation.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -113,10 +113,8 @@ void volPointInterpolation::calcBoundaryAddressing() { boolList oldData(isPatchPoint_); - //mesh().globalData().syncPointData(isPatchPoint_, orEqOp<bool>()); syncUntransformedData(isPatchPoint_, orEqOp<bool>()); - forAll(isPatchPoint_, pointI) { if (isPatchPoint_[pointI] != oldData[pointI]) @@ -272,7 +270,7 @@ void volPointInterpolation::makeWeights() makeInternalWeights(sumWeights); - // Create boundary weights; add to sumWeights + // Create boundary weights; override sumWeights makeBoundaryWeights(sumWeights); @@ -292,7 +290,6 @@ void volPointInterpolation::makeWeights() // Sum collocated contributions - //mesh().globalData().syncPointData(sumWeights, plusEqOp<scalar>()); syncUntransformedData(sumWeights, plusEqOp<scalar>()); // And add separated contributions @@ -302,7 +299,6 @@ void volPointInterpolation::makeWeights() // a coupled point to have its master on a different patch so // to make sure just push master data to slaves. Reuse the syncPointData // structure. - //mesh().globalData().syncPointData(sumWeights, nopEqOp<scalar>()); pushUntransformedData(sumWeights);