]> https://gitweb.dealii.org/ - dealii.git/commit
Rework Compressed*SparsityPattern
authorTimo Heister <timo.heister@gmail.com>
Sun, 8 Mar 2015 15:08:31 +0000 (11:08 -0400)
committerTimo Heister <timo.heister@gmail.com>
Sat, 21 Mar 2015 23:09:23 +0000 (19:09 -0400)
commitceb95444570d0bb019d58b5ad73ed319699f257b
treec1b53aa8a5f5c66ab775716beadab7f8695f64f6
parent134cd028541b36f82623783c56c9ab7e1128f704
Rework Compressed*SparsityPattern

- rename CompressedSimpleSparsityPattern to DynamicSparsityPattern
- deprecate all Compressed*SparsityPattern classes
- same for BlockCompressed*SparsityPattern
- update examples
- replace non-dynamic sparsity creation in step-7, 8, 9, 13, 14, 16, 23,
24, 25, 28, 29, 35

Motivation for removing the other compressed objects:
Number of degrees of freedom: 274625
FE_Q<3>(4)
CompressedSimple vmpeak:  749024 rss:  530804 make: 5.99s copy: 3.58s
Compressed       vmpeak:  744880 rss:  526852 make: 8.59s copy: 3.64s
CompressedSet    vmpeak: 3184880 rss: 2966776 make: 92s   copy: 18s

Or in Martin's words:
I remember having looked into compute times for the
DoFTools::make_sparsity_pattern in detail some five years ago and all
benchmarks showed CompressedSimpleSparsityPattern as the fastest of the
three. The internal data structure in CSimpleSP is std::vector, thus
simpler than plain CSP where there is an additional array of length 8
with 'fresh' entries about to be submitted but otherwise very similar.
std::set as used in CSetSP does way too many memory allocations and is
most likely slower than inserting into a sorted vector for almost all
imaginable loads with up to a few hundred entries. In particular for how
we mostly use sparsity patterns where each row gets touched as many
times as we have adjacent elements to that DoF.

Last but not least, CSimpleSP is the only one with the appropriate
infrastructure for parallel distributed computations where rows use an
additional IndexSet argument.
72 files changed:
cmake/config/template-arguments.in
examples/doxygen/compressed_block_sparsity_pattern.cc
examples/step-11/step-11.cc
examples/step-12/step-12.cc
examples/step-13/step-13.cc
examples/step-14/step-14.cc
examples/step-15/step-15.cc
examples/step-16/step-16.cc
examples/step-18/step-18.cc
examples/step-2/step-2.cc
examples/step-20/step-20.cc
examples/step-22/step-22.cc
examples/step-23/step-23.cc
examples/step-24/step-24.cc
examples/step-25/step-25.cc
examples/step-26/step-26.cc
examples/step-27/step-27.cc
examples/step-28/step-28.cc
examples/step-29/step-29.cc
examples/step-3/step-3.cc
examples/step-31/step-31.cc
examples/step-32/step-32.cc
examples/step-33/step-33.cc
examples/step-35/step-35.cc
examples/step-36/step-36.cc
examples/step-38/step-38.cc
examples/step-39/step-39.cc
examples/step-4/step-4.cc
examples/step-40/step-40.cc
examples/step-41/step-41.cc
examples/step-43/step-43.cc
examples/step-44/step-44.cc
examples/step-45/step-45.cc
examples/step-46/step-46.cc
examples/step-47/step-47.cc
examples/step-5/step-5.cc
examples/step-50/step-50.cc
examples/step-51/step-51.cc
examples/step-52/step-52.cc
examples/step-6/step-6.cc
examples/step-7/step-7.cc
examples/step-8/step-8.cc
examples/step-9/step-9.cc
include/deal.II/lac/block_sparsity_pattern.h
include/deal.II/lac/compressed_set_sparsity_pattern.h
include/deal.II/lac/compressed_simple_sparsity_pattern.h
include/deal.II/lac/compressed_sparsity_pattern.h
include/deal.II/lac/constraint_matrix.h
include/deal.II/lac/dynamic_sparsity_pattern.h [new file with mode: 0644]
include/deal.II/lac/generic_linear_algebra.h
include/deal.II/lac/petsc_parallel_block_sparse_matrix.h
include/deal.II/lac/sparsity_pattern.h
include/deal.II/lac/trilinos_block_sparse_matrix.h
include/deal.II/lac/trilinos_sparsity_pattern.h
include/deal.II/matrix_free/dof_info.h
include/deal.II/matrix_free/dof_info.templates.h
source/lac/CMakeLists.txt
source/lac/block_sparsity_pattern.cc
source/lac/chunk_sparsity_pattern.cc
source/lac/compressed_set_sparsity_pattern.cc [deleted file]
source/lac/compressed_sparsity_pattern.cc [deleted file]
source/lac/constraint_matrix.cc
source/lac/dynamic_sparsity_pattern.cc [moved from source/lac/compressed_simple_sparsity_pattern.cc with 80% similarity]
source/lac/petsc_parallel_block_sparse_matrix.cc
source/lac/petsc_parallel_sparse_matrix.cc
source/lac/petsc_sparse_matrix.cc
source/lac/sparsity_pattern.cc
source/lac/sparsity_tools.cc
source/lac/trilinos_block_sparse_matrix.cc
source/lac/trilinos_sparse_matrix.cc
source/lac/trilinos_sparsity_pattern.cc
tests/lac/sparsity_pattern_common.h

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.