]> https://gitweb.dealii.org/ - dealii.git/commitdiff
inline functions to avoid linker conflicts
authorGuido Kanschat <dr.guido.kanschat@gmail.com>
Tue, 20 Jul 2010 19:59:23 +0000 (19:59 +0000)
committerGuido Kanschat <dr.guido.kanschat@gmail.com>
Tue, 20 Jul 2010 19:59:23 +0000 (19:59 +0000)
git-svn-id: https://svn.dealii.org/trunk@21549 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/deal.II/include/multigrid/mg_constraints.h

index 35e46b12bceef888db802150ae09d44341cac0f9..12b7f30ee913081a82ac0d05950a65cc076c5415 100644 (file)
@@ -113,48 +113,59 @@ class MGConstraints : public Subscriptor
     std::vector<std::vector<bool> > refinement_edge_boundary_indices;
 };
 
+
 template <int dim, int spacedim>
-void MGConstraints::initialize(const MGDoFHandler<dim,spacedim>& dof)
+inline
+void
+MGConstraints::initialize(const MGDoFHandler<dim,spacedim>& dof)
 {
   MGTools::extract_inner_interface_dofs (dof, refinement_edge_indices, 
-      refinement_edge_boundary_indices);
+                                        refinement_edge_boundary_indices);
 }
 
+
 template <int dim, int spacedim>
-void MGConstraints::initialize(const MGDoFHandler<dim,spacedim>& dof,
-    const typename FunctionMap<dim>::type& function_map,
-    const std::vector<bool>& component_mask)
+inline
+void
+MGConstraints::initialize(
+  const MGDoFHandler<dim,spacedim>& dof,
+  const typename FunctionMap<dim>::type& function_map,
+  const std::vector<bool>& component_mask)
 {
   const unsigned int nlevels = dof.get_tria().n_levels();
   boundary_indices.resize(nlevels);
   refinement_edge_indices.resize(nlevels);
   refinement_edge_boundary_indices.resize(nlevels);
-
+  
   for(unsigned int l=0; l<nlevels; ++l)
-  {
-    boundary_indices[l].clear();
-    refinement_edge_indices[l].resize(dof.n_dofs(l));
-    refinement_edge_boundary_indices[l].resize(dof.n_dofs(l));
-  }
-
+    {
+      boundary_indices[l].clear();
+      refinement_edge_indices[l].resize(dof.n_dofs(l));
+      refinement_edge_boundary_indices[l].resize(dof.n_dofs(l));
+    }
+  
   MGTools::make_boundary_list (dof, function_map, boundary_indices, component_mask);
   MGTools::extract_inner_interface_dofs (dof, refinement_edge_indices, 
-      refinement_edge_boundary_indices);
+                                        refinement_edge_boundary_indices);
 }
 
+
+inline
 void
 MGConstraints::clear() 
 {
   for(unsigned int l=0; l<boundary_indices.size(); ++l)
     boundary_indices[l].clear();
-
+  
   for(unsigned int l=0; l<refinement_edge_indices.size(); ++l)
     refinement_edge_indices[l].clear();
-
+  
   for(unsigned int l=0; l<refinement_edge_boundary_indices.size(); ++l)
     refinement_edge_boundary_indices[l].clear();
 }
 
+
+inline
 bool
 MGConstraints::is_boundary_index(unsigned int level, unsigned int index) const
 {
@@ -165,6 +176,8 @@ MGConstraints::is_boundary_index(unsigned int level, unsigned int index) const
     return false;
 }
 
+
+inline
 bool
 MGConstraints::at_refinement_edge(unsigned int level, unsigned int index) const
 {
@@ -174,6 +187,8 @@ MGConstraints::at_refinement_edge(unsigned int level, unsigned int index) const
   return refinement_edge_indices[level][index];
 }
 
+
+inline
 bool
 MGConstraints::at_refinement_edge_boundary(unsigned int level, unsigned int index) const
 {

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.