+template <int dim, int spacedim>
+void
+MappingCartesian<dim, spacedim>::maybe_update_inverse_jacobians(
+ const InternalData & data,
+ const CellSimilarity::Similarity cell_similarity,
+ internal::FEValuesImplementation::MappingRelatedData<dim, spacedim>
+ &output_data) const
+{
+ // "compute" inverse Jacobian at the quadrature points, which are
+ // all the same
+ if (data.update_each & update_inverse_jacobians)
+ if (cell_similarity != CellSimilarity::translation)
+ for (unsigned int i = 0; i < output_data.inverse_jacobians.size(); ++i)
+ {
+ output_data.inverse_jacobians[i] = Tensor<2, dim>();
+ for (unsigned int j = 0; j < dim; ++j)
+ output_data.inverse_jacobians[i][j][j] = 1. / data.cell_extents[j];
+ }
+}
+
+
+
template <int dim, int spacedim>
CellSimilarity::Similarity
MappingCartesian<dim, spacedim>::fill_fe_values(
}
maybe_update_jacobian_derivatives(data, cell_similarity, output_data);
-
- // "compute" inverse Jacobian at the quadrature points, which are
- // all the same
- if (data.update_each & update_inverse_jacobians)
- if (cell_similarity != CellSimilarity::translation)
- for (unsigned int i = 0; i < output_data.inverse_jacobians.size(); ++i)
- {
- output_data.inverse_jacobians[i] = Tensor<2, dim>();
- for (unsigned int j = 0; j < dim; ++j)
- output_data.inverse_jacobians[i][j][j] = 1. / data.cell_extents[j];
- }
+ maybe_update_inverse_jacobians(data, cell_similarity, output_data);
return cell_similarity;
}
for (unsigned int j = 0; j < dim; ++j)
output_data.jacobians[i][j][j] = data.cell_extents[j];
}
-
- if (update_flags & update_inverse_jacobians)
- {
- output_data.inverse_jacobians[i] = DerivativeForm<1, dim, spacedim>();
- for (unsigned int j = 0; j < dim; ++j)
- output_data.inverse_jacobians[i][j][j] = 1. / data.cell_extents[j];
- }
}
+
+ maybe_update_inverse_jacobians(data, CellSimilarity::none, output_data);
}
}
maybe_update_jacobian_derivatives(data, CellSimilarity::none, output_data);
-
- if (data.update_each & update_inverse_jacobians)
- for (unsigned int i = 0; i < output_data.inverse_jacobians.size(); ++i)
- {
- output_data.inverse_jacobians[i] = DerivativeForm<1, dim, spacedim>();
- for (unsigned int d = 0; d < dim; ++d)
- output_data.inverse_jacobians[i][d][d] = 1. / data.cell_extents[d];
- }
+ maybe_update_inverse_jacobians(data, CellSimilarity::none, output_data);
}
}
maybe_update_jacobian_derivatives(data, CellSimilarity::none, output_data);
-
- if (data.update_each & update_inverse_jacobians)
- for (unsigned int i = 0; i < output_data.inverse_jacobians.size(); ++i)
- {
- output_data.inverse_jacobians[i] = DerivativeForm<1, spacedim, dim>();
- for (unsigned int d = 0; d < dim; ++d)
- output_data.inverse_jacobians[i][d][d] = 1. / data.cell_extents[d];
- }
+ maybe_update_inverse_jacobians(data, CellSimilarity::none, output_data);
}