From: Luca Heltai Date: Thu, 3 Mar 2016 19:10:54 +0000 (+0100) Subject: Restored most of Jacobian related code. X-Git-Tag: v8.5.0-rc1~1131^2~19 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=898123bb4828d31a322338f4d465105c4c83f9e6;p=dealii.git Restored most of Jacobian related code. --- diff --git a/source/fe/mapping_manifold.cc b/source/fe/mapping_manifold.cc index dfa7449188..c017d0b4a3 100644 --- a/source/fe/mapping_manifold.cc +++ b/source/fe/mapping_manifold.cc @@ -91,8 +91,8 @@ initialize (const UpdateFlags update_flags, if (this->update_each & update_contravariant_transformation) contravariant.resize(n_original_q_points); - // if (this->update_each & update_volume_elements) - // volume_elements.resize(n_original_q_points); + if (this->update_each & update_volume_elements) + volume_elements.resize(n_original_q_points); // if (this->update_each & // (update_jacobian_grads | update_jacobian_pushed_forward_grads) ) @@ -441,7 +441,7 @@ namespace internal Tensor<1,spacedim> T = data.cell->get_manifold().get_tangent_vector(P, NP); for (unsigned int d=0; d::cell_iterator &cell, internal::maybe_update_Jacobians (QProjector::DataSetDescriptor::cell (), data); -// const UpdateFlags update_flags = data.update_each; -// const std::vector &weights=quadrature.get_weights(); + const UpdateFlags update_flags = data.update_each; + const std::vector &weights=quadrature.get_weights(); -// // Multiply quadrature weights by absolute value of Jacobian determinants or -// // the area element g=sqrt(DX^t DX) in case of codim > 0 + // Multiply quadrature weights by absolute value of Jacobian determinants or + // the area element g=sqrt(DX^t DX) in case of codim > 0 -// if (update_flags & (update_normal_vectors -// | update_JxW_values)) -// { -// AssertDimension (output_data.JxW_values.size(), n_q_points); - -// Assert( !(update_flags & update_normal_vectors ) || -// (output_data.normal_vectors.size() == n_q_points), -// ExcDimensionMismatch(output_data.normal_vectors.size(), n_q_points)); - - -// if (cell_similarity != CellSimilarity::translation) -// for (unsigned int point=0; point 1e-12*Utilities::fixed_power(cell->diameter()/ -// std::sqrt(double(dim))), -// (typename Mapping::ExcDistortedMappedCell(cell->center(), det, point))); - -// output_data.JxW_values[point] = weights[point] * det; -// } -// // if dim==spacedim, then there is no cell normal to -// // compute. since this is for FEValues (and not FEFaceValues), -// // there are also no face normals to compute -// else //codim>0 case -// { -// Tensor<1, spacedim> DX_t [dim]; -// for (unsigned int i=0; i G; //First fundamental form -// for (unsigned int i=0; idirection_flag() == false) -// output_data.normal_vectors[point] *= -1.; -// } - -// } -// } //codim>0 case - -// } -// } + if (update_flags & (update_normal_vectors + | update_JxW_values)) + { + AssertDimension (output_data.JxW_values.size(), n_q_points); + Assert( !(update_flags & update_normal_vectors ) || + (output_data.normal_vectors.size() == n_q_points), + ExcDimensionMismatch(output_data.normal_vectors.size(), n_q_points)); -// // copy values from InternalData to vector given by reference -// if (update_flags & update_jacobians) -// { -// AssertDimension (output_data.jacobians.size(), n_q_points); -// if (cell_similarity != CellSimilarity::translation) -// for (unsigned int point=0; point 1e-12*Utilities::fixed_power(cell->diameter()/ + std::sqrt(double(dim))), + (typename Mapping::ExcDistortedMappedCell(cell->center(), det, point))); + + output_data.JxW_values[point] = weights[point] * det; + } + // if dim==spacedim, then there is no cell normal to + // compute. since this is for FEValues (and not FEFaceValues), + // there are also no face normals to compute + else //codim>0 case + { + Tensor<1, spacedim> DX_t [dim]; + for (unsigned int i=0; i G; //First fundamental form + for (unsigned int i=0; idirection_flag() == false) + output_data.normal_vectors[point] *= -1.; + } + + } + } //codim>0 case + + } + } + + + + // copy values from InternalData to vector given by reference + if (update_flags & update_jacobians) + { + AssertDimension (output_data.jacobians.size(), n_q_points); + if (cell_similarity != CellSimilarity::translation) + for (unsigned int point=0; point (cell_similarity, // QProjector::DataSetDescriptor::cell (),