Commit cc0eac3e authored by Mark OLESEN's avatar Mark OLESEN
Browse files

ENH: add decompose flag for vtkWrite function object

- default is now without polyhedral decomposition, since this produces
  compacter files and VTK mananges this in most instances.
  However, provide function object flag to reinstate the old behaviour.
parent f40d7ef5
......@@ -108,6 +108,7 @@ bool Foam::functionObjects::vtkWrite::read(const dictionary& dict)
//
dict.readIfPresent("directory", dirName_);
decompose_ = dict.lookupOrDefault("decompose", false);
writeIds_ = dict.lookupOrDefault("writeIds", false);
......@@ -185,7 +186,7 @@ bool Foam::functionObjects::vtkWrite::write()
(
mesh_,
writeOpts_,
true // decompose
decompose_
);
// Write mesh
......
......@@ -44,6 +44,7 @@ Description
writeInterval 1;
format binary;
legacy false;
decompose false;
...
fields (U p);
}
......@@ -51,14 +52,15 @@ Description
Usage
\table
Property | Description | Required | Default value
type | Type name: vtkWrite | yes |
fields | Fields to output | yes |
writeControl | Output control | recommended | timeStep
directory | The output directory name | no | "VTK"
format | ASCII or binary format | no | binary
legacy | Legacy VTK output | no | false
writeIds | Write cell ids as field | no | true
Property | Description | Required | Default
type | Type name: vtkWrite | yes |
fields | Fields to output | yes |
writeControl | Output control | recommended | timeStep
directory | The output directory name | no | "VTK"
format | ASCII or binary format | no | binary
legacy | Legacy VTK output | no | false
decompose | decompose polyhedra | no | false
writeIds | Write cell ids as field | no | true
\endtable
See also
......@@ -106,6 +108,9 @@ class vtkWrite
//- Output directory name
fileName dirName_;
//- Decompose polyhedra
bool decompose_;
//- Write cell ids field
bool writeIds_;
......@@ -119,7 +124,11 @@ class vtkWrite
//- Write selected fields for GeoField type.
template<class GeoField>
label writeFields(vtk::internalWriter& writer, bool verbose=true) const;
label writeFields
(
vtk::internalWriter& writer,
bool verbose=true
) const;
//- Write selected fields for GeoField type.
......@@ -131,10 +140,10 @@ class vtkWrite
) const;
//- Disallow default bitwise copy construct
//- No copy construct
vtkWrite(const vtkWrite&) = delete;
//- Disallow default bitwise assignment
//- No copy assignment
void operator=(const vtkWrite&) = delete;
......@@ -150,7 +159,7 @@ public:
vtkWrite
(
const word& name,
const Time& t,
const Time& runTime,
const dictionary& dict
);
......
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