VTK  9.2.6
vtkIOSSWriter.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkIOSSWriter.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
28 #ifndef vtkIOSSWriter_h
29 #define vtkIOSSWriter_h
30 
31 #include "vtkDataObjectAlgorithm.h"
32 #include "vtkIOIOSSModule.h" // for export macros
33 
34 #include <memory> // for std::unique_ptr
35 
37 
38 class VTKIOIOSS_EXPORT vtkIOSSWriter : public vtkDataObjectAlgorithm
39 {
40 public:
41  static vtkIOSSWriter* New();
43  void PrintSelf(ostream& os, vtkIndent indent) override;
44 
46 
50  vtkSetStringMacro(FileName);
51  vtkGetStringMacro(FileName);
53 
55 
61  vtkSetMacro(OffsetGlobalIds, bool);
62  vtkGetMacro(OffsetGlobalIds, bool);
63  vtkBooleanMacro(OffsetGlobalIds, bool);
65 
67 
74  vtkSetMacro(PreserveInputEntityGroups, bool);
75  vtkGetMacro(PreserveInputEntityGroups, bool);
76  vtkBooleanMacro(PreserveInputEntityGroups, bool);
78 
80 
87  vtkSetClampMacro(DisplacementMagnitude, double, 0, VTK_DOUBLE_MAX);
88  vtkGetMacro(DisplacementMagnitude, double);
90 
92 
100  vtkSetClampMacro(MaximumTimeStepsPerFile, int, 0, VTK_INT_MAX);
101  vtkGetMacro(MaximumTimeStepsPerFile, int);
103 
105 
112  void SetController(vtkMultiProcessController* controller);
113  vtkGetObjectMacro(Controller, vtkMultiProcessController);
115 
119  bool Write();
120 
121 protected:
122  vtkIOSSWriter();
123  ~vtkIOSSWriter() override;
124 
125  int FillInputPortInformation(int port, vtkInformation* info) override;
126  int RequestInformation(vtkInformation* request, vtkInformationVector** inputVector,
127  vtkInformationVector* outputVector) override;
128  int RequestUpdateExtent(vtkInformation* request, vtkInformationVector** inputVector,
129  vtkInformationVector* outputVector) override;
130  int RequestData(vtkInformation* request, vtkInformationVector** inputVector,
131  vtkInformationVector* outputVector) override;
132 
133 private:
134  vtkIOSSWriter(const vtkIOSSWriter&) = delete;
135  void operator=(const vtkIOSSWriter&) = delete;
136 
137  class vtkInternals;
138  std::unique_ptr<vtkInternals> Internals;
139 
140  vtkMultiProcessController* Controller;
141  char* FileName;
142  bool OffsetGlobalIds;
143  bool PreserveInputEntityGroups;
144  double DisplacementMagnitude;
145  int MaximumTimeStepsPerFile;
146 };
147 
148 #endif
#define VTK_DOUBLE_MAX
Definition: vtkType.h:165
Store vtkAlgorithm input/output information.
static vtkDataObjectAlgorithm * New()
#define VTK_INT_MAX
Definition: vtkType.h:155
a simple class to control print indentation
Definition: vtkIndent.h:39
virtual int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called by the superclass.
writer using IOSS
Definition: vtkIOSSWriter.h:38
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.
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
Multiprocessing communication superclass.