Commit 4212b115 authored by mattijs's avatar mattijs
Browse files

BUG: LUscalarMatrix : assembly of master proc matrix

With processorCyclics there can now be multiple interfaces between two processors
parent d9126948
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -260,6 +260,11 @@ void Foam::LUscalarMatrix::convert
}
else if (interface.myProcNo_ < interface.neighbProcNo_)
{
// Interface to neighbour proc. Find on neighbour proc the
// corresponding interface. The problem is that there can
// be multiple interfaces between two processors (from
// processorCyclics) so also compare the communication tag
const PtrList<procLduInterface>& neiInterfaces =
lduMatrices[interface.neighbProcNo_].interfaces_;
......@@ -269,8 +274,11 @@ void Foam::LUscalarMatrix::convert
{
if
(
neiInterfaces[ninti].neighbProcNo_
== interface.myProcNo_
(
neiInterfaces[ninti].neighbProcNo_
== interface.myProcNo_
)
&& (neiInterfaces[ninti].tag_ == interface.tag_)
)
{
neiInterfacei = ninti;
......
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -39,7 +39,8 @@ Foam::procLduInterface::procLduInterface
faceCells_(interface.interface().faceCells()),
coeffs_(coeffs),
myProcNo_(-1),
neighbProcNo_(-1)
neighbProcNo_(-1),
tag_(-1)
{
if (isA<processorLduInterface>(interface.interface()))
{
......@@ -48,6 +49,7 @@ Foam::procLduInterface::procLduInterface
myProcNo_ = pldui.myProcNo();
neighbProcNo_ = pldui.neighbProcNo();
tag_ = pldui.tag();
}
else if (isA<cyclicLduInterface>(interface.interface()))
{
......@@ -70,7 +72,8 @@ Foam::procLduInterface::procLduInterface(Istream& is)
faceCells_(is),
coeffs_(is),
myProcNo_(readLabel(is)),
neighbProcNo_(readLabel(is))
neighbProcNo_(readLabel(is)),
tag_(readLabel(is))
{}
......@@ -81,7 +84,8 @@ Foam::Ostream& Foam::operator<<(Ostream& os, const procLduInterface& cldui)
os << cldui.faceCells_
<< cldui.coeffs_
<< cldui.myProcNo_
<< cldui.neighbProcNo_;
<< cldui.neighbProcNo_
<< cldui.tag_;
return os;
}
......
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -57,6 +57,7 @@ class procLduInterface
scalarField coeffs_;
label myProcNo_;
label neighbProcNo_;
label tag_;
// Private Member Functions
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment