BUG: vtkCloud suppresses output for empty clouds (closes #866)

- the original intention was to avoid vtp output when the clouds are
  empty anyhow. However, it is useful for post-processing to have
  clouds with zero parcels (eg, before the start of injection).

  Pruning of empty clouds is now an option in the vtkCloud dictionary
  controls, with the default being false (no pruning). This represents
  a non-breaking change in behaviour since it generates more output
  than previously.

  Example,
  {
      type    vtkCloud;
      //- Suppress writing of empty clouds (default: false)
      prune   true;
  }
This commit is contained in:
Mark Olesen
2018-07-11 07:53:51 +02:00
parent baba0069d4
commit 1b76ff6001
6 changed files with 62 additions and 5 deletions

View File

@ -0,0 +1,19 @@
#!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory
. $WM_PROJECT_DIR/bin/tools/RunFunctions # Tutorial run functions
restore0Dir
runApplication blockMesh
runApplication topoSet
runApplication createBaffles -overwrite
runApplication decomposePar
runParallel $(getApplication)
runApplication reconstructPar
#------------------------------------------------------------------------------

View File

@ -51,5 +51,9 @@ maxCo 1.0;
maxDeltaT 1;
functions
{
#include "vtkCloud"
}
// ************************************************************************* //

View File

@ -26,10 +26,7 @@ preserveFaceZones
coeffs
{
n (2 2 1);
//delta 0.001; // default=0.001
//order xyz; // default=xzy
dataFile "";
n (2 2 1);
}
// ************************************************************************* //

View File

@ -0,0 +1,31 @@
// -*- C++ -*-
cloudWrite
{
type vtkCloud;
libs ("liblagrangianFunctionObjects.so");
log true;
writeControl writeTime;
// cloud reactingCloud1;
clouds ( ".*" );
// Fields to output (words or regex)
fields ( U T d "Y.*" );
//- Output format (ascii | binary) - default = binary
// format binary;
// format ascii;
// writePrecision 12;
//- Suppress writing of empty clouds - default = false
// prune true;
//- Output directory name - default = "VTK"
// directory "VTK";
}
// ************************************************************************* //