VTK  9.2.6
vtkDiagonalMatrixSource.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkDiagonalMatrixSource.h
5
6-------------------------------------------------------------------------
7 Copyright 2008 Sandia Corporation.
8 Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
9 the U.S. Government retains certain rights in this software.
10-------------------------------------------------------------------------
11
12 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
13 All rights reserved.
14 See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
15
16 This software is distributed WITHOUT ANY WARRANTY; without even
17 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
18 PURPOSE. See the above copyright notice for more information.
19
20=========================================================================*/
21
34#ifndef vtkDiagonalMatrixSource_h
35#define vtkDiagonalMatrixSource_h
36
38#include "vtkFiltersSourcesModule.h" // For export macro
39
40class vtkArray;
41
42class VTKFILTERSSOURCES_EXPORT vtkDiagonalMatrixSource : public vtkArrayDataAlgorithm
43{
44public:
47 void PrintSelf(ostream& os, vtkIndent indent) override;
48
49 // Determines whether the output matrix will be dense or sparse
51 {
53 SPARSE
54 };
55
56 vtkGetMacro(ArrayType, int);
57 vtkSetMacro(ArrayType, int);
58
60
63 vtkGetMacro(Extents, vtkIdType);
64 vtkSetMacro(Extents, vtkIdType);
66
68
71 vtkGetMacro(Diagonal, double);
72 vtkSetMacro(Diagonal, double);
74
76
79 vtkGetMacro(SuperDiagonal, double);
80 vtkSetMacro(SuperDiagonal, double);
82
84
87 vtkGetMacro(SubDiagonal, double);
88 vtkSetMacro(SubDiagonal, double);
90
92
96 vtkGetStringMacro(RowLabel);
97 vtkSetStringMacro(RowLabel);
99
101
105 vtkGetStringMacro(ColumnLabel);
106 vtkSetStringMacro(ColumnLabel);
108
109protected:
112
114
115private:
117 void operator=(const vtkDiagonalMatrixSource&) = delete;
118
119 vtkArray* GenerateDenseArray();
120 vtkArray* GenerateSparseArray();
121
122 int ArrayType;
123 vtkIdType Extents;
124 double Diagonal;
125 double SuperDiagonal;
126 double SubDiagonal;
127 char* RowLabel;
128 char* ColumnLabel;
129};
130
131#endif
Superclass for algorithms that produce vtkArrayDatas as output.
Abstract interface for N-dimensional arrays.
Definition vtkArray.h:68
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:40
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
int vtkIdType
Definition vtkType.h:332