VTK  9.5.20250912
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
21#include "vtkFiltersSourcesModule.h" // For export macro
22#include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
23
24VTK_ABI_NAMESPACE_BEGIN
25class vtkArray;
26
27class VTKFILTERSSOURCES_EXPORT VTK_MARSHALAUTO vtkDiagonalMatrixSource
29{
30public:
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
95protected:
98
100
101private:
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
117VTK_ABI_NAMESPACE_END
118#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,...
static vtkDiagonalMatrixSource * New()
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.
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:333
#define VTK_MARSHALAUTO