VTK
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 
37 #ifndef vtkDiagonalMatrixSource_h
38 #define vtkDiagonalMatrixSource_h
39 
40 #include "vtkFiltersSourcesModule.h" // For export macro
41 #include "vtkArrayDataAlgorithm.h"
42 
43 class VTKFILTERSSOURCES_EXPORT vtkDiagonalMatrixSource : public vtkArrayDataAlgorithm
44 {
45 public:
46  static vtkDiagonalMatrixSource* New();
48  void PrintSelf(ostream& os, vtkIndent indent) override;
49 
50  // Determines whether the output matrix will be dense or sparse
52  {
54  SPARSE
55  };
56 
57  vtkGetMacro(ArrayType, int);
58  vtkSetMacro(ArrayType, int);
59 
61 
64  vtkGetMacro(Extents, vtkIdType);
65  vtkSetMacro(Extents, vtkIdType);
67 
69 
72  vtkGetMacro(Diagonal, double);
73  vtkSetMacro(Diagonal, double);
75 
77 
80  vtkGetMacro(SuperDiagonal, double);
81  vtkSetMacro(SuperDiagonal, double);
83 
85 
88  vtkGetMacro(SubDiagonal, double);
89  vtkSetMacro(SubDiagonal, double);
91 
93 
97  vtkGetStringMacro(RowLabel);
98  vtkSetStringMacro(RowLabel);
100 
102 
106  vtkGetStringMacro(ColumnLabel);
107  vtkSetStringMacro(ColumnLabel);
109 
110 protected:
112  ~vtkDiagonalMatrixSource() override;
113 
114  int RequestData(
117  vtkInformationVector*) override;
118 
119 private:
121  void operator=(const vtkDiagonalMatrixSource&) = delete;
122 
123  vtkArray* GenerateDenseArray();
124  vtkArray* GenerateSparseArray();
125 
126  int ArrayType;
127  vtkIdType Extents;
128  double Diagonal;
129  double SuperDiagonal;
130  double SubDiagonal;
131  char* RowLabel;
132  char* ColumnLabel;
133 };
134 
135 #endif
136 
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
Store vtkAlgorithm input/output information.
Abstract interface for N-dimensional arrays.
Definition: vtkArray.h:70
int vtkIdType
Definition: vtkType.h:347
a simple class to control print indentation
Definition: vtkIndent.h:39
Superclass for algorithms that produce vtkArrayDatas as output.
generates a sparse or dense square matrix with user-specified values for the diagonal, superdiagonal, and subdiagonal.
static vtkArrayDataAlgorithm * New()
Store zero or more vtkInformation instances.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.