VTK  9.0.1
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 
34 #include "vtkArrayDataAlgorithm.h"
35 #include "vtkFiltersSourcesModule.h" // For export macro
36 
37 class VTKFILTERSSOURCES_EXPORT vtkDiagonalMatrixSource : public vtkArrayDataAlgorithm
38 {
39 public:
40  static vtkDiagonalMatrixSource* New();
42  void PrintSelf(ostream& os, vtkIndent indent) override;
43 
44  // Determines whether the output matrix will be dense or sparse
46  {
48  SPARSE
49  };
50 
51  vtkGetMacro(ArrayType, int);
52  vtkSetMacro(ArrayType, int);
53 
55 
58  vtkGetMacro(Extents, vtkIdType);
59  vtkSetMacro(Extents, vtkIdType);
61 
63 
66  vtkGetMacro(Diagonal, double);
67  vtkSetMacro(Diagonal, double);
69 
71 
74  vtkGetMacro(SuperDiagonal, double);
75  vtkSetMacro(SuperDiagonal, double);
77 
79 
82  vtkGetMacro(SubDiagonal, double);
83  vtkSetMacro(SubDiagonal, double);
85 
87 
91  vtkGetStringMacro(RowLabel);
92  vtkSetStringMacro(RowLabel);
94 
96 
100  vtkGetStringMacro(ColumnLabel);
101  vtkSetStringMacro(ColumnLabel);
103 
104 protected:
106  ~vtkDiagonalMatrixSource() override;
107 
109 
110 private:
112  void operator=(const vtkDiagonalMatrixSource&) = delete;
113 
114  vtkArray* GenerateDenseArray();
115  vtkArray* GenerateSparseArray();
116 
117  int ArrayType;
118  vtkIdType Extents;
119  double Diagonal;
120  double SuperDiagonal;
121  double SubDiagonal;
122  char* RowLabel;
123  char* ColumnLabel;
124 };
125 
126 #endif
vtkArrayDataAlgorithm.h
vtkIdType
int vtkIdType
Definition: vtkType.h:338
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:35
vtkDiagonalMatrixSource::DENSE
@ DENSE
Definition: vtkDiagonalMatrixSource.h:47
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkArrayDataAlgorithm::RequestData
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
vtkArrayDataAlgorithm
Superclass for algorithms that produce vtkArrayDatas as output.
Definition: vtkArrayDataAlgorithm.h:53
vtkDiagonalMatrixSource
generates a sparse or dense square matrix with user-specified values for the diagonal,...
Definition: vtkDiagonalMatrixSource.h:37
vtkArray
Abstract interface for N-dimensional arrays.
Definition: vtkArray.h:64
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:73
vtkArrayDataAlgorithm::New
static vtkArrayDataAlgorithm * New()
vtkArrayDataAlgorithm::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkDiagonalMatrixSource::StorageType
StorageType
Definition: vtkDiagonalMatrixSource.h:45