VTK  9.3.1
vtkXdmf3Writer.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
3 
17 #ifndef vtkXdmf3Writer_h
18 #define vtkXdmf3Writer_h
19 
20 #include "vtkIOXdmf3Module.h" // For export macro
21 
22 #include "vtkDataObjectAlgorithm.h"
23 
24 VTK_ABI_NAMESPACE_BEGIN
25 class vtkDoubleArray;
26 
27 class VTKIOXDMF3_EXPORT vtkXdmf3Writer : public vtkDataObjectAlgorithm
28 {
29 public:
30  static vtkXdmf3Writer* New();
32  void PrintSelf(ostream& os, vtkIndent indent) override;
33 
37  virtual void SetInputData(vtkDataObject* dobj);
38 
40 
43  vtkSetFilePathMacro(FileName);
44  vtkGetFilePathMacro(FileName);
46 
48 
52  void SetGhostLevel(int) {}
53  int GetGhostLevel() { return 0; }
55 
61  virtual int Write();
62 
64 
68  vtkSetMacro(LightDataLimit, unsigned int);
69  vtkGetMacro(LightDataLimit, unsigned int);
71 
73 
78  vtkSetMacro(WriteAllTimeSteps, bool);
79  vtkGetMacro(WriteAllTimeSteps, bool);
80  vtkBooleanMacro(WriteAllTimeSteps, bool);
82 
83 protected:
85  ~vtkXdmf3Writer() override;
86 
87  // Overridden to set up automatic loop over time steps.
89  // Overridden to continue automatic loop over time steps.
91  // Write out the input data objects as XDMF and HDF output files.
93 
94  char* FileName;
95  unsigned int LightDataLimit;
98  int MyRank;
99 
102  void WriteDataInternal(vtkInformation* request);
103  int CheckParametersInternal(int numberOfProcesses, int myRank);
104  virtual int CheckParameters();
105  // If writing in parallel multiple time steps exchange after each time step
106  // if we should continue the execution. Pass local continueExecution as a
107  // parameter and return the global continueExecution.
108  virtual int GlobalContinueExecuting(int localContinueExecution);
109 
111 
112 private:
113  vtkXdmf3Writer(const vtkXdmf3Writer&) = delete;
114  void operator=(const vtkXdmf3Writer&) = delete;
115 
116  class Internals;
117  Internals* Internal;
118 };
119 
120 VTK_ABI_NAMESPACE_END
121 #endif /* vtkXdmf3Writer_h */
void SetGhostLevel(int)
We never write out ghost cells.
Store vtkAlgorithm input/output information.
static vtkDataObjectAlgorithm * New()
int GetGhostLevel()
We never write out ghost cells.
dynamic, self-adjusting array of double
a simple class to control print indentation
Definition: vtkIndent.h:28
virtual int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called by the superclass.
void SetInputData(vtkDataObject *)
Assign a data object as input.
unsigned int LightDataLimit
vtkDataObject * OriginalInput
write eXtensible Data Model and Format files
Superclass for algorithms that produce only data object as output.
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
virtual int RequestInformation(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
Store zero or more vtkInformation instances.
vtkDoubleArray * TimeValues
general representation of visualization data
Definition: vtkDataObject.h:54
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.