FEAT 3
Finite Element Analysis Toolbox
Loading...
Searching...
No Matches
sparse_matrix_bwrappedcsr.hpp
1// FEAT3: Finite Element Analysis Toolbox, Version 3
2// Copyright (C) 2010 by Stefan Turek & the FEAT group
3// FEAT3 is released under the GNU General Public License version 3,
4// see the file 'copyright.txt' in the top level directory for details.
5
6#pragma once
7
8// includes, FEAT
10#include <kernel/lafem/sparse_matrix_csr.hpp>
11#include <kernel/lafem/sparse_matrix_bcsr.hpp>
12
13namespace FEAT
14{
15 namespace LAFEM
16 {
38 template<typename DT_, typename IT_, int BlockSize_>
40 {
41 public:
43 typedef DT_ DataType;
45 typedef IT_ IndexType;
46
48 static constexpr int BlockHeight = BlockSize_;
50 static constexpr int BlockWidth = BlockSize_;
51
56
61
63 using BaseClass::BaseClass;
64
66 template <typename DT2_ = DT_, typename IT2_ = IT_>
68
70 template <typename DataType2_, typename IndexType2_>
72
77 {
78 }
79
88 BaseClass(std::forward<BaseClass>(other))
89 {
90 }
91
99 {
100 return VectorTypeL(this->rows());
101 }
102
109 VectorTypeR create_vector_r() const
110 {
111 return VectorTypeR(this->columns());
112 }
113
114 template <typename DT2_, typename IT2_>
115 void convert(const SparseMatrixCSR<DT2_, IT2_> & other)
116 {
117 BaseClass::convert(other);
118 }
119
128 {
130 }
131
134 {
135 return *this;
136 }
137
140 {
141 return *this;
142 }
143 };
144 } // namespace LAFEM
145} // namespace FEAT
FEAT Kernel base header.
CSR based blocked sparse matrix.
Intern::BCSRVectorHelper< DT_, IT_, BlockHeight_ >::VectorType VectorTypeL
Compatible L-vector type.
Intern::BCSRVectorHelper< DT_, IT_, BlockWidth_ >::VectorType VectorTypeR
Compatible R-vector type.
Wraps a SparseMatrixCSR to SparseMatrixBCSR.
LAFEM::SparseMatrixCSR< DT_, IT_ > & unwrap()
LAFEM::SparseMatrixCSR< DT_, IT_ > BaseClass
The real type of the underlying matrix.
SparseMatrixBWrappedCSR clone(CloneMode mode=CloneMode::Weak) const
Clone operation.
LAFEM::SparseMatrixBCSR< DT_, IT_, BlockSize_, BlockSize_ > PretendType
What this matrix pretends to be.
SparseMatrixBWrappedCSR(BaseClass &&other)
From-baseclass move constructor.
SparseMatrixBWrappedCSR()
Empty standard constructor.
VectorTypeL create_vector_l() const
Returns a new compatible vector for left-multiplication.
DT_ DataType
The floating point datatype.
VectorTypeR create_vector_r() const
Returns a new compatible vector for right-multiplication.
const LAFEM::SparseMatrixCSR< DT_, IT_ > & unwrap() const
static constexpr int BlockWidth
The block width the SparseMatrixBWrappedCSR pretends to have.
PretendType::VectorTypeL VectorTypeL
Vector type accepted for multiplication form the left.
static constexpr int BlockHeight
The block height the SparseMatrixBWrappedCSR pretends to have.
PretendType::VectorTypeR VectorTypeR
Vector type accepted for multiplication form the right.
CSR based sparse matrix.
void convert(const SparseMatrixCSR< DT2_, IT2_ > &other)
Conversion method.
Index rows() const
Retrieve matrix row count.
SparseMatrixCSR clone(CloneMode clone_mode=CloneMode::Weak) const
Clone operation.
Index columns() const
Retrieve matrix column count.
FEAT namespace.
Definition: adjactor.hpp:12