mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
BUG: polyMesh: update patchGroups when polyMesh::readUpdate
This commit is contained in:
@ -3,7 +3,7 @@
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -227,7 +227,8 @@ Foam::polyMesh::readUpdateState Foam::polyMesh::readUpdate()
|
||||
newBoundary[patchI].start(),
|
||||
patchI,
|
||||
boundary_,
|
||||
newBoundary[patchI].type()
|
||||
newBoundary[patchI].physicalType(),
|
||||
newBoundary[patchI].inGroups()
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -78,15 +78,43 @@ void Foam::polyMesh::updateMesh(const mapPolyMesh& mpm)
|
||||
newMotionPoints.setSize(points_.size());
|
||||
|
||||
// Map the list
|
||||
newMotionPoints.map(oldMotionPoints, mpm.pointMap());
|
||||
|
||||
// Any points created out-of-nothing get set to the current coordinate
|
||||
// for lack of anything better.
|
||||
forAll(mpm.pointMap(), newPointI)
|
||||
if (mpm.hasMotionPoints())
|
||||
{
|
||||
if (mpm.pointMap()[newPointI] == -1)
|
||||
newMotionPoints.map(oldMotionPoints, mpm.pointMap());
|
||||
|
||||
// Any points created out-of-nothing get set to the current
|
||||
// coordinate for lack of anything better.
|
||||
forAll(mpm.pointMap(), newPointI)
|
||||
{
|
||||
newMotionPoints[newPointI] = points_[newPointI];
|
||||
if (mpm.pointMap()[newPointI] == -1)
|
||||
{
|
||||
newMotionPoints[newPointI] = points_[newPointI];
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
const labelList& pointMap = mpm.pointMap();
|
||||
const labelList& revPointMap = mpm.reversePointMap();
|
||||
|
||||
forAll(pointMap, newPointI)
|
||||
{
|
||||
label oldPointI = pointMap[newPointI];
|
||||
if (oldPointI >= 0)
|
||||
{
|
||||
if (revPointMap[oldPointI] == newPointI) // master point
|
||||
{
|
||||
newMotionPoints[newPointI] = oldMotionPoints[oldPointI];
|
||||
}
|
||||
else
|
||||
{
|
||||
newMotionPoints[newPointI] = points_[newPointI];
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
newMotionPoints[newPointI] = points_[newPointI];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -107,6 +107,30 @@ Foam::polyPatch::polyPatch
|
||||
}
|
||||
|
||||
|
||||
Foam::polyPatch::polyPatch
|
||||
(
|
||||
const word& name,
|
||||
const label size,
|
||||
const label start,
|
||||
const label index,
|
||||
const polyBoundaryMesh& bm,
|
||||
const word& physicalType,
|
||||
const wordList& inGroups
|
||||
)
|
||||
:
|
||||
patchIdentifier(name, index, physicalType, inGroups),
|
||||
primitivePatch
|
||||
(
|
||||
faceSubList(bm.mesh().faces(), size, start),
|
||||
bm.mesh().points()
|
||||
),
|
||||
start_(start),
|
||||
boundaryMesh_(bm),
|
||||
faceCellsPtr_(NULL),
|
||||
mePtr_(NULL)
|
||||
{}
|
||||
|
||||
|
||||
Foam::polyPatch::polyPatch
|
||||
(
|
||||
const word& name,
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -179,6 +179,18 @@ public:
|
||||
const word& patchType
|
||||
);
|
||||
|
||||
//- Construct from components
|
||||
polyPatch
|
||||
(
|
||||
const word& name,
|
||||
const label size,
|
||||
const label start,
|
||||
const label index,
|
||||
const polyBoundaryMesh& bm,
|
||||
const word& physicalType,
|
||||
const wordList& inGroups
|
||||
);
|
||||
|
||||
//- Construct from dictionary
|
||||
polyPatch
|
||||
(
|
||||
|
||||
Reference in New Issue
Block a user