Go to the documentation of this file.00001
00002
00003
00004
00005
00006 #ifndef MOR_EPETRASAMPLINGOPERATOR_HPP
00007 #define MOR_EPETRASAMPLINGOPERATOR_HPP
00008
00009 #include "Epetra_Operator.h"
00010 #include "Epetra_Map.h"
00011
00012 #include "Teuchos_Array.hpp"
00013 #include "Teuchos_ArrayView.hpp"
00014
00015 namespace MOR {
00016
00017 class EpetraSamplingOperator : public Epetra_Operator {
00018 public:
00019 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
00020 typedef int GlobalIndex;
00021 #else
00022 typedef long long GlobalIndex;
00023 #endif
00024
00025 enum FromGIDsTag {
00026 fromGIDs
00027 };
00028
00029 EpetraSamplingOperator(const Epetra_Map &map, const Teuchos::ArrayView<const GlobalIndex> &sampleLIDs);
00030 EpetraSamplingOperator(const Epetra_Map &map, FromGIDsTag, const Teuchos::ArrayView<const GlobalIndex> &sampleGIDs);
00031
00032
00033 virtual const char *Label() const;
00034
00035 virtual const Epetra_Map &OperatorDomainMap() const;
00036 virtual const Epetra_Map &OperatorRangeMap() const;
00037 virtual const Epetra_Comm &Comm() const;
00038
00039 virtual bool UseTranspose() const;
00040 virtual int SetUseTranspose(bool UseTranspose);
00041
00042 virtual int Apply(const Epetra_MultiVector &X, Epetra_MultiVector &Y) const;
00043 virtual int ApplyInverse(const Epetra_MultiVector &X, Epetra_MultiVector &Y) const;
00044
00045 virtual bool HasNormInf() const;
00046 virtual double NormInf() const;
00047
00048 private:
00049 Epetra_Map map_;
00050 Teuchos::Array<int> sampleLIDs_;
00051
00052 bool useTranspose_;
00053 };
00054
00055 }
00056
00057 #endif