Updating call-back functionality on meshObjects: dynamic mesh support
This commit is contained in:
parent
713c27c5c0
commit
7f631ac3c6
9 changed files with 26 additions and 17 deletions
|
@ -81,10 +81,11 @@ protected:
|
|||
|
||||
//- Face restriction addressing array.
|
||||
// Maps from the finer to the coarser level.
|
||||
// Positive indices map the finer faces which form part of the boundary
|
||||
// of the coarser cells to the corresponding coarser cell face.
|
||||
// Positive indices map the finer faces which form part of the
|
||||
// boundary of the coarser cells to the corresponding coarser
|
||||
// cell face.
|
||||
// Negative indices map the finer faces which are internal to the
|
||||
// coarser cells to minus the corresponding coarser cell index minus 1.
|
||||
// coarser cells to minus the corresponding coarser cell index minus 1
|
||||
PtrList<labelList> faceRestrictAddressing_;
|
||||
|
||||
//- Hierarchy of mesh addressing
|
||||
|
|
|
@ -73,7 +73,7 @@ class pointMesh
|
|||
public:
|
||||
|
||||
// Declare name of the class and its debug switch
|
||||
ClassName("pointMesh");
|
||||
TypeName("pointMesh");
|
||||
|
||||
typedef pointMesh Mesh;
|
||||
typedef pointBoundaryMesh BoundaryMesh;
|
||||
|
|
|
@ -1226,7 +1226,6 @@ void Foam::polyMesh::setOldPoints
|
|||
oldPointsPtr_ = new pointField::subField(oldAllPoints(), nPoints());
|
||||
curMotionTimeIndex_ = 0;
|
||||
primitiveMesh::clearGeom();
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -28,6 +28,7 @@ License
|
|||
#include "primitiveMesh.H"
|
||||
#include "globalMeshData.H"
|
||||
#include "demandDrivenData.H"
|
||||
#include "meshObjectBase.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
|
@ -90,6 +91,9 @@ void Foam::polyMesh::clearGeom()
|
|||
// Reset valid directions (could change with rotation)
|
||||
geometricD_ = Vector<label>::zero;
|
||||
solutionD_ = Vector<label>::zero;
|
||||
|
||||
// Move points all mesh objects. HJ, 13/Oct/2010
|
||||
meshObjectBase::allMovePoints(*this);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -27,6 +27,8 @@ License
|
|||
#include "polyMesh.H"
|
||||
#include "Time.H"
|
||||
#include "cellIOList.H"
|
||||
#include "meshObjectBase.H"
|
||||
#include "mapPolyMesh.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
|
@ -394,6 +396,11 @@ Foam::polyMesh::readUpdateState Foam::polyMesh::readUpdate()
|
|||
cellZones_.set(czI, newCellZones[czI].clone(cellZones_));
|
||||
}
|
||||
|
||||
// Instantiate a dummy mapPolyMesh
|
||||
autoPtr<mapPolyMesh> mapPtr(new mapPolyMesh(*this));
|
||||
|
||||
// Execute dummy topo change on all mesh objects
|
||||
meshObjectBase::allUpdateTopology(*this, mapPtr());
|
||||
|
||||
if (boundaryChanged)
|
||||
{
|
||||
|
@ -432,14 +439,17 @@ Foam::polyMesh::readUpdateState Foam::polyMesh::readUpdate()
|
|||
|
||||
// Reset points, mesh is not moved
|
||||
points_ = pointField::subField(allPoints_, nPoints());
|
||||
|
||||
|
||||
// Derived info
|
||||
bounds_ = boundBox(allPoints_);
|
||||
|
||||
// Rotation can cause direction vector to change
|
||||
geometricD_ = Vector<label>::zero;
|
||||
solutionD_ = Vector<label>::zero;
|
||||
|
||||
|
||||
// Move points in all mesh objects
|
||||
meshObjectBase::allMovePoints<polyMesh>(*this);
|
||||
|
||||
return polyMesh::POINTS_MOVED;
|
||||
}
|
||||
else
|
||||
|
|
|
@ -59,6 +59,7 @@ void boundMinMax
|
|||
const dimensionedScalar& vsf1
|
||||
);
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
|
|
@ -37,7 +37,6 @@ License
|
|||
#include "MapFvFields.H"
|
||||
#include "fvMeshMapper.H"
|
||||
#include "mapClouds.H"
|
||||
#include "meshObjectBase.H"
|
||||
|
||||
#include "volPointInterpolation.H"
|
||||
#include "extendedLeastSquaresVectors.H"
|
||||
|
@ -78,9 +77,8 @@ void Foam::fvMesh::clearGeom()
|
|||
// needs to be saved.
|
||||
|
||||
// Geometry dependent object updated through call-back
|
||||
// "Reserve" optional delete. Reconsider
|
||||
// and handled by polyMesh
|
||||
// HJ, 29/Aug/2010
|
||||
// meshObjectBase::allDelete(*this);
|
||||
}
|
||||
|
||||
|
||||
|
@ -89,9 +87,8 @@ void Foam::fvMesh::clearAddressing()
|
|||
deleteDemandDrivenData(lduPtr_);
|
||||
|
||||
// Geometry dependent object updated through call-back
|
||||
// "Reserve" optional delete. Reconsider
|
||||
// and handled by polyMesh
|
||||
// HJ, 29/Aug/2010
|
||||
// meshObjectBase::allDelete(*this);
|
||||
}
|
||||
|
||||
|
||||
|
@ -528,9 +525,6 @@ void Foam::fvMesh::syncUpdateMesh()
|
|||
// This is a temporary solution
|
||||
surfaceInterpolation::movePoints();
|
||||
|
||||
// Instantiate a dummy mapPolyMesh
|
||||
autoPtr<mapPolyMesh> mapPtr(new mapPolyMesh(*this));
|
||||
|
||||
// Function object update moved to polyMesh
|
||||
// HJ, 29/Aug/2010
|
||||
}
|
||||
|
|
|
@ -57,7 +57,7 @@ class skewCorrectionVectors
|
|||
public MeshObject<fvMesh, skewCorrectionVectors>
|
||||
{
|
||||
// Private data
|
||||
|
||||
|
||||
//- Is mesh skew
|
||||
mutable bool skew_;
|
||||
|
||||
|
|
|
@ -81,7 +81,7 @@ class volPointInterpolation
|
|||
public:
|
||||
|
||||
// Declare name of the class and its debug switch
|
||||
ClassName("volPointInterpolation");
|
||||
TypeName("volPointInterpolation");
|
||||
|
||||
|
||||
// Constructors
|
||||
|
|
Reference in a new issue