diff --git a/applications/solvers/combustion/PDRFoam/laminarFlameSpeed/SCOPE/SCOPELaminarFlameSpeed.C b/applications/solvers/combustion/PDRFoam/laminarFlameSpeed/SCOPE/SCOPELaminarFlameSpeed.C index a9224f59eb..9f42a4cc97 100644 --- a/applications/solvers/combustion/PDRFoam/laminarFlameSpeed/SCOPE/SCOPELaminarFlameSpeed.C +++ b/applications/solvers/combustion/PDRFoam/laminarFlameSpeed/SCOPE/SCOPELaminarFlameSpeed.C @@ -395,7 +395,7 @@ Foam::laminarFlameSpeedModels::SCOPE::Ma() const ( "Ma", mesh.time().timeName(), - mesh.db(), + mesh, IOobject::NO_READ, IOobject::NO_WRITE ), diff --git a/applications/utilities/mesh/manipulation/splitMeshRegions/splitMeshRegions.C b/applications/utilities/mesh/manipulation/splitMeshRegions/splitMeshRegions.C index 8aac1f6b7e..a4b33b97dd 100644 --- a/applications/utilities/mesh/manipulation/splitMeshRegions/splitMeshRegions.C +++ b/applications/utilities/mesh/manipulation/splitMeshRegions/splitMeshRegions.C @@ -613,7 +613,7 @@ autoPtr createRegionMesh "fvSchemes", mesh.time().system(), regionName, - mesh.db(), + mesh, IOobject::NO_READ, IOobject::NO_WRITE, false @@ -642,7 +642,7 @@ autoPtr createRegionMesh "fvSolution", mesh.time().system(), regionName, - mesh.db(), + mesh, IOobject::NO_READ, IOobject::NO_WRITE, false diff --git a/src/OpenFOAM/fields/GeometricFields/GeometricField/MapGeometricFields.H b/src/OpenFOAM/fields/GeometricFields/GeometricField/MapGeometricFields.H index b85d27c8ad..5f5896893b 100644 --- a/src/OpenFOAM/fields/GeometricFields/GeometricField/MapGeometricFields.H +++ b/src/OpenFOAM/fields/GeometricFields/GeometricField/MapGeometricFields.H @@ -75,7 +75,7 @@ void MapGeometricFields { HashTable*> fields ( - mapper.db().objectRegistry::lookupClass + mapper.thisDb().objectRegistry::lookupClass >() ); @@ -145,7 +145,7 @@ void MapGeometricFields ); } - field.instance() = field.mesh().db().time().timeName(); + field.instance() = field.time().timeName(); } else if (polyMesh::debug) { diff --git a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/GAMGAgglomeration/GAMGAgglomeration.C b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/GAMGAgglomeration/GAMGAgglomeration.C index e1df085914..633b8e2f37 100644 --- a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/GAMGAgglomeration/GAMGAgglomeration.C +++ b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/GAMGAgglomeration/GAMGAgglomeration.C @@ -97,7 +97,7 @@ const Foam::GAMGAgglomeration& Foam::GAMGAgglomeration::New { if ( - !mesh.db().objectRegistry::foundObject + !mesh.thisDb().foundObject ( GAMGAgglomeration::typeName ) @@ -134,7 +134,7 @@ const Foam::GAMGAgglomeration& Foam::GAMGAgglomeration::New } else { - return mesh.db().objectRegistry::lookupObject + return mesh.thisDb().lookupObject ( GAMGAgglomeration::typeName ); @@ -152,7 +152,7 @@ const Foam::GAMGAgglomeration& Foam::GAMGAgglomeration::New if ( - !mesh.db().objectRegistry::foundObject + !mesh.thisDb().foundObject ( GAMGAgglomeration::typeName ) @@ -185,7 +185,7 @@ const Foam::GAMGAgglomeration& Foam::GAMGAgglomeration::New } else { - return mesh.db().objectRegistry::lookupObject + return mesh.thisDb().lookupObject ( GAMGAgglomeration::typeName ); diff --git a/src/OpenFOAM/meshes/GeoMesh/GeoMesh.H b/src/OpenFOAM/meshes/GeoMesh/GeoMesh.H index eeec9ac71e..847844e21b 100644 --- a/src/OpenFOAM/meshes/GeoMesh/GeoMesh.H +++ b/src/OpenFOAM/meshes/GeoMesh/GeoMesh.H @@ -76,7 +76,7 @@ public: // Member Functions //- Return the object registry - const objectRegistry& db() const + const objectRegistry& thisDb() const { return mesh_; } diff --git a/src/OpenFOAM/meshes/MeshObject/MeshObject.C b/src/OpenFOAM/meshes/MeshObject/MeshObject.C index 232929e295..68f05c2f82 100644 --- a/src/OpenFOAM/meshes/MeshObject/MeshObject.C +++ b/src/OpenFOAM/meshes/MeshObject/MeshObject.C @@ -37,8 +37,8 @@ Foam::MeshObject::MeshObject(const Mesh& mesh) IOobject ( Type::typeName, - mesh.db().instance(), - mesh.db() + mesh.thisDb().instance(), + mesh.thisDb() ) ), mesh_(mesh) @@ -53,13 +53,13 @@ const Type& Foam::MeshObject::New const Mesh& mesh ) { - if (!mesh.db().objectRegistry::foundObject(Type::typeName)) + if (!mesh.thisDb().objectRegistry::foundObject(Type::typeName)) { return store(new Type(mesh)); } else { - return mesh.db().objectRegistry::lookupObject(Type::typeName); + return mesh.thisDb().objectRegistry::lookupObject(Type::typeName); } } @@ -72,13 +72,13 @@ const Type& Foam::MeshObject::New const Data1& d ) { - if (!mesh.db().objectRegistry::foundObject(Type::typeName)) + if (!mesh.thisDb().objectRegistry::foundObject(Type::typeName)) { return store(new Type(mesh, d)); } else { - return mesh.db().objectRegistry::lookupObject(Type::typeName); + return mesh.thisDb().objectRegistry::lookupObject(Type::typeName); } } @@ -92,13 +92,13 @@ const Type& Foam::MeshObject::New const Data2& d2 ) { - if (!mesh.db().objectRegistry::foundObject(Type::typeName)) + if (!mesh.thisDb().objectRegistry::foundObject(Type::typeName)) { return store(new Type(mesh, d1, d2)); } else { - return mesh.db().objectRegistry::lookupObject(Type::typeName); + return mesh.thisDb().objectRegistry::lookupObject(Type::typeName); } } @@ -113,13 +113,13 @@ const Type& Foam::MeshObject::New const Data3& d3 ) { - if (!mesh.db().objectRegistry::foundObject(Type::typeName)) + if (!mesh.thisDb().objectRegistry::foundObject(Type::typeName)) { return store(new Type(mesh, d1, d2, d3)); } else { - return mesh.db().objectRegistry::lookupObject(Type::typeName); + return mesh.thisDb().objectRegistry::lookupObject(Type::typeName); } } @@ -135,13 +135,13 @@ const Type& Foam::MeshObject::New const Data4& d4 ) { - if (!mesh.db().objectRegistry::foundObject(Type::typeName)) + if (!mesh.thisDb().objectRegistry::foundObject(Type::typeName)) { return store(new Type(mesh, d3, d4)); } else { - return mesh.db().objectRegistry::lookupObject(Type::typeName); + return mesh.thisDb().objectRegistry::lookupObject(Type::typeName); } } @@ -151,13 +151,13 @@ const Type& Foam::MeshObject::New template bool Foam::MeshObject::Delete(const Mesh& mesh) { - if (mesh.db().objectRegistry::foundObject(Type::typeName)) + if (mesh.thisDb().objectRegistry::foundObject(Type::typeName)) { - return mesh.db().objectRegistry::checkOut + return mesh.thisDb().checkOut ( const_cast ( - mesh.db().objectRegistry::lookupObject + mesh.thisDb().objectRegistry::lookupObject ( Type::typeName ) diff --git a/src/OpenFOAM/meshes/lduMesh/lduMesh.C b/src/OpenFOAM/meshes/lduMesh/lduMesh.C index ac9a65fe64..135b74c6ab 100644 --- a/src/OpenFOAM/meshes/lduMesh/lduMesh.C +++ b/src/OpenFOAM/meshes/lduMesh/lduMesh.C @@ -36,9 +36,9 @@ namespace Foam // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -const Foam::objectRegistry& Foam::lduMesh::db() const +const Foam::objectRegistry& Foam::lduMesh::thisDb() const { - notImplemented("lduMesh::db() const"); + notImplemented("lduMesh::thisDb() const"); const objectRegistry* orPtr_ = NULL; return *orPtr_; } diff --git a/src/OpenFOAM/meshes/lduMesh/lduMesh.H b/src/OpenFOAM/meshes/lduMesh/lduMesh.H index 1176f77bc9..5c6f39e778 100644 --- a/src/OpenFOAM/meshes/lduMesh/lduMesh.H +++ b/src/OpenFOAM/meshes/lduMesh/lduMesh.H @@ -71,7 +71,7 @@ public: // Access //- Return the object registry - virtual const objectRegistry& db() const; + virtual const objectRegistry& thisDb() const; //- Return ldu addressing virtual const lduAddressing& lduAddr() const = 0; diff --git a/src/OpenFOAM/meshes/pointMesh/pointMesh.H b/src/OpenFOAM/meshes/pointMesh/pointMesh.H index 16f80727e5..a41f725c45 100644 --- a/src/OpenFOAM/meshes/pointMesh/pointMesh.H +++ b/src/OpenFOAM/meshes/pointMesh/pointMesh.H @@ -112,10 +112,10 @@ public: return GeoMesh::mesh_.globalData(); } - //- Return database (only needed for compilation purposes) - const objectRegistry& db() const + //- Return database. For now is its polyMesh. + const objectRegistry& thisDb() const { - return GeoMesh::mesh_.db(); + return GeoMesh::mesh_.thisDb(); } diff --git a/src/OpenFOAM/meshes/pointMesh/pointMeshMapper/pointMeshMapper.H b/src/OpenFOAM/meshes/pointMesh/pointMeshMapper/pointMeshMapper.H index 0274524887..3f73e8225c 100644 --- a/src/OpenFOAM/meshes/pointMesh/pointMeshMapper/pointMeshMapper.H +++ b/src/OpenFOAM/meshes/pointMesh/pointMeshMapper/pointMeshMapper.H @@ -100,7 +100,7 @@ public: //- Return reference to objectRegistry storing fields. Can be // removed once fields stored on pointMesh. - const objectRegistry& db() const + const objectRegistry& thisDb() const { return mesh_(); } diff --git a/src/OpenFOAM/meshes/polyMesh/polyMesh.C b/src/OpenFOAM/meshes/polyMesh/polyMesh.C index a1b10f0d8a..c3a789e54d 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyMesh.C +++ b/src/OpenFOAM/meshes/polyMesh/polyMesh.C @@ -1042,17 +1042,11 @@ Foam::tmp Foam::polyMesh::movePoints // movePoints function. // pointMesh - if - ( - db().objectRegistry::foundObject - ( - pointMesh::typeName - ) - ) + if (thisDb().foundObject(pointMesh::typeName)) { const_cast ( - db().objectRegistry::lookupObject + thisDb().lookupObject ( pointMesh::typeName ) @@ -1094,7 +1088,7 @@ const Foam::globalMeshData& Foam::polyMesh::globalData() const // Remove all files and some subdirs (eg, sets) void Foam::polyMesh::removeFiles(const fileName& instanceDir) const { - fileName meshFilesPath = db().path()/instanceDir/meshDir(); + fileName meshFilesPath = thisDb().path()/instanceDir/meshDir(); rm(meshFilesPath/"points"); rm(meshFilesPath/"faces"); diff --git a/src/OpenFOAM/meshes/polyMesh/polyMesh.H b/src/OpenFOAM/meshes/polyMesh/polyMesh.H index 0dfd7685c8..588394d1c2 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyMesh.H +++ b/src/OpenFOAM/meshes/polyMesh/polyMesh.H @@ -343,6 +343,11 @@ public: //- Return parallel info const globalMeshData& globalData() const; + //- Return the object registry + const objectRegistry& thisDb() const + { + return *this; + } // Mesh motion diff --git a/src/OpenFOAM/meshes/polyMesh/polyMeshUpdate.C b/src/OpenFOAM/meshes/polyMesh/polyMeshUpdate.C index 644d4a446a..24d9ebbb13 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyMeshUpdate.C +++ b/src/OpenFOAM/meshes/polyMesh/polyMeshUpdate.C @@ -71,17 +71,11 @@ void Foam::polyMesh::updateMesh(const mapPolyMesh& mpm) // Hack until proper callbacks. Below are all the polyMesh-MeshObjects. // pointMesh - if - ( - db().objectRegistry::foundObject - ( - pointMesh::typeName - ) - ) + if (thisDb().foundObject(pointMesh::typeName)) { const_cast ( - db().objectRegistry::lookupObject + thisDb().lookupObject ( pointMesh::typeName ) diff --git a/src/autoMesh/autoHexMesh/autoHexMeshDriver/autoLayerDriver.C b/src/autoMesh/autoHexMesh/autoHexMeshDriver/autoLayerDriver.C index b384902710..bbe715eff0 100644 --- a/src/autoMesh/autoHexMesh/autoHexMeshDriver/autoLayerDriver.C +++ b/src/autoMesh/autoHexMesh/autoHexMeshDriver/autoLayerDriver.C @@ -2889,12 +2889,12 @@ void Foam::autoLayerDriver::addLayers //mesh.name()+"_layer", mesh.name(), static_cast(mesh).instance(), - mesh.db(), + mesh.db(), // register with runTime static_cast(mesh).readOpt(), static_cast(mesh).writeOpt() - ), // io params from original mesh but new name - mesh, // original mesh - true // parallel sync + ), // io params from original mesh but new name + mesh, // original mesh + true // parallel sync ); fvMesh& newMesh = newMeshPtr(); diff --git a/src/autoMesh/autoHexMesh/autoHexMeshDriver/autoRefineDriver.C b/src/autoMesh/autoHexMesh/autoHexMeshDriver/autoRefineDriver.C index f602376461..e53c4e041a 100644 --- a/src/autoMesh/autoHexMesh/autoHexMeshDriver/autoRefineDriver.C +++ b/src/autoMesh/autoHexMesh/autoHexMeshDriver/autoRefineDriver.C @@ -80,7 +80,7 @@ Foam::label Foam::autoRefineDriver::readFeatureEdges featFileName, // name mesh.time().constant(), // directory "triSurface", // instance - mesh.db(), // registry + mesh.time(), // registry IOobject::MUST_READ, IOobject::NO_WRITE, false diff --git a/src/autoMesh/autoHexMesh/meshRefinement/meshRefinementProblemCells.C b/src/autoMesh/autoHexMesh/meshRefinement/meshRefinementProblemCells.C index fd5a7bdffa..ff1d5fc3a4 100644 --- a/src/autoMesh/autoHexMesh/meshRefinement/meshRefinementProblemCells.C +++ b/src/autoMesh/autoHexMesh/meshRefinement/meshRefinementProblemCells.C @@ -443,7 +443,7 @@ Foam::labelList Foam::meshRefinement::markFacesOnProblemCells { const labelList& cPoints = mesh_.cellPoints(cellI, dynCPoints); - // Get number of anchor points (pointLevel == cellLevel) + // Get number of anchor points (pointLevel <= cellLevel) label nBoundaryAnchors = 0; label nNonAnchorBoundary = 0; diff --git a/src/finiteVolume/cfdTools/general/SRF/SRFModel/SRFModel/SRFModel.C b/src/finiteVolume/cfdTools/general/SRF/SRFModel/SRFModel/SRFModel.C index a16ea2fd04..394be20d2e 100644 --- a/src/finiteVolume/cfdTools/general/SRF/SRFModel/SRFModel/SRFModel.C +++ b/src/finiteVolume/cfdTools/general/SRF/SRFModel/SRFModel/SRFModel.C @@ -56,8 +56,8 @@ Foam::SRF::SRFModel::SRFModel IOobject ( "SRFProperties", - Urel.mesh().time().constant(), - Urel.mesh().db(), + Urel.time().constant(), + Urel.db(), IOobject::MUST_READ, IOobject::NO_WRITE ) diff --git a/src/finiteVolume/cfdTools/general/SRF/SRFModel/SRFModel/newSRFModel.C b/src/finiteVolume/cfdTools/general/SRF/SRFModel/SRFModel/newSRFModel.C index 914fe22978..ff94172db0 100644 --- a/src/finiteVolume/cfdTools/general/SRF/SRFModel/SRFModel/newSRFModel.C +++ b/src/finiteVolume/cfdTools/general/SRF/SRFModel/SRFModel/newSRFModel.C @@ -53,8 +53,8 @@ autoPtr SRFModel::New IOobject ( "SRFProperties", - Urel.mesh().time().constant(), - Urel.mesh().db(), + Urel.time().constant(), + Urel.db(), IOobject::MUST_READ, IOobject::NO_WRITE ) diff --git a/src/finiteVolume/fvMesh/fvMesh.C b/src/finiteVolume/fvMesh/fvMesh.C index 1192ef2357..d9c775a68b 100644 --- a/src/finiteVolume/fvMesh/fvMesh.C +++ b/src/finiteVolume/fvMesh/fvMesh.C @@ -485,17 +485,11 @@ void Foam::fvMesh::mapFields(const mapPolyMesh& meshMap) template void MeshObjectMovePoints(const Foam::fvMesh& mesh) { - if - ( - mesh.db().objectRegistry::foundObject - ( - Type::typeName - ) - ) + if (mesh.thisDb().foundObject(Type::typeName)) { const_cast ( - mesh.db().objectRegistry::lookupObject + mesh.thisDb().lookupObject ( Type::typeName ) diff --git a/src/finiteVolume/fvMesh/fvMesh.H b/src/finiteVolume/fvMesh/fvMesh.H index 819dd30514..64e4d87f3e 100644 --- a/src/finiteVolume/fvMesh/fvMesh.H +++ b/src/finiteVolume/fvMesh/fvMesh.H @@ -221,10 +221,10 @@ public: return polyMesh::time(); } - //- Return the object registry - virtual const objectRegistry& db() const + //- Return the object registry - resolve conflict polyMesh/lduMesh + virtual const objectRegistry& thisDb() const { - return *this; + return polyMesh::thisDb(); } //- Return reference to name diff --git a/src/finiteVolume/fvMesh/fvMeshMapper/fvMeshMapper.H b/src/finiteVolume/fvMesh/fvMeshMapper/fvMeshMapper.H index 1a277a14b9..0f9784affd 100644 --- a/src/finiteVolume/fvMesh/fvMeshMapper/fvMeshMapper.H +++ b/src/finiteVolume/fvMesh/fvMeshMapper/fvMeshMapper.H @@ -108,7 +108,7 @@ public: //- Return reference to objectRegistry storing fields. Can be // removed once fields stored on pointMesh. - const objectRegistry& db() const + const objectRegistry& thisDb() const { return mesh_; } diff --git a/src/finiteVolume/fvMesh/fvMeshSubset/fvMeshSubset.H b/src/finiteVolume/fvMesh/fvMeshSubset/fvMeshSubset.H index 32749e5233..9ad70db647 100644 --- a/src/finiteVolume/fvMesh/fvMeshSubset/fvMeshSubset.H +++ b/src/finiteVolume/fvMesh/fvMeshSubset/fvMeshSubset.H @@ -335,7 +335,6 @@ public: ( const GeometricField&, const pointMesh& sMesh, - const objectRegistry& reg, const labelList& patchMap, const labelList& pointMap ); diff --git a/src/finiteVolume/fvMesh/fvMeshSubset/fvMeshSubsetInterpolate.C b/src/finiteVolume/fvMesh/fvMeshSubset/fvMeshSubsetInterpolate.C index 7986cfc665..f95b7a9dfe 100644 --- a/src/finiteVolume/fvMesh/fvMeshSubset/fvMeshSubsetInterpolate.C +++ b/src/finiteVolume/fvMesh/fvMeshSubset/fvMeshSubsetInterpolate.C @@ -299,7 +299,6 @@ fvMeshSubset::interpolate ( const GeometricField& vf, const pointMesh& sMesh, - const objectRegistry& reg, const labelList& patchMap, const labelList& pointMap ) @@ -385,7 +384,7 @@ fvMeshSubset::interpolate ( "subset"+vf.name(), vf.time().timeName(), - reg, + sMesh.thisDb(), IOobject::NO_READ, IOobject::NO_WRITE ), @@ -410,7 +409,6 @@ tmp > fvMeshSubset::interpolate ( sf, pointMesh::New(subMesh()), // subsetted point mesh - subMesh(), // registry (pointfields are stored on the polyMesh) patchMap(), pointMap() ); diff --git a/src/finiteVolume/interpolation/volPointInterpolation/volPointInterpolate.C b/src/finiteVolume/interpolation/volPointInterpolation/volPointInterpolate.C index 405fb59be0..1adc4046c7 100644 --- a/src/finiteVolume/interpolation/volPointInterpolation/volPointInterpolate.C +++ b/src/finiteVolume/interpolation/volPointInterpolation/volPointInterpolate.C @@ -128,7 +128,7 @@ volPointInterpolation::interpolate ( "volPointInterpolate(" + vf.name() + ')', vf.instance(), - vf.db() + pMesh.thisDb() ), pMesh, vf.dimensions(), @@ -168,6 +168,8 @@ volPointInterpolation::interpolate const GeometricField& vf ) const { + const pointMesh& pm = pointMesh::New(vf.mesh()); + tmp > tpf ( new GeometricField @@ -176,9 +178,9 @@ volPointInterpolation::interpolate ( "volPointInterpolate(" + vf.name() + ')', vf.instance(), - vf.db() + pm.thisDb() ), - pointMesh::New(vf.mesh()), + pm, vf.dimensions() ) ); diff --git a/src/thermophysicalModels/radiation/radiationModel/radiationModel/newRadiationModel.C b/src/thermophysicalModels/radiation/radiationModel/radiationModel/newRadiationModel.C index a30d7946f4..0a213f03d3 100644 --- a/src/thermophysicalModels/radiation/radiationModel/radiationModel/newRadiationModel.C +++ b/src/thermophysicalModels/radiation/radiationModel/radiationModel/newRadiationModel.C @@ -52,8 +52,8 @@ autoPtr radiationModel::New IOobject ( "radiationProperties", - T.mesh().time().constant(), - T.mesh().db(), + T.time().constant(), + T.db(), IOobject::MUST_READ, IOobject::NO_WRITE ) diff --git a/src/thermophysicalModels/radiation/radiationModel/radiationModel/radiationModel.C b/src/thermophysicalModels/radiation/radiationModel/radiationModel/radiationModel.C index 5fec3f003f..adc5c53558 100644 --- a/src/thermophysicalModels/radiation/radiationModel/radiationModel/radiationModel.C +++ b/src/thermophysicalModels/radiation/radiationModel/radiationModel/radiationModel.C @@ -54,8 +54,8 @@ Foam::radiation::radiationModel::radiationModel IOobject ( "radiationProperties", - T.mesh().time().constant(), - T.mesh().db(), + T.time().constant(), + T.db(), IOobject::MUST_READ, IOobject::NO_WRITE ) diff --git a/src/topoChangerFvMesh/movingConeTopoFvMesh/movingConeTopoFvMesh.C b/src/topoChangerFvMesh/movingConeTopoFvMesh/movingConeTopoFvMesh.C index 2ebc9f7ff0..2f3804afde 100644 --- a/src/topoChangerFvMesh/movingConeTopoFvMesh/movingConeTopoFvMesh.C +++ b/src/topoChangerFvMesh/movingConeTopoFvMesh/movingConeTopoFvMesh.C @@ -343,7 +343,7 @@ bool Foam::movingConeTopoFvMesh::update() // << endl; { - OFstream str(db().path()/"meshPoints.obj"); + OFstream str(thisDb().path()/"meshPoints.obj"); Pout<< "Writing mesh with meshPoints to " << str.name() << endl; @@ -361,7 +361,7 @@ bool Foam::movingConeTopoFvMesh::update() } } { - OFstream str(db().path()/"preMotionPoints.obj"); + OFstream str(thisDb().path()/"preMotionPoints.obj"); Pout<< "Writing mesh with preMotionPoints to " << str.name() << endl;