Commit 984f8f00 authored by Andrew Heather's avatar Andrew Heather
Browse files

ENH: Lagrangian - provided backwards compatibility for cases using the

old "positions" file form

The change to barycentric-based tracking changed the contents of the
cloud "positions" file to a new format comprising the barycentric
co-ordinates and other cell position-based info.  This broke
backwards compatibility, providing no option to restart old cases
(v1706 and earlier), and caused difficulties for dependent code, e.g.
for post-processing utilities that could only infer the contents only
after reading.

The barycentric position info is now written to a file called
"coordinates" with provision to restart old cases for which only the
"positions" file is available. Related utilities, e.g. for parallel
running and data conversion have been updated to be able to support both
file types.

To write the "positions" file by default, use set the following option
in the InfoSwitches section of the controlDict:

    writeLagrangianPositions 1;
parent 5267abaf
......@@ -64,7 +64,8 @@ vtkSmartPointer<vtkPolyData> Foam::vtkPVFoam::lagrangianVTKMesh
IOobject* positionsPtr = sprayObjs.lookup(word("positions"));
if (positionsPtr)
IOobject* coordinatesPtr = sprayObjs.lookup(word("coordinates"));
if (positionsPtr || coordinatesPtr)
Cloud<passiveParticle> parcels(mesh, cloudName, false);
Supports Markdown
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