LAMA
|
00001 00034 #ifndef LAMA_MATRIX_CREATOR_HPP_ 00035 #define LAMA_MATRIX_CREATOR_HPP_ 00036 00037 // for dll_import 00038 #include <lama/config.hpp> 00039 00040 // others 00041 #include <lama/matrix/CSRSparseMatrix.hpp> 00042 00043 #include <memory> 00044 00054 namespace lama 00055 { 00056 00065 template<typename T> 00066 class LAMA_DLL_IMPORTEXPORT MatrixCreator 00067 { 00068 public: 00069 00077 static void fillRandom( Matrix& matrix, double density ); 00078 00086 static void buildRandom( CSRSparseMatrix<T>& matrix, const IndexType size, const double density ); 00087 00096 static void buildPoisson1D( CSRSparseMatrix<T>& matrix, 00097 const IndexType stencilType, const IndexType dim ); 00098 00107 static void buildPoisson2D( CSRSparseMatrix<T>& matrix, const IndexType stencilType, 00108 const IndexType dim1, const IndexType dim2 ); 00109 00118 static void buildPoisson3D( CSRSparseMatrix<T>& matrix, const IndexType stencilType, 00119 const IndexType dim1, const IndexType dim2, const IndexType dim3 ); 00120 00131 static void buildPoisson( CSRSparseMatrix<T>& matrix, 00132 const IndexType dimension, const IndexType stencilType, 00133 const IndexType dimX, const IndexType dimY, const IndexType dimZ ); 00134 00141 static bool supportedStencilType( const IndexType dimension, const IndexType stencilType ); 00142 00143 private: 00144 00145 LAMA_LOG_DECL_STATIC_LOGGER( logger ); 00146 }; 00147 00148 } // namespace lama 00149 00150 #endif // LAMA_MATRIX_CREATOR_HPP_