]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Revert Guido's patch with total_dofs->n_dofs.
authorwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 16 Feb 1999 14:01:38 +0000 (14:01 +0000)
committerwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 16 Feb 1999 14:01:38 +0000 (14:01 +0000)
git-svn-id: https://svn.dealii.org/trunk@814 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/deal.II/source/dofs/dof_accessor.cc
deal.II/deal.II/source/dofs/mg_dof_handler.cc
deal.II/deal.II/source/multigrid/mg_dof_handler.cc

index d8a664ddfeb00468c07c9ff011927a05ec121f0e..c55ffbac34a259892f1a83c497401a5ff5a52cac 100644 (file)
@@ -565,11 +565,11 @@ template <int dim>
 void
 DoFCellAccessor<dim>::get_interpolated_dof_values (const dVector &values,
                                                   dVector       &interpolated_values) const {
-  const unsigned int n_dofs = dof_handler->get_fe().total_dofs;
+  const unsigned int total_dofs = dof_handler->get_fe().total_dofs;
   
   Assert (dof_handler != 0, ExcInvalidObject());
   Assert (&dof_handler->get_fe() != 0, ExcInvalidObject());
-  Assert (interpolated_values.size() == n_dofs,
+  Assert (interpolated_values.size() == total_dofs,
          ExcVectorDoesNotMatch());
   Assert (values.size() == dof_handler->n_dofs(),
          ExcVectorDoesNotMatch());
@@ -581,8 +581,8 @@ DoFCellAccessor<dim>::get_interpolated_dof_values (const dVector &values,
   else
                                     // otherwise clobber them from the children
     {
-      dVector tmp1(n_dofs);
-      dVector tmp2(n_dofs);
+      dVector tmp1(total_dofs);
+      dVector tmp2(total_dofs);
       
       interpolated_values.clear ();
 
@@ -605,7 +605,7 @@ DoFCellAccessor<dim>::get_interpolated_dof_values (const dVector &values,
                                           // end in adding up the contribution
                                           // from nodes on boundaries of
                                           // children more than once.
-         for (unsigned int i=0; i<n_dofs; ++i)
+         for (unsigned int i=0; i<total_dofs; ++i)
            if (tmp2(i) != 0)
              interpolated_values(i) = tmp2(i);
        };
@@ -618,11 +618,11 @@ template <int dim>
 void
 DoFCellAccessor<dim>::set_dof_values_by_interpolation (const dVector &local_values,
                                                       dVector       &values) const {
-  const unsigned int n_dofs = dof_handler->get_fe().total_dofs;
+  const unsigned int total_dofs = dof_handler->get_fe().total_dofs;
   
   Assert (dof_handler != 0, ExcInvalidObject());
   Assert (&dof_handler->get_fe() != 0, ExcInvalidObject());
-  Assert (local_values.size() == n_dofs,
+  Assert (local_values.size() == total_dofs,
          ExcVectorDoesNotMatch());
   Assert (values.size() == dof_handler->n_dofs(),
          ExcVectorDoesNotMatch());
@@ -634,7 +634,7 @@ DoFCellAccessor<dim>::set_dof_values_by_interpolation (const dVector &local_valu
   else
                                     // otherwise distribute them to the children
     {
-      dVector tmp(n_dofs);
+      dVector tmp(total_dofs);
       
       for (unsigned int child=0; child<GeometryInfo<dim>::children_per_cell;
           ++child)
index 097382612d03f51f2fe26c5d93447f591ac3a9ea..c1ce677a99cc40215dde75fe3be2ba364be5d8df 100644 (file)
@@ -1009,16 +1009,16 @@ void MGDoFHandler<dim>::make_sparsity_pattern (const unsigned int  level,
   Assert (sparsity.n_cols() == n_dofs(level),
          ExcDifferentDimensions (sparsity.n_cols(), n_dofs(level)));
 
-  const unsigned int n_dofs = selected_fe->total_dofs;
-  vector<int> dofs_on_this_cell(n_dofs);
+  const unsigned int total_dofs = selected_fe->total_dofs;
+  vector<int> dofs_on_this_cell(total_dofs);
   cell_iterator cell = begin_active(level),
                endc = end(level);
   for (; cell!=endc; ++cell) 
     {
       cell->get_mg_dof_indices (dofs_on_this_cell);
                                       // make sparsity pattern for this cell
-      for (unsigned int i=0; i<n_dofs; ++i)
-       for (unsigned int j=0; j<n_dofs; ++j)
+      for (unsigned int i=0; i<total_dofs; ++i)
+       for (unsigned int j=0; j<total_dofs; ++j)
          sparsity.add (dofs_on_this_cell[i],
                        dofs_on_this_cell[j]);
     };
index 097382612d03f51f2fe26c5d93447f591ac3a9ea..c1ce677a99cc40215dde75fe3be2ba364be5d8df 100644 (file)
@@ -1009,16 +1009,16 @@ void MGDoFHandler<dim>::make_sparsity_pattern (const unsigned int  level,
   Assert (sparsity.n_cols() == n_dofs(level),
          ExcDifferentDimensions (sparsity.n_cols(), n_dofs(level)));
 
-  const unsigned int n_dofs = selected_fe->total_dofs;
-  vector<int> dofs_on_this_cell(n_dofs);
+  const unsigned int total_dofs = selected_fe->total_dofs;
+  vector<int> dofs_on_this_cell(total_dofs);
   cell_iterator cell = begin_active(level),
                endc = end(level);
   for (; cell!=endc; ++cell) 
     {
       cell->get_mg_dof_indices (dofs_on_this_cell);
                                       // make sparsity pattern for this cell
-      for (unsigned int i=0; i<n_dofs; ++i)
-       for (unsigned int j=0; j<n_dofs; ++j)
+      for (unsigned int i=0; i<total_dofs; ++i)
+       for (unsigned int j=0; j<total_dofs; ++j)
          sparsity.add (dofs_on_this_cell[i],
                        dofs_on_this_cell[j]);
     };

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.