/usr/include/vtk-5.10/vtkEnSightWriter.h is in libvtk5-dev 5.10.1+dfsg-2.1build1.
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 | /*=========================================================================
Program: Visualization Toolkit
Module: vtkEnSightWriter.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.
=========================================================================*/
/*----------------------------------------------------------------------------
Copyright (c) Sandia Corporation
See Copyright.txt or http://www.paraview.org/HTML/Copyright.html for details.
----------------------------------------------------------------------------*/
// .NAME vtkEnSightWriter - write vtk unstructured grid data as an EnSight file
// .SECTION Description
// vtkEnSightWriter is a source object that writes binary
// unstructured grid data files in EnSight format. See EnSight Manual for
// format details
// .SECTION Caveats
// Binary files written on one system may not be readable on other systems.
// Be sure to specify the endian-ness of the file when reading it into EnSight
#ifndef __vtkEnSightWriter_h
#define __vtkEnSightWriter_h
#include "vtkWriter.h"
class vtkUnstructuredGrid;
class vtkModelMetadata;
class VTK_PARALLEL_EXPORT vtkEnSightWriter : public vtkWriter
{
public:
vtkTypeMacro(vtkEnSightWriter,vtkWriter);
virtual void PrintSelf(ostream& os, vtkIndent indent);
// Description:
//
static vtkEnSightWriter *New();
//Description
//Specify which process this writer is
vtkSetMacro(ProcessNumber,int);
vtkGetMacro(ProcessNumber,int);
// Description:
// Specify path of EnSight data files to write.
vtkSetStringMacro(Path);
vtkGetStringMacro(Path);
// Description:
// Specify base name of EnSight data files to write.
vtkSetStringMacro(BaseName);
vtkGetStringMacro(BaseName);
// Description:
// Specify the path and base name of the output files.
vtkSetStringMacro(FileName);
vtkGetStringMacro(FileName);
// Description
// Specify the Timestep that this data is for
vtkSetMacro(TimeStep,int);
vtkGetMacro(TimeStep,int);
// Description
// Specify the number of ghost levels to include in output files
vtkSetMacro(GhostLevel,int);
vtkGetMacro(GhostLevel,int);
// Description
// Specify whether the geoemtry changes each timestep
// if false, geometry is only written at timestep 0
vtkSetMacro(TransientGeometry,bool);
vtkGetMacro(TransientGeometry,bool);
//Description
//set the number of block ID's
vtkSetMacro(NumberOfBlocks,int);
vtkGetMacro(NumberOfBlocks,int);
//Description
//set the array of Block ID's
//this class keeps a reference to the array and will not delete it
virtual void SetBlockIDs(int* val)
{
BlockIDs=val;
}
virtual int* GetBlockIDs()
{
return BlockIDs;
}
// Description:
// Specify the input data or filter.
virtual void SetInput(vtkUnstructuredGrid *input);
virtual vtkUnstructuredGrid* GetInput();
// Description
// Writes the case file that EnSight is capable of reading
// The other data files must be written before the case file
// and the input must be one of the time steps
// variables must be the same for all time steps or the case file will be
// missing variables
virtual void WriteCaseFile(int TotalTimeSteps);
virtual void WriteSOSCaseFile(int NumProcs);
// Description
// sets and gets the metadata
virtual void SetModelMetadata(vtkModelMetadata* model);
vtkGetObjectMacro(ModelMetadata, vtkModelMetadata);
protected:
vtkEnSightWriter();
virtual ~vtkEnSightWriter();
virtual int FillInputPortInformation(int port, vtkInformation* info);
virtual void WriteData(); // method to allow this class to be instantiated and delegated to
virtual void WriteStringToFile(const char* string, FILE* file);
virtual void WriteTerminatedStringToFile(const char* string, FILE* file);
virtual void WriteIntToFile(const int i,FILE* file);
virtual void WriteFloatToFile(const float f,FILE* file);
virtual void WriteElementTypeToFile(int ElementType, FILE* fd);
virtual bool ShouldWriteGeometry();
virtual void SanitizeFileName(char* name);
virtual FILE* OpenFile(char* name);
void ComputeNames();
void DefaultNames();
int GetExodusModelIndex(int *ElementArray,int NumberElements,int PartID);
char *Path;
char *BaseName;
char *FileName;
int TimeStep;
int GhostLevelMultiplier;
int ProcessNumber;
int NumberOfProcesses;
int NumberOfBlocks;
int * BlockIDs;
bool TransientGeometry;
int GhostLevel;
vtkUnstructuredGrid* TmpInput;
vtkModelMetadata* ModelMetadata;
vtkEnSightWriter(const vtkEnSightWriter&); // Not implemented.
void operator=(const vtkEnSightWriter&); // Not implemented.
};
#endif
|