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 #ifndef TSFEPETRAVECTORSPACE_HPP
00028 #define TSFEPETRAVECTORSPACE_HPP
00029
00030 #include "SundanceDefs.hpp"
00031 #include "Epetra_Map.h"
00032 #include "Teuchos_RefCountPtr.hpp"
00033 #include "Teuchos_Comm.hpp"
00034 #include "Thyra_ScalarProdVectorSpaceBase.hpp"
00035 #include "Thyra_SpmdVectorSpaceBase.hpp"
00036
00037 namespace TSFExtended
00038 {
00039 using namespace Teuchos;
00040 using namespace Thyra;
00041
00042
00043
00044
00045
00046 class EpetraVectorSpace
00047 : virtual public Thyra::ScalarProdVectorSpaceBase<double>,
00048 virtual public Thyra::SpmdVectorSpaceBase<double>
00049 {
00050 public:
00051
00052
00053 EpetraVectorSpace(const RCP<const Epetra_Map>& map);
00054
00055
00056
00057
00058
00059 std::string description() const;
00060
00061
00062
00063
00064
00065
00066 OrdType dim() const ;
00067
00068
00069 bool isCompatible(const VectorSpaceBase<double>& other) const ;
00070
00071
00072 RCP<const VectorSpaceFactoryBase<double> >
00073 smallVecSpcFcty() const ;
00074
00075
00076 RCP< const VectorSpaceBase<double> > clone() const ;
00077
00078
00079
00080
00081
00082
00083
00084
00085
00086 Teuchos::RCP<const Teuchos::Comm<OrdType> > getComm() const
00087 {return comm_;}
00088
00089
00090 OrdType localSubDim() const {return localSubDim_;}
00091
00092
00093 OrdType localOffset() const {return localOffset_;}
00094
00095
00096 OrdType mapCode() const {return -1;}
00097
00098
00099
00100
00101 const RCP<const Epetra_Map>& epetraMap() const
00102 {return epetraMap_;}
00103
00104
00105 protected:
00106
00107 Teuchos::RCP<const Teuchos::Comm<OrdType> >
00108 epetraCommToTeuchosComm(const Epetra_Comm& epComm) const ;
00109
00110
00111
00112
00113 RCP<VectorBase<double> > createMember() const;
00114
00115 RCP<MultiVectorBase<double> > createMembers(int numVecs) const;
00116
00117 private:
00118
00119 RCP<const VectorSpaceFactoryBase<double> > smallVecSpcFactory_;
00120
00121 RCP<const Epetra_Map> epetraMap_;
00122
00123 Teuchos::RCP<const Teuchos::Comm<OrdType> > comm_;
00124
00125 OrdType localSubDim_;
00126
00127 OrdType localOffset_;
00128 };
00129
00130 }
00131
00132 #endif