VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkDiagonalMatrixSource.h 00005 00006 ------------------------------------------------------------------------- 00007 Copyright 2008 Sandia Corporation. 00008 Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, 00009 the U.S. Government retains certain rights in this software. 00010 ------------------------------------------------------------------------- 00011 00012 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen 00013 All rights reserved. 00014 See Copyright.txt or http://www.kitware.com/Copyright.htm for details. 00015 00016 This software is distributed WITHOUT ANY WARRANTY; without even 00017 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00018 PURPOSE. See the above copyright notice for more information. 00019 00020 =========================================================================*/ 00021 00036 #ifndef __vtkDiagonalMatrixSource_h 00037 #define __vtkDiagonalMatrixSource_h 00038 00039 #include "vtkFiltersSourcesModule.h" // For export macro 00040 #include "vtkArrayDataAlgorithm.h" 00041 00042 class VTKFILTERSSOURCES_EXPORT vtkDiagonalMatrixSource : public vtkArrayDataAlgorithm 00043 { 00044 public: 00045 static vtkDiagonalMatrixSource* New(); 00046 vtkTypeMacro(vtkDiagonalMatrixSource, vtkArrayDataAlgorithm); 00047 void PrintSelf(ostream& os, vtkIndent indent); 00048 00049 //BTX 00050 // Determines whether the output matrix will be dense or sparse 00051 enum StorageType 00052 { 00053 DENSE, 00054 SPARSE 00055 }; 00056 //ETX 00057 00058 vtkGetMacro(ArrayType, int); 00059 vtkSetMacro(ArrayType, int); 00060 00062 00063 vtkGetMacro(Extents, vtkIdType); 00064 vtkSetMacro(Extents, vtkIdType); 00066 00068 00070 vtkGetMacro(Diagonal, double); 00071 vtkSetMacro(Diagonal, double); 00073 00075 00077 vtkGetMacro(SuperDiagonal, double); 00078 vtkSetMacro(SuperDiagonal, double); 00080 00082 00084 vtkGetMacro(SubDiagonal, double); 00085 vtkSetMacro(SubDiagonal, double); 00087 00089 00090 vtkGetStringMacro(RowLabel); 00091 vtkSetStringMacro(RowLabel); 00093 00095 00096 vtkGetStringMacro(ColumnLabel); 00097 vtkSetStringMacro(ColumnLabel); 00099 00100 protected: 00101 vtkDiagonalMatrixSource(); 00102 ~vtkDiagonalMatrixSource(); 00103 00104 int RequestData( 00105 vtkInformation*, 00106 vtkInformationVector**, 00107 vtkInformationVector*); 00108 00109 private: 00110 vtkDiagonalMatrixSource(const vtkDiagonalMatrixSource&); // Not implemented 00111 void operator=(const vtkDiagonalMatrixSource&); // Not implemented 00112 00113 vtkArray* GenerateDenseArray(); 00114 vtkArray* GenerateSparseArray(); 00115 00116 int ArrayType; 00117 vtkIdType Extents; 00118 double Diagonal; 00119 double SuperDiagonal; 00120 double SubDiagonal; 00121 char* RowLabel; 00122 char* ColumnLabel; 00123 }; 00124 00125 #endif 00126