Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029 #ifndef TSFEPETRAMATRIXFACTORY_HPP
00030 #define TSFEPETRAMATRIXFACTORY_HPP
00031
00032 #include "TSFEpetraVectorSpace.hpp"
00033 #include "TSFIncrementallyConfigurableMatrixFactory.hpp"
00034 #include "TSFCollectivelyConfigurableMatrixFactory.hpp"
00035 #include "TSFMatrixFactory.hpp"
00036 #include "SundanceHandleable.hpp"
00037 #include "SundancePrintable.hpp"
00038 #include "Epetra_CrsGraph.h"
00039
00040 namespace TSFExtended
00041 {
00042 using namespace Teuchos;
00043 using namespace Thyra;
00044
00045
00046 class EpetraMatrixFactory : public MatrixFactory<double>,
00047 public IncrementallyConfigurableMatrixFactory,
00048 public CollectivelyConfigurableMatrixFactory
00049 {
00050 public:
00051
00052
00053 EpetraMatrixFactory(const RCP<const EpetraVectorSpace>& domain,
00054 const RCP<const EpetraVectorSpace>& range);
00055
00056
00057 const RCP<const EpetraVectorSpace>& epRange() const {return range_;}
00058
00059
00060 const RCP<const EpetraVectorSpace>& epDomain() const {return domain_;}
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071 virtual void initializeNonzerosInRow(int globalRowIndex,
00072 int nElemsToInsert,
00073 const int* globalColumnIndices) ;
00074
00075
00076
00077
00078 virtual void initializeNonzeroBatch(int numRows,
00079 int rowBlockSize,
00080 const int* globalRowIndices,
00081 int numColumnsPerRow,
00082 const int* globalColumnIndices,
00083 const int* skipRow);
00084
00085
00086 virtual void configure(int lowestRow,
00087 const std::vector<int>& rowPtrs,
00088 const std::vector<int>& nnzPerRow,
00089 const std::vector<int>& data);
00090
00091
00092 void finalize();
00093
00094
00095 const Epetra_CrsGraph& graph() const ;
00096
00097
00098 virtual LinearOperator<double> createMatrix() const ;
00099
00100 protected:
00101
00102 private:
00103
00104
00105 RCP<Epetra_CrsGraph> graph_;
00106
00107
00108 RCP<const EpetraVectorSpace> range_;
00109
00110
00111 RCP<const EpetraVectorSpace> domain_;
00112 };
00113 }
00114
00115 #endif