Merge remote-tracking branch 'remotes/origin/hotfix/faMeshDecom'
This commit is contained in:
commit
568e341348
2 changed files with 44 additions and 40 deletions
|
@ -910,8 +910,8 @@ int main(int argc, char *argv[])
|
||||||
|
|
||||||
IOobject faMeshBoundaryIOobj
|
IOobject faMeshBoundaryIOobj
|
||||||
(
|
(
|
||||||
"boundary",
|
"faBoundary",
|
||||||
mesh.time().findInstance(mesh.dbDir()/fvMesh::meshSubDir, "boundary"),
|
mesh.time().findInstance(mesh.dbDir()/faMesh::meshSubDir, "faBoundary"),
|
||||||
faMesh::meshSubDir,
|
faMesh::meshSubDir,
|
||||||
mesh,
|
mesh,
|
||||||
IOobject::MUST_READ,
|
IOobject::MUST_READ,
|
||||||
|
|
|
@ -62,7 +62,9 @@ void faMeshDecomposition::distributeFaces()
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
labelIOList faceProcAddressing
|
labelHashSet faceProcAddressingHash
|
||||||
|
(
|
||||||
|
labelIOList
|
||||||
(
|
(
|
||||||
IOobject
|
IOobject
|
||||||
(
|
(
|
||||||
|
@ -73,11 +75,12 @@ void faMeshDecomposition::distributeFaces()
|
||||||
IOobject::MUST_READ,
|
IOobject::MUST_READ,
|
||||||
IOobject::NO_WRITE
|
IOobject::NO_WRITE
|
||||||
)
|
)
|
||||||
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
forAll (faceLabels(), faceI)
|
forAll (faceLabels(), faceI)
|
||||||
{
|
{
|
||||||
if (findIndex(faceProcAddressing, faceLabels()[faceI] + 1) > -1)
|
if (faceProcAddressingHash.found(faceLabels()[faceI] + 1))
|
||||||
{
|
{
|
||||||
faceToProc_[faceI] = procI;
|
faceToProc_[faceI] = procI;
|
||||||
}
|
}
|
||||||
|
@ -209,6 +212,9 @@ void faMeshDecomposition::decomposeMesh(const bool filterEmptyPatches)
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
HashTable<label, label, Hash<label> > fvFaceProcAddressingHash;
|
||||||
|
|
||||||
|
{
|
||||||
labelIOList fvFaceProcAddressing
|
labelIOList fvFaceProcAddressing
|
||||||
(
|
(
|
||||||
IOobject
|
IOobject
|
||||||
|
@ -222,6 +228,15 @@ void faMeshDecomposition::decomposeMesh(const bool filterEmptyPatches)
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
forAll(fvFaceProcAddressing, faceI)
|
||||||
|
{
|
||||||
|
fvFaceProcAddressingHash.insert
|
||||||
|
(
|
||||||
|
fvFaceProcAddressing[faceI], faceI
|
||||||
|
);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
const labelList& curProcFaceAddressing = procFaceAddressing_[procI];
|
const labelList& curProcFaceAddressing = procFaceAddressing_[procI];
|
||||||
|
|
||||||
labelList& curFaceLabels = procFaceLabels_[procI];
|
labelList& curFaceLabels = procFaceLabels_[procI];
|
||||||
|
@ -231,11 +246,10 @@ void faMeshDecomposition::decomposeMesh(const bool filterEmptyPatches)
|
||||||
forAll(curProcFaceAddressing, faceI)
|
forAll(curProcFaceAddressing, faceI)
|
||||||
{
|
{
|
||||||
curFaceLabels[faceI] =
|
curFaceLabels[faceI] =
|
||||||
findIndex
|
fvFaceProcAddressingHash.find
|
||||||
(
|
(
|
||||||
fvFaceProcAddressing,
|
|
||||||
faceLabels()[curProcFaceAddressing[faceI]] + 1
|
faceLabels()[curProcFaceAddressing[faceI]] + 1
|
||||||
);
|
)();
|
||||||
}
|
}
|
||||||
|
|
||||||
// create processor finite area mesh
|
// create processor finite area mesh
|
||||||
|
@ -248,8 +262,7 @@ void faMeshDecomposition::decomposeMesh(const bool filterEmptyPatches)
|
||||||
const indirectPrimitivePatch& patch = this->patch();
|
const indirectPrimitivePatch& patch = this->patch();
|
||||||
const Map<label>& map = patch.meshPointMap();
|
const Map<label>& map = patch.meshPointMap();
|
||||||
|
|
||||||
// const edgeList& edges = aMesh.edges();
|
HashTable<label, edge, Hash<edge> > edgesHash;
|
||||||
edgeList edges(patch.nEdges());
|
|
||||||
|
|
||||||
label edgeI = -1;
|
label edgeI = -1;
|
||||||
|
|
||||||
|
@ -257,8 +270,7 @@ void faMeshDecomposition::decomposeMesh(const bool filterEmptyPatches)
|
||||||
|
|
||||||
for (label curEdge = 0; curEdge < nIntEdges; curEdge++)
|
for (label curEdge = 0; curEdge < nIntEdges; curEdge++)
|
||||||
{
|
{
|
||||||
edges[++edgeI] =
|
edgesHash.insert(patch.edges()[curEdge], ++edgeI);
|
||||||
patch.edges()[curEdge];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
forAll (boundary(), patchI)
|
forAll (boundary(), patchI)
|
||||||
|
@ -269,8 +281,7 @@ void faMeshDecomposition::decomposeMesh(const bool filterEmptyPatches)
|
||||||
|
|
||||||
for(int eI=0; eI<size; eI++)
|
for(int eI=0; eI<size; eI++)
|
||||||
{
|
{
|
||||||
edges[++edgeI] =
|
edgesHash.insert(patch.edges()[boundary()[patchI][eI]], ++edgeI);
|
||||||
patch.edges()[boundary()[patchI][eI]];
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -298,14 +309,7 @@ void faMeshDecomposition::decomposeMesh(const bool filterEmptyPatches)
|
||||||
curGlobalEdge[0] = curPatchPointAddressing[curGlobalEdge[0]];
|
curGlobalEdge[0] = curPatchPointAddressing[curGlobalEdge[0]];
|
||||||
curGlobalEdge[1] = curPatchPointAddressing[curGlobalEdge[1]];
|
curGlobalEdge[1] = curPatchPointAddressing[curGlobalEdge[1]];
|
||||||
|
|
||||||
forAll(edges, gEdgeI)
|
curPatchEdgeAddressing[edgeI] = edgesHash.find(curGlobalEdge)();
|
||||||
{
|
|
||||||
if(edges[gEdgeI]==curGlobalEdge)
|
|
||||||
{
|
|
||||||
curPatchEdgeAddressing[edgeI] = gEdgeI;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Map<label>& curMap = procMeshEdgesMap_[procI];
|
Map<label>& curMap = procMeshEdgesMap_[procI];
|
||||||
|
|
Reference in a new issue