From: Wolfgang Bangerth Date: Mon, 20 Dec 2010 16:38:36 +0000 (+0000) Subject: Un-transpose matrix again. X-Git-Tag: v8.0.0~4631 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=73d9d68bc86c4bfe2e125cb4765638469d8c7561;p=dealii.git Un-transpose matrix again. git-svn-id: https://svn.dealii.org/trunk@23028 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/source/fe/mapping_q1.cc b/deal.II/source/fe/mapping_q1.cc index 9a8485f722..4f2d1af00b 100644 --- a/deal.II/source/fe/mapping_q1.cc +++ b/deal.II/source/fe/mapping_q1.cc @@ -804,7 +804,14 @@ MappingQ1::fill_fe_values ( } else { - data.contravariant[point]=transpose(data.contravariant[point]); + // temporarily + // transpose the + // matrix so that + // we can refer + // to its columns + // using a single + // index + data.contravariant[point] = transpose(data.contravariant[point]); // compute the normal // vector to this cell @@ -835,15 +842,20 @@ MappingQ1::fill_fe_values ( // vectors data.contravariant[point][spacedim-1] /= data.contravariant[point][spacedim-1].norm(); - + if (update_flags & update_normal_vectors) { normal_vectors[point] = data.contravariant[point][spacedim-1]; - + if (cell->direction_flag() == false) normal_vectors[point] *= -1.; } + + // un-transpose + // the matrix + // again + data.contravariant[point] = transpose(data.contravariant[point]); } } } @@ -1065,6 +1077,13 @@ namespace internal { Tensor<1,spacedim> cell_normal; + // temporarily + // transpose the + // matrix so that + // we can refer + // to its columns + // using a single + // index data.contravariant[point] = transpose(data.contravariant[point]); // compute the normal @@ -1105,9 +1124,14 @@ namespace internal data.aux[0][point], cell_normal); else Assert (false, ExcNotImplemented()); + + // un-transpose + // the matrix + // again + data.contravariant[point] = transpose(data.contravariant[point]); } } - + if (update_flags & (update_normal_vectors | update_JxW_values))