mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
reconstructPar: Added '-noFields' option
This commit is contained in:
@ -91,6 +91,11 @@ int main(int argc, char *argv[])
|
||||
"specify a list of fields to be reconstructed. Eg, '(U T p)' - "
|
||||
"regular expressions not currently supported"
|
||||
);
|
||||
argList::addBoolOption
|
||||
(
|
||||
"noFields",
|
||||
"skip reconstructing fields"
|
||||
);
|
||||
argList::addOption
|
||||
(
|
||||
"lagrangianFields",
|
||||
@ -124,6 +129,14 @@ int main(int argc, char *argv[])
|
||||
args.optionLookup("fields")() >> selectedFields;
|
||||
}
|
||||
|
||||
const bool noFields = args.optionFound("noFields");
|
||||
|
||||
if (noFields)
|
||||
{
|
||||
Info<< "Skipping reconstructing fields"
|
||||
<< nl << endl;
|
||||
}
|
||||
|
||||
const bool noLagrangian = args.optionFound("noLagrangian");
|
||||
|
||||
if (noLagrangian)
|
||||
@ -368,6 +381,7 @@ int main(int argc, char *argv[])
|
||||
databases[0].timeName()
|
||||
);
|
||||
|
||||
if (!noFields)
|
||||
{
|
||||
// If there are any FV fields, reconstruct them
|
||||
Info<< "Reconstructing FV fields" << nl << endl;
|
||||
@ -466,6 +480,7 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
}
|
||||
|
||||
if (!noFields)
|
||||
{
|
||||
Info<< "Reconstructing point fields" << nl << endl;
|
||||
|
||||
@ -744,6 +759,8 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
}
|
||||
|
||||
if (cSetNames.size() || fSetNames.size() || pSetNames.size())
|
||||
{
|
||||
// Construct all sets
|
||||
PtrList<cellSet> cellSets(cSetNames.size());
|
||||
PtrList<faceSet> faceSets(fSetNames.size());
|
||||
@ -752,15 +769,18 @@ int main(int argc, char *argv[])
|
||||
Info<< "Reconstructing sets:" << endl;
|
||||
if (cSetNames.size())
|
||||
{
|
||||
Info<< " cellSets " << cSetNames.sortedToc() << endl;
|
||||
Info<< " cellSets "
|
||||
<< cSetNames.sortedToc() << endl;
|
||||
}
|
||||
if (fSetNames.size())
|
||||
{
|
||||
Info<< " faceSets " << fSetNames.sortedToc() << endl;
|
||||
Info<< " faceSets "
|
||||
<< fSetNames.sortedToc() << endl;
|
||||
}
|
||||
if (pSetNames.size())
|
||||
{
|
||||
Info<< " pointSets " << pSetNames.sortedToc() << endl;
|
||||
Info<< " pointSets "
|
||||
<< pSetNames.sortedToc() << endl;
|
||||
}
|
||||
|
||||
// Load sets
|
||||
@ -771,7 +791,7 @@ int main(int argc, char *argv[])
|
||||
IOobjectList objects
|
||||
(
|
||||
procMesh,
|
||||
databases[0].timeName(), //procMesh.facesInstance(),
|
||||
databases[0].timeName(),
|
||||
polyMesh::meshSubDir/"sets"
|
||||
);
|
||||
|
||||
@ -779,7 +799,11 @@ int main(int argc, char *argv[])
|
||||
const labelList& cellMap =
|
||||
procMeshes.cellProcAddressing()[proci];
|
||||
|
||||
IOobjectList cSets(objects.lookupClass(cellSet::typeName));
|
||||
IOobjectList cSets
|
||||
(
|
||||
objects.lookupClass(cellSet::typeName)
|
||||
);
|
||||
|
||||
forAllConstIter(IOobjectList, cSets, iter)
|
||||
{
|
||||
// Load cellSet
|
||||
@ -790,7 +814,12 @@ int main(int argc, char *argv[])
|
||||
cellSets.set
|
||||
(
|
||||
setI,
|
||||
new cellSet(mesh, iter.key(), procSet.size())
|
||||
new cellSet
|
||||
(
|
||||
mesh,
|
||||
iter.key(),
|
||||
procSet.size()
|
||||
)
|
||||
);
|
||||
}
|
||||
cellSet& cSet = cellSets[setI];
|
||||
@ -806,7 +835,11 @@ int main(int argc, char *argv[])
|
||||
const labelList& faceMap =
|
||||
procMeshes.faceProcAddressing()[proci];
|
||||
|
||||
IOobjectList fSets(objects.lookupClass(faceSet::typeName));
|
||||
IOobjectList fSets
|
||||
(
|
||||
objects.lookupClass(faceSet::typeName)
|
||||
);
|
||||
|
||||
forAllConstIter(IOobjectList, fSets, iter)
|
||||
{
|
||||
// Load faceSet
|
||||
@ -817,7 +850,12 @@ int main(int argc, char *argv[])
|
||||
faceSets.set
|
||||
(
|
||||
setI,
|
||||
new faceSet(mesh, iter.key(), procSet.size())
|
||||
new faceSet
|
||||
(
|
||||
mesh,
|
||||
iter.key(),
|
||||
procSet.size()
|
||||
)
|
||||
);
|
||||
}
|
||||
faceSet& fSet = faceSets[setI];
|
||||
@ -832,7 +870,10 @@ int main(int argc, char *argv[])
|
||||
const labelList& pointMap =
|
||||
procMeshes.pointProcAddressing()[proci];
|
||||
|
||||
IOobjectList pSets(objects.lookupClass(pointSet::typeName));
|
||||
IOobjectList pSets
|
||||
(
|
||||
objects.lookupClass(pointSet::typeName)
|
||||
);
|
||||
forAllConstIter(IOobjectList, pSets, iter)
|
||||
{
|
||||
// Load pointSet
|
||||
@ -843,7 +884,12 @@ int main(int argc, char *argv[])
|
||||
pointSets.set
|
||||
(
|
||||
setI,
|
||||
new pointSet(mesh, iter.key(), propSet.size())
|
||||
new pointSet
|
||||
(
|
||||
mesh,
|
||||
iter.key(),
|
||||
propSet.size()
|
||||
)
|
||||
);
|
||||
}
|
||||
pointSet& pSet = pointSets[setI];
|
||||
@ -870,6 +916,7 @@ int main(int argc, char *argv[])
|
||||
pointSets[i].write();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Reconstruct refinement data
|
||||
|
||||
Reference in New Issue
Block a user