From: Martin Kronbichler Date: Sat, 18 Aug 2018 17:18:55 +0000 (+0200) Subject: Add documentation. X-Git-Tag: v9.1.0-rc1~806^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=85483f69d4edce7108e693ade5cf0daa4adf4a9a;p=dealii.git Add documentation. --- diff --git a/include/deal.II/matrix_free/dof_info.templates.h b/include/deal.II/matrix_free/dof_info.templates.h index caaba870dd..3dd3a6c69c 100644 --- a/include/deal.II/matrix_free/dof_info.templates.h +++ b/include/deal.II/matrix_free/dof_info.templates.h @@ -928,7 +928,7 @@ namespace internal // Step 2: fix single contiguous cell among others with interleaved // storage if (n_interleaved > 0 && index_kinds[static_cast( - IndexStorageVariants::contiguous)]) + IndexStorageVariants::contiguous)] > 0) for (unsigned int i = 0; i < irregular_cells.size(); ++i) if (index_storage_variants[dof_access_cell][i] == IndexStorageVariants::contiguous) @@ -941,14 +941,6 @@ namespace internal IndexStorageVariants::interleaved_contiguous_mixed_strides)]++; } - n_interleaved = - index_kinds[static_cast( - IndexStorageVariants::interleaved_contiguous)] + - index_kinds[static_cast( - IndexStorageVariants::interleaved_contiguous_strided)] + - index_kinds[static_cast( - IndexStorageVariants::interleaved_contiguous_mixed_strides)]; - // Step 3: Interleaved cells are left but also some non-contiguous ones // -> revert all to full storage if (n_interleaved > 0 && diff --git a/include/deal.II/matrix_free/fe_evaluation.h b/include/deal.II/matrix_free/fe_evaluation.h index daafb5ad8f..889b13753e 100644 --- a/include/deal.II/matrix_free/fe_evaluation.h +++ b/include/deal.II/matrix_free/fe_evaluation.h @@ -6885,7 +6885,12 @@ FEEvaluation:: const bool evaluate_gradients, const bool evaluate_hessians) { - if (this->dof_info->index_storage_variants + // If the index storage is interleaved and contiguous and the vector storage + // has the correct alignment, we can directly pass the pointer into the + // vector to the evaluate() call, without reading the vector entries into a + // separate data field. This saves some operations. + if (std::is_same::value && + this->dof_info->index_storage_variants [internal::MatrixFreeFunctions::DoFInfo::dof_access_cell] [this->cell] == internal::MatrixFreeFunctions::DoFInfo:: IndexStorageVariants::interleaved_contiguous && @@ -6998,7 +7003,13 @@ FEEvaluation:: const bool integrate_gradients, VectorType &destination) { - if (this->dof_info->index_storage_variants + // If the index storage is interleaved and contiguous and the vector storage + // has the correct alignment, we can directly pass the pointer into the + // vector to the integrate() call, without writing temporary results into a + // separate data field that will later be added into the vector. This saves + // some operations. + if (std::is_same::value && + this->dof_info->index_storage_variants [internal::MatrixFreeFunctions::DoFInfo::dof_access_cell] [this->cell] == internal::MatrixFreeFunctions::DoFInfo:: IndexStorageVariants::interleaved_contiguous &&