Commit 382f1da1 authored by Mark Olesen's avatar Mark Olesen

ENH: rationalize cloud method inheritance

- a top-level cloud::nParcels() virtual, which is overloaded by the
  first level of Cloud inheritance. This permits quick determination of
  cloud sizes, even when retrieved from registry with the base level.
  Eg,
      cloud* cldPtr = mesh.cfindObject<cloud>("myCloud");
      label nParcels = (cldPtr ? cldPtr->nParcels() : 0);

- make writeLagrangianPositions on by default unless explicitly
  disabled in the InfoSwitches.

  Flag output errors (where neither coordinates nor positions are
  written) with Fatal.

- additional IOField helper functions in cloud

STYLE: simplify iterator inheritance
parent 7d552144
......@@ -159,7 +159,7 @@ addGeometry
objPtr->writeObjects(obrTmp);
const auto* pointsPtr = obrTmp.findObject<vectorField>("position");
const auto* pointsPtr = cloud::findIOPosition(obrTmp);
if (!pointsPtr)
{
......
......@@ -46,7 +46,7 @@ Foam::functionObjects::runTimePostPro::geometryCloud::gatherCloud
auto multiPiece = vtkSmartPointer<vtkMultiPieceDataSet>::New();
multiPiece->SetNumberOfPieces(Pstream::nProcs());
const auto* pointsPtr = obrTmp.findObject<vectorField>("position");
const auto* pointsPtr = cloud::findIOPosition(obrTmp);
if (!needsCollective())
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment