VTK  9.3.20240328
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 
23 VTK_ABI_NAMESPACE_BEGIN
24 class vtkArray;
25 
26 class VTKFILTERSSOURCES_EXPORT vtkDiagonalMatrixSource : public vtkArrayDataAlgorithm
27 {
28 public:
31  void PrintSelf(ostream& os, vtkIndent indent) override;
32 
33  // Determines whether the output matrix will be dense or sparse
35  {
37  SPARSE
38  };
39 
40  vtkGetMacro(ArrayType, int);
41  vtkSetMacro(ArrayType, int);
42 
44 
47  vtkGetMacro(Extents, vtkIdType);
48  vtkSetMacro(Extents, vtkIdType);
50 
52 
55  vtkGetMacro(Diagonal, double);
56  vtkSetMacro(Diagonal, double);
58 
60 
63  vtkGetMacro(SuperDiagonal, double);
64  vtkSetMacro(SuperDiagonal, double);
66 
68 
71  vtkGetMacro(SubDiagonal, double);
72  vtkSetMacro(SubDiagonal, double);
74 
76 
80  vtkGetStringMacro(RowLabel);
81  vtkSetStringMacro(RowLabel);
83 
85 
89  vtkGetStringMacro(ColumnLabel);
90  vtkSetStringMacro(ColumnLabel);
92 
93 protected:
96 
98 
99 private:
101  void operator=(const vtkDiagonalMatrixSource&) = delete;
102 
103  vtkArray* GenerateDenseArray();
104  vtkArray* GenerateSparseArray();
105 
106  int ArrayType;
107  vtkIdType Extents;
108  double Diagonal;
109  double SuperDiagonal;
110  double SubDiagonal;
111  char* RowLabel;
112  char* ColumnLabel;
113 };
114 
115 VTK_ABI_NAMESPACE_END
116 #endif
Superclass for algorithms that produce vtkArrayDatas as output.
Abstract interface for N-dimensional arrays.
Definition: vtkArray.h:52
generates a sparse or dense square matrix with user-specified values for the diagonal,...
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
~vtkDiagonalMatrixSource() override
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
static vtkDiagonalMatrixSource * New()
a simple class to control print indentation
Definition: vtkIndent.h:108
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
int vtkIdType
Definition: vtkType.h:315