diff --git a/src/OpenFOAM/db/IOobjects/IOdictionary/IOdictionaryIO.C b/src/OpenFOAM/db/IOobjects/IOdictionary/IOdictionaryIO.C index bd5c4cc598f7aa60223351ae2c7ea64050fa6b2a..d18a0e29342d0b46926698453f11ef0db1dcb218 100644 --- a/src/OpenFOAM/db/IOobjects/IOdictionary/IOdictionaryIO.C +++ b/src/OpenFOAM/db/IOobjects/IOdictionary/IOdictionaryIO.C @@ -105,6 +105,7 @@ void Foam::IOdictionary::readFile(const bool masterOnly) myComm.above(), 0, Pstream::msgType(), + Pstream::worldComm, IOstream::ASCII ); IOdictionary::readData(fromAbove); @@ -124,6 +125,7 @@ void Foam::IOdictionary::readFile(const bool masterOnly) myComm.below()[belowI], 0, Pstream::msgType(), + Pstream::worldComm, IOstream::ASCII ); IOdictionary::writeData(toBelow); diff --git a/src/OpenFOAM/db/regIOobject/regIOobjectRead.C b/src/OpenFOAM/db/regIOobject/regIOobjectRead.C index 91827479a44471338cd9ccdf439b621f5fec91af..bc950e518f2f61f552c2c2d98e53cf4b85db3faf 100644 --- a/src/OpenFOAM/db/regIOobject/regIOobjectRead.C +++ b/src/OpenFOAM/db/regIOobject/regIOobjectRead.C @@ -243,6 +243,7 @@ bool Foam::regIOobject::read() myComm.above(), 0, Pstream::msgType(), + Pstream::worldComm, IOstream::ASCII ); ok = readData(fromAbove); @@ -257,6 +258,7 @@ bool Foam::regIOobject::read() myComm.below()[belowI], 0, Pstream::msgType(), + Pstream::worldComm, IOstream::ASCII ); writeData(toBelow); diff --git a/src/OpenFOAM/fields/pointPatchFields/constraint/processorCyclic/processorCyclicPointPatchField.C b/src/OpenFOAM/fields/pointPatchFields/constraint/processorCyclic/processorCyclicPointPatchField.C index 6bea99a1bc998c4598358bb620f4b3c87b9e66c9..74707a9a93e8dfade08fbfcf13982c1e7b1b0165 100644 --- a/src/OpenFOAM/fields/pointPatchFields/constraint/processorCyclic/processorCyclicPointPatchField.C +++ b/src/OpenFOAM/fields/pointPatchFields/constraint/processorCyclic/processorCyclicPointPatchField.C @@ -122,7 +122,8 @@ void Foam::processorCyclicPointPatchField<Type>::initSwapAddSeparated procPatch_.neighbProcNo(), reinterpret_cast<char*>(receiveBuf_.begin()), receiveBuf_.byteSize(), - procPatch_.tag() + procPatch_.tag(), + procPatch_.comm() ); } OPstream::write @@ -131,7 +132,8 @@ void Foam::processorCyclicPointPatchField<Type>::initSwapAddSeparated procPatch_.neighbProcNo(), reinterpret_cast<const char*>(pf.begin()), pf.byteSize(), - procPatch_.tag() + procPatch_.tag(), + procPatch_.comm() ); } } @@ -156,7 +158,8 @@ void Foam::processorCyclicPointPatchField<Type>::swapAddSeparated procPatch_.neighbProcNo(), reinterpret_cast<char*>(receiveBuf_.begin()), receiveBuf_.byteSize(), - procPatch_.tag() + procPatch_.tag(), + procPatch_.comm() ); } diff --git a/src/OpenFOAM/meshes/pointMesh/pointPatches/constraint/processor/processorPointPatch.H b/src/OpenFOAM/meshes/pointMesh/pointPatches/constraint/processor/processorPointPatch.H index 992a5b0c24e7ab6848b62178f4991aceb40d0e59..da777d683c53287bc9ee0942c9c989919d8bd7ad 100644 --- a/src/OpenFOAM/meshes/pointMesh/pointPatches/constraint/processor/processorPointPatch.H +++ b/src/OpenFOAM/meshes/pointMesh/pointPatches/constraint/processor/processorPointPatch.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-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -134,6 +134,12 @@ public: return procPolyPatch_.tag(); } + //- Return communicator used for communication + virtual label comm() const + { + return procPolyPatch_.comm(); + } + //- Return the constraint type this pointPatch implements. virtual const word& constraintType() const { diff --git a/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/processor/processorPolyPatch.H b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/processor/processorPolyPatch.H index 3bd72a7cf260ddfd4d16ff20ce4aa7eda5dc7bc2..c5a6226dc89f895cc1811ca42b87057db27f68a1 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/processor/processorPolyPatch.H +++ b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/processor/processorPolyPatch.H @@ -246,14 +246,6 @@ public: } } - - //- Return communicator used for communication - label comm() const - { - //return comm_; - return boundaryMesh().mesh().comm(); - } - //- Return processor number int myProcNo() const { @@ -266,30 +258,6 @@ public: return neighbProcNo_; } - - // For testing - -// //- Return communicator used for communication -// label& comm() -// { -// return comm_; -// } - - //- Return processor number - int& myProcNo() - { - return myProcNo_; - } - - //- Return neigbour processor number - int& neighbProcNo() - { - return neighbProcNo_; - } - - - - //- Does the processor own the patch ? virtual bool owner() const { @@ -332,6 +300,12 @@ public: return Pstream::msgType(); } + //- Return communicator used for communication + virtual label comm() const + { + return boundaryMesh().mesh().comm(); + } + //- Transform a patch-based position from other side to this side virtual void transformPosition(pointField& l) const {}