Skip to content
Snippets Groups Projects
Commit 66034f9f authored by Jonathan Youett's avatar Jonathan Youett
Browse files

OperatorType -> MatrixType

DiscFuncType -> VectorType
parent ae0a4d1d
No related branches found
No related tags found
No related merge requests found
template<class DiscFuncType, class BitVectorType, class OperatorType> template<class VectorType, class BitVectorType, class MatrixType>
void TruncatedDenseMGTransfer<DiscFuncType, BitVectorType, OperatorType>::prolong(const DiscFuncType& f, DiscFuncType& t) const void TruncatedDenseMGTransfer<VectorType, BitVectorType, MatrixType>::prolong(const VectorType& f, VectorType& t) const
{ {
// If the critical bitfield is not set, call the base class method // If the critical bitfield is not set, call the base class method
if (this->critical_ == nullptr) { if (this->critical_ == nullptr) {
...@@ -21,10 +21,10 @@ void TruncatedDenseMGTransfer<DiscFuncType, BitVectorType, OperatorType>::prolon ...@@ -21,10 +21,10 @@ void TruncatedDenseMGTransfer<DiscFuncType, BitVectorType, OperatorType>::prolon
t.resize(this->matrix_.N()); t.resize(this->matrix_.N());
typedef typename DiscFuncType::Iterator Iterator; typedef typename VectorType::Iterator Iterator;
typedef typename DiscFuncType::ConstIterator ConstIterator; typedef typename VectorType::ConstIterator ConstIterator;
typedef typename OperatorType::row_type RowType; typedef typename MatrixType::row_type RowType;
typedef typename RowType::ConstIterator ColumnIterator; typedef typename RowType::ConstIterator ColumnIterator;
Iterator tIt = t.begin(); Iterator tIt = t.begin();
...@@ -60,8 +60,8 @@ void TruncatedDenseMGTransfer<DiscFuncType, BitVectorType, OperatorType>::prolon ...@@ -60,8 +60,8 @@ void TruncatedDenseMGTransfer<DiscFuncType, BitVectorType, OperatorType>::prolon
} }
template<class DiscFuncType, class BitVectorType, class OperatorType> template<class VectorType, class BitVectorType, class MatrixType>
void TruncatedDenseMGTransfer<DiscFuncType, BitVectorType, OperatorType>::restrict(const DiscFuncType& f, DiscFuncType& t) const void TruncatedDenseMGTransfer<VectorType, BitVectorType, MatrixType>::restrict(const VectorType& f, VectorType& t) const
{ {
// If the critical bitfield is not set, call the base class method // If the critical bitfield is not set, call the base class method
...@@ -84,10 +84,10 @@ void TruncatedDenseMGTransfer<DiscFuncType, BitVectorType, OperatorType>::restri ...@@ -84,10 +84,10 @@ void TruncatedDenseMGTransfer<DiscFuncType, BitVectorType, OperatorType>::restri
t.resize(this->matrix_.M()); t.resize(this->matrix_.M());
t = 0; t = 0;
typedef typename DiscFuncType::Iterator Iterator; typedef typename VectorType::Iterator Iterator;
typedef typename DiscFuncType::ConstIterator ConstIterator; typedef typename VectorType::ConstIterator ConstIterator;
typedef typename OperatorType::row_type RowType; typedef typename MatrixType::row_type RowType;
typedef typename RowType::ConstIterator ColumnIterator; typedef typename RowType::ConstIterator ColumnIterator;
Iterator tIt = t.begin(); Iterator tIt = t.begin();
...@@ -104,7 +104,7 @@ void TruncatedDenseMGTransfer<DiscFuncType, BitVectorType, OperatorType>::restri ...@@ -104,7 +104,7 @@ void TruncatedDenseMGTransfer<DiscFuncType, BitVectorType, OperatorType>::restri
// The following lines are a matrix-vector loop, but rows belonging // The following lines are a matrix-vector loop, but rows belonging
// to critical dofs are left out // to critical dofs are left out
typename DiscFuncType::block_type& tEntry = t[cIt.index()]; typename VectorType::block_type& tEntry = t[cIt.index()];
for (int i=0; i<blocksize; i++) { for (int i=0; i<blocksize; i++) {
for (int j=0; j<blocksize; j++) { for (int j=0; j<blocksize; j++) {
...@@ -123,9 +123,9 @@ void TruncatedDenseMGTransfer<DiscFuncType, BitVectorType, OperatorType>::restri ...@@ -123,9 +123,9 @@ void TruncatedDenseMGTransfer<DiscFuncType, BitVectorType, OperatorType>::restri
} }
template<class DiscFuncType, class BitVectorType, class OperatorType> template<class VectorType, class BitVectorType, class MatrixType>
void TruncatedDenseMGTransfer<DiscFuncType, BitVectorType, OperatorType>:: void TruncatedDenseMGTransfer<VectorType, BitVectorType, MatrixType>::
galerkinRestrict(const OperatorType& fineMat, OperatorType& coarseMat) const galerkinRestrict(const MatrixType& fineMat, MatrixType& coarseMat) const
{ {
// If the critical bitfield is not set, call the base class method // If the critical bitfield is not set, call the base class method
...@@ -141,7 +141,7 @@ galerkinRestrict(const OperatorType& fineMat, OperatorType& coarseMat) const ...@@ -141,7 +141,7 @@ galerkinRestrict(const OperatorType& fineMat, OperatorType& coarseMat) const
// //////////////////////// // ////////////////////////
// Nonsymmetric case // Nonsymmetric case
// //////////////////////// // ////////////////////////
typedef typename OperatorType::row_type RowType; typedef typename MatrixType::row_type RowType;
typedef typename RowType::Iterator ColumnIterator; typedef typename RowType::Iterator ColumnIterator;
typedef typename RowType::ConstIterator ConstColumnIterator; typedef typename RowType::ConstIterator ConstColumnIterator;
...@@ -199,7 +199,7 @@ galerkinRestrict(const OperatorType& fineMat, OperatorType& coarseMat) const ...@@ -199,7 +199,7 @@ galerkinRestrict(const OperatorType& fineMat, OperatorType& coarseMat) const
if (this->recompute_ && !((*this->recompute_)[iv][0]) && !((*this->recompute_)[jv][0])) if (this->recompute_ && !((*this->recompute_)[iv][0]) && !((*this->recompute_)[jv][0]))
continue; continue;
typename OperatorType::block_type& cm = coarseMat[iv][jv]; typename MatrixType::block_type& cm = coarseMat[iv][jv];
// Compute im * m * jm, but omitting the critical entries // Compute im * m * jm, but omitting the critical entries
for (int i=0; i<blocksize; i++) { for (int i=0; i<blocksize; i++) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment