From: bangerth Date: Mon, 4 Jun 2007 10:00:53 +0000 (+0000) Subject: New functions to condense right away a sparsity pattern upon creation. Rewrite most... X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4782574acbf18fb659fb76822c2bb246a0d47450;p=dealii-svn.git New functions to condense right away a sparsity pattern upon creation. Rewrite most of the documentation of the ConstraintMatrix class. git-svn-id: https://svn.dealii.org/trunk@14747 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/deal.II/source/dofs/dof_constraints.cc b/deal.II/deal.II/source/dofs/dof_constraints.cc index 549c08d275..0ea47bc9a1 100644 --- a/deal.II/deal.II/source/dofs/dof_constraints.cc +++ b/deal.II/deal.II/source/dofs/dof_constraints.cc @@ -79,13 +79,6 @@ ConstraintMatrix::ConstraintLine::memory_consumption () const -ConstraintMatrix::ConstraintMatrix () - : - lines (), - sorted (false) -{} - - void ConstraintMatrix::add_entries (const unsigned int line, const std::vector > &col_val_pairs) @@ -1502,4 +1495,22 @@ MATRIX_FUNCTIONS(PETScWrappers::MPI::SparseMatrix); MATRIX_FUNCTIONS(PETScWrappers::MPI::BlockSparseMatrix); #endif +template void ConstraintMatrix:: +add_entries_local_to_global (const std::vector &, + SparsityPattern &, + const bool) const; +template void ConstraintMatrix:: +add_entries_local_to_global (const std::vector &, + CompressedSparsityPattern &, + const bool) const; +template void ConstraintMatrix:: +add_entries_local_to_global (const std::vector &, + BlockSparsityPattern &, + const bool) const; +template void ConstraintMatrix:: +add_entries_local_to_global (const std::vector &, + CompressedBlockSparsityPattern &, + const bool) const; + + DEAL_II_NAMESPACE_CLOSE diff --git a/deal.II/deal.II/source/dofs/dof_tools.cc b/deal.II/deal.II/source/dofs/dof_tools.cc index a47c140e62..c4ece0c0c3 100644 --- a/deal.II/deal.II/source/dofs/dof_tools.cc +++ b/deal.II/deal.II/source/dofs/dof_tools.cc @@ -46,9 +46,9 @@ DEAL_II_NAMESPACE_OPEN template void -DoFTools::make_sparsity_pattern ( - const DH &dof, - SparsityPattern &sparsity) +DoFTools::make_sparsity_pattern (const DH &dof, + SparsityPattern &sparsity, + const ConstraintMatrix &constraints) { const unsigned int n_dofs = dof.n_dofs(); @@ -66,11 +66,13 @@ DoFTools::make_sparsity_pattern ( const unsigned int dofs_per_cell = cell->get_fe().dofs_per_cell; dofs_on_this_cell.resize (dofs_per_cell); cell->get_dof_indices (dofs_on_this_cell); - // make sparsity pattern for this cell - for (unsigned int i=0; i,FullMatrix > > > split_face_interpolation_matrices (n_finite_elements (dof_handler), n_finite_elements (dof_handler)); @@ -4959,43 +4961,51 @@ template void DoFTools::make_sparsity_pattern, SparsityPattern> (const DoFHandler &dof, - SparsityPattern &sparsity); + SparsityPattern &sparsity, + const ConstraintMatrix &); template void DoFTools::make_sparsity_pattern, CompressedSparsityPattern> (const DoFHandler &dof, - CompressedSparsityPattern &sparsity); + CompressedSparsityPattern &sparsity, + const ConstraintMatrix &); template void DoFTools::make_sparsity_pattern, BlockSparsityPattern> (const DoFHandler &dof, - BlockSparsityPattern &sparsity); + BlockSparsityPattern &sparsity, + const ConstraintMatrix &); template void DoFTools::make_sparsity_pattern, CompressedBlockSparsityPattern> (const DoFHandler &dof, - CompressedBlockSparsityPattern &sparsity); + CompressedBlockSparsityPattern &sparsity, + const ConstraintMatrix &); template void DoFTools::make_sparsity_pattern, SparsityPattern> (const hp::DoFHandler &dof, - SparsityPattern &sparsity); + SparsityPattern &sparsity, + const ConstraintMatrix &); template void DoFTools::make_sparsity_pattern, CompressedSparsityPattern> (const hp::DoFHandler &dof, - CompressedSparsityPattern &sparsity); + CompressedSparsityPattern &sparsity, + const ConstraintMatrix &); template void DoFTools::make_sparsity_pattern, BlockSparsityPattern> (const hp::DoFHandler &dof, - BlockSparsityPattern &sparsity); + BlockSparsityPattern &sparsity, + const ConstraintMatrix &); template void DoFTools::make_sparsity_pattern, CompressedBlockSparsityPattern> (const hp::DoFHandler &dof, - CompressedBlockSparsityPattern &sparsity); + CompressedBlockSparsityPattern &sparsity, + const ConstraintMatrix &); template void diff --git a/deal.II/doc/doxygen/images/hp-refinement-simple.png b/deal.II/doc/doxygen/images/hp-refinement-simple.png new file mode 100644 index 0000000000..13431624c3 Binary files /dev/null and b/deal.II/doc/doxygen/images/hp-refinement-simple.png differ diff --git a/deal.II/doc/news/changes.html b/deal.II/doc/news/changes.html index d8cf807d61..b1d73c0bbf 100644 --- a/deal.II/doc/news/changes.html +++ b/deal.II/doc/news/changes.html @@ -1033,6 +1033,26 @@ inconvenience this causes.

deal.II

    +
  1. New: the function + DoFTools::make_sparsity_pattern + now takes an optional constraint matrix argument that can be used to + avoid the subsequent call to condense the sparsity pattern. In effect, + the sparsity pattern is generated condensed right away. For problems in + 3d and with many constraints, this is many times faster than separate + creation and condensation. +
    + (WB 2007/06/03) +

    + +
  2. New: the new function + ConstraintMatrix::add_entries_local_to_global + can be used to add entries to a matrix where entries that will appear if + the current entry corresponds to a constrained degree of freedom are + also added. +
    + (WB 2007/06/03) +

    +
  3. Fixed: the function GridTools::find_cells_adjacent_to_vertex was not detecting properly the coarse cells adjacent to