From 5dce4db74339a5328daf931a840400b7b08ade7c Mon Sep 17 00:00:00 2001 From: bangerth Date: Mon, 9 Sep 2013 19:26:27 +0000 Subject: [PATCH] Move DoFObjects into dof_faces.h since this is now the only place where it is referenced. git-svn-id: https://svn.dealii.org/trunk@30656 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/include/deal.II/hp/dof_faces.h | 506 ++++++++++++++++++++- deal.II/include/deal.II/hp/dof_objects.h | 540 ----------------------- deal.II/source/hp/dof_faces.cc | 28 +- deal.II/source/hp/dof_handler.cc | 1 - deal.II/source/hp/dof_objects.cc | 50 --- 5 files changed, 531 insertions(+), 594 deletions(-) delete mode 100644 deal.II/include/deal.II/hp/dof_objects.h delete mode 100644 deal.II/source/hp/dof_objects.cc diff --git a/deal.II/include/deal.II/hp/dof_faces.h b/deal.II/include/deal.II/hp/dof_faces.h index 2937bf902d..bcb99615b2 100644 --- a/deal.II/include/deal.II/hp/dof_faces.h +++ b/deal.II/include/deal.II/hp/dof_faces.h @@ -19,8 +19,6 @@ #include -#include -#include #include #include @@ -38,6 +36,218 @@ namespace internal { namespace hp { + /** + * Store the indices of the degrees of freedom which are located on + * objects of dimension @p structdim < dim, i.e., for faces or edges + * of cells. This is opposed to the internal::hp::DoFLevels class + * that stores the DoF indices on cells. + * + * The things we store here is very similar to what is stored in the + * internal::DoFHandler::DoFObjects classes (see there for more + * information, in particular on the layout of the class hierarchy, + * and the use of file names). + * + *

Offset computations

+ * + * For hp methods, not all cells may use the same finite element, and + * it is consequently more complicated to determine where the DoF + * indices for a given line, quad, or hex are stored. As described in + * the documentation of the internal::DoFHandler::DoFLevel class, we + * can compute the location of the first line DoF, for example, by + * calculating the offset as line_index * + * dof_handler.get_fe().dofs_per_line. This of course doesn't + * work any more if different lines may have different numbers of + * degrees of freedom associated with them. Consequently, rather than + * using this simple multiplication, the dofs array has an associated + * array dof_offsets. The data corresponding to a + * line then starts at index line_dof_offsets[line_index] + * within the line_dofs array. + * + * + *

Multiple data sets per object

