|
dune-pdelab 2.10-git
|
Loading...
Searching...
No Matches
blockmatrixdiagonal.hh
Go to the documentation of this file.
51 void matrix_element_vector_from_matrix(tags::field_matrix, FieldMatrix& c, const FieldMatrix& matrix)
105 // We don't know the type of the container that stores the actual field values (double, complex,...)
106 // Moreover, there might be different containers in case of heterogeneous matrices (multidomain etc.)
107 // In order to communicate the matrix blocks, we need to stream the single row inside the lowest-level
109 // The following set of functions extracts this information from the container and provides a simple
112 // WARNING: This assumes that matrix blocks at the lowest level are dense and stored in column-major format!
139 // FieldMatrix with a single row is special because the last-level index isn't stored, so we have to
142 typename FieldMatrix::field_type* row_begin(tags::field_matrix_1_any, FieldMatrix& c, const CI& ci, int i)
149 typename FieldMatrix::field_type* row_begin(tags::field_matrix_n_any, FieldMatrix& c, const CI& ci, int i)
156 // The end iterators are a little tricky: We want a pointer to the memory location directly after the last
157 // entry for the given row. In theory, we could get this location by dereferencing the end() iterator and
158 // then taking the address of that location, but we are not allowed to dereference an end() iterator. So
159 // we instead decrement the end() iterator by one, take the (valid) address of the element at that location
162 // With a 1x1 matrix, we can simply take the address directly following the begin() iterator's target.
164 typename FieldMatrix::field_type* row_end(tags::field_matrix_1_1, FieldMatrix& c, const CI& ci, int i)
170 // For any other matrix, we perform the decrement iterator / increment address of target dance...
173 typename FieldMatrix::field_type* row_end(tags::field_matrix_1_any, FieldMatrix& c, const CI& ci, int i)
183 typename FieldMatrix::field_type* row_end(tags::field_matrix_n_any, FieldMatrix& c, const CI& ci, int i)
192 // These are the standard begin() and end() methods for BlockVector. They recursvely call row_begin()
196 typename BlockVector::field_type* row_begin(tags::block_vector, BlockVector& c, const CI& ci, std::size_t i)
202 typename BlockVector::field_type* row_end(tags::block_vector, BlockVector& c, const CI& ci, std::size_t i)
230 diagonal::matrix_element_vector_from_matrix(container_tag(_container),_container,Backend::native(m));
267 : public Dune::CommDataHandleIF<AddMatrixElementVectorDataHandle<GFS>,typename Matrix::field_type>
OperatorHierarchy::ParallelMatrixHierarchy::ConstIterator matrix
auto rows(Matrix const &matrix)
static constexpr size_type M()
void mv(const X &x, Y &y) const
const FieldVector< K, n > & diagonal() const
std::enable_if< std::is_base_of< impl::WrapperBase, T >::value, Native< T > & >::type native(T &t)
Definition backend/interface.hh:192
typename native_type< T >::type Native
Alias of the native container type associated with T or T itself if it is not a backend wrapper.
Definition backend/interface.hh:176
tags::container< T >::type container_tag(const T &)
Gets instance of container tag associated with T.
Definition backend/istl/tags.hh:234
For backward compatibility – Do not use this!
typename Imp::BlockTraits< T >::field_type field_type
Definition blockmatrixdiagonal.hh:215
Backend::Native< M > Matrix
Definition blockmatrixdiagonal.hh:217
Definition blockmatrixdiagonal.hh:220
field_type * iterator
Definition blockmatrixdiagonal.hh:224
Container::field_type field_type
Definition blockmatrixdiagonal.hh:223
void invert()
Definition blockmatrixdiagonal.hh:233
diagonal::matrix_element_vector< Matrix >::type Container
Definition blockmatrixdiagonal.hh:222
MatrixElementVector(const M &m)
Definition blockmatrixdiagonal.hh:228
std::size_t row_size(const ContainerIndex &ci) const
Definition blockmatrixdiagonal.hh:245
void mv(const X &x, Y &y) const
Definition blockmatrixdiagonal.hh:239
iterator row_begin(const ContainerIndex &ci)
Definition blockmatrixdiagonal.hh:251
iterator row_end(const ContainerIndex &ci)
Definition blockmatrixdiagonal.hh:257
Container _container
Definition blockmatrixdiagonal.hh:226
Definition blockmatrixdiagonal.hh:268
AddMatrixElementVectorDataHandle(const GFS &gfs, MatrixElementVector &v)
Definition blockmatrixdiagonal.hh:275
void gather(MessageBuffer &buff, const Entity &e) const
pack data from user to message buffer
Definition blockmatrixdiagonal.hh:310
void scatter(MessageBuffer &buff, const Entity &e, size_type n)
unpack data from message buffer to user
Definition blockmatrixdiagonal.hh:329
size_type size(Entity &e) const
how many objects of type DataType have to be sent for a given entity
Definition blockmatrixdiagonal.hh:298
bool fixedSize(int dim, int codim) const
returns true if size per entity of given dim and codim is a constant
Definition blockmatrixdiagonal.hh:288
bool contains(int dim, int codim) const
returns true if data for this codim should be communicated
Definition blockmatrixdiagonal.hh:282
Matrix::field_type DataType
Definition blockmatrixdiagonal.hh:272
GFS::Traits::SizeType size_type
Definition blockmatrixdiagonal.hh:273
Definition entityindexcache.hh:18
Ordering::Traits::ContainerIndex ContainerIndex
Definition entityindexcache.hh:24
const CI & containerIndex(size_type i) const
Definition entityindexcache.hh:65
Legal Statements / Impressum | Hosted by TU Dresden & Uni Heidelberg | Generated by
1.9.8