From: Timo Heister
Date: Mon, 3 Sep 2012 22:31:24 +0000 (+0000)
Subject: remove offset parameter from DoFHandler::distribute_dofs() (was never tested/working...
X-Git-Tag: v8.0.0~2179
X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ebc6d5771ee9cd68b3796028b0f756c71e50e7fe;p=dealii.git
remove offset parameter from DoFHandler::distribute_dofs() (was never tested/working correctly)
git-svn-id: https://svn.dealii.org/trunk@26220 0785d39b-7218-0410-832d-ea1e28bc413d
---
diff --git a/deal.II/doc/news/changes.h b/deal.II/doc/news/changes.h
index 8e3c7ea8c5..56a6582e34 100644
--- a/deal.II/doc/news/changes.h
+++ b/deal.II/doc/news/changes.h
@@ -24,7 +24,12 @@ inconvenience this causes.
-- Nothing so far.
+
- Changed: the optional argument offset got removed from
+DoFHandler and MGDoFHandler::distribute_dofs() because it was
+never working correctly and it is not used.
+
+(Timo Heister, 2012/09/03)
+
diff --git a/deal.II/include/deal.II/dofs/dof_handler.h b/deal.II/include/deal.II/dofs/dof_handler.h
index b236cdea75..68fdcc45d8 100644
--- a/deal.II/include/deal.II/dofs/dof_handler.h
+++ b/deal.II/include/deal.II/dofs/dof_handler.h
@@ -293,18 +293,6 @@ class DoFHandler : public Subscriptor
* is first discussed in the introduction
* to the step-2 tutorial program.
*
- * The additional optional
- * parameter @p offset allows you
- * to reserve space for a finite
- * number of additional vector
- * entries in the beginning of
- * all discretization vectors, by
- * starting the enumeration of
- * degrees of freedom on the grid
- * at a nonzero value. By
- * default, this value is of
- * course zero.
- *
* A pointer of the transferred
* finite element is
* stored. Therefore, the
@@ -317,8 +305,7 @@ class DoFHandler : public Subscriptor
* releases the lock of this
* object to the finite element.
*/
- virtual void distribute_dofs (const FiniteElement &fe,
- const unsigned int offset = 0);
+ virtual void distribute_dofs (const FiniteElement &fe);
/**
* After distribute_dofs() with
diff --git a/deal.II/include/deal.II/dofs/dof_handler_policy.h b/deal.II/include/deal.II/dofs/dof_handler_policy.h
index 65c9044016..c5c0f80d84 100644
--- a/deal.II/include/deal.II/dofs/dof_handler_policy.h
+++ b/deal.II/include/deal.II/dofs/dof_handler_policy.h
@@ -65,8 +65,7 @@ namespace internal
*/
virtual
NumberCache
- distribute_dofs (const unsigned int offset,
- dealii::DoFHandler &dof_handler) const = 0;
+ distribute_dofs (dealii::DoFHandler &dof_handler) const = 0;
/**
* Renumber degrees of freedom as
@@ -95,8 +94,7 @@ namespace internal
*/
virtual
NumberCache
- distribute_dofs (const unsigned int offset,
- dealii::DoFHandler &dof_handler) const;
+ distribute_dofs (dealii::DoFHandler &dof_handler) const;
/**
* Renumber degrees of freedom as
@@ -126,8 +124,7 @@ namespace internal
*/
virtual
NumberCache
- distribute_dofs (const unsigned int offset,
- dealii::DoFHandler &dof_handler) const;
+ distribute_dofs (dealii::DoFHandler &dof_handler) const;
/**
* Renumber degrees of freedom as
diff --git a/deal.II/include/deal.II/multigrid/mg_dof_handler.h b/deal.II/include/deal.II/multigrid/mg_dof_handler.h
index aa0bf6b665..3eab55be99 100644
--- a/deal.II/include/deal.II/multigrid/mg_dof_handler.h
+++ b/deal.II/include/deal.II/multigrid/mg_dof_handler.h
@@ -119,8 +119,7 @@ class MGDoFHandler : public DoFHandler
* A copy of the transferred
* finite element is stored.
*/
- virtual void distribute_dofs (const FiniteElement &,
- const unsigned int offset = 0);
+ virtual void distribute_dofs (const FiniteElement &);
/**
* Clear all data of this object
diff --git a/deal.II/source/dofs/dof_handler.cc b/deal.II/source/dofs/dof_handler.cc
index 7a793fd719..ab9251c238 100644
--- a/deal.II/source/dofs/dof_handler.cc
+++ b/deal.II/source/dofs/dof_handler.cc
@@ -1651,8 +1651,7 @@ DoFHandler::memory_consumption () const
template
void DoFHandler::
-distribute_dofs (const FiniteElement &ff,
- const unsigned int offset)
+distribute_dofs (const FiniteElement &ff)
{
selected_fe = &ff;
@@ -1676,8 +1675,7 @@ distribute_dofs (const FiniteElement &ff,
internal::DoFHandler::Implementation::reserve_space (*this);
// hand things off to the policy
- number_cache = policy->distribute_dofs (offset,
- *this);
+ number_cache = policy->distribute_dofs (*this);
// initialize the block info object
// only if this is a sequential
diff --git a/deal.II/source/dofs/dof_handler_policy.cc b/deal.II/source/dofs/dof_handler_policy.cc
index 5c8185b46f..4d7940c2f7 100644
--- a/deal.II/source/dofs/dof_handler_policy.cc
+++ b/deal.II/source/dofs/dof_handler_policy.cc
@@ -492,11 +492,10 @@ namespace internal
template
NumberCache
Sequential::
- distribute_dofs (const unsigned int offset,
- DoFHandler &dof_handler) const
+ distribute_dofs (DoFHandler &dof_handler) const
{
const unsigned int n_dofs =
- Implementation::distribute_dofs (offset,
+ Implementation::distribute_dofs (0,
types::invalid_subdomain_id,
dof_handler);
@@ -1049,10 +1048,8 @@ namespace internal
template
NumberCache
ParallelDistributed::
- distribute_dofs (const unsigned int offset,
- DoFHandler &dof_handler) const
+ distribute_dofs (DoFHandler &dof_handler) const
{
- Assert(offset==0, ExcNotImplemented());
NumberCache number_cache;
#ifndef DEAL_II_USE_P4EST
diff --git a/deal.II/source/multigrid/mg_dof_handler.cc b/deal.II/source/multigrid/mg_dof_handler.cc
index a7ba799876..4d9d2eff40 100644
--- a/deal.II/source/multigrid/mg_dof_handler.cc
+++ b/deal.II/source/multigrid/mg_dof_handler.cc
@@ -1972,8 +1972,7 @@ set_dof_index (const unsigned int obj_level,
template
-void MGDoFHandler::distribute_dofs (const FiniteElement &fe,
- const unsigned int offset)
+void MGDoFHandler::distribute_dofs (const FiniteElement &fe)
{
// first distribute global dofs
DoFHandler::distribute_dofs (fe);
@@ -1999,7 +1998,7 @@ void MGDoFHandler::distribute_dofs (const FiniteElementget_tria().n_levels(); ++level)
{
- unsigned int next_free_dof = offset;
+ unsigned int next_free_dof = 0;
cell_iterator cell = begin(level),
endc = end(level);