Skip to content
Snippets Groups Projects
Commit 2d26d4b2 authored by mattijs's avatar mattijs
Browse files

STYLE: cyclicAMI: add non-blocking for GAMG. See #3052

parent 872a8b77
Branches
Tags
No related merge requests found
...@@ -68,8 +68,8 @@ Foam::cyclicACMIGAMGInterfaceField::cyclicACMIGAMGInterfaceField ...@@ -68,8 +68,8 @@ Foam::cyclicACMIGAMGInterfaceField::cyclicACMIGAMGInterfaceField
cyclicACMIInterface_(refCast<const cyclicACMIGAMGInterface>(GAMGCp)), cyclicACMIInterface_(refCast<const cyclicACMIGAMGInterface>(GAMGCp)),
doTransform_(false), doTransform_(false),
rank_(0), rank_(0),
sendRequests_(0), sendRequests_(),
recvRequests_(0) recvRequests_()
{ {
const cyclicAMILduInterfaceField& p = const cyclicAMILduInterfaceField& p =
refCast<const cyclicAMILduInterfaceField>(fineInterface); refCast<const cyclicAMILduInterfaceField>(fineInterface);
...@@ -90,8 +90,8 @@ Foam::cyclicACMIGAMGInterfaceField::cyclicACMIGAMGInterfaceField ...@@ -90,8 +90,8 @@ Foam::cyclicACMIGAMGInterfaceField::cyclicACMIGAMGInterfaceField
cyclicACMIInterface_(refCast<const cyclicACMIGAMGInterface>(GAMGCp)), cyclicACMIInterface_(refCast<const cyclicACMIGAMGInterface>(GAMGCp)),
doTransform_(doTransform), doTransform_(doTransform),
rank_(rank), rank_(rank),
sendRequests_(0), sendRequests_(),
recvRequests_(0) recvRequests_()
{} {}
...@@ -105,8 +105,8 @@ Foam::cyclicACMIGAMGInterfaceField::cyclicACMIGAMGInterfaceField ...@@ -105,8 +105,8 @@ Foam::cyclicACMIGAMGInterfaceField::cyclicACMIGAMGInterfaceField
cyclicACMIInterface_(refCast<const cyclicACMIGAMGInterface>(GAMGCp)), cyclicACMIInterface_(refCast<const cyclicACMIGAMGInterface>(GAMGCp)),
doTransform_(readBool(is)), doTransform_(readBool(is)),
rank_(readLabel(is)), rank_(readLabel(is)),
sendRequests_(0), sendRequests_(),
recvRequests_(0) recvRequests_()
{} {}
...@@ -121,8 +121,8 @@ Foam::cyclicACMIGAMGInterfaceField::cyclicACMIGAMGInterfaceField ...@@ -121,8 +121,8 @@ Foam::cyclicACMIGAMGInterfaceField::cyclicACMIGAMGInterfaceField
cyclicACMIInterface_(refCast<const cyclicACMIGAMGInterface>(GAMGCp)), cyclicACMIInterface_(refCast<const cyclicACMIGAMGInterface>(GAMGCp)),
doTransform_(false), doTransform_(false),
rank_(0), rank_(0),
sendRequests_(0), sendRequests_(),
recvRequests_(0) recvRequests_()
{ {
const auto& p = refCast<const cyclicACMILduInterfaceField>(local); const auto& p = refCast<const cyclicACMILduInterfaceField>(local);
...@@ -219,8 +219,7 @@ void Foam::cyclicACMIGAMGInterfaceField::initInterfaceMatrixUpdate ...@@ -219,8 +219,7 @@ void Foam::cyclicACMIGAMGInterfaceField::initInterfaceMatrixUpdate
// Insert send/receive requests (non-blocking). See e.g. // Insert send/receive requests (non-blocking). See e.g.
// cyclicAMIPolyPatchTemplates.C // cyclicAMIPolyPatchTemplates.C
const label oldWarnComm = UPstream::warnComm; const label oldWarnComm = UPstream::commWarn(AMI.comm());
UPstream::warnComm = AMI.comm();
map.send map.send
( (
pnf, pnf,
...@@ -229,7 +228,7 @@ void Foam::cyclicACMIGAMGInterfaceField::initInterfaceMatrixUpdate ...@@ -229,7 +228,7 @@ void Foam::cyclicACMIGAMGInterfaceField::initInterfaceMatrixUpdate
recvRequests_, recvRequests_,
scalarRecvBufs_ scalarRecvBufs_
); );
UPstream::warnComm = oldWarnComm; UPstream::commWarn(oldWarnComm);
} }
} }
......
...@@ -68,8 +68,8 @@ Foam::cyclicAMIGAMGInterfaceField::cyclicAMIGAMGInterfaceField ...@@ -68,8 +68,8 @@ Foam::cyclicAMIGAMGInterfaceField::cyclicAMIGAMGInterfaceField
cyclicAMIInterface_(refCast<const cyclicAMIGAMGInterface>(GAMGCp)), cyclicAMIInterface_(refCast<const cyclicAMIGAMGInterface>(GAMGCp)),
doTransform_(false), doTransform_(false),
rank_(0), rank_(0),
sendRequests_(0), sendRequests_(),
recvRequests_(0) recvRequests_()
{ {
const cyclicAMILduInterfaceField& p = const cyclicAMILduInterfaceField& p =
refCast<const cyclicAMILduInterfaceField>(fineInterface); refCast<const cyclicAMILduInterfaceField>(fineInterface);
...@@ -90,8 +90,8 @@ Foam::cyclicAMIGAMGInterfaceField::cyclicAMIGAMGInterfaceField ...@@ -90,8 +90,8 @@ Foam::cyclicAMIGAMGInterfaceField::cyclicAMIGAMGInterfaceField
cyclicAMIInterface_(refCast<const cyclicAMIGAMGInterface>(GAMGCp)), cyclicAMIInterface_(refCast<const cyclicAMIGAMGInterface>(GAMGCp)),
doTransform_(doTransform), doTransform_(doTransform),
rank_(rank), rank_(rank),
sendRequests_(0), sendRequests_(),
recvRequests_(0) recvRequests_()
{} {}
...@@ -105,8 +105,8 @@ Foam::cyclicAMIGAMGInterfaceField::cyclicAMIGAMGInterfaceField ...@@ -105,8 +105,8 @@ Foam::cyclicAMIGAMGInterfaceField::cyclicAMIGAMGInterfaceField
cyclicAMIInterface_(refCast<const cyclicAMIGAMGInterface>(GAMGCp)), cyclicAMIInterface_(refCast<const cyclicAMIGAMGInterface>(GAMGCp)),
doTransform_(readBool(is)), doTransform_(readBool(is)),
rank_(readLabel(is)), rank_(readLabel(is)),
sendRequests_(0), sendRequests_(),
recvRequests_(0) recvRequests_()
{} {}
...@@ -121,8 +121,8 @@ Foam::cyclicAMIGAMGInterfaceField::cyclicAMIGAMGInterfaceField ...@@ -121,8 +121,8 @@ Foam::cyclicAMIGAMGInterfaceField::cyclicAMIGAMGInterfaceField
cyclicAMIInterface_(refCast<const cyclicAMIGAMGInterface>(GAMGCp)), cyclicAMIInterface_(refCast<const cyclicAMIGAMGInterface>(GAMGCp)),
doTransform_(false), doTransform_(false),
rank_(0), rank_(0),
sendRequests_(0), // assume no requests in flight for input field sendRequests_(), // assume no requests in flight for input field
recvRequests_(0) recvRequests_()
{ {
const auto& p = refCast<const cyclicAMILduInterfaceField>(local); const auto& p = refCast<const cyclicAMILduInterfaceField>(local);
...@@ -220,8 +220,7 @@ void Foam::cyclicAMIGAMGInterfaceField::initInterfaceMatrixUpdate ...@@ -220,8 +220,7 @@ void Foam::cyclicAMIGAMGInterfaceField::initInterfaceMatrixUpdate
// Insert send/receive requests (non-blocking). See e.g. // Insert send/receive requests (non-blocking). See e.g.
// cyclicAMIPolyPatchTemplates.C // cyclicAMIPolyPatchTemplates.C
const label oldWarnComm = UPstream::warnComm; const label oldWarnComm = UPstream::commWarn(AMI.comm());
UPstream::warnComm = AMI.comm();
map.send map.send
( (
pnf, pnf,
...@@ -230,7 +229,7 @@ void Foam::cyclicAMIGAMGInterfaceField::initInterfaceMatrixUpdate ...@@ -230,7 +229,7 @@ void Foam::cyclicAMIGAMGInterfaceField::initInterfaceMatrixUpdate
recvRequests_, recvRequests_,
scalarRecvBufs_ scalarRecvBufs_
); );
UPstream::warnComm = oldWarnComm; UPstream::commWarn(oldWarnComm);
} }
} }
...@@ -314,10 +313,6 @@ void Foam::cyclicAMIGAMGInterfaceField::updateInterfaceMatrix ...@@ -314,10 +313,6 @@ void Foam::cyclicAMIGAMGInterfaceField::updateInterfaceMatrix
// Transform according to the transformation tensors // Transform according to the transformation tensors
transformCoupleField(work, cmpt); transformCoupleField(work, cmpt);
// Switch on warning if using wrong communicator. Can be removed if
// sure all is correct
UPstream::warnComm = AMI.comm();
solveScalarField pnf(faceCells.size(), Zero); solveScalarField pnf(faceCells.size(), Zero);
AMI.weightedSum AMI.weightedSum
( (
......
...@@ -22,7 +22,7 @@ solvers ...@@ -22,7 +22,7 @@ solvers
tolerance 1e-2; tolerance 1e-2;
relTol 0; relTol 0;
smoother GaussSeidel; smoother GaussSeidel;
cacheAgglomeration no; //cacheAgglomeration no; // keep agglom during pimple
maxIter 50; maxIter 50;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment