Skip to content
Commits on Source (2)
......@@ -511,12 +511,13 @@ void Foam::petscSolver::buildMat
const globalIndex globalNumbering_(nrows_);
// Number of non-zeros from interfaces (on-processor or off-processor)
const label nReq = Pstream::nRequests();
label nProcValues = 0;
labelList globalCells
(
identity(globalNumbering_.range())
);
const label startOfRequests = UPstream::nRequests();
forAll(interfaces, patchi)
{
const lduInterface* intf = interfaces.set(patchi);
......@@ -566,9 +567,9 @@ void Foam::petscSolver::buildMat
*ptr_i++ = globRow;
*ptr_j++ = globCol;
}
if (Pstream::parRun())
if (UPstream::parRun())
{
Pstream::waitRequests(nReq);
UPstream::waitRequests(startOfRequests);
}
forAll(interfaces, patchi)
{
......@@ -905,6 +906,8 @@ void Foam::petscSolver::updateMat
// Connections to neighbouring processors
{
const label startOfRequests = UPstream::nRequests();
// Initialise transfer of global cells
forAll(interfaces, patchi)
{
......@@ -918,9 +921,9 @@ void Foam::petscSolver::updateMat
}
}
if (Pstream::parRun())
if (UPstream::parRun())
{
Pstream::waitRequests();
UPstream::waitRequests(startOfRequests);
}
forAll(interfaces, patchi)
......
......@@ -32,6 +32,12 @@ License
#include "petscUtils.H"
#include "petscLinearSolverContext.H"
// For older PETSc. Not strictly correct for 64-bit compilations,
// but adequate for transitional code
#ifndef PetscInt_FMT
#define PetscInt_FMT "D"
#endif
// * * * * * * * * * * * * * * * Global Functions * * * * * * * * * * * * * //
Foam::solveScalar Foam::gAverage(Vec input)
......