/usr/include/vtk-6.3/vtkXdmfWriter.h is in libvtk6-dev 6.3.0+dfsg1-5.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 | /*=========================================================================
Program: Visualization Toolkit
Module: vtkXdmfWriter.h
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
All rights reserved.
See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notice for more information.
=========================================================================*/
// .NAME vtkXdmfWriter - write eXtensible Data Model and Format files
// .SECTION Description
// vtkXdmfWriter converts vtkDataObjects to XDMF format. This is intended to
// replace vtkXdmfWriter, which is not up to date with the capabilities of the
// newer XDMF2 library. This writer understands VTK's composite data types and
// produces full trees in the output XDMF files.
#ifndef _vtkXdmfWriter_h
#define _vtkXdmfWriter_h
#include "vtkIOXdmf2Module.h" // For export macro
#include "vtkDataObjectAlgorithm.h"
#include <string> // Needed for private members
#include <vector> //
class vtkExecutive;
class vtkCompositeDataSet;
class vtkDataArray;
class vtkDataSet;
class vtkDataObject;
class vtkFieldData;
class vtkInformation;
class vtkInformationVector;
class vtkXdmfWriterDomainMemoryHandler;
namespace xdmf2
{
class XdmfArray;
class XdmfDOM;
class XdmfElement;
class XdmfGrid;
class XdmfGeometry;
class XdmfTopology;
}
class VTKIOXDMF2_EXPORT vtkXdmfWriter : public vtkDataObjectAlgorithm
{
public:
static vtkXdmfWriter *New();
vtkTypeMacro(vtkXdmfWriter,vtkDataObjectAlgorithm);
void PrintSelf(ostream& os, vtkIndent indent);
// Description:
// Set the input data set.
virtual void SetInputData(vtkDataObject* dobj);
// Description:
// Set or get the file name of the xdmf file.
vtkSetStringMacro(FileName);
vtkGetStringMacro(FileName);
// Description:
// Set or get the file name of the hdf5 file.
// Note that if the File name is not specified, then the group name is ignore
vtkSetStringMacro(HeavyDataFileName);
vtkGetStringMacro(HeavyDataFileName);
// Description:
// Set or get the group name into which data will be written
// it may contain nested groups as in "/Proc0/Block0"
vtkSetStringMacro(HeavyDataGroupName);
vtkGetStringMacro(HeavyDataGroupName);
// Description:
// Write data to output. Method executes subclasses WriteData() method, as
// well as StartMethod() and EndMethod() methods.
// Returns 1 on success and 0 on failure.
virtual int Write();
// Description:
// Topology Geometry and Attribute arrays smaller than this are written in line into the XML.
// Default is 100.
// Node: LightDataLimit is forced to 1 when MeshStaticOverTime is TRUE.
vtkSetMacro(LightDataLimit, int);
vtkGetMacro(LightDataLimit, int);
//Description:
//Controls whether writer automatically writes all input time steps, or
//just the timestep that is currently on the input.
//Default is OFF.
vtkSetMacro(WriteAllTimeSteps, int);
vtkGetMacro(WriteAllTimeSteps, int);
vtkBooleanMacro(WriteAllTimeSteps, int);
// Description:
// Set of get the flag that specify if input mesh is static over time.
// If so, the mesh topology and geometry heavy data will be written only once.
// Default if FALSE.
// Note: this mode requires that all data is dumped in the heavy data file.
vtkSetMacro(MeshStaticOverTime, bool);
vtkGetMacro(MeshStaticOverTime, bool);
vtkBooleanMacro(MeshStaticOverTime, bool);
// Description:
// Called in parallel runs to identify the portion this process is responsible for
// TODO: respect this
vtkSetMacro(Piece, int);
vtkSetMacro(NumberOfPieces, int);
//TODO: control choice of heavy data format (xml, hdf5, sql, raw)
//TODO: These controls are available in vtkXdmfWriter, but are not used here.
//GridsOnly
//Append to Domain
protected:
vtkXdmfWriter();
~vtkXdmfWriter();
//Choose composite executive by default for time.
virtual vtkExecutive* CreateDefaultExecutive();
//Can take any one data object
virtual int FillInputPortInformation(int port, vtkInformation *info);
//Overridden to ...
virtual int RequestInformation(vtkInformation*,
vtkInformationVector**,
vtkInformationVector*);
//Overridden to ...
virtual int RequestUpdateExtent(vtkInformation*,
vtkInformationVector**,
vtkInformationVector*);
//Overridden to ...
virtual int RequestData(vtkInformation*,
vtkInformationVector**,
vtkInformationVector*);
//These do the work: recursively parse down input's structure all the way to arrays,
//use XDMF lib to dump everything to file.
virtual int CreateTopology(vtkDataSet *ds, xdmf2::XdmfGrid *grid, vtkIdType PDims[3], vtkIdType CDims[3], vtkIdType &PRank, vtkIdType &CRank, void *staticdata);
virtual int CreateGeometry(vtkDataSet *ds, xdmf2::XdmfGrid *grid, void *staticdata);
virtual int WriteDataSet(vtkDataObject *dobj, xdmf2::XdmfGrid *grid);
virtual int WriteCompositeDataSet(vtkCompositeDataSet *dobj, xdmf2::XdmfGrid *grid);
virtual int WriteAtomicDataSet(vtkDataObject *dobj, xdmf2::XdmfGrid *grid);
virtual int WriteArrays(vtkFieldData* dsa, xdmf2::XdmfGrid *grid, int association,
vtkIdType rank, vtkIdType *dims, const char *name);
virtual void ConvertVToXArray(vtkDataArray *vda, xdmf2::XdmfArray *xda,
vtkIdType rank, vtkIdType *dims,
int AllocStrategy, const char *heavyprefix);
virtual void SetupDataArrayXML(xdmf2::XdmfElement*, xdmf2::XdmfArray*) const;
char *FileName;
char *HeavyDataFileName;
char *HeavyDataGroupName;
std::string WorkingDirectory;
std::string BaseFileName;
int LightDataLimit;
int WriteAllTimeSteps;
int NumberOfTimeSteps;
double CurrentTime;
int CurrentTimeIndex;
int CurrentBlockIndex;
int UnlabelledDataArrayId;
int Piece;
int NumberOfPieces;
bool MeshStaticOverTime;
xdmf2::XdmfDOM *DOM;
xdmf2::XdmfGrid *TopTemporalGrid;
vtkXdmfWriterDomainMemoryHandler *DomainMemoryHandler;
std::vector<xdmf2::XdmfTopology*> TopologyAtT0;
std::vector<xdmf2::XdmfGeometry*> GeometryAtT0;
private:
vtkXdmfWriter(const vtkXdmfWriter&); // Not implemented
void operator=(const vtkXdmfWriter&); // Not implemented
};
#endif /* _vtkXdmfWriter_h */
|