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 TSFPARTITIONEDMATRIXFACTORYDECL_HPP
00030 #define TSFPARTITIONEDMATRIXFACTORYDECL_HPP
00031
00032 #include "TSFIncrementallyConfigurableMatrixFactory.hpp"
00033 #include "TSFCollectivelyConfigurableMatrixFactory.hpp"
00034 #include "TSFMatrixFactory.hpp"
00035 #include "TSFVectorSpaceDecl.hpp"
00036 #include "TSFVectorType.hpp"
00037 #include "SundanceHandleable.hpp"
00038 #include "SundancePrintable.hpp"
00039 #include "Epetra_CrsGraph.h"
00040 #include <set>
00041
00042 namespace TSFExtended
00043 {
00044 using namespace Teuchos;
00045 using namespace Thyra;
00046
00047
00048 class PartitionedMatrixFactory
00049 : public MatrixFactory<double>,
00050 public IncrementallyConfigurableMatrixFactory
00051 {
00052 public:
00053
00054
00055 PartitionedMatrixFactory(
00056 const VectorSpace<double>& domain,
00057 int lowestLocalCol,
00058 const RCP<Array<int> >& isBCCol,
00059 const RCP<std::set<int> >& remoteBCCols,
00060 const VectorType<double>& domainVecType,
00061 const VectorSpace<double>& range,
00062 int lowestLocalRow,
00063 const RCP<Array<int> >& isBCRow,
00064 const VectorType<double>& rangeType
00065 );
00066
00067
00068 virtual ~PartitionedMatrixFactory(){;}
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078 virtual void initializeNonzerosInRow(int globalRowIndex,
00079 int nElemsToInsert,
00080 const int* globalColumnIndices) ;
00081
00082
00083 void finalize();
00084
00085
00086 virtual LinearOperator<double> createMatrix() const ;
00087
00088 protected:
00089
00090 private:
00091 VectorSpace<double> domain_;
00092 VectorSpace<double> internalDomain_;
00093 VectorSpace<double> bcDomain_;
00094 RCP<Array<int> > isBCCol_;
00095 RCP<std::set<int> > remoteBCCols_;
00096 VectorType<double> domainVecType_;
00097 int lowestLocalCol_;
00098 int highestLocalCol_;
00099 VectorSpace<double> range_;
00100 VectorSpace<double> internalRange_;
00101 VectorSpace<double> bcRange_;
00102 RCP<Array<int> > isBCRow_;
00103 VectorType<double> rangeVecType_;
00104 int lowestLocalRow_;
00105 int highestLocalRow_;
00106
00107
00108 Array<Array<RCP<MatrixFactory<double> > > > blockFactory_;
00109 Array<Array<IncrementallyConfigurableMatrixFactory*> > blockICMF_;
00110 };
00111 }
00112
00113
00114 #endif