mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
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.
This commit is contained in:
@ -108,6 +108,7 @@ bool Foam::functionObjects::vtkWrite::read(const dictionary& dict)
|
|||||||
//
|
//
|
||||||
dict.readIfPresent("directory", dirName_);
|
dict.readIfPresent("directory", dirName_);
|
||||||
|
|
||||||
|
decompose_ = dict.lookupOrDefault("decompose", false);
|
||||||
writeIds_ = dict.lookupOrDefault("writeIds", false);
|
writeIds_ = dict.lookupOrDefault("writeIds", false);
|
||||||
|
|
||||||
|
|
||||||
@ -185,7 +186,7 @@ bool Foam::functionObjects::vtkWrite::write()
|
|||||||
(
|
(
|
||||||
mesh_,
|
mesh_,
|
||||||
writeOpts_,
|
writeOpts_,
|
||||||
true // decompose
|
decompose_
|
||||||
);
|
);
|
||||||
|
|
||||||
// Write mesh
|
// Write mesh
|
||||||
|
|||||||
@ -44,6 +44,7 @@ Description
|
|||||||
writeInterval 1;
|
writeInterval 1;
|
||||||
format binary;
|
format binary;
|
||||||
legacy false;
|
legacy false;
|
||||||
|
decompose false;
|
||||||
...
|
...
|
||||||
fields (U p);
|
fields (U p);
|
||||||
}
|
}
|
||||||
@ -51,13 +52,14 @@ Description
|
|||||||
|
|
||||||
Usage
|
Usage
|
||||||
\table
|
\table
|
||||||
Property | Description | Required | Default value
|
Property | Description | Required | Default
|
||||||
type | Type name: vtkWrite | yes |
|
type | Type name: vtkWrite | yes |
|
||||||
fields | Fields to output | yes |
|
fields | Fields to output | yes |
|
||||||
writeControl | Output control | recommended | timeStep
|
writeControl | Output control | recommended | timeStep
|
||||||
directory | The output directory name | no | "VTK"
|
directory | The output directory name | no | "VTK"
|
||||||
format | ASCII or binary format | no | binary
|
format | ASCII or binary format | no | binary
|
||||||
legacy | Legacy VTK output | no | false
|
legacy | Legacy VTK output | no | false
|
||||||
|
decompose | decompose polyhedra | no | false
|
||||||
writeIds | Write cell ids as field | no | true
|
writeIds | Write cell ids as field | no | true
|
||||||
\endtable
|
\endtable
|
||||||
|
|
||||||
@ -106,6 +108,9 @@ class vtkWrite
|
|||||||
//- Output directory name
|
//- Output directory name
|
||||||
fileName dirName_;
|
fileName dirName_;
|
||||||
|
|
||||||
|
//- Decompose polyhedra
|
||||||
|
bool decompose_;
|
||||||
|
|
||||||
//- Write cell ids field
|
//- Write cell ids field
|
||||||
bool writeIds_;
|
bool writeIds_;
|
||||||
|
|
||||||
@ -119,7 +124,11 @@ class vtkWrite
|
|||||||
|
|
||||||
//- Write selected fields for GeoField type.
|
//- Write selected fields for GeoField type.
|
||||||
template<class GeoField>
|
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.
|
//- Write selected fields for GeoField type.
|
||||||
@ -131,10 +140,10 @@ class vtkWrite
|
|||||||
) const;
|
) const;
|
||||||
|
|
||||||
|
|
||||||
//- Disallow default bitwise copy construct
|
//- No copy construct
|
||||||
vtkWrite(const vtkWrite&) = delete;
|
vtkWrite(const vtkWrite&) = delete;
|
||||||
|
|
||||||
//- Disallow default bitwise assignment
|
//- No copy assignment
|
||||||
void operator=(const vtkWrite&) = delete;
|
void operator=(const vtkWrite&) = delete;
|
||||||
|
|
||||||
|
|
||||||
@ -150,7 +159,7 @@ public:
|
|||||||
vtkWrite
|
vtkWrite
|
||||||
(
|
(
|
||||||
const word& name,
|
const word& name,
|
||||||
const Time& t,
|
const Time& runTime,
|
||||||
const dictionary& dict
|
const dictionary& dict
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user