From: bangerth Date: Sun, 19 Dec 2010 19:54:15 +0000 (+0000) Subject: Reindent a few places in our usual style. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=91ddb3407b8cf37dd864924667c96a9ad50cd370;p=dealii-svn.git Reindent a few places in our usual style. git-svn-id: https://svn.dealii.org/trunk@23010 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/source/fe/mapping_q1.cc b/deal.II/source/fe/mapping_q1.cc index 808ed9dc90..789abf6749 100644 --- a/deal.II/source/fe/mapping_q1.cc +++ b/deal.II/source/fe/mapping_q1.cc @@ -719,6 +719,7 @@ MappingQ1::compute_fill (const typename Triangulation void MappingQ1::compute_mapping_support_points( @@ -731,6 +732,8 @@ MappingQ1::compute_mapping_support_points( a[i] = cell->vertex(i); } + + template void MappingQ1::fill_fe_values ( @@ -745,7 +748,8 @@ MappingQ1::fill_fe_values ( std::vector > &normal_vectors, CellSimilarity::Similarity &cell_similarity) const { - // ensure that the following cast is really correct: + // ensure that the following cast + // is really correct: Assert (dynamic_cast(&mapping_data) != 0, ExcInternalError()); InternalData &data = static_cast(mapping_data); @@ -769,69 +773,86 @@ MappingQ1::fill_fe_values ( | update_JxW_values)) { Assert (JxW_values.size() == n_q_points, - ExcDimensionMismatch(JxW_values.size(), n_q_points)); + ExcDimensionMismatch(JxW_values.size(), n_q_points)); Assert( !(update_flags & update_normal_vectors ) || (normal_vectors.size() == n_q_points), - ExcDimensionMismatch(normal_vectors.size(), n_q_points)); + ExcDimensionMismatch(normal_vectors.size(), n_q_points)); if (cell_similarity != CellSimilarity::translation) - for (unsigned int point=0; pointdirection_flag()) - normal_vectors[point] *= -1.; - } - } - else { - if ( (dim==2) && (spacedim==3) ) { - data.contravariant[point]=transpose(data.contravariant[point]); - cross_product(data.contravariant[point][2], - data.contravariant[point][0], - data.contravariant[point][1]); - JxW_values[point] - = data.contravariant[point][2].norm()*weights[point]; - //the cell normal vector - //(normal to the surface) - //is stored in the 3d - //subtensor of the contravariant tensor - data.contravariant[point][2] /= data.contravariant[point][2].norm(); - if(update_flags & update_normal_vectors){ - normal_vectors[point]=data.contravariant[point][2]; - if (!cell->direction_flag()) + for (unsigned int point=0; pointdirection_flag()) + normal_vectors[point] *= -1.; + } + } + else + { + if ( (dim==2) && (spacedim==3) ) + { + data.contravariant[point]=transpose(data.contravariant[point]); + cross_product(data.contravariant[point][2], + data.contravariant[point][0], + data.contravariant[point][1]); + JxW_values[point] + = data.contravariant[point][2].norm()*weights[point]; + + // the cell + // normal + // vector + // (normal + // to the + // surface) + // is + // stored + // in the + // 3d + // subtensor + // of the + // contravariant + // tensor + data.contravariant[point][2] /= data.contravariant[point][2].norm(); + if(update_flags & update_normal_vectors) + { + normal_vectors[point]=data.contravariant[point][2]; + if (!cell->direction_flag()) + normal_vectors[point] *= -1.; + } + } + } + } } - } } - } } - // copy values from InternalData to vector - // given by reference + // copy values from InternalData to + // vector given by reference if (update_flags & update_jacobians) { Assert (jacobians.size() == n_q_points, @@ -840,9 +861,10 @@ MappingQ1::fill_fe_values ( for (unsigned int point=0; point