From 4782574acbf18fb659fb76822c2bb246a0d47450 Mon Sep 17 00:00:00 2001 From: bangerth Date: Mon, 4 Jun 2007 10:00:53 +0000 Subject: [PATCH] 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 --- .../deal.II/source/dofs/dof_constraints.cc | 25 ++++++--- deal.II/deal.II/source/dofs/dof_tools.cc | 48 +++++++++++------- .../doxygen/images/hp-refinement-simple.png | Bin 0 -> 2067 bytes deal.II/doc/news/changes.html | 20 ++++++++ 4 files changed, 67 insertions(+), 26 deletions(-) create mode 100644 deal.II/doc/doxygen/images/hp-refinement-simple.png 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 0000000000000000000000000000000000000000..13431624c33ca46e5b5caf5265ce974bf134073d GIT binary patch literal 2067 zcmeAS@N?(olHy`uVBq!ia0y~yU~~YoS934{$r)^yIDiyqfk$L90|SpQ2s2(fx7H6R zC|lwhQ4*Y=R#Ki=l*-^59H8KykzZU=oLrPyP@-U=XK2cK>fRg%23BcL7srr_IdAXY zE?ev-;u?73!~g$Al?Qw?1QsmdeiK}5w^Ov7oj3dClmf-ChYd=mT>k#|k(m99N&j~K zVyM_(x;NTH1uGO!+e(jlkhOk5v=Z?PgXa35@t7Mt)7PU{Q3X?9sH1K zfBgQTw_j`bzbO9m_~FXAM=SLw9ye@!Jok3P)$f0Q>EAjndYt84*{*vZyMLaL&5z+P ze&=&w;yoj+>#OsGE&5bVSd1H$eGh-W!?$Ga`|Wk-loEEGd$~G-Deu;v=*{L6uOIkh z)FRAjapU#$2R!v>{yR2t%viU%u21#BHk&&Qu6m4@OM7Dl;yW9nw@4gHE7IHV=2cq7 zeSFLF%D?mPmFCp+a^9I!x*~eIKykfV!7B0k>MzHXA3CWSun6Nuo2O1%|0z-Lz3PKs ze(@Dw?sd1w$8Fj1e}BMlMaJvfEAH4=etj>kFLbZ+{pq#mi*K%qJRkNAx6Vw@^ygRHUA_1G#+GOH<}crVV&+I< z`uzIsSE*<53JJUNrXIhWwe$AJJMF3_+s{1~etuY6u;8`c`tsKdHARn%S$wX~y`}bb zZu7)jtmu1qvw6OPz!aMf;?UjtqzJC3&WO-z6?&LjJ&zuK3UhjS4#Sclp zpFC|B_dQT^;hejn?|p;Xy%FK>>y4GyH~w6+cKW8*x)A1aE^U{_BW(ocR z2H`?)yLA>S&S=0u_n9x3-gB~@#(8H~q5hR$$GrL4{-0)9_Igiim5%U^OrX?UpeEIl z%RIMB)C|1uU03U9_}N{xIl}4l>F5>eLI(HREoU^$R=ZomlsDb9n9-LdXYu=4lS55K z?78=Dz4(3R-hHXxnC&a;JwwWv-tXB}owh!Iult`r|EjpZ8g=HWj!d0RjHkbA$0G1~1Q=bJA)Z&z40o{!w)vgVgaK*hqqAM0{gnl)x` zXXjQcDE6}3ZTj_yZG1+^>;o63xG~?WJe2op=bVyWwmUlhK1WSNfB_cR%>R__eNp9A zCOP@V(fK8JKCMgmIxR%^!O4H39=^7-a`$Sjd9Z%svD`^_SI+%)cHKJ8&|;?ivvbz6 znzd+IG^$7QuGde#@n5?jdMfk1MM0-l>}+Xs;{fKPfkuC0Y8mES|Ni$+|6zleQk9sa zEPh*8e1E7rMg4(C@an_z-M2Ga8b0?-J-7Sqn)%VH2^?w<3@-oJ`^#YmE2Fak2&vzU zw2zM3?s-7K2ZTf;?9IJFjLK)fRe$d@uZw<`wM6BxLC?-ze4P_HWzz1hs)|lydTyyx zW;lQCMsDNA)i-x7x-hj(m2=0Gzh0&>{SB`xmihCFD<^n7yThg;b$`-PmbQewoH55H zuh0K`MBA_tm;_%}q-~Mff0Sc~NbNQ^U^!-@^S)}%kyR(3diDMgZ!*+bsd8`qJ79Ur z;OXk;vd$@?sgu?vG7}fHM853E%b*}|z~I3C=ZBf)H!TU>aQ@pFodqxd@G;zzlsLr0 olgQR)!0bGuQSrdeal.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 -- 2.39.5