added noLagrangian option

This commit is contained in:
andy
2009-03-19 11:38:47 +00:00
parent 9c08a0da24
commit 9035b3e419

View File

@ -51,6 +51,7 @@ int main(int argc, char *argv[])
argList::noParallel(); argList::noParallel();
# include "addRegionOption.H" # include "addRegionOption.H"
argList::validOptions.insert("fields", "\"(list of fields)\""); argList::validOptions.insert("fields", "\"(list of fields)\"");
argList::validOptions.insert("noLagrangian", "");
# include "setRootCase.H" # include "setRootCase.H"
# include "createTime.H" # include "createTime.H"
@ -61,6 +62,8 @@ int main(int argc, char *argv[])
IStringStream(args.options()["fields"])() >> selectedFields; IStringStream(args.options()["fields"])() >> selectedFields;
} }
bool noLagrangian = args.options().found("noLagrangian");
// determine the processor count directly // determine the processor count directly
label nProcs = 0; label nProcs = 0;
while (isDir(args.path()/(word("processor") + name(nProcs)))) while (isDir(args.path()/(word("processor") + name(nProcs))))
@ -269,6 +272,8 @@ int main(int argc, char *argv[])
// the first processor that has them. They are in pass2 only used // the first processor that has them. They are in pass2 only used
// for name and type (scalar, vector etc). // for name and type (scalar, vector etc).
if (!noLagrangian)
{
HashTable<IOobjectList> cloudObjects; HashTable<IOobjectList> cloudObjects;
forAll (databases, procI) forAll (databases, procI)
@ -284,13 +289,13 @@ int main(int argc, char *argv[])
forAll (cloudDirs, i) forAll (cloudDirs, i)
{ {
// Check if we already have cloud objects for this cloudname. // Check if we already have cloud objects for this cloudname
HashTable<IOobjectList>::const_iterator iter = HashTable<IOobjectList>::const_iterator iter =
cloudObjects.find(cloudDirs[i]); cloudObjects.find(cloudDirs[i]);
if (iter == cloudObjects.end()) if (iter == cloudObjects.end())
{ {
// Do local scan for valid cloud objects. // Do local scan for valid cloud objects
IOobjectList sprayObjs IOobjectList sprayObjs
( (
procMeshes.meshes()[procI], procMeshes.meshes()[procI],
@ -378,9 +383,10 @@ int main(int argc, char *argv[])
{ {
Info << "No lagrangian fields" << nl << endl; Info << "No lagrangian fields" << nl << endl;
} }
}
// If there are any "uniform" directories copy them from // If there are any "uniform" directories copy them from
// the master processor. // the master processor
fileName uniformDir0 = databases[0].timePath()/"uniform"; fileName uniformDir0 = databases[0].timePath()/"uniform";
if (isDir(uniformDir0)) if (isDir(uniformDir0))