From: bangerth Date: Fri, 28 Jul 2006 15:17:44 +0000 (+0000) Subject: Move a few functions that are really trivial into the header file for simple inlining... X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b4b374469e21a82f44ad2eed5b8a02ef19aad793;p=dealii-svn.git Move a few functions that are really trivial into the header file for simple inlining. Also avoids cumbersome explicit instantiation. git-svn-id: https://svn.dealii.org/trunk@13466 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/deal.II/include/dofs/dof_objects.h b/deal.II/deal.II/include/dofs/dof_objects.h index 5325f958f5..487417b302 100644 --- a/deal.II/deal.II/include/dofs/dof_objects.h +++ b/deal.II/deal.II/include/dofs/dof_objects.h @@ -175,6 +175,36 @@ namespace internal template friend class DoFFaces; }; + +// --------------------- template and inline functions ------------------ + + template + template + inline + unsigned int + DoFObjects::n_active_fe_indices (const ::DoFHandler &, + const unsigned) const + { + return 1; + } + + + + template + template + inline + bool + DoFObjects::fe_index_is_active (const ::DoFHandler &, + const unsigned int, + const unsigned int fe_index) const + { + Assert (fe_index == 0, + ExcMessage ("Only zero fe_index values are allowed for " + "non-hp DoFHandlers.")); + return true; + } + + } } #endif diff --git a/deal.II/deal.II/source/dofs/dof_objects.cc b/deal.II/deal.II/source/dofs/dof_objects.cc index 3bf6313bf7..b1734aa911 100644 --- a/deal.II/deal.II/source/dofs/dof_objects.cc +++ b/deal.II/deal.II/source/dofs/dof_objects.cc @@ -29,28 +29,7 @@ namespace internal return (MemoryConsumption::memory_consumption (dofs)); } - template - template - unsigned int - DoFObjects::n_active_fe_indices (const ::DoFHandler &, - const unsigned) const - { - return 1; - } - - template - template - bool - DoFObjects::fe_index_is_active (const ::DoFHandler &, - const unsigned int, - const unsigned int fe_index) const - { - Assert (fe_index == 0, - ExcMessage ("Only zero fe_index values are allowed for " - "non-hp DoFHandlers.")); - return true; - } template template @@ -86,6 +65,7 @@ namespace internal return dofs[obj_index * dofs_per_obj + local_index]; } + template template @@ -143,19 +123,6 @@ namespace internal const unsigned int local_index, const unsigned int global_index); - template - unsigned int - DoFObjects<1>:: - n_active_fe_indices (const ::DoFHandler &, - const unsigned) const; - - template - bool - DoFObjects<1>:: - fe_index_is_active (const ::DoFHandler &, - const unsigned int, - const unsigned int fe_index) const; - #if deal_II_dimension >= 2 template class DoFObjects<2>; @@ -177,19 +144,6 @@ namespace internal const unsigned int local_index, const unsigned int global_index); - template - unsigned int - DoFObjects<2>:: - n_active_fe_indices (const ::DoFHandler &, - const unsigned) const; - - template - bool - DoFObjects<2>:: - fe_index_is_active (const ::DoFHandler &, - const unsigned int, - const unsigned int fe_index) const; - #endif #if deal_II_dimension >= 3 @@ -213,19 +167,6 @@ namespace internal const unsigned int local_index, const unsigned int global_index); - template - unsigned int - DoFObjects<3>:: - n_active_fe_indices (const ::DoFHandler &, - const unsigned) const; - - template - bool - DoFObjects<3>:: - fe_index_is_active (const ::DoFHandler &, - const unsigned int, - const unsigned int fe_index) const; - #endif }