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

@ -35,7 +35,7 @@ int USERD_get_gold_part_build_info
for(label i=0; i<nPatches; i++)
{
word patchName(meshPtr->boundary()[i].name());
strncpy(part_descriptions[i+1], patchName.c_str(), Z_BUFL);
strncpy(part_descriptions[i+1], patchName.c_str(), Z_BUFL);
}
label nHex08 = 0;
@ -101,7 +101,7 @@ int USERD_get_gold_part_build_info
*/
number_of_nodes[0] = meshPtr->nPoints();
const polyBoundaryMesh& bMesh = meshPtr->boundaryMesh();
for(label i=0; i<nPatches; i++)
@ -137,7 +137,12 @@ int USERD_get_gold_part_build_info
if (Numparts_available > nPatches+1)
{
strncpy(part_descriptions[nPatches+1], sprayName.c_str(), Z_BUFL);
strncpy
(
part_descriptions[nPatches+1],
cloud::subInstance.c_str(),
Z_BUFL
);
number_of_elements[nPatches+1][Z_POINT] = sprayPtr->size();
number_of_nodes[nPatches+1] = sprayPtr->size();
}

View File

@ -164,7 +164,7 @@ int USERD_set_filenames
(
"positions",
runTime.timeName(),
"lagrangian",
cloud::subInstance,
runTime,
IOobject::NO_READ,
IOobject::NO_WRITE,
@ -179,7 +179,7 @@ int USERD_set_filenames
sprayPtr = new Cloud<passiveParticle>(*meshPtr);
IOobjectList objects(*meshPtr, runTime.timeName(), "lagrangian");
IOobjectList objects(*meshPtr, runTime.timeName(), cloud::subInstance);
lagrangianScalarNames =
(const wordList&)objects.names(sprayScalarFieldName);

View File

@ -12,7 +12,7 @@ if (nVar >= 0)
(
name,
runTime.timeName(),
"lagrangian",
cloud::subInstance,
mesh,
IOobject::MUST_READ,
IOobject::NO_WRITE

View File

@ -14,7 +14,7 @@ if (nVar >= 0)
(
name,
runTime.timeName(),
"lagrangian",
cloud::subInstance,
mesh,
IOobject::MUST_READ,
IOobject::NO_WRITE

View File

@ -32,7 +32,6 @@ static bool isSpray[maxNames];
static word scalarName = "volScalarField";
static word vectorName = "volVectorField";
static word tensorName = "volTensorField";
static word sprayName = "lagrangian";
static word sprayScalarFieldName = "scalarField";
static word sprayVectorFieldName = "vectorField";
static word sprayTensorFieldName = "tensorField";