Update points using setOldPoints to avoid geometrical update
This commit is contained in:
parent
171fdf38f6
commit
2c88222c95
6 changed files with 74 additions and 26 deletions
|
@ -363,26 +363,52 @@ bool Foam::linearValveFvMesh::update()
|
|||
|
||||
Info << "Moving points post slider attach" << endl;
|
||||
|
||||
if (topoChangeMap3->morphing())
|
||||
bool localMorphing3 = topoChangeMap3->morphing();
|
||||
bool globalMorphing3 = localMorphing3;
|
||||
|
||||
reduce(globalMorphing3, orOp<bool>());
|
||||
|
||||
if (globalMorphing3)
|
||||
{
|
||||
msPtr_->updateMesh(topoChangeMap3());
|
||||
|
||||
if (debug)
|
||||
{
|
||||
Info << "Moving points post slider attach" << endl;
|
||||
}
|
||||
|
||||
pointField newPoints = allPoints();
|
||||
pointField mappedOldPointsNew(newPoints.size());
|
||||
|
||||
mappedOldPointsNew.map(oldPointsNew, topoChangeMap3->pointMap());
|
||||
if (localMorphing3)
|
||||
{
|
||||
msPtr_->updateMesh(topoChangeMap3());
|
||||
|
||||
// Solve the correct mesh motion to make sure motion fluxes
|
||||
// are solved for and not mapped
|
||||
movePoints(mappedOldPointsNew);
|
||||
resetMotion();
|
||||
setV0();
|
||||
movePoints(newPoints);
|
||||
pointField mappedOldPointsNew(newPoints.size());
|
||||
|
||||
mappedOldPointsNew.map
|
||||
(
|
||||
oldPointsNew,
|
||||
topoChangeMap3->pointMap()
|
||||
);
|
||||
|
||||
// Solve the correct mesh motion to make sure motion fluxes
|
||||
// are solved for and not mapped
|
||||
// Note: using setOldPoints instead of movePoints.
|
||||
// HJ, 23/Aug/2015
|
||||
setOldPoints(mappedOldPointsNew);
|
||||
|
||||
resetMotion();
|
||||
setV0();
|
||||
|
||||
fvMesh::movePoints(newPoints);
|
||||
}
|
||||
else
|
||||
{
|
||||
// No local topological change. Execute double motion for
|
||||
// sync with topological changes
|
||||
// Note: using setOldPoints instead of movePoints.
|
||||
// HJ, 23/Aug/2015
|
||||
setOldPoints(oldPointsNew);
|
||||
|
||||
resetMotion();
|
||||
setV0();
|
||||
|
||||
// Set new point motion
|
||||
fvMesh::movePoints(newPoints);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -532,12 +532,16 @@ bool Foam::linearValveLayersFvMesh::update()
|
|||
if (localMorphing2)
|
||||
{
|
||||
Info << "Topology change; executing pre-motion" << endl;
|
||||
movePoints(topoChangeMap2->preMotionPoints());
|
||||
// Note: using setOldPoints instead of movePoints.
|
||||
// HJ, 23/Aug/2015
|
||||
setOldPoints(topoChangeMap2->preMotionPoints());
|
||||
newPoints = topoChangeMap2->preMotionPoints();
|
||||
}
|
||||
else
|
||||
{
|
||||
movePoints(newPoints);
|
||||
// Note: using setOldPoints instead of movePoints.
|
||||
// HJ, 23/Aug/2015
|
||||
setOldPoints(newPoints);
|
||||
}
|
||||
|
||||
setV0();
|
||||
|
@ -589,7 +593,9 @@ bool Foam::linearValveLayersFvMesh::update()
|
|||
|
||||
// Solve the correct mesh motion to make sure motion fluxes
|
||||
// are solved for and not mapped
|
||||
movePoints(mappedOldPointsNew);
|
||||
// Note: using setOldPoints instead of movePoints.
|
||||
// HJ, 23/Aug/2015
|
||||
setOldPoints(mappedOldPointsNew);
|
||||
|
||||
resetMotion();
|
||||
setV0();
|
||||
|
@ -601,7 +607,9 @@ bool Foam::linearValveLayersFvMesh::update()
|
|||
{
|
||||
// No local topological change. Execute double motion for
|
||||
// sync with topological changes
|
||||
movePoints(oldPointsNew);
|
||||
// Note: using setOldPoints instead of movePoints.
|
||||
// HJ, 23/Aug/2015
|
||||
setOldPoints(oldPointsNew);
|
||||
|
||||
resetMotion();
|
||||
setV0();
|
||||
|
|
|
@ -477,7 +477,9 @@ bool Foam::mixerFvMesh::update()
|
|||
pointField mappedOldPointsNew(allPoints().size());
|
||||
mappedOldPointsNew.map(oldPointsNew, topoChangeMap->pointMap());
|
||||
|
||||
movePoints(mappedOldPointsNew);
|
||||
// Note: using setOldPoints instead of movePoints.
|
||||
// HJ, 23/Aug/2015
|
||||
setOldPoints(mappedOldPointsNew);
|
||||
|
||||
resetMotion();
|
||||
setV0();
|
||||
|
@ -488,7 +490,10 @@ bool Foam::mixerFvMesh::update()
|
|||
else
|
||||
{
|
||||
pointField newPoints = allPoints();
|
||||
movePoints(oldPointsNew);
|
||||
|
||||
// Note: using setOldPoints instead of movePoints.
|
||||
// HJ, 23/Aug/2015
|
||||
setOldPoints(oldPointsNew);
|
||||
|
||||
resetMotion();
|
||||
setV0();
|
||||
|
|
|
@ -276,7 +276,9 @@ bool Foam::movingBodyTopoFvMesh::update()
|
|||
// pointField mappedOldPointsNew(allPoints().size());
|
||||
// mappedOldPointsNew.map(oldPointsNew, topoChangeMap->pointMap());
|
||||
|
||||
// movePoints(mappedOldPointsNew);
|
||||
// // Note: using setOldPoints instead of movePoints.
|
||||
// // HJ, 23/Aug/2015
|
||||
// setOldPoints(mappedOldPointsNew);
|
||||
// resetMotion();
|
||||
// setV0();
|
||||
|
||||
|
@ -286,7 +288,9 @@ bool Foam::movingBodyTopoFvMesh::update()
|
|||
// else
|
||||
// {
|
||||
// // No change, use old points
|
||||
// movePoints(oldPointsNew);
|
||||
// // Note: using setOldPoints instead of movePoints.
|
||||
// // HJ, 23/Aug/2015
|
||||
// setOldPoints(oldPointsNew);
|
||||
// resetMotion();
|
||||
// setV0();
|
||||
// }
|
||||
|
|
|
@ -284,7 +284,10 @@ bool Foam::multiMixerFvMesh::update()
|
|||
pointField mappedOldPointsNew(allPoints().size());
|
||||
mappedOldPointsNew.map(oldPointsNew, topoChangeMap->pointMap());
|
||||
|
||||
movePoints(mappedOldPointsNew);
|
||||
// Note: using setOldPoints instead of movePoints.
|
||||
// HJ, 23/Aug/2015
|
||||
setOldPoints(mappedOldPointsNew);
|
||||
|
||||
resetMotion();
|
||||
setV0();
|
||||
|
||||
|
|
|
@ -236,7 +236,9 @@ bool Foam::multiTopoBodyFvMesh::update()
|
|||
// pointField mappedOldPointsNew(allPoints().size());
|
||||
// mappedOldPointsNew.map(oldPointsNew, topoChangeMap->pointMap());
|
||||
|
||||
// movePoints(mappedOldPointsNew);
|
||||
// // Note: using setOldPoints instead of movePoints.
|
||||
// // HJ, 23/Aug/2015
|
||||
// setOldPoints(mappedOldPointsNew);
|
||||
// resetMotion();
|
||||
// setV0();
|
||||
|
||||
|
|
Reference in a new issue