From f446a208605acb0a11b678cc39ccfd706c3dbaa9 Mon Sep 17 00:00:00 2001 From: bangerth Date: Mon, 20 Dec 2010 16:38:36 +0000 Subject: [PATCH] Un-transpose matrix again. git-svn-id: https://svn.dealii.org/trunk@23028 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/source/fe/mapping_q1.cc | 32 ++++++++++++++++++++++++++++---- 1 file changed, 28 insertions(+), 4 deletions(-) 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)) -- 2.39.5