VTK  9.1.0
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
31#ifndef vtkDiagonalMatrixSource_h
32#define vtkDiagonalMatrixSource_h
33
35#include "vtkFiltersSourcesModule.h" // For export macro
36
37class vtkArray;
38
39class VTKFILTERSSOURCES_EXPORT vtkDiagonalMatrixSource : public vtkArrayDataAlgorithm
40{
41public:
44 void PrintSelf(ostream& os, vtkIndent indent) override;
45
46 // Determines whether the output matrix will be dense or sparse
48 {
50 SPARSE
51 };
52
53 vtkGetMacro(ArrayType, int);
54 vtkSetMacro(ArrayType, int);
55
57
60 vtkGetMacro(Extents, vtkIdType);
61 vtkSetMacro(Extents, vtkIdType);
63
65
68 vtkGetMacro(Diagonal, double);
69 vtkSetMacro(Diagonal, double);
71
73
76 vtkGetMacro(SuperDiagonal, double);
77 vtkSetMacro(SuperDiagonal, double);
79
81
84 vtkGetMacro(SubDiagonal, double);
85 vtkSetMacro(SubDiagonal, double);
87
89
93 vtkGetStringMacro(RowLabel);
94 vtkSetStringMacro(RowLabel);
96
98
102 vtkGetStringMacro(ColumnLabel);
103 vtkSetStringMacro(ColumnLabel);
105
106protected:
109
111
112private:
114 void operator=(const vtkDiagonalMatrixSource&) = delete;
115
116 vtkArray* GenerateDenseArray();
117 vtkArray* GenerateSparseArray();
118
119 int ArrayType;
120 vtkIdType Extents;
121 double Diagonal;
122 double SuperDiagonal;
123 double SubDiagonal;
124 char* RowLabel;
125 char* ColumnLabel;
126};
127
128#endif
Superclass for algorithms that produce vtkArrayDatas as output.
Abstract interface for N-dimensional arrays.
Definition: vtkArray.h:65
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:113
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
int vtkIdType
Definition: vtkType.h:332