GAMG: removed warnComm

This commit is contained in:
Henry Weller 2017-09-01 16:43:24 +01:00
parent 437961d247
commit a36ee338ae
6 changed files with 3 additions and 53 deletions

View file

@ -374,10 +374,6 @@ void Foam::GAMGAgglomeration::procAgglomerateLduAddressing
const lduMesh& myMesh = meshLevels_[levelIndex-1]; const lduMesh& myMesh = meshLevels_[levelIndex-1];
label oldWarn = UPstream::warnComm;
UPstream::warnComm = meshComm;
procAgglomMap_.set(levelIndex, new labelList(procAgglomMap)); procAgglomMap_.set(levelIndex, new labelList(procAgglomMap));
agglomProcIDs_.set(levelIndex, new labelList(procIDs)); agglomProcIDs_.set(levelIndex, new labelList(procIDs));
procCommunicator_[levelIndex] = allMeshComm; procCommunicator_[levelIndex] = allMeshComm;
@ -435,8 +431,6 @@ void Foam::GAMGAgglomeration::procAgglomerateLduAddressing
{ {
clearLevel(levelIndex); clearLevel(levelIndex);
} }
UPstream::warnComm = oldWarn;
} }

View file

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -253,13 +253,6 @@ Foam::GAMGSolver::GAMGSolver
if (matrixLevels_.set(coarsestLevel)) if (matrixLevels_.set(coarsestLevel))
{ {
const lduMesh& coarsestMesh =
matrixLevels_[coarsestLevel].mesh();
label coarseComm = coarsestMesh.comm();
label oldWarn = UPstream::warnComm;
UPstream::warnComm = coarseComm;
coarsestLUMatrixPtr_.set coarsestLUMatrixPtr_.set
( (
new LUscalarMatrix new LUscalarMatrix
@ -269,8 +262,6 @@ Foam::GAMGSolver::GAMGSolver
interfaceLevels_[coarsestLevel] interfaceLevels_[coarsestLevel]
) )
); );
UPstream::warnComm = oldWarn;
} }
} }
} }

View file

@ -433,14 +433,8 @@ void Foam::GAMGSolver::procAgglomerateMatrix
interfaceLevelsIntCoeffs_[levelI]; interfaceLevelsIntCoeffs_[levelI];
const lduMesh& coarsestMesh = coarsestMatrix.mesh(); const lduMesh& coarsestMesh = coarsestMatrix.mesh();
label coarseComm = coarsestMesh.comm(); label coarseComm = coarsestMesh.comm();
label oldWarn = UPstream::warnComm;
UPstream::warnComm = coarseComm;
// Gather all matrix coefficients onto agglomProcIDs[0] // Gather all matrix coefficients onto agglomProcIDs[0]
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@ -731,7 +725,6 @@ void Foam::GAMGSolver::procAgglomerateMatrix
// } // }
//} //}
} }
UPstream::warnComm = oldWarn;
} }

View file

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -556,8 +556,6 @@ void Foam::GAMGSolver::solveCoarsestLevel
const label coarsestLevel = matrixLevels_.size() - 1; const label coarsestLevel = matrixLevels_.size() - 1;
label coarseComm = matrixLevels_[coarsestLevel].mesh().comm(); label coarseComm = matrixLevels_[coarsestLevel].mesh().comm();
label oldWarn = UPstream::warnComm;
UPstream::warnComm = coarseComm;
if (directSolveCoarsest_) if (directSolveCoarsest_)
{ {
@ -595,9 +593,6 @@ void Foam::GAMGSolver::solveCoarsestLevel
// //solverPerformance coarseSolverPerf; // //solverPerformance coarseSolverPerf;
// //
// label solveComm = agglomeration_.procCommunicator(coarsestLevel); // label solveComm = agglomeration_.procCommunicator(coarsestLevel);
// label oldWarn = UPstream::warnComm;
// UPstream::warnComm = solveComm;
//
// //
// coarsestCorrField = 0; // coarsestCorrField = 0;
// solverPerformance coarseSolverPerf; // solverPerformance coarseSolverPerf;
@ -645,7 +640,6 @@ void Foam::GAMGSolver::solveCoarsestLevel
// } // }
// } // }
// //
// UPstream::warnComm = oldWarn;
// Pout<< "done master solve." << endl; // Pout<< "done master solve." << endl;
// //
// //// Scatter to all processors // //// Scatter to all processors
@ -709,8 +703,6 @@ void Foam::GAMGSolver::solveCoarsestLevel
coarseSolverPerf.print(Info.masterStream(coarseComm)); coarseSolverPerf.print(Info.masterStream(coarseComm));
} }
} }
UPstream::warnComm = oldWarn;
} }

View file

@ -99,9 +99,6 @@ void Foam::processorGAMGInterfaceField::initInterfaceMatrixUpdate
const Pstream::commsTypes commsType const Pstream::commsTypes commsType
) const ) const
{ {
label oldWarn = UPstream::warnComm;
UPstream::warnComm = comm();
procInterface_.interfaceInternalField(psiInternal, scalarSendBuf_); procInterface_.interfaceInternalField(psiInternal, scalarSendBuf_);
if if
@ -140,8 +137,6 @@ void Foam::processorGAMGInterfaceField::initInterfaceMatrixUpdate
} }
const_cast<processorGAMGInterfaceField&>(*this).updatedMatrix() = false; const_cast<processorGAMGInterfaceField&>(*this).updatedMatrix() = false;
UPstream::warnComm = oldWarn;
} }
@ -159,9 +154,6 @@ void Foam::processorGAMGInterfaceField::updateInterfaceMatrix
return; return;
} }
label oldWarn = UPstream::warnComm;
UPstream::warnComm = comm();
const labelUList& faceCells = procInterface_.faceCells(); const labelUList& faceCells = procInterface_.faceCells();
if if
@ -209,8 +201,6 @@ void Foam::processorGAMGInterfaceField::updateInterfaceMatrix
} }
const_cast<processorGAMGInterfaceField&>(*this).updatedMatrix() = true; const_cast<processorGAMGInterfaceField&>(*this).updatedMatrix() = true;
UPstream::warnComm = oldWarn;
} }

View file

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -195,12 +195,7 @@ void Foam::processorGAMGInterface::initInternalFieldTransfer
const labelUList& iF const labelUList& iF
) const ) const
{ {
label oldWarn = UPstream::warnComm;
UPstream::warnComm = comm();
send(commsType, interfaceInternalField(iF)()); send(commsType, interfaceInternalField(iF)());
UPstream::warnComm = oldWarn;
} }
@ -210,13 +205,8 @@ Foam::tmp<Foam::labelField> Foam::processorGAMGInterface::internalFieldTransfer
const labelUList& iF const labelUList& iF
) const ) const
{ {
label oldWarn = UPstream::warnComm;
UPstream::warnComm = comm();
tmp<Field<label>> tfld(receive<label>(commsType, this->size())); tmp<Field<label>> tfld(receive<label>(commsType, this->size()));
UPstream::warnComm = oldWarn;
return tfld; return tfld;
} }