Skip to content
Snippets Groups Projects
Commit 2ebcb74d authored by Mark OLESEN's avatar Mark OLESEN
Browse files

BUG: reconstructPar ignores writeLagrangianPositions (fixes #702)

- The central InfoSwitch "writeLagrangianPositions" allows writing an
  additional Lagrangian "positions" file, but these were not being
  written by reconstructPar. These are now also written in reconstructPar
  if the central writeLagrangianPositions InfoSwitch is enabled.

NOTES

- "positions" are reconstructed from the processors "coordinates" file

- decomposePar will not attempt to create or redistribute any
  "positions" files
parent 73ce0ccb
No related branches found
No related tags found
No related merge requests found
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd. \\/ M anipulation | Copyright (C) 2015-2018 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
...@@ -728,7 +728,7 @@ int main(int argc, char *argv[]) ...@@ -728,7 +728,7 @@ int main(int argc, char *argv[])
) )
{ {
Info << "Reconstructing FA fields" << nl << endl; Info << "Reconstructing FA fields" << nl << endl;
faMesh aMesh(mesh); faMesh aMesh(mesh);
processorFaMeshes procFaMeshes(procMeshes.meshes()); processorFaMeshes procFaMeshes(procMeshes.meshes());
...@@ -748,7 +748,7 @@ int main(int argc, char *argv[]) ...@@ -748,7 +748,7 @@ int main(int argc, char *argv[])
.reconstructFaAreaFields<sphericalTensor>(objects); .reconstructFaAreaFields<sphericalTensor>(objects);
faReconstructor.reconstructFaAreaFields<symmTensor>(objects); faReconstructor.reconstructFaAreaFields<symmTensor>(objects);
faReconstructor.reconstructFaAreaFields<tensor>(objects); faReconstructor.reconstructFaAreaFields<tensor>(objects);
faReconstructor.reconstructFaEdgeFields<scalar>(objects); faReconstructor.reconstructFaEdgeFields<scalar>(objects);
} }
else else
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation | Copyright (C) 2018 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
...@@ -60,7 +60,7 @@ void Foam::reconstructLagrangianPositions ...@@ -60,7 +60,7 @@ void Foam::reconstructLagrangianPositions
// Inverting sign if necessary and subtracting 1 from // Inverting sign if necessary and subtracting 1 from
// faceProcAddressing // faceProcAddressing
label mappedTetFace = mag(faceMap[ppi.tetFace()]) - 1; const label mappedTetFace = mag(faceMap[ppi.tetFace()]) - 1;
lagrangianPositions.append lagrangianPositions.append
( (
...@@ -77,6 +77,16 @@ void Foam::reconstructLagrangianPositions ...@@ -77,6 +77,16 @@ void Foam::reconstructLagrangianPositions
} }
IOPosition<Cloud<passiveParticle>>(lagrangianPositions).write(); IOPosition<Cloud<passiveParticle>>(lagrangianPositions).write();
// Force writing of "positions" too, if specified via the InfoSwitch
if (particle::writeLagrangianPositions)
{
IOPosition<Cloud<passiveParticle>>
(
lagrangianPositions,
IOPosition<Cloud<passiveParticle>>::geometryType::POSITIONS
).write();
}
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment