ENH: add 'cellCentre' sampledSet (issue #869)

- samples on cell centres, can optionally limit based on a bounding box.
  Can be used, for example, to extract volume fields into CSV format.
This commit is contained in:
Mark Olesen
2018-06-12 23:22:23 +02:00
parent 7402cd7b5a
commit b2b77c9c13
5 changed files with 283 additions and 0 deletions

View File

@ -53,6 +53,7 @@ functions
{
#include "sampling"
// #include "samplingDebug"
// #include "sampleCellCentres"
}

View File

@ -0,0 +1,34 @@
// -*- C++ -*-
sampleSets
{
type sets;
libs ("libsampling.so");
log on;
enabled true;
writeControl timeStep;
writeInterval 10;
setFormat vtk;
setFormat csv;
interpolationScheme cell;
// fields ( U p );
fields ( U );
sets
(
centres
{
type cellCentre;
// axis xyz; // default: xyz
// bounds (-0.2 -1 -1) (-0.195 0 1);
bounds (-0.025 -1 -1) (-0.0225 0 1); // single cell layer
}
);
}
// ************************************************************************* //