]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Fix incorrect index check for cases of rank-4 symmetric tensors.
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Fri, 8 Jul 2016 21:02:43 +0000 (16:02 -0500)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Fri, 8 Jul 2016 21:02:43 +0000 (16:02 -0500)
include/deal.II/base/symmetric_tensor.h

index bac352363428cb773897a8073c801b9bb752dfed..c4fa23fe41a54f594601c39f7bd3185c9df75a2a 100644 (file)
@@ -1728,7 +1728,7 @@ inline
 Number
 SymmetricTensor<rank,dim,Number>::access_raw_entry (const unsigned int index) const
 {
-  AssertIndexRange (index, data.dimension);
+  AssertIndexRange (index, n_independent_components);
   return data[internal::SymmetricTensor::entry_to_indices(*this, index)];
 }
 
@@ -1739,7 +1739,7 @@ inline
 Number &
 SymmetricTensor<rank,dim,Number>::access_raw_entry (const unsigned int index)
 {
-  AssertIndexRange (index, data.dimension);
+  AssertIndexRange (index, n_independent_components);
   return data[internal::SymmetricTensor::entry_to_indices(*this, index)];
 }
 

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.