VTK  9.7.1
vtkDiagonalMatrixSource.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-FileCopyrightText: Copyright 2008 Sandia Corporation
3 // SPDX-License-Identifier: LicenseRef-BSD-3-Clause-Sandia-USGov
4 
17 #ifndef vtkDiagonalMatrixSource_h
18 #define vtkDiagonalMatrixSource_h
19 
20 #include "vtkArrayDataAlgorithm.h"
21 #include "vtkFiltersSourcesModule.h" // For export macro
22 #include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
23 
24 VTK_ABI_NAMESPACE_BEGIN
25 class vtkArray;
26 
27 class VTKFILTERSSOURCES_EXPORT VTK_MARSHALAUTO vtkDiagonalMatrixSource
28  : public vtkArrayDataAlgorithm
29 {
30 public:
31  static vtkDiagonalMatrixSource* New();
33  void PrintSelf(ostream& os, vtkIndent indent) override;
34 
35  // Determines whether the output matrix will be dense or sparse
37  {
39  SPARSE
40  };
41 
42  vtkGetMacro(ArrayType, int);
43  vtkSetMacro(ArrayType, int);
44 
46 
49  vtkGetMacro(Extents, vtkIdType);
50  vtkSetMacro(Extents, vtkIdType);
52 
54 
57  vtkGetMacro(Diagonal, double);
58  vtkSetMacro(Diagonal, double);
60 
62 
65  vtkGetMacro(SuperDiagonal, double);
66  vtkSetMacro(SuperDiagonal, double);
68 
70 
73  vtkGetMacro(SubDiagonal, double);
74  vtkSetMacro(SubDiagonal, double);
76 
78 
82  vtkGetStringMacro(RowLabel);
83  vtkSetStringMacro(RowLabel);
85 
87 
91  vtkGetStringMacro(ColumnLabel);
92  vtkSetStringMacro(ColumnLabel);
94 
95 protected:
97  ~vtkDiagonalMatrixSource() override;
98 
100 
101 private:
103  void operator=(const vtkDiagonalMatrixSource&) = delete;
104 
105  vtkArray* GenerateDenseArray();
106  vtkArray* GenerateSparseArray();
107 
108  int ArrayType;
109  vtkIdType Extents;
110  double Diagonal;
111  double SuperDiagonal;
112  double SubDiagonal;
113  char* RowLabel;
114  char* ColumnLabel;
115 };
116 
117 VTK_ABI_NAMESPACE_END
118 #endif
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
Store vtkAlgorithm input/output information.
Abstract interface for N-dimensional arrays.
Definition: vtkArray.h:51
int vtkIdType
Definition: vtkType.h:363
a simple class to control print indentation
Definition: vtkIndent.h:28
Superclass for algorithms that produce vtkArrayDatas as output.
generates a sparse or dense square matrix with user-specified values for the diagonal, superdiagonal, and subdiagonal.
static vtkArrayDataAlgorithm * New()
Store zero or more vtkInformation instances.
#define VTK_MARSHALAUTO
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.