DUNE PDELab (git)
blockmatrixdiagonal.hh
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>
typename Imp::BlockTraits< B >::field_type field_type
export the type representing the field
Definition: bvector.hh:398
CommDataHandleIF describes the features of a data handle for communication in parallel runs using the...
Definition: datahandleif.hh:78
void scatter(MessageBufferImp &buff, const EntityType &e, size_t n)
unpack data from message buffer to user.
Definition: datahandleif.hh:143
void gather(MessageBufferImp &buff, const EntityType &e) const
pack data from user to message buffer
Definition: datahandleif.hh:129
Traits::value_type field_type
export the type representing the field
Definition: densematrix.hh:160
Iterator iterator
typedef for stl compliant access
Definition: densevector.hh:344
typename Imp::BlockTraits< T >::field_type field_type
Export the type representing the underlying field.
Definition: matrix.hh:565
constexpr std::integral_constant< std::size_t, sizeof...(II)> size(std::integer_sequence< T, II... >)
Return the size of the sequence.
Definition: integersequence.hh:75
constexpr std::bool_constant<((II==value)||...)> contains(std::integer_sequence< T, II... >, std::integral_constant< T, value >)
Checks whether or not a given sequence contains a value.
Definition: integersequence.hh:137
std::size_t fixedSize
The number of data items per index if it is fixed, 0 otherwise.
Definition: variablesizecommunicator.hh:264
|
Legal Statements / Impressum |
Hosted by TU Dresden |
generated with Hugo v0.111.3
(Nov 12, 23:30, 2024)