BUG: polyMesh: update pointMesh objects

This commit is contained in:
mattijs
2013-12-20 15:59:10 +00:00
parent 4d42057791
commit 2a9a899d8f
4 changed files with 33 additions and 10 deletions

View File

@ -34,7 +34,7 @@ License
#include "indexedOctree.H" #include "indexedOctree.H"
#include "treeDataCell.H" #include "treeDataCell.H"
#include "MeshObject.H" #include "MeshObject.H"
#include "pointMesh.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
@ -1160,6 +1160,7 @@ Foam::tmp<Foam::scalarField> Foam::polyMesh::movePoints
solutionD_ = Vector<label>::zero; solutionD_ = Vector<label>::zero;
meshObject::movePoints<polyMesh>(*this); meshObject::movePoints<polyMesh>(*this);
meshObject::movePoints<pointMesh>(*this);
const_cast<Time&>(time()).functionObjects().movePoints(*this); const_cast<Time&>(time()).functionObjects().movePoints(*this);

View File

@ -29,6 +29,7 @@ License
#include "MeshObject.H" #include "MeshObject.H"
#include "indexedOctree.H" #include "indexedOctree.H"
#include "treeDataCell.H" #include "treeDataCell.H"
#include "pointMesh.H"
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
@ -61,6 +62,7 @@ void Foam::polyMesh::clearGeom()
} }
// Clear all geometric mesh objects // Clear all geometric mesh objects
meshObject::clear<pointMesh, GeometricMeshObject>(*this);
meshObject::clear<polyMesh, GeometricMeshObject>(*this); meshObject::clear<polyMesh, GeometricMeshObject>(*this);
primitiveMesh::clearGeom(); primitiveMesh::clearGeom();
@ -108,6 +110,15 @@ void Foam::polyMesh::clearAddressing(const bool isMeshUpdate)
// Part of a mesh update. Keep meshObjects that have an updateMesh // Part of a mesh update. Keep meshObjects that have an updateMesh
// callback // callback
meshObject::clearUpto meshObject::clearUpto
<
pointMesh,
TopologicalMeshObject,
UpdateableMeshObject
>
(
*this
);
meshObject::clearUpto
< <
polyMesh, polyMesh,
TopologicalMeshObject, TopologicalMeshObject,
@ -119,6 +130,7 @@ void Foam::polyMesh::clearAddressing(const bool isMeshUpdate)
} }
else else
{ {
meshObject::clear<pointMesh, TopologicalMeshObject>(*this);
meshObject::clear<polyMesh, TopologicalMeshObject>(*this); meshObject::clear<polyMesh, TopologicalMeshObject>(*this);
} }

View File

@ -92,6 +92,7 @@ void Foam::polyMesh::updateMesh(const mapPolyMesh& mpm)
} }
meshObject::updateMesh<polyMesh>(*this, mpm); meshObject::updateMesh<polyMesh>(*this, mpm);
meshObject::updateMesh<pointMesh>(*this, mpm);
// Reset valid directions (could change by faces put into empty patches) // Reset valid directions (could change by faces put into empty patches)
geometricD_ = Vector<label>::zero; geometricD_ = Vector<label>::zero;

View File

@ -48,7 +48,7 @@ void pointConstraints::makePatchPatchAddressing()
{ {
Pout<< "pointConstraints::makePatchPatchAddressing() : " Pout<< "pointConstraints::makePatchPatchAddressing() : "
<< "constructing boundary addressing" << "constructing boundary addressing"
<< endl; << endl << incrIndent;
} }
const pointMesh& pMesh = mesh(); const pointMesh& pMesh = mesh();
@ -72,7 +72,7 @@ void pointConstraints::makePatchPatchAddressing()
if (debug) if (debug)
{ {
Pout<< "On patch:" << pbm[patchi].name() Pout<< indent << "On patch:" << pbm[patchi].name()
<< " nBoundaryPoints:" << bp.size() << endl; << " nBoundaryPoints:" << bp.size() << endl;
} }
} }
@ -80,7 +80,8 @@ void pointConstraints::makePatchPatchAddressing()
if (debug) if (debug)
{ {
Pout<< "Found nPatchPatchPoints:" << nPatchPatchPoints << endl; Pout<< indent << "Found nPatchPatchPoints:" << nPatchPatchPoints
<< endl;
} }
@ -137,7 +138,7 @@ void pointConstraints::makePatchPatchAddressing()
if (debug) if (debug)
{ {
Pout<< "Have (local) constrained points:" Pout<< indent << "Have (local) constrained points:"
<< nPatchPatchPoints << endl; << nPatchPatchPoints << endl;
} }
@ -224,7 +225,7 @@ void pointConstraints::makePatchPatchAddressing()
if (iter == patchPatchPointSet.end()) if (iter == patchPatchPointSet.end())
{ {
//Pout<< "on meshpoint:" << meshPointI //Pout<< indent << "on meshpoint:" << meshPointI
// << " coupled:" << coupledPointI // << " coupled:" << coupledPointI
// << " at:" << mesh.points()[meshPointI] // << " at:" << mesh.points()[meshPointI]
// << " have new constraint:" // << " have new constraint:"
@ -242,7 +243,7 @@ void pointConstraints::makePatchPatchAddressing()
} }
else else
{ {
//Pout<< "on meshpoint:" << meshPointI //Pout<< indent << "on meshpoint:" << meshPointI
// << " coupled:" << coupledPointI // << " coupled:" << coupledPointI
// << " at:" << mesh.points()[meshPointI] // << " at:" << mesh.points()[meshPointI]
// << " have possibly extended constraint:" // << " have possibly extended constraint:"
@ -271,7 +272,7 @@ void pointConstraints::makePatchPatchAddressing()
if (debug) if (debug)
{ {
Pout<< "Have (global) constrained points:" Pout<< indent << "Have (global) constrained points:"
<< nPatchPatchPoints << endl; << nPatchPatchPoints << endl;
} }
@ -303,7 +304,7 @@ void pointConstraints::makePatchPatchAddressing()
if (debug) if (debug)
{ {
Pout<< "Have non-trivial constrained points:" Pout<< indent << "Have non-trivial constrained points:"
<< nConstraints << endl; << nConstraints << endl;
} }
@ -314,7 +315,8 @@ void pointConstraints::makePatchPatchAddressing()
if (debug) if (debug)
{ {
Pout<< "pointConstraints::makePatchPatchAddressing() : " Pout<< decrIndent
<< "pointConstraints::makePatchPatchAddressing() : "
<< "finished constructing boundary addressing" << "finished constructing boundary addressing"
<< endl; << endl;
} }
@ -327,6 +329,13 @@ pointConstraints::pointConstraints(const pointMesh& pm)
: :
MeshObject<pointMesh, Foam::UpdateableMeshObject, pointConstraints>(pm) MeshObject<pointMesh, Foam::UpdateableMeshObject, pointConstraints>(pm)
{ {
if (debug)
{
Pout<< "pointConstraints::pointConstraints(const pointMesh&): "
<< "Constructing from pointMesh " << pm.name()
<< endl;
}
makePatchPatchAddressing(); makePatchPatchAddressing();
} }