Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007 #include "MOR_WindowedAtomicBasisSource.hpp"
00008
00009 #include <algorithm>
00010
00011 namespace MOR {
00012
00013 WindowedAtomicBasisSource::WindowedAtomicBasisSource(
00014 const Teuchos::RCP<AtomicBasisSource> &delegate,
00015 int firstVectorRank) :
00016 delegate_(delegate),
00017 firstVectorRank_(firstVectorRank),
00018 vectorCount_(delegate->vectorCount() - firstVectorRank)
00019 {
00020
00021 }
00022
00023 WindowedAtomicBasisSource::WindowedAtomicBasisSource(
00024 const Teuchos::RCP<AtomicBasisSource> &delegate,
00025 int firstVectorRank,
00026 int vectorCountMax) :
00027 delegate_(delegate),
00028 firstVectorRank_(firstVectorRank),
00029 vectorCount_(std::min(delegate->vectorCount() - firstVectorRank, vectorCountMax))
00030 {
00031
00032 }
00033
00034 Epetra_Map
00035 WindowedAtomicBasisSource::atomMap() const
00036 {
00037 return delegate_->atomMap();
00038 }
00039
00040 int
00041 WindowedAtomicBasisSource::entryCount(int localAtomRank) const
00042 {
00043 return delegate_->entryCount(localAtomRank);
00044 }
00045
00046 int
00047 WindowedAtomicBasisSource::entryCountMax() const
00048 {
00049 return delegate_->entryCountMax();
00050 }
00051
00052 int
00053 WindowedAtomicBasisSource::vectorCount() const
00054 {
00055 return vectorCount_;
00056 }
00057
00058 int
00059 WindowedAtomicBasisSource::currentVectorRank() const
00060 {
00061 return firstVectorRank_ + delegate_->currentVectorRank();
00062 }
00063
00064 void
00065 WindowedAtomicBasisSource::currentVectorRankIs(int vr)
00066 {
00067 delegate_->currentVectorRankIs(firstVectorRank_ + vr);
00068 }
00069
00070 Teuchos::ArrayView<const double>
00071 WindowedAtomicBasisSource::atomData(int localAtomRank, const Teuchos::ArrayView<double> &result) const
00072 {
00073 return delegate_->atomData(localAtomRank, result);
00074 }
00075
00076 }