From cc2eab23940b79fb2fb1b7f4838bbf59de2d138f Mon Sep 17 00:00:00 2001 From: bangerth Date: Sun, 19 Dec 2010 23:54:20 +0000 Subject: [PATCH] More minor whitespace edits. git-svn-id: https://svn.dealii.org/trunk@23012 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/source/fe/mapping_q1.cc | 43 +++++++++++++++++++++------------ 1 file changed, 27 insertions(+), 16 deletions(-) diff --git a/deal.II/source/fe/mapping_q1.cc b/deal.II/source/fe/mapping_q1.cc index 789abf6749..3dee5dbf4e 100644 --- a/deal.II/source/fe/mapping_q1.cc +++ b/deal.II/source/fe/mapping_q1.cc @@ -783,6 +783,15 @@ MappingQ1::fill_fe_values ( for (unsigned int point=0; point::fill_fe_values ( if (cell_similarity == CellSimilarity::inverted_translation) { // we only need to flip the normal - if(update_flags & update_normal_vectors) + if (update_flags & update_normal_vectors) normal_vectors[point] *= -1.; } else { if ( (dim==1) && (spacedim==2) ) { - data.contravariant[point]=transpose(data.contravariant[point]); + data.contravariant[point] = transpose(data.contravariant[point]); JxW_values[point] = data.contravariant[point][0].norm()*weights[point]; - if(update_flags & update_normal_vectors) { - normal_vectors[point][0] - = -(data.contravariant[point][0][1] - / - data.contravariant[point][0].norm()); - normal_vectors[point][1] - = (data.contravariant[point][0][0] - / - data.contravariant[point][0].norm()); - if (!cell->direction_flag()) - normal_vectors[point] *= -1.; - } + if (update_flags & update_normal_vectors) + { + normal_vectors[point][0] + = -(data.contravariant[point][0][1] + / + data.contravariant[point][0].norm()); + normal_vectors[point][1] + = (data.contravariant[point][0][0] + / + data.contravariant[point][0].norm()); + + if (cell->direction_flag() == false) + normal_vectors[point] *= -1.; + } } else { @@ -839,10 +850,10 @@ MappingQ1::fill_fe_values ( // contravariant // tensor data.contravariant[point][2] /= data.contravariant[point][2].norm(); - if(update_flags & update_normal_vectors) + if (update_flags & update_normal_vectors) { normal_vectors[point]=data.contravariant[point][2]; - if (!cell->direction_flag()) + if (cell->direction_flag() == false) normal_vectors[point] *= -1.; } } -- 2.39.5