From: bangerth Date: Sun, 7 Apr 2013 17:02:05 +0000 (+0000) Subject: Provide some additional documentation. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2c15ddeec958dec154da376af4a6f3402408a593;p=dealii-svn.git Provide some additional documentation. git-svn-id: https://svn.dealii.org/branches/branch_bigger_global_dof_indices_4@29213 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/include/deal.II/dofs/dof_handler.h b/deal.II/include/deal.II/dofs/dof_handler.h index e293946f1e..e15cd32329 100644 --- a/deal.II/include/deal.II/dofs/dof_handler.h +++ b/deal.II/include/deal.II/dofs/dof_handler.h @@ -966,23 +966,93 @@ private: */ DoFHandler &operator = (const DoFHandler &); + /** + * A data structure that is used to store the DoF indices associated with + * a particular vertex. Unlike cells, vertices live on several levels of + * a multigrid hierarchy; consequently, we need to store DoF indices for + * each vertex for each of the levels it lives on. This class does + * this. + */ class MGVertexDoFs { - private: - unsigned int coarsest_level; - unsigned int finest_level; - types::global_dof_index *indices; - types::global_dof_index *indices_offset; - public: - DeclException0 (ExcNoMemory); + /** + * Constructor. + */ MGVertexDoFs (); + + /** + * Destructor. + */ ~MGVertexDoFs (); + + /** + * A function that is called to allocate the necessary amount of memory + * to store the indices of the DoFs that live on this vertex for the + * given (inclusive) range of levels. + */ + void init (const unsigned int coarsest_level, + const unsigned int finest_level, + const unsigned int dofs_per_vertex); + + /** + * Return the coarsest level for which this structure + * stores data. + */ unsigned int get_coarsest_level () const; + + /** + * Return the finest level for which this structure + * stores data. + */ unsigned int get_finest_level () const; - types::global_dof_index get_index (const unsigned int level, const unsigned int dof_number) const; - void init (const unsigned int coarsest_level, const unsigned int finest_level, const unsigned int dofs_per_vertex); - void set_index (const unsigned int level, const unsigned int dof_number, const types::global_dof_index index); + + /** + * Return the index of the dof_numberth degree of + * freedom for the given level stored for the current vertex. + */ + types::global_dof_index + get_index (const unsigned int level, + const unsigned int dof_number) const; + + /** + * Set the index of the dof_numberth degree of + * freedom for the given level stored for the current vertex + * to index. + */ + void set_index (const unsigned int level, + const unsigned int dof_number, + const types::global_dof_index index); + + /** + * Exception. + */ + DeclException0 (ExcNoMemory); + + private: + /** + * Coarsest level for which this object stores DoF indices. + */ + unsigned int coarsest_level; + + /** + * Finest level for which this object stores DoF indices. + */ + unsigned int finest_level; + + /** + * A pointer to an array where we store the indices of the + * DoFs that live on the various levels this vertex exists + * on. + */ + types::global_dof_index *indices; + + /** + * This array stores, for each level starting with coarsest_level, + * the offset in the indices array where the DoF + * indices for each level are stored. + */ + types::global_dof_index *indices_offset; }; void clear_mg_space ();