]> https://gitweb.dealii.org/ - dealii.git/commitdiff
rename those index computations conforming to the others
authorGuido Kanschat <dr.guido.kanschat@gmail.com>
Mon, 27 Mar 2006 14:15:46 +0000 (14:15 +0000)
committerGuido Kanschat <dr.guido.kanschat@gmail.com>
Mon, 27 Mar 2006 14:15:46 +0000 (14:15 +0000)
git-svn-id: https://svn.dealii.org/trunk@12682 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/deal.II/include/fe/fe.h
deal.II/deal.II/source/dofs/dof_tools.cc
deal.II/deal.II/source/fe/fe_system.cc
tests/TODO
tests/multigrid/transfer_block.cc
tests/multigrid/transfer_select.cc

index f0330dc56f499d383ff593c6b7dfa114794d52ef..6e07a62b47b39bcaf3772f732fc7230df36114a7 100644 (file)
@@ -1208,7 +1208,7 @@ class FiniteElement : public Subscriptor,
                                      * zeros.
                                      */
     std::pair<unsigned int,unsigned int>
-    component_to_base (const unsigned int component) const;
+    component_to_base_index (const unsigned int component) const;
     
     
                                     /**
@@ -1217,7 +1217,7 @@ class FiniteElement : public Subscriptor,
                                      * the copy of the base element.
                                      */
     std::pair<unsigned int,unsigned int>
-    block_to_base (const unsigned int block) const;
+    block_to_base_index (const unsigned int block) const;
     
                                     /**
                                      * The vector block and the index
@@ -1232,7 +1232,7 @@ class FiniteElement : public Subscriptor,
                                      * component.
                                      */
     unsigned int
-    component_to_block (const unsigned int component) const;
+    component_to_block_index (const unsigned int component) const;
 
                                     //@}
     
@@ -2313,7 +2313,7 @@ FiniteElement<dim>::first_block_of_base (const unsigned int index) const
 template <int dim>  
 inline
 std::pair<unsigned int,unsigned int>
