From: Guido Kanschat Date: Tue, 20 Jun 2000 22:39:59 +0000 (+0000) Subject: additional functions for DG-elements X-Git-Tag: v8.0.0~20377 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c245d9800ef768abecd9a473542d09b6f5052c9a;p=dealii.git additional functions for DG-elements git-svn-id: https://svn.dealii.org/trunk@3038 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/deal.II/include/multigrid/mg_dof_tools.h b/deal.II/deal.II/include/multigrid/mg_dof_tools.h index 210f2a6e2f..224483b997 100644 --- a/deal.II/deal.II/include/multigrid/mg_dof_tools.h +++ b/deal.II/deal.II/include/multigrid/mg_dof_tools.h @@ -27,7 +27,7 @@ * All member functions are static, so there is no need to create an * object of class #MGDoFTools#. * - * @author Wolfgang Bangerth and others, 1999 + * @author Wolfgang Bangerth, Guido Kanschat, 1999, 2000 */ class MGDoFTools { @@ -64,6 +64,19 @@ class MGDoFTools SparsityPattern &sparsity, const unsigned int level); + /** + * Create sparsity pattern for + * the fluxes at refinement + * edges. + * @see{make_flux_sparsity_pattern} + * @see{DoFTools} + */ + template + static void + make_flux_sparsity_pattern_edge (const MGDoFHandler &dof_handler, + SparsityPattern &sparsity, + const unsigned int level); + /** * This function does the same as * the other with the same name, diff --git a/deal.II/deal.II/source/dofs/dof_tools.cc b/deal.II/deal.II/source/dofs/dof_tools.cc index d24dc56122..6cbb5db9ca 100644 --- a/deal.II/deal.II/source/dofs/dof_tools.cc +++ b/deal.II/deal.II/source/dofs/dof_tools.cc @@ -406,13 +406,14 @@ DoFTools::make_flux_sparsity_pattern (const DoFHandler &dof, for (unsigned int i=0; iface(neighbor_face)->set_user_flag (); } @@ -421,10 +422,11 @@ DoFTools::make_flux_sparsity_pattern (const DoFHandler &dof, for (unsigned int i=0; i &dof, } } + + template void MGDoFTools::make_flux_sparsity_pattern (const MGDoFHandler &dof, @@ -103,6 +105,59 @@ MGDoFTools::make_flux_sparsity_pattern (const MGDoFHandler &dof, +template +void +MGDoFTools::make_flux_sparsity_pattern_edge (const MGDoFHandler &dof, + SparsityPattern &sparsity, + const unsigned int level) +{ + Assert ((level>=1) && (level dofs_on_this_cell(dofs_per_cell); + vector dofs_on_other_cell(dofs_per_cell); + MGDoFHandler::cell_iterator cell = dof.begin(level), + endc = dof.end(level); + for (; cell!=endc; ++cell) + { + cell->get_mg_dof_indices (dofs_on_this_cell); + // Loop over all interior neighbors + for (unsigned int face = 0; + face < GeometryInfo::faces_per_cell; + ++face) + { + if ( (! cell->at_boundary(face)) && + (static_cast(cell->neighbor_level(face)) != level) ) + { + MGDoFHandler::cell_iterator neighbor = cell->neighbor(face); + neighbor->get_mg_dof_indices (dofs_on_other_cell); + + for (unsigned int i=0; i void MGDoFTools::make_flux_sparsity_pattern (const MGDoFHandler &dof, @@ -209,6 +264,10 @@ template void MGDoFTools::make_flux_sparsity_pattern (const MGDoFHandler &, + SparsityPattern &, + const unsigned int); + #if deal_II_dimension > 1 template void MGDoFTools::make_flux_sparsity_pattern (const MGDoFHandler &, SparsityPattern &,