]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Merge pull request #6300 from kronbichler/issue_5667_dof_info
authorMatthias Maier <tamiko@43-1.org>
Fri, 27 Apr 2018 14:48:44 +0000 (09:48 -0500)
committerGitHub <noreply@github.com>
Fri, 27 Apr 2018 14:48:44 +0000 (09:48 -0500)
Face loop functionality in MatrixFree, FEFaceEvaluation class, test cases

1  2 
include/deal.II/matrix_free/dof_info.h

index 214a4da17cf12d915c3bd24f07a7d7bb73e0b361,55a36b3e39728832f436c72369333c869919627e..850ebc0e0f106cdabb38fe34ae6edece1552a212
@@@ -376,139 -501,18 +501,20 @@@ namespace interna
  
      inline
      unsigned int
-     DoFInfo::row_length_indices (const unsigned int row) const
-     {
-       AssertIndexRange (row, row_starts.size()-1);
-       return (row_starts[row+1][0] - row_starts[row][0]);
-     }
-     inline
-     const std::pair<unsigned short,unsigned short> *
-     DoFInfo::begin_indicators (const unsigned int row) const
-     {
-       AssertIndexRange (row, row_starts.size()-1);
-       const unsigned int index = row_starts[row][1];
-       AssertIndexRange (index, constraint_indicator.size()+1);
-       return constraint_indicator.empty() ?
-              nullptr :
-              constraint_indicator.data()+index;
-     }
-     inline
-     const std::pair<unsigned short,unsigned short> *
-     DoFInfo::end_indicators (const unsigned int row) const
-     {
-       AssertIndexRange (row, row_starts.size()-1);
-       const unsigned int index = row_starts[row+1][1];
-       AssertIndexRange (index, constraint_indicator.size()+1);
-       return constraint_indicator.empty() ?
-              nullptr :
-              constraint_indicator.data()+index;
-     }
-     inline
-     unsigned int
-     DoFInfo::row_length_indicators (const unsigned int row) const
-     {
-       AssertIndexRange (row, row_starts.size()-1);
-       return (row_starts[row+1][1] - row_starts[row][1]);
-     }
-     inline
-     const unsigned int *
-     DoFInfo::begin_indices_plain (const unsigned int row) const
-     {
-       // if we have no constraints, should take the data from dof_indices
-       if (row_length_indicators(row) == 0)
-         {
-           Assert (row_starts_plain_indices[row]==numbers::invalid_unsigned_int,
-                   ExcInternalError());
-           return begin_indices(row);
-         }
-       else
-         {
-           AssertDimension (row_starts.size(), row_starts_plain_indices.size());
-           const unsigned int index = row_starts_plain_indices[row];
-           AssertIndexRange(index, plain_dof_indices.size()+1);
-           return plain_dof_indices.empty() ?
-                  nullptr :
-                  plain_dof_indices.data()+index;
-         }
-     }
-     inline
-     const unsigned int *
-     DoFInfo::end_indices_plain (const unsigned int row) const
-     {
-       return begin_indices_plain(row) +
-              dofs_per_cell[(cell_active_fe_index.size()==0)?
-                            0:cell_active_fe_index[row]];
-     }
-     inline
-     unsigned int
-     DoFInfo::fe_index_from_degree (const unsigned int fe_degree) const
+     DoFInfo::fe_index_from_degree (const unsigned int first_selected_component,
+                                    const unsigned int fe_degree) const
      {
        const unsigned int n_indices = fe_index_conversion.size();
+       if (n_indices <= 1)
+         return 0;
        for (unsigned int i=0; i<n_indices; ++i)
-         if (fe_index_conversion[i].first == fe_degree)
-           return i;
-       return n_indices;
-     }
-     inline
-     unsigned int
-     DoFInfo::fe_index_from_dofs_per_cell (const unsigned int dofs_per_cell) const
-     {
-       for (unsigned int i=0; i<fe_index_conversion.size(); ++i)
-         if (fe_index_conversion[i].second == dofs_per_cell)
+         if (fe_index_conversion[i][first_selected_component] == fe_degree)
            return i;
-       return 0;
+       return numbers::invalid_unsigned_int;
      }
  
 +#endif  // ifndef DOXYGEN
 +
    } // end of namespace MatrixFreeFunctions
  } // end of namespace internal
  

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.