Skip to content
Snippets Groups Projects
Commit 85c16434 authored by Mark Olesen's avatar Mark Olesen
Browse files

Added IOobject::readOption to IOOutputFilter

 - allows post-processing functions with an optional dictionary
   (eg, the developer can hard-wire some defaults)
parent 4d96b876
Branches
Tags
No related merge requests found
......@@ -44,7 +44,7 @@ int main(int argc, char *argv[])
instantList timeDirs = timeSelector::select0(runTime, args);
# include "createMesh.H"
IOprobes sniff(mesh, "probesDict", true);
IOprobes sniff(mesh, "probesDict", IOobject::MUST_READ, true);
forAll(timeDirs, timeI)
{
......
......@@ -28,39 +28,39 @@ Description
Keywords:
setFormat: set output format, choice of
xmgr
jplot
gnuplot
raw
surfaceFormat: surface output format, choice of
null : suppress output
foamFile : separate points, faces and values file
dx : DX scalar or vector format
vtk : VTK ascii format
raw : x y z value format for use with e.g. gnuplot 'splot'.
stl : ascii stl. Does not contain values!
interpolationScheme: interpolation scheme, choice of
cell : use cell-centre value; constant over cells (default)
cellPoint : use cell-centre and vertex values
cellPointFace : use cell-centre, vertex and face values.
1] vertex values determined from neighbouring cell-centre values
2] face values determined using the current face interpolation scheme
for the field (linear, limitedLinear, etc.)
fields: list of fields to sample
sets: list of sets to sample, choice of
uniform evenly distributed points on line
face one point per face intersection
midPoint one point per cell, inbetween two face intersections
midPointAndFace combination of face and midPoint
curve specified points, not nessecary on line, uses
@param setFormat : set output format, choice of \n
- xmgr
- jplot
- gnuplot
- raw
@param surfaceFormat : surface output format, choice of \n
- null : suppress output
- foamFile : separate points, faces and values file
- dx : DX scalar or vector format
- vtk : VTK ascii format
- raw : x y z value format for use with e.g. gnuplot 'splot'.
- stl : ascii stl. Does not contain values!
@param interpolationScheme : interpolation scheme, choice of \n
- cell : use cell-centre value; constant over cells (default)
- cellPoint : use cell-centre and vertex values
- cellPointFace : use cell-centre, vertex and face values. \n
-# vertex values determined from neighbouring cell-centre values
-# face values determined using the current face interpolation scheme
for the field (linear, limitedLinear, etc.)
@param fields : list of fields to sample
@param sets : list of sets to sample, choice of \n
- uniform evenly distributed points on line
- face one point per face intersection
- midPoint one point per cell, inbetween two face intersections
- midPointAndFace combination of face and midPoint
- curve specified points, not nessecary on line, uses
tracking
cloud specified points, uses findCell
- cloud specified points, uses findCell
Option axis: how to write point coordinate. Choice of
- x/y/z: x/y/z coordinate only
......@@ -74,11 +74,12 @@ Description
uniform: extra number of sampling points
curve, cloud: list of coordinates
surfaces: list of surfaces to sample, choice of
plane : values on plane defined by point, normal.
patch : values on patch.
@param surfaces : list of surfaces to sample, choice of \n
- plane : values on plane defined by point, normal.
- patch : values on patch.
Runs in parallel.
Notes
Runs in parallel
\*---------------------------------------------------------------------------*/
......@@ -100,8 +101,8 @@ int main(int argc, char *argv[])
instantList timeDirs = timeSelector::select0(runTime, args);
# include "createMesh.H"
IOsampledSets sSets(mesh, "sampleDict", true);
IOsampledSurfaces sSurfaces(mesh, "sampleDict", true);
IOsampledSets sSets(mesh, "sampleDict", IOobject::MUST_READ, true);
IOsampledSurfaces sSurfs(mesh, "sampleDict", IOobject::MUST_READ, true);
forAll(timeDirs, timeI)
{
......@@ -112,10 +113,10 @@ int main(int argc, char *argv[])
polyMesh::readUpdateState state = mesh.readUpdate();
sSets.readUpdate(state);
sSurfaces.readUpdate(state);
sSurfs.readUpdate(state);
sSets.write();
sSurfaces.write();
sSurfs.write();
Info<< endl;
}
......
......@@ -34,6 +34,7 @@ Foam::IOOutputFilter<OutputFilter>::IOOutputFilter
(
const objectRegistry& obr,
const fileName& dictName,
const IOobject::readOption rOpt,
const bool readFromFiles
)
:
......@@ -44,7 +45,7 @@ Foam::IOOutputFilter<OutputFilter>::IOOutputFilter
dictName,
obr.time().system(),
obr,
IOobject::MUST_READ,
rOpt,
IOobject::NO_WRITE
)
),
......
......@@ -70,11 +70,13 @@ public:
// Constructors
//- Construct for given objectRegistry and dictionary
// allow the possibility to load fields from files
// Allow dictionary to be optional
// Allow the possibility to load fields from files
IOOutputFilter
(
const objectRegistry&,
const fileName& dictName = OutputFilter::typeName() + "Dict",
const IOobject::readOption rOpt = IOobject::MUST_READ,
const bool loadFromFile = false
);
......
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