From 7c594b16f2cbe87913c0484ae482e73b57f7b0e0 Mon Sep 17 00:00:00 2001 From: wolf Date: Mon, 10 Jun 2002 08:13:42 +0000 Subject: [PATCH] Better checking of what goes on in get_dof_indices on non-active cells. This is only useful for certain kinds of FEs, otherwise disallow it. git-svn-id: https://svn.dealii.org/trunk@6034 0785d39b-7218-0410-832d-ea1e28bc413d --- .../include/dofs/dof_accessor.templates.h | 41 +++++++++++++++++++ deal.II/doc/news/2002/c-3-4.html | 20 +++++++++ 2 files changed, 61 insertions(+) diff --git a/deal.II/deal.II/include/dofs/dof_accessor.templates.h b/deal.II/deal.II/include/dofs/dof_accessor.templates.h index 65f7ca249e..87c6f6ec88 100644 --- a/deal.II/deal.II/include/dofs/dof_accessor.templates.h +++ b/deal.II/deal.II/include/dofs/dof_accessor.templates.h @@ -157,6 +157,19 @@ DoFObjectAccessor<1,dim>::get_dof_indices (std::vector &dof_indice this->dof_handler->get_fe().dofs_per_line), typename BaseClass::ExcVectorDoesNotMatch()); + // this function really only makes + // sense on non-active objects if + // all degrees of freedom are + // located on vertices, since + // otherwise there are degrees of + // freedom on sub-objects which are + // not allocated for this + // non-active thing + Assert (this->active() || + (this->dof_handler->get_fe().dofs_per_cell == + 2*this->dof_handler->get_fe().dofs_per_vertex), + typename DoFAccessor::ExcNotActive()); + const unsigned int dofs_per_vertex = this->dof_handler->get_fe().dofs_per_vertex, dofs_per_line = this->dof_handler->get_fe().dofs_per_line; std::vector::iterator next = dof_indices.begin(); @@ -257,6 +270,20 @@ DoFObjectAccessor<2,dim>::get_dof_indices (std::vector &dof_indice this->dof_handler->get_fe().dofs_per_quad), typename DoFAccessor::ExcVectorDoesNotMatch()); + // this function really only makes + // sense on non-active objects if + // all degrees of freedom are + // located on vertices, since + // otherwise there are degrees of + // freedom on sub-objects which are + // not allocated for this + // non-active thing + Assert (this->active() || + (this->dof_handler->get_fe().dofs_per_cell == + 4*this->dof_handler->get_fe().dofs_per_vertex), + typename DoFAccessor::ExcNotActive()); + + const unsigned int dofs_per_vertex = this->dof_handler->get_fe().dofs_per_vertex, dofs_per_line = this->dof_handler->get_fe().dofs_per_line, dofs_per_quad = this->dof_handler->get_fe().dofs_per_quad; @@ -375,6 +402,19 @@ DoFObjectAccessor<3,dim>::get_dof_indices (std::vector &dof_indice this->dof_handler->get_fe().dofs_per_hex), typename DoFAccessor::ExcVectorDoesNotMatch()); + // this function really only makes + // sense on non-active objects if + // all degrees of freedom are + // located on vertices, since + // otherwise there are degrees of + // freedom on sub-objects which are + // not allocated for this + // non-active thing + Assert (this->active() || + (this->dof_handler->get_fe().dofs_per_cell == + 8*this->dof_handler->get_fe().dofs_per_vertex), + typename DoFAccessor::ExcNotActive()); + const unsigned int dofs_per_vertex = this->dof_handler->get_fe().dofs_per_vertex, dofs_per_line = this->dof_handler->get_fe().dofs_per_line, dofs_per_quad = this->dof_handler->get_fe().dofs_per_quad, @@ -394,6 +434,7 @@ DoFObjectAccessor<3,dim>::get_dof_indices (std::vector &dof_indice }; + template inline TriaIterator > diff --git a/deal.II/doc/news/2002/c-3-4.html b/deal.II/doc/news/2002/c-3-4.html index c9e48022d9..4ca67185d3 100644 --- a/deal.II/doc/news/2002/c-3-4.html +++ b/deal.II/doc/news/2002/c-3-4.html @@ -50,6 +50,13 @@ contributor's names are abbreviated by WB (Wolfgang Bangerth), GK

base

    +
  1. + New: There are now operators to allow multiplication and + division of Tensor objects by scalar + factors. +
    + (WB 2002/06/07) +

@@ -66,6 +73,19 @@ contributor's names are abbreviated by WB (Wolfgang Bangerth), GK

deal.II

    +
  1. + Fixed: The get_dof_indices + functions of DoF accessor classes used to work also for + non-active cells. However, the results were bogus except for + the special case that we had a finite element that has all its + degrees of freedom located in vertices. This is now fixed: the + function throws an exception in all other cases, since there is + no useful meaning for it then. It continues to work in the + special case. +
    + (WB 2002/06/08) +

    +
  2. New: For encapsulated postscript of 2d grids, it is now possible to tell the GridOut to -- 2.39.5