+ * + * If two adjacent cells use different finite elements, then + * the face that they share needs to store DoF indices for both + * involved finite elements. While faces therefore have to have at + * most two sets of DoF indices, it is easy to see that edges and + * vertices can have as many sets of DoF indices associated with them + * as there are adjacent cells. + * + * Consequently, for objects that have a lower dimensionality than + * cells, we have to store a map from the finite element index to the + * set of DoF indices associated. Since real sets are typically very + * inefficient to store, and since most of the time we expect the + * number of individual keys to be small (frequently, adjacent cells + * will have the same finite element, and only a single entry will + * exist in the map), what we do is instead to store a linked list. In + * this format, the first entry starting at position + * lines.dofs[lines.dof_offsets[line_index]] will denote + * the finite element index of the set of DoF indices following; after + * this set, we will store the finite element index of the second set + * followed by the corresponding DoF indices; and so on. Finally, when + * all finite element indices adjacent to this object have been + * covered, we write a -1 to indicate the end of the list. + * + * Access to this kind of data, as well as the distinction between + * cells and objects of lower dimensionality are encoded in the + * accessor functions, DoFObjects::set_dof_index() and + * DoFLevel::get_dof_index(). They are able to traverse this + * list and pick out or set a DoF index given the finite element index + * and its location within the set of DoFs corresponding to this + * finite element. + * + * + * @ingroup hp + * @author Tobias Leicht, 2006 + */ + template + class DoFObjects + { + public: + /** + * Store the start index for + * the degrees of freedom of each + * object in the @p dofs array. + * + * The type we store is then obviously the type the @p dofs array + * uses for indexing. + */ + std::vector dof_offsets; + + /** + * Store the global indices of + * the degrees of freedom. See + * DoFLevel() for detailed + * information. + */ + std::vector dofs; + + /** + * Set the global index of + * the @p local_index-th + * degree of freedom located + * on the object with number @p + * obj_index to the value + * given by @p global_index. The @p + * dof_handler argument is + * used to access the finite + * element that is to be used + * to compute the location + * where this data is stored. + * + * The third argument, @p + * fe_index, denotes which of + * the finite elements + * associated with this + * object we shall + * access. Refer to the + * general documentation of + * the internal::hp::DoFLevel + * class template for more + * information. + */ + template + void + set_dof_index (const dealii::hp::DoFHandler &dof_handler, + const unsigned int obj_index, + const unsigned int fe_index, + const unsigned int local_index, + const types::global_dof_index global_index, + const unsigned int obj_level); + + /** + * Return the global index of + * the @p local_index-th + * degree of freedom located + * on the object with number @p + * obj_index. The @p + * dof_handler argument is + * used to access the finite + * element that is to be used + * to compute the location + * where this data is stored. + * + * The third argument, @p + * fe_index, denotes which of + * the finite elements + * associated with this + * object we shall + * access. Refer to the + * general documentation of + * the internal::hp::DoFLevel + * class template for more + * information. + */ + template + types::global_dof_index + get_dof_index (const dealii::hp::DoFHandler &dof_handler, + const unsigned int obj_index, + const unsigned int fe_index, + const unsigned int local_index, + const unsigned int obj_level) const; + + /** + * Return the number of + * finite elements that are + * active on a given + * object. If this is a cell, + * the answer is of course + * one. If it is a face, the + * answer may be one or two, + * depending on whether the + * two adjacent cells use the + * same finite element or + * not. If it is an edge in + * 3d, the possible return + * value may be one or any + * other value larger than + * that. + * + * If the object is not part + * of an active cell, then no + * degrees of freedom have + * been distributed and zero + * is returned. + */ + template + unsigned int + n_active_fe_indices (const dealii::hp::DoFHandler &dof_handler, + const unsigned int obj_index) const; + + /** + * Return the fe_index of the + * n-th active finite element + * on this object. + */ + template + types::global_dof_index + nth_active_fe_index (const dealii::hp::DoFHandler &dof_handler, + const unsigned int obj_level, + const unsigned int obj_index, + const unsigned int n) const; + + /** + * Check whether a given + * finite element index is + * used on the present + * object or not. + */ + template + bool + fe_index_is_active (const dealii::hp::DoFHandler &dof_handler, + const unsigned int obj_index, + const unsigned int fe_index, + const unsigned int obj_level) const; + + /** + * Determine an estimate for the + * memory consumption (in bytes) + * of this object. + */ + std::size_t memory_consumption () const; + }; + + /** * These classes are similar to the internal::hp::DoFLevel classes. We here store @@ -138,6 +348,298 @@ namespace internal std::size_t memory_consumption () const; }; + + // --------------------- inline and template functions ------------------ + + template + template + inline + types::global_dof_index + DoFObjects:: + get_dof_index (const dealii::hp::DoFHandler &dof_handler, + const unsigned int obj_index, + const unsigned int fe_index, + const unsigned int local_index, + const unsigned int obj_level) const + { + Assert ((fe_index != dealii::hp::DoFHandler::default_fe_index), + ExcMessage ("You need to specify a FE index when working " + "with hp DoFHandlers")); + Assert (&dof_handler != 0, + ExcMessage ("No DoFHandler is specified for this iterator")); + Assert (&dof_handler.get_fe() != 0, + ExcMessage ("No finite element collection is associated with " + "this DoFHandler")); + Assert (fe_index < dof_handler.get_fe().size(), + ExcIndexRange (fe_index, 0, dof_handler.get_fe().size())); + Assert (local_index < + dof_handler.get_fe()[fe_index].template n_dofs_per_object(), + ExcIndexRange(local_index, 0, + dof_handler.get_fe()[fe_index] + .template n_dofs_per_object())); + Assert (obj_index < dof_offsets.size(), + ExcIndexRange (obj_index, 0, dof_offsets.size())); + + // make sure we are on an + // object for which DoFs have + // been allocated at all + Assert (dof_offsets[obj_index] != numbers::invalid_dof_index, + ExcMessage ("You are trying to access degree of freedom " + "information for an object on which no such " + "information is available")); + + Assert (structdim( + dof_handler.get_fe()[*pointer] + .template n_dofs_per_object() + 1); + } + } + + + + template + template + inline + void + DoFObjects:: + set_dof_index (const dealii::hp::DoFHandler &dof_handler, + const unsigned int obj_index, + const unsigned int fe_index, + const unsigned int local_index, + const types::global_dof_index global_index, + const unsigned int obj_level) + { + Assert ((fe_index != dealii::hp::DoFHandler::default_fe_index), + ExcMessage ("You need to specify a FE index when working " + "with hp DoFHandlers")); + Assert (&dof_handler != 0, + ExcMessage ("No DoFHandler is specified for this iterator")); + Assert (&dof_handler.get_fe() != 0, + ExcMessage ("No finite element collection is associated with " + "this DoFHandler")); + Assert (fe_index < dof_handler.get_fe().size(), + ExcIndexRange (fe_index, 0, dof_handler.get_fe().size())); + Assert (local_index < + dof_handler.get_fe()[fe_index].template n_dofs_per_object(), + ExcIndexRange(local_index, 0, + dof_handler.get_fe()[fe_index] + .template n_dofs_per_object())); + Assert (obj_index < dof_offsets.size(), + ExcIndexRange (obj_index, 0, dof_offsets.size())); + + // make sure we are on an + // object for which DoFs have + // been allocated at all + Assert (dof_offsets[obj_index] != numbers::invalid_dof_index, + ExcMessage ("You are trying to access degree of freedom " + "information for an object on which no such " + "information is available")); + + Assert (structdim() + 1; + } + } + + + + template + template + inline + unsigned int + DoFObjects:: + n_active_fe_indices (const dealii::hp::DoFHandler &dof_handler, + const unsigned int obj_index) const + { + Assert (&dof_handler != 0, + ExcMessage ("No DoFHandler is specified for this iterator")); + Assert (&dof_handler.get_fe() != 0, + ExcMessage ("No finite element collection is associated with " + "this DoFHandler")); + Assert (obj_index < dof_offsets.size(), + ExcIndexRange (obj_index, 0, dof_offsets.size())); + + // make sure we are on an + // object for which DoFs have + // been allocated at all + if (dof_offsets[obj_index] == numbers::invalid_dof_index) + return 0; + + Assert (structdim() + 1; + } + } + } + + + + template + template + inline + types::global_dof_index + DoFObjects:: + nth_active_fe_index (const dealii::hp::DoFHandler &dof_handler, + const unsigned int obj_level, + const unsigned int obj_index, + const unsigned int n) const + { + Assert (&dof_handler != 0, + ExcMessage ("No DoFHandler is specified for this iterator")); + Assert (&dof_handler.get_fe() != 0, + ExcMessage ("No finite element collection is associated with " + "this DoFHandler")); + Assert (obj_index < dof_offsets.size(), + ExcIndexRange (obj_index, 0, dof_offsets.size())); + + // make sure we are on an + // object for which DoFs have + // been allocated at all + Assert (dof_offsets[obj_index] != numbers::invalid_dof_index, + ExcMessage ("You are trying to access degree of freedom " + "information for an object on which no such " + "information is available")); + + Assert (structdim() + 1; + } + } + + + + template + template + inline + bool + DoFObjects:: + fe_index_is_active (const dealii::hp::DoFHandler &dof_handler, + const unsigned int obj_index, + const unsigned int fe_index, + const unsigned int obj_level) const + { + Assert (&dof_handler != 0, + ExcMessage ("No DoFHandler is specified for this iterator")); + Assert (&dof_handler.get_fe() != 0, + ExcMessage ("No finite element collection is associated with " + "this DoFHandler")); + Assert (obj_index < dof_offsets.size(), + ExcIndexRange (obj_index, 0, static_cast(dof_offsets.size()))); + Assert ((fe_index != dealii::hp::DoFHandler::default_fe_index), + ExcMessage ("You need to specify a FE index when working " + "with hp DoFHandlers")); + Assert (fe_index < dof_handler.get_fe().size(), + ExcIndexRange (fe_index, 0, dof_handler.get_fe().size())); + + // make sure we are on an + // object for which DoFs have + // been allocated at all + Assert (dof_offsets[obj_index] != numbers::invalid_dof_index, + ExcMessage ("You are trying to access degree of freedom " + "information for an object on which no such " + "information is available")); + + Assert (structdim( + dof_handler.get_fe()[*pointer] + .template n_dofs_per_object()+1); + } + } + + } // namespace hp } // namespace internal diff --git a/deal.II/include/deal.II/hp/dof_objects.h b/deal.II/include/deal.II/hp/dof_objects.h deleted file mode 100644 index cb21ed7701..0000000000 --- a/deal.II/include/deal.II/hp/dof_objects.h +++ /dev/null @@ -1,540 +0,0 @@ -// --------------------------------------------------------------------- -// $Id$ -// -// Copyright (C) 2006 - 2013 by the deal.II authors -// -// This file is part of the deal.II library. -// -// The deal.II library is free software; you can use it, redistribute -// it, and/or modify it under the terms of the GNU Lesser General -// Public License as published by the Free Software Foundation; either -// version 2.1 of the License, or (at your option) any later version. -// The full text of the license can be found in the file LICENSE at -// the top level of the deal.II distribution. -// -// --------------------------------------------------------------------- - -#ifndef __deal2__hp_dof_objects_h -#define __deal2__hp_dof_objects_h - -#include -#include -#include - -#include - -DEAL_II_NAMESPACE_OPEN - -namespace internal -{ - namespace hp - { - - /** - * Store the indices of the degrees of freedom which are located on - * objects of dimension @p structdim < dim, i.e., for faces or edges - * of cells. This is opposed to the internal::hp::DoFLevels class - * that stores the DoF indices on cells. - * - * The things we store here is very similar to what is stored in the - * internal::DoFHandler::DoFObjects classes (see there for more - * information, in particular on the layout of the class hierarchy, - * and the use of file names). - * - *

Offset computations

- * - * For hp methods, not all cells may use the same finite element, and - * it is consequently more complicated to determine where the DoF - * indices for a given line, quad, or hex are stored. As described in - * the documentation of the internal::DoFHandler::DoFLevel class, we - * can compute the location of the first line DoF, for example, by - * calculating the offset as line_index * - * dof_handler.get_fe().dofs_per_line. This of course doesn't - * work any more if different lines may have different numbers of - * degrees of freedom associated with them. Consequently, rather than - * using this simple multiplication, the dofs array has an associated - * array dof_offsets. The data corresponding to a - * line then starts at index line_dof_offsets[line_index] - * within the line_dofs array. - * - * - *

Multiple data sets per object

- * - * If two adjacent cells use different finite elements, then - * the face that they share needs to store DoF indices for both - * involved finite elements. While faces therefore have to have at - * most two sets of DoF indices, it is easy to see that edges and - * vertices can have as many sets of DoF indices associated with them - * as there are adjacent cells. - * - * Consequently, for objects that have a lower dimensionality than - * cells, we have to store a map from the finite element index to the - * set of DoF indices associated. Since real sets are typically very - * inefficient to store, and since most of the time we expect the - * number of individual keys to be small (frequently, adjacent cells - * will have the same finite element, and only a single entry will - * exist in the map), what we do is instead to store a linked list. In - * this format, the first entry starting at position - * lines.dofs[lines.dof_offsets[line_index]] will denote - * the finite element index of the set of DoF indices following; after - * this set, we will store the finite element index of the second set - * followed by the corresponding DoF indices; and so on. Finally, when - * all finite element indices adjacent to this object have been - * covered, we write a -1 to indicate the end of the list. - * - * Access to this kind of data, as well as the distinction between - * cells and objects of lower dimensionality are encoded in the - * accessor functions, DoFObjects::set_dof_index() and - * DoFLevel::get_dof_index(). They are able to traverse this - * list and pick out or set a DoF index given the finite element index - * and its location within the set of DoFs corresponding to this - * finite element. - * - * - * @ingroup hp - * @author Tobias Leicht, 2006 - */ - template - class DoFObjects - { - public: - /** - * Store the start index for - * the degrees of freedom of each - * object in the @p dofs array. - * - * The type we store is then obviously the type the @p dofs array - * uses for indexing. - */ - std::vector dof_offsets; - - /** - * Store the global indices of - * the degrees of freedom. See - * DoFLevel() for detailed - * information. - */ - std::vector dofs; - - /** - * Set the global index of - * the @p local_index-th - * degree of freedom located - * on the object with number @p - * obj_index to the value - * given by @p global_index. The @p - * dof_handler argument is - * used to access the finite - * element that is to be used - * to compute the location - * where this data is stored. - * - * The third argument, @p - * fe_index, denotes which of - * the finite elements - * associated with this - * object we shall - * access. Refer to the - * general documentation of - * the internal::hp::DoFLevel - * class template for more - * information. - */ - template - void - set_dof_index (const dealii::hp::DoFHandler &dof_handler, - const unsigned int obj_index, - const unsigned int fe_index, - const unsigned int local_index, - const types::global_dof_index global_index, - const unsigned int obj_level); - - /** - * Return the global index of - * the @p local_index-th - * degree of freedom located - * on the object with number @p - * obj_index. The @p - * dof_handler argument is - * used to access the finite - * element that is to be used - * to compute the location - * where this data is stored. - * - * The third argument, @p - * fe_index, denotes which of - * the finite elements - * associated with this - * object we shall - * access. Refer to the - * general documentation of - * the internal::hp::DoFLevel - * class template for more - * information. - */ - template - types::global_dof_index - get_dof_index (const dealii::hp::DoFHandler &dof_handler, - const unsigned int obj_index, - const unsigned int fe_index, - const unsigned int local_index, - const unsigned int obj_level) const; - - /** - * Return the number of - * finite elements that are - * active on a given - * object. If this is a cell, - * the answer is of course - * one. If it is a face, the - * answer may be one or two, - * depending on whether the - * two adjacent cells use the - * same finite element or - * not. If it is an edge in - * 3d, the possible return - * value may be one or any - * other value larger than - * that. - * - * If the object is not part - * of an active cell, then no - * degrees of freedom have - * been distributed and zero - * is returned. - */ - template - unsigned int - n_active_fe_indices (const dealii::hp::DoFHandler &dof_handler, - const unsigned int obj_index) const; - - /** - * Return the fe_index of the - * n-th active finite element - * on this object. - */ - template - types::global_dof_index - nth_active_fe_index (const dealii::hp::DoFHandler &dof_handler, - const unsigned int obj_level, - const unsigned int obj_index, - const unsigned int n) const; - - /** - * Check whether a given - * finite element index is - * used on the present - * object or not. - */ - template - bool - fe_index_is_active (const dealii::hp::DoFHandler &dof_handler, - const unsigned int obj_index, - const unsigned int fe_index, - const unsigned int obj_level) const; - - /** - * Determine an estimate for the - * memory consumption (in bytes) - * of this object. - */ - std::size_t memory_consumption () const; - }; - - - // --------------------- inline and template functions ------------------ - - template - template - inline - types::global_dof_index - DoFObjects:: - get_dof_index (const dealii::hp::DoFHandler &dof_handler, - const unsigned int obj_index, - const unsigned int fe_index, - const unsigned int local_index, - const unsigned int obj_level) const - { - Assert ((fe_index != dealii::hp::DoFHandler::default_fe_index), - ExcMessage ("You need to specify a FE index when working " - "with hp DoFHandlers")); - Assert (&dof_handler != 0, - ExcMessage ("No DoFHandler is specified for this iterator")); - Assert (&dof_handler.get_fe() != 0, - ExcMessage ("No finite element collection is associated with " - "this DoFHandler")); - Assert (fe_index < dof_handler.get_fe().size(), - ExcIndexRange (fe_index, 0, dof_handler.get_fe().size())); - Assert (local_index < - dof_handler.get_fe()[fe_index].template n_dofs_per_object(), - ExcIndexRange(local_index, 0, - dof_handler.get_fe()[fe_index] - .template n_dofs_per_object())); - Assert (obj_index < dof_offsets.size(), - ExcIndexRange (obj_index, 0, dof_offsets.size())); - - // make sure we are on an - // object for which DoFs have - // been allocated at all - Assert (dof_offsets[obj_index] != numbers::invalid_dof_index, - ExcMessage ("You are trying to access degree of freedom " - "information for an object on which no such " - "information is available")); - - Assert (structdim( - dof_handler.get_fe()[*pointer] - .template n_dofs_per_object() + 1); - } - } - - - - template - template - inline - void - DoFObjects:: - set_dof_index (const dealii::hp::DoFHandler &dof_handler, - const unsigned int obj_index, - const unsigned int fe_index, - const unsigned int local_index, - const types::global_dof_index global_index, - const unsigned int obj_level) - { - Assert ((fe_index != dealii::hp::DoFHandler::default_fe_index), - ExcMessage ("You need to specify a FE index when working " - "with hp DoFHandlers")); - Assert (&dof_handler != 0, - ExcMessage ("No DoFHandler is specified for this iterator")); - Assert (&dof_handler.get_fe() != 0, - ExcMessage ("No finite element collection is associated with " - "this DoFHandler")); - Assert (fe_index < dof_handler.get_fe().size(), - ExcIndexRange (fe_index, 0, dof_handler.get_fe().size())); - Assert (local_index < - dof_handler.get_fe()[fe_index].template n_dofs_per_object(), - ExcIndexRange(local_index, 0, - dof_handler.get_fe()[fe_index] - .template n_dofs_per_object())); - Assert (obj_index < dof_offsets.size(), - ExcIndexRange (obj_index, 0, dof_offsets.size())); - - // make sure we are on an - // object for which DoFs have - // been allocated at all - Assert (dof_offsets[obj_index] != numbers::invalid_dof_index, - ExcMessage ("You are trying to access degree of freedom " - "information for an object on which no such " - "information is available")); - - Assert (structdim() + 1; - } - } - - - - template - template - inline - unsigned int - DoFObjects:: - n_active_fe_indices (const dealii::hp::DoFHandler &dof_handler, - const unsigned int obj_index) const - { - Assert (&dof_handler != 0, - ExcMessage ("No DoFHandler is specified for this iterator")); - Assert (&dof_handler.get_fe() != 0, - ExcMessage ("No finite element collection is associated with " - "this DoFHandler")); - Assert (obj_index < dof_offsets.size(), - ExcIndexRange (obj_index, 0, dof_offsets.size())); - - // make sure we are on an - // object for which DoFs have - // been allocated at all - if (dof_offsets[obj_index] == numbers::invalid_dof_index) - return 0; - - Assert (structdim() + 1; - } - } - } - - - - template - template - inline - types::global_dof_index - DoFObjects:: - nth_active_fe_index (const dealii::hp::DoFHandler &dof_handler, - const unsigned int obj_level, - const unsigned int obj_index, - const unsigned int n) const - { - Assert (&dof_handler != 0, - ExcMessage ("No DoFHandler is specified for this iterator")); - Assert (&dof_handler.get_fe() != 0, - ExcMessage ("No finite element collection is associated with " - "this DoFHandler")); - Assert (obj_index < dof_offsets.size(), - ExcIndexRange (obj_index, 0, dof_offsets.size())); - - // make sure we are on an - // object for which DoFs have - // been allocated at all - Assert (dof_offsets[obj_index] != numbers::invalid_dof_index, - ExcMessage ("You are trying to access degree of freedom " - "information for an object on which no such " - "information is available")); - - Assert (structdim() + 1; - } - } - - - - template - template - inline - bool - DoFObjects:: - fe_index_is_active (const dealii::hp::DoFHandler &dof_handler, - const unsigned int obj_index, - const unsigned int fe_index, - const unsigned int obj_level) const - { - Assert (&dof_handler != 0, - ExcMessage ("No DoFHandler is specified for this iterator")); - Assert (&dof_handler.get_fe() != 0, - ExcMessage ("No finite element collection is associated with " - "this DoFHandler")); - Assert (obj_index < dof_offsets.size(), - ExcIndexRange (obj_index, 0, static_cast(dof_offsets.size()))); - Assert ((fe_index != dealii::hp::DoFHandler::default_fe_index), - ExcMessage ("You need to specify a FE index when working " - "with hp DoFHandlers")); - Assert (fe_index < dof_handler.get_fe().size(), - ExcIndexRange (fe_index, 0, dof_handler.get_fe().size())); - - // make sure we are on an - // object for which DoFs have - // been allocated at all - Assert (dof_offsets[obj_index] != numbers::invalid_dof_index, - ExcMessage ("You are trying to access degree of freedom " - "information for an object on which no such " - "information is available")); - - Assert (structdim( - dof_handler.get_fe()[*pointer] - .template n_dofs_per_object()+1); - } - } - - } -} - -DEAL_II_NAMESPACE_CLOSE - -#endif diff --git a/deal.II/source/hp/dof_faces.cc b/deal.II/source/hp/dof_faces.cc index 280ab65a9a..cde80599b1 100644 --- a/deal.II/source/hp/dof_faces.cc +++ b/deal.II/source/hp/dof_faces.cc @@ -23,6 +23,32 @@ namespace internal { namespace hp { +// ---------------------- DoFObjects ---------------------------- + + template + std::size_t + DoFObjects::memory_consumption () const + { + return (MemoryConsumption::memory_consumption (dofs) + + MemoryConsumption::memory_consumption (dof_offsets)); + } + + + // explicit instantiations + template + std::size_t + DoFObjects<1>::memory_consumption () const; + + template + std::size_t + DoFObjects<2>::memory_consumption () const; + + template + std::size_t + DoFObjects<3>::memory_consumption () const; + + +// ---------------------- DoFFaces ---------------------------- std::size_t DoFFaces<1>::memory_consumption () const @@ -43,7 +69,7 @@ namespace internal std::size_t DoFFaces<3>::memory_consumption () const { - return (MemoryConsumption::memory_consumption (quads) + + return (MemoryConsumption::memory_consumption (lines) + MemoryConsumption::memory_consumption (quads) ); } diff --git a/deal.II/source/hp/dof_handler.cc b/deal.II/source/hp/dof_handler.cc index 318a1c3d7f..0eec20bccc 100644 --- a/deal.II/source/hp/dof_handler.cc +++ b/deal.II/source/hp/dof_handler.cc @@ -18,7 +18,6 @@ #include #include #include -#include #include #include #include diff --git a/deal.II/source/hp/dof_objects.cc b/deal.II/source/hp/dof_objects.cc deleted file mode 100644 index 361e15da2a..0000000000 --- a/deal.II/source/hp/dof_objects.cc +++ /dev/null @@ -1,50 +0,0 @@ -// --------------------------------------------------------------------- -// $Id$ -// -// Copyright (C) 2006 - 2013 by the deal.II authors -// -// This file is part of the deal.II library. -// -// The deal.II library is free software; you can use it, redistribute -// it, and/or modify it under the terms of the GNU Lesser General -// Public License as published by the Free Software Foundation; either -// version 2.1 of the License, or (at your option) any later version. -// The full text of the license can be found in the file LICENSE at -// the top level of the deal.II distribution. -// -// --------------------------------------------------------------------- - -#include -#include - -DEAL_II_NAMESPACE_OPEN - -namespace internal -{ - namespace hp - { - template - std::size_t - DoFObjects::memory_consumption () const - { - return (MemoryConsumption::memory_consumption (dofs) + - MemoryConsumption::memory_consumption (dof_offsets)); - } - - - // explicit instantiations - template - std::size_t - DoFObjects<1>::memory_consumption () const; - - template - std::size_t - DoFObjects<2>::memory_consumption () const; - - template - std::size_t - DoFObjects<3>::memory_consumption () const; - } -} - -DEAL_II_NAMESPACE_CLOSE -- 2.39.5