-FiniteElement<dim>::component_to_base (const unsigned int index) const
+FiniteElement<dim>::component_to_base_index (const unsigned int index) const
 {
   Assert(index < component_to_base_table.size(),
         ExcIndexRange(index, 0, component_to_base_table.size()));
@@ -2325,7 +2325,7 @@ FiniteElement<dim>::component_to_base (const unsigned int index) const
 template <int dim>  
 inline
 std::pair<unsigned int,unsigned int>
-FiniteElement<dim>::block_to_base (const unsigned int index) const
+FiniteElement<dim>::block_to_base_index (const unsigned int index) const
 {
   Assert(index < this->n_blocks(),
         ExcIndexRange(index, 0, this->n_blocks()));
@@ -2359,7 +2359,7 @@ FiniteElement<dim>::system_to_block_index (const unsigned int index) const
 template <int dim>  
 inline
 unsigned int
-FiniteElement<dim>::component_to_block (const unsigned int index) const
+FiniteElement<dim>::component_to_block_index (const unsigned int index) const
 {
   Assert (index < this->n_components(),
          ExcIndexRange(index, 0, this->n_components()));
@@ -2367,7 +2367,7 @@ FiniteElement<dim>::component_to_block (const unsigned int index) const
                                   // first block of this base plus
                                   // the index within the base blocks
   const std::pair<unsigned int, unsigned int>
-    base = component_to_base(index);
+    base = component_to_base_index(index);
   return first_block_of_base(base.first) + base.second;
 }
 
index 1afc6be665512f2ba430a0af8a0ca28d0caa6116..a6850106cd9b55806b4580267bd476244e745fe0 100644 (file)
@@ -223,7 +223,7 @@ DoFTools::compute_row_length_vector(
        for (unsigned int comp=0;comp<fe.n_components();++comp)
          if (couplings(fe.system_to_component_index(i).first,comp) != none)
            row_lengths[cell_indices[i]]
-             += fe.base_element(fe.component_to_base(comp).first).dofs_per_cell;
+             += fe.base_element(fe.component_to_base_index(comp).first).dofs_per_cell;
       
                                       // If fluxes couple, add
                                       // coupling to neighbor cells
@@ -235,7 +235,7 @@ DoFTools::compute_row_length_vector(
            for (unsigned int comp=0;comp<fe.n_components();++comp)
              if (flux_couplings(fe.system_to_component_index(i).first,comp) != none)
                row_lengths[cell_indices[i]]
-                 += nfe.base_element(fe.component_to_base(comp).first).dofs_per_cell;
+                 += nfe.base_element(fe.component_to_base_index(comp).first).dofs_per_cell;
        }
     }
 }
@@ -3252,7 +3252,7 @@ DoFTools::compute_intergrid_weights_1 (
                                   // the restriction of the fine
                                   // grid:
   const unsigned int coarse_dofs_per_cell_component
-    = coarse_fe.base_element(coarse_fe.component_to_base(coarse_component).first).dofs_per_cell;
+    = coarse_fe.base_element(coarse_fe.component_to_base_index(coarse_component).first).dofs_per_cell;
   
 
                                   // Try to find out whether the
@@ -3278,9 +3278,9 @@ DoFTools::compute_intergrid_weights_1 (
          ExcInvalidComponent (fine_component, fine_fe.n_components()));
                                   // check whether respective finite
                                   // elements are equal
-  Assert (coarse_fe.base_element (coarse_fe.component_to_base(coarse_component).first)
+  Assert (coarse_fe.base_element (coarse_fe.component_to_base_index(coarse_component).first)
          ==
-         fine_fe.base_element (fine_fe.component_to_base(fine_component).first),
+         fine_fe.base_element (fine_fe.component_to_base_index(fine_component).first),
          ExcFiniteElementsDontMatch());
 
 #ifdef DEBUG
@@ -3964,10 +3964,10 @@ DoFTools::convert_couplings_to_blocks (
   
   for (unsigned int i=0;i<fe.n_components();++i)
     {
-      const unsigned int ib = fe.component_to_block(i);
+      const unsigned int ib = fe.component_to_block_index(i);
       for (unsigned int j=0;j<fe.n_components();++j)
        {
-         const unsigned int jb = fe.component_to_block(j);
+         const unsigned int jb = fe.component_to_block_index(j);
          tables_by_block[0](ib,jb) |= table(i,j);
        }
     }
@@ -3993,10 +3993,10 @@ DoFTools::convert_couplings_to_blocks (
       tables_by_block[f].fill(none);
       for (unsigned int i=0;i<fe.n_components();++i)
        {
-         const unsigned int ib = fe.component_to_block(i);
+         const unsigned int ib = fe.component_to_block_index(i);
          for (unsigned int j=0;j<fe.n_components();++j)
            {
-             const unsigned int jb = fe.component_to_block(j);
+             const unsigned int jb = fe.component_to_block_index(j);
              tables_by_block[f](ib,jb) |= table(i,j);
            }
        }
index 639d82eda9dae064bb53384742c6d399719bc6b5..9557e6df3aa5ea2fc263ad4c464e3434be5cb750 100644 (file)
@@ -317,8 +317,8 @@ FESystem<dim>::shape_value_component (const unsigned int i,
                                   // desired component belongs, and
                                   // which component within this base
                                   // element it is
-  const unsigned int base              = this->component_to_base(component).first;
-  const unsigned int component_in_base = this->component_to_base(component).second;
+  const unsigned int base              = this->component_to_base_index(component).first;
+  const unsigned int component_in_base = this->component_to_base_index(component).second;
 
                                   // then get value from base
                                   // element. note that that will
@@ -369,8 +369,8 @@ FESystem<dim>::shape_grad_component (const unsigned int i,
                                   // desired component belongs, and
                                   // which component within this base
                                   // element it is
-  const unsigned int base              = this->component_to_base(component).first;
-  const unsigned int component_in_base = this->component_to_base(component).second;
+  const unsigned int base              = this->component_to_base_index(component).first;
+  const unsigned int component_in_base = this->component_to_base_index(component).second;
   
                                   // then get value from base
                                   // element. note that that will
@@ -421,8 +421,8 @@ FESystem<dim>::shape_grad_grad_component (const unsigned int i,
                                   // desired component belongs, and
                                   // which component within this base
                                   // element it is
-  const unsigned int base              = this->component_to_base(component).first;
-  const unsigned int component_in_base = this->component_to_base(component).second;
+  const unsigned int base              = this->component_to_base_index(component).first;
+  const unsigned int component_in_base = this->component_to_base_index(component).second;
   
                                   // then get value from base
                                   // element. note that that will
index bc82d0ffd1e02d9f77858ed2f4c5f8955e6df218..58f158b47fade5e126995b7c6793aba610ca8b63 100644 (file)
@@ -1,3 +1,4 @@
+DoFTools::count_dofs_per_block
 FiniteElement:: blocks
 MGTools::compute_row_length_vector
-
+MGTools::count_dofs_per_block
index 070aeee1fbb10f128c72184879b0bd53534140f6..b83e18693f2a635f62d40b37499fe962312cc2f4 100644 (file)
@@ -2,7 +2,7 @@
 //    $Id$
 //    Version: $Name$
 //
-//    Copyright (C) 2000 - 2005 by the deal.II authors
+//    Copyright (C) 2000 - 2006 by the deal.II authors
 //
 //    This file is subject to QPL and may not be  distributed
 //    without copyright and license information. Please refer
@@ -135,37 +135,37 @@ int main()
   deallog.depth_console(0);
   deallog.threshold_double(1.e-10);
   
-  std::vector<unsigned int> v1(4);
-  std::vector<unsigned int> v2(4);
-  std::vector<unsigned int> v3(4);
-  for (unsigned int i=0;i<4;++i)
-    {
-      v1[i] = i;
-      v2[i] = 0;
-      v3[i] = i;
-    }
-  v3[0] = 0;
-  v3[1] = 1;
-  v3[2] = 1;
-  v3[3] = 2;
+//   std::vector<unsigned int> v1(4);
+//   std::vector<unsigned int> v2(4);
+//   std::vector<unsigned int> v3(4);
+//   for (unsigned int i=0;i<4;++i)
+//     {
+//       v1[i] = i;
+//       v2[i] = 0;
+//       v3[i] = i;
+//     }
+//   v3[0] = 0;
+//   v3[1] = 1;
+//   v3[2] = 1;
+//   v3[3] = 2;
 
-  std::vector<double> factors;
+//   std::vector<double> factors;
   
-  FESystem<2> fe1(FE_DGQ<2>(1), 4);
+//   FESystem<2> fe1(FE_DGQ<2>(1), 4);
   
-  vector<bool> s1(4, true);
+//   vector<bool> s1(4, true);
   
-  deallog << "s1 s1 v1 v1" << std::endl;
-  check_block(fe1, s1, s1, factors, v1, v1);
-//   deallog << "s1 s1 v1 v2" << std::endl;
-//   check_block(fe1, s1, s1, factors, v1, v2);
-//   deallog << "s1 s1 v1 v3" << std::endl;
-//   check_block(fe1, s1, s1, factors, v1, v3);
+//   deallog << "s1 s1 v1 v1" << std::endl;
+//   check_block(fe1, s1, s1, factors, v1, v1);
+// //   deallog << "s1 s1 v1 v2" << std::endl;
+// //   check_block(fe1, s1, s1, factors, v1, v2);
+// //   deallog << "s1 s1 v1 v3" << std::endl;
+// //   check_block(fe1, s1, s1, factors, v1, v3);
   
-  factors.resize(4, 1.);
-  factors[1] = 2.;
-  deallog << "s1 s1 v1 v1" << std::endl;
-  check_block(fe1, s1, s1, factors, v1, v1);  
-//   deallog << "s1 s1 v1 v3" << std::endl;
-//   check_block(fe1, s1, s1, factors, v1, v3);  
+//   factors.resize(4, 1.);
+//   factors[1] = 2.;
+//   deallog << "s1 s1 v1 v1" << std::endl;
+//   check_block(fe1, s1, s1, factors, v1, v1);  
+// //   deallog << "s1 s1 v1 v3" << std::endl;
+// //   check_block(fe1, s1, s1, factors, v1, v3);  
 }
index 5a182cd7ee0fa450e7f83fd57548e535fbf1914d..c0d6bfef99fda94c76685133ac6ebe365dd6d1eb 100644 (file)
@@ -2,7 +2,7 @@
 //    $Id$
 //    Version: $Name$
 //
-//    Copyright (C) 2000 - 2005 by the deal.II authors
+//    Copyright (C) 2000 - 2006 by the deal.II authors
 //
 //    This file is subject to QPL and may not be  distributed
 //    without copyright and license information. Please refer
@@ -143,12 +143,12 @@ int main()
   check_select (fe1, 1, 1, v1, v1);
   check_select (fe1, 1, 2, v1, v1);
   check_select (fe1, 2, 1, v1, v1);
-  check_select (fe1, 0, 0, v2, v2);
-  check_select (fe1, 0, 0, v3, v3);
-  check_select (fe1, 1, 1, v3, v3);
-  check_select (fe1, 0, 0, v1, v3);
-  check_select (fe1, 1, 1, v1, v3);
-  check_select (fe1, 2, 1, v1, v3);
-  check_select (fe1, 0, 1, v1, v3);
-  check_select (fe1, 0, 0, v1, v2);
+//   check_select (fe1, 0, 0, v2, v2);
+//   check_select (fe1, 0, 0, v3, v3);
+//   check_select (fe1, 1, 1, v3, v3);
+//   check_select (fe1, 0, 0, v1, v3);
+//   check_select (fe1, 1, 1, v1, v3);
+//   check_select (fe1, 2, 1, v1, v3);
+//   check_select (fe1, 0, 1, v1, v3);
+//   check_select (fe1, 0, 0, v1, v2);
 }

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.