]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Better checking of what goes on in get_dof_indices on non-active cells. This is only...
authorwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 10 Jun 2002 08:13:42 +0000 (08:13 +0000)
committerwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 10 Jun 2002 08:13:42 +0000 (08:13 +0000)
git-svn-id: https://svn.dealii.org/trunk@6034 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/deal.II/include/dofs/dof_accessor.templates.h
deal.II/doc/news/2002/c-3-4.html

index 65f7ca249eafba47e0a89c3743665fe22065b242..87c6f6ec8856c8f4b701348a237bc723e4b78338 100644 (file)
@@ -157,6 +157,19 @@ DoFObjectAccessor<1,dim>::get_dof_indices (std::vector<unsigned int> &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<dim>::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<unsigned int>::iterator next = dof_indices.begin();
@@ -257,6 +270,20 @@ DoFObjectAccessor<2,dim>::get_dof_indices (std::vector<unsigned int> &dof_indice
                                 this->dof_handler->get_fe().dofs_per_quad),
          typename DoFAccessor<dim>::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<dim>::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<unsigned int> &dof_indice
                                 this->dof_handler->get_fe().dofs_per_hex),
          typename DoFAccessor<dim>::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<dim>::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<unsigned int> &dof_indice
 };
 
 
+
 template <int dim>
 inline
 TriaIterator<dim,DoFObjectAccessor<1,dim> >
index c9e48022d92f08ee738d3d166679ab8aed0b2663..4ca67185d36066cb6cd18845aaf8ef78844a08ef 100644 (file)
@@ -50,6 +50,13 @@ contributor's names are abbreviated by WB (Wolfgang Bangerth), GK
 <h3>base</h3>
 
 <ol>
+  <li> <p> 
+       New: There are now operators to allow multiplication and
+       division of <code class="class">Tensor</code> objects by scalar
+       factors.
+       <br>
+       (WB 2002/06/07)
+       </p>
 </ol>
 
 
@@ -66,6 +73,19 @@ contributor's names are abbreviated by WB (Wolfgang Bangerth), GK
 <h3>deal.II</h3>
 
 <ol>
+  <li> <p> 
+       Fixed: The <code class="member">get_dof_indices</code>
+       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.
+       <br>
+       (WB 2002/06/08)
+       </p>
+
   <li> <p> 
        New: For encapsulated postscript of 2d grids, it is now
        possible to tell the <code class="class">GridOut</code> to

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.