domainDecomposition: Correct stitcher construction on read-update

This commit is contained in:
Will Bainbridge
2024-03-14 16:26:17 +00:00
parent 745572e808
commit 81c2c42ca4
3 changed files with 13 additions and 27 deletions

View File

@ -109,6 +109,8 @@ void Foam::domainDecomposition::readComplete()
false false
) )
); );
completeMesh_->postConstruct(false, fvMesh::stitchType::none);
} }
@ -132,6 +134,8 @@ void Foam::domainDecomposition::readProcs()
false false
) )
); );
procMeshes_[proci].postConstruct(false, fvMesh::stitchType::none);
} }
} }
@ -516,12 +520,7 @@ bool Foam::domainDecomposition::readDecompose()
void Foam::domainDecomposition::postReadDecompose() void Foam::domainDecomposition::postReadDecompose()
{ {
completeMesh_->postConstruct(false, fvMesh::stitchType::nonGeometric); completeMesh_->stitcher().connect(false, false, true);
forAll(procMeshes_, proci)
{
procMeshes_[proci].postConstruct(false, fvMesh::stitchType::none);
}
} }
@ -663,15 +662,9 @@ bool Foam::domainDecomposition::readReconstruct()
void Foam::domainDecomposition::postReadReconstruct() void Foam::domainDecomposition::postReadReconstruct()
{ {
completeMesh_->postConstruct(false, fvMesh::stitchType::none);
forAll(procMeshes_, proci) forAll(procMeshes_, proci)
{ {
procMeshes_[proci].postConstruct procMeshes_[proci].stitcher().connect(false, false, true);
(
false,
fvMesh::stitchType::nonGeometric
);
} }
} }
@ -776,14 +769,6 @@ void Foam::domainDecomposition::postReadUpdateDecompose
const fvMesh::readUpdateState stat const fvMesh::readUpdateState stat
) )
{ {
if (stat >= fvMesh::TOPO_CHANGE)
{
forAll(procMeshes_, proci)
{
procMeshes_[proci].postConstruct(false, fvMesh::stitchType::none);
}
}
if (completeMesh_->stitcher().stitches() && stat != fvMesh::UNCHANGED) if (completeMesh_->stitcher().stitches() && stat != fvMesh::UNCHANGED)
{ {
procFaceAddressingBf_.clear(); procFaceAddressingBf_.clear();
@ -883,11 +868,6 @@ void Foam::domainDecomposition::postReadUpdateReconstruct
const fvMesh::readUpdateState stat const fvMesh::readUpdateState stat
) )
{ {
if (stat >= fvMesh::TOPO_CHANGE)
{
completeMesh_->postConstruct(false, fvMesh::stitchType::none);
}
if (completeMesh_->stitcher().stitches() && stat != fvMesh::UNCHANGED) if (completeMesh_->stitcher().stitches() && stat != fvMesh::UNCHANGED)
{ {
procFaceAddressingBf_.clear(); procFaceAddressingBf_.clear();

View File

@ -930,6 +930,9 @@ void Foam::domainDecomposition::decompose()
// Add patches to the mesh // Add patches to the mesh
procMesh.addFvPatches(procPatches); procMesh.addFvPatches(procPatches);
// Allocate a stitcher, but do not stitch
procMesh.postConstruct(false, fvMesh::stitchType::none);
// Create point zones // Create point zones
{ {
const meshPointZones& pz = completeMesh().pointZones(); const meshPointZones& pz = completeMesh().pointZones();

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -516,6 +516,9 @@ void Foam::domainDecomposition::reconstruct()
completeMesh_->setInstance(procMeshes()[0].facesInstance()); completeMesh_->setInstance(procMeshes()[0].facesInstance());
completeMesh_->setPointsInstance(procMeshes()[0].pointsInstance()); completeMesh_->setPointsInstance(procMeshes()[0].pointsInstance());
// Allocate a stitcher, but do not stitch
completeMesh_->postConstruct(false, fvMesh::stitchType::none);
Info<< decrIndent; Info<< decrIndent;
} }