objectRegistry fixes

- objectRegistry gets a rename() that also adjusts the dbDir
- cloud reworked to use static variables subInstance and defaultName.
  This avoids writing "lagrangian" everywhere

string fixes
- avoid masking of std::string::replace in string.H
- avoid old strstream in PV3FoamReader
This commit is contained in:
Mark Olesen
2009-03-06 15:18:00 +01:00
parent 9ce984d1dc
commit b968e62ef9
41 changed files with 171 additions and 104 deletions

View File

@ -58,6 +58,11 @@ SourceFiles
#ifndef vtkPV3Foam_H
#define vtkPV3Foam_H
// do not include legacy strstream headers
#ifndef VTK_EXCLUDE_STRSTREAM_HEADERS
# define VTK_EXCLUDE_STRSTREAM_HEADERS
#endif
#include "className.H"
#include "fileName.H"
#include "volPointInterpolation.H"

View File

@ -268,7 +268,7 @@ void Foam::vtkPV3Foam::convertLagrangianFields
(
mesh,
dbPtr_().timeName(),
"lagrangian"/cloudName
cloud::subInstance/cloudName
);
pruneObjectList(objects, selectedFields);

View File

@ -30,6 +30,8 @@ InClass
#ifndef vtkPV3FoamLagrangianFields_H
#define vtkPV3FoamLagrangianFields_H
#include "Cloud.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
template<class Type>

View File

@ -53,7 +53,7 @@ vtkPolyData* Foam::vtkPV3Foam::lagrangianVTKMesh
if (debug)
{
Info<< "<beg> Foam::vtkPV3Foam::lagrangianVTKMesh - timePath "
<< mesh.time().timePath()/"lagrangian"/cloudName << endl;
<< mesh.time().timePath()/cloud::subInstance/cloudName << endl;
printMemory();
}
@ -63,7 +63,7 @@ vtkPolyData* Foam::vtkPV3Foam::lagrangianVTKMesh
(
mesh,
mesh.time().timeName(),
"lagrangian"/cloudName
cloud::subInstance/cloudName
);
IOobject* positionsPtr = sprayObjs.lookup("positions");

View File

@ -34,6 +34,7 @@ License
#include "IOPtrList.H"
#include "polyBoundaryMeshEntries.H"
#include "entry.H"
#include "Cloud.H"
#include "vtkPV3FoamReader.h"
// local headers
@ -148,16 +149,16 @@ void Foam::vtkPV3Foam::updateInfoLagrangian()
if (debug)
{
Info<< "<beg> Foam::vtkPV3Foam::updateInfoLagrangian" << nl
<< " " << dbPtr_->timePath()/"lagrangian" << endl;
<< " " << dbPtr_->timePath()/cloud::subInstance << endl;
}
// use the db directly since this might be called without a mesh,
// but the region must get added back in
fileName lagrangianPrefix("lagrangian");
fileName lagrangianPrefix(cloud::subInstance);
if (meshRegion_ != polyMesh::defaultRegion)
{
lagrangianPrefix = meshRegion_/"lagrangian";
lagrangianPrefix = meshRegion_/cloud::subInstance;
}
// Search for list of lagrangian objects for this time
@ -463,10 +464,10 @@ void Foam::vtkPV3Foam::updateInfoLagrangianFields()
// use the db directly since this might be called without a mesh,
// but the region must get added back in
fileName lagrangianPrefix("lagrangian");
fileName lagrangianPrefix(cloud::subInstance);
if (meshRegion_ != polyMesh::defaultRegion)
{
lagrangianPrefix = meshRegion_/"lagrangian";
lagrangianPrefix = meshRegion_/cloud::subInstance;
}
IOobjectList objects