62 template <
int dim,
int spacedim,
typename VectorType,
typename DoFHandlerType>
67 , n_shape_functions(fe.dofs_per_cell)
69 , local_dof_indices(fe.dofs_per_cell)
70 , local_dof_values(fe.dofs_per_cell)
75 template <
int dim,
int spacedim,
typename VectorType,
typename DoFHandlerType>
86 template <
int dim,
int spacedim,
typename DoFHandlerType,
typename VectorType>
89 const unsigned int qpoint,
90 const unsigned int shape_nr)
92 AssertIndexRange(qpoint * n_shape_functions + shape_nr, shape_values.size());
93 return shape_values[qpoint * n_shape_functions + shape_nr];
97 template <
int dim,
int spacedim,
typename DoFHandlerType,
typename VectorType>
100 derivative(
const unsigned int qpoint,
const unsigned int shape_nr)
const
103 shape_derivatives.size());
104 return shape_derivatives[qpoint * n_shape_functions + shape_nr];
109 template <
int dim,
int spacedim,
typename DoFHandlerType,
typename VectorType>
112 derivative(
const unsigned int qpoint,
const unsigned int shape_nr)
115 shape_derivatives.size());
116 return shape_derivatives[qpoint * n_shape_functions + shape_nr];
120 template <
int dim,
int spacedim,
typename DoFHandlerType,
typename VectorType>
124 const unsigned int shape_nr)
const
127 shape_second_derivatives.size());
128 return shape_second_derivatives[qpoint * n_shape_functions + shape_nr];
133 template <
int dim,
int spacedim,
typename DoFHandlerType,
typename VectorType>
139 shape_second_derivatives.size());
140 return shape_second_derivatives[qpoint * n_shape_functions + shape_nr];
144 template <
int dim,
int spacedim,
typename DoFHandlerType,
typename VectorType>
150 shape_third_derivatives.size());
151 return shape_third_derivatives[qpoint * n_shape_functions + shape_nr];
156 template <
int dim,
int spacedim,
typename DoFHandlerType,
typename VectorType>
162 shape_third_derivatives.size());
163 return shape_third_derivatives[qpoint * n_shape_functions + shape_nr];
167 template <
int dim,
int spacedim,
typename DoFHandlerType,
typename VectorType>
171 const unsigned int shape_nr)
const
174 shape_fourth_derivatives.size());
175 return shape_fourth_derivatives[qpoint * n_shape_functions + shape_nr];
180 template <
int dim,
int spacedim,
typename DoFHandlerType,
typename VectorType>
186 shape_fourth_derivatives.size());
187 return shape_fourth_derivatives[qpoint * n_shape_functions + shape_nr];
198 get_vertex_quadrature()
201 if (quad.
size() == 0)
214 template <
int dim,
int spacedim,
typename VectorType,
typename DoFHandlerType>
221 , euler_dof_handler(&euler_dof_handler)
222 , fe_mask(mask.size() ?
225 euler_dof_handler.get_fe().get_nonzero_components(0).size(),
228 , fe_values(this->euler_dof_handler->get_fe(),
229 get_vertex_quadrature<dim>(),
232 unsigned int size = 0;
233 for (
unsigned int i = 0; i < fe_mask.size(); ++i)
236 fe_to_real[i] = size++;
243 template <
int dim,
int spacedim,
typename VectorType,
typename DoFHandlerType>
245 const DoFHandlerType & euler_dof_handler,
246 const std::vector<VectorType> &euler_vector,
248 : uses_level_dofs(true)
249 , euler_dof_handler(&euler_dof_handler)
250 , fe_mask(mask.size() ?
253 euler_dof_handler.get_fe().get_nonzero_components(0).size(),
256 , fe_values(this->euler_dof_handler->get_fe(),
257 get_vertex_quadrature<dim>(),
260 unsigned int size = 0;
269 ExcMessage(
"The underlying DoFHandler object did not call "
270 "distribute_mg_dofs(). In this case, the construction via "
271 "level vectors does not make sense."));
274 this->euler_vector.clear();
282 template <
int dim,
int spacedim,
typename VectorType,
typename DoFHandlerType>
284 const DoFHandlerType & euler_dof_handler,
287 : uses_level_dofs(true)
288 , euler_dof_handler(&euler_dof_handler)
289 , fe_mask(mask.size() ?
292 euler_dof_handler.get_fe().get_nonzero_components(0).size(),
295 , fe_values(this->euler_dof_handler->get_fe(),
296 get_vertex_quadrature<dim>(),
299 unsigned int size = 0;
308 ExcMessage(
"The underlying DoFHandler object did not call "
309 "distribute_mg_dofs(). In this case, the construction via "
310 "level vectors does not make sense."));
313 this->euler_vector.clear();
314 this->euler_vector.
resize(
323 template <
int dim,
int spacedim,
typename VectorType,
typename DoFHandlerType>
326 : uses_level_dofs(mapping.uses_level_dofs)
327 , euler_vector(mapping.euler_vector)
328 , euler_dof_handler(mapping.euler_dof_handler)
329 , fe_mask(mapping.fe_mask)
330 , fe_to_real(mapping.fe_to_real)
331 , fe_values(mapping.euler_dof_handler->get_fe(),
332 get_vertex_quadrature<dim>(),
338 template <
int dim,
int spacedim,
typename VectorType,
typename DoFHandlerType>
339 inline const double &
341 const unsigned int qpoint,
342 const unsigned int shape_nr)
const
350 template <
int dim,
int spacedim,
typename VectorType,
typename DoFHandlerType>
360 template <
int dim,
int spacedim,
typename VectorType,
typename DoFHandlerType>
389 std::vector<types::global_dof_index> dof_indices(dofs_per_cell);
391 dof_cell->get_mg_dof_indices(dof_indices);
393 dof_cell->get_dof_indices(dof_indices);
399 for (
unsigned int i = 0; i < dofs_per_cell; ++i)
405 typename VectorType::value_type
value =
420 template <
int dim,
int spacedim,
typename VectorType,
typename DoFHandlerType>
429 const unsigned int n_points = unit_points.size();
433 if (data.shape_values.size() != 0)
434 for (
unsigned int i = 0; i < data.n_shape_functions; ++i)
435 data.shape(
point, i) = fe->shape_value(i, unit_points[
point]);
437 if (data.shape_derivatives.size() != 0)
438 for (
unsigned int i = 0; i < data.n_shape_functions; ++i)
439 data.derivative(
point, i) = fe->shape_grad(i, unit_points[
point]);
441 if (data.shape_second_derivatives.size() != 0)
442 for (
unsigned int i = 0; i < data.n_shape_functions; ++i)
443 data.second_derivative(
point, i) =
444 fe->shape_grad_grad(i, unit_points[
point]);
446 if (data.shape_third_derivatives.size() != 0)
447 for (
unsigned int i = 0; i < data.n_shape_functions; ++i)
448 data.third_derivative(
point, i) =
449 fe->shape_3rd_derivative(i, unit_points[
point]);
451 if (data.shape_fourth_derivatives.size() != 0)
452 for (
unsigned int i = 0; i < data.n_shape_functions; ++i)
453 data.fourth_derivative(
point, i) =
454 fe->shape_4th_derivative(i, unit_points[
point]);
459 template <
int dim,
int spacedim,
typename VectorType,
typename DoFHandlerType>
471 for (
unsigned int i = 0; i < 5; ++i)
514 template <
int dim,
int spacedim,
typename VectorType,
typename DoFHandlerType>
519 const unsigned int n_original_q_points,
527 const unsigned int n_q_points = q.
size();
541 data.
covariant.resize(n_original_q_points);
565 template <
int dim,
int spacedim,
typename VectorType,
typename DoFHandlerType>
570 const unsigned int n_original_q_points,
573 compute_data(update_flags, q, n_original_q_points, data);
592 .resize(n_original_q_points);
606 template <
int dim,
int spacedim,
typename VectorType,
typename DoFHandlerType>
607 typename std::unique_ptr<typename Mapping<dim, spacedim>::InternalDataBase>
612 std::unique_ptr<typename Mapping<dim, spacedim>::InternalDataBase> data_ptr =
622 template <
int dim,
int spacedim,
typename VectorType,
typename DoFHandlerType>
623 std::unique_ptr<typename Mapping<dim, spacedim>::InternalDataBase>
628 std::unique_ptr<typename Mapping<dim, spacedim>::InternalDataBase> data_ptr =
638 template <
int dim,
int spacedim,
typename VectorType,
typename DoFHandlerType>
639 std::unique_ptr<typename Mapping<dim, spacedim>::InternalDataBase>
644 std::unique_ptr<typename Mapping<dim, spacedim>::InternalDataBase> data_ptr =
657 namespace MappingFEFieldImplementation
670 typename DoFHandlerType>
672 maybe_compute_q_points(
673 const typename ::QProjector<dim>::DataSetDescriptor data_set,
690 const double * shape = &data.shape(
point + data_set, 0);
692 for (
unsigned int k = 0; k < data.n_shape_functions; ++k)
694 const unsigned int comp_k =
698 data.local_dof_values[k] * shape[k];
716 typename DoFHandlerType>
718 maybe_update_Jacobians(
719 const typename ::QProjector<dim>::DataSetDescriptor data_set,
732 const unsigned int n_q_points = data.contravariant.size();
739 &data.derivative(
point + data_set, 0);
743 for (
unsigned int k = 0; k < data.n_shape_functions; ++k)
745 const unsigned int comp_k =
749 data.local_dof_values[k] * data_derv[k];
753 for (
unsigned int i = 0; i < spacedim; ++i)
755 data.contravariant[
point][i] = result[i];
763 for (
unsigned int point = 0;
point < data.contravariant.size();
765 data.covariant[
point] =
766 (data.contravariant[
point]).covariant_form();
772 data.volume_elements.size());
773 for (
unsigned int point = 0;
point < data.contravariant.size();
775 data.volume_elements[
point] =
776 data.contravariant[
point].determinant();
789 typename DoFHandlerType>
791 maybe_update_jacobian_grads(
792 const typename ::QProjector<dim>::DataSetDescriptor data_set,
804 const unsigned int n_q_points = jacobian_grads.size();
809 &data.second_derivative(
point + data_set, 0);
813 for (
unsigned int k = 0; k < data.n_shape_functions; ++k)
815 const unsigned int comp_k =
818 for (
unsigned int j = 0; j < dim; ++j)
819 for (
unsigned int l = 0;
l < dim; ++
l)
821 (
second[k][j][
l] * data.local_dof_values[k]);
826 for (
unsigned int i = 0; i < spacedim; ++i)
827 for (
unsigned int j = 0; j < dim; ++j)
828 for (
unsigned int l = 0;
l < dim; ++
l)
829 jacobian_grads[
point][i][j][
l] = result[i][j][
l];
843 typename DoFHandlerType>
845 maybe_update_jacobian_pushed_forward_grads(
846 const typename ::QProjector<dim>::DataSetDescriptor data_set,
858 const unsigned int n_q_points =
859 jacobian_pushed_forward_grads.size();
861 double tmp[spacedim][spacedim][spacedim];
865 &data.second_derivative(
point + data_set, 0);
869 for (
unsigned int k = 0; k < data.n_shape_functions; ++k)
871 const unsigned int comp_k =
874 for (
unsigned int j = 0; j < dim; ++j)
875 for (
unsigned int l = 0;
l < dim; ++
l)
877 (
second[k][j][
l] * data.local_dof_values[k]);
881 for (
unsigned int i = 0; i < spacedim; ++i)
882 for (
unsigned int j = 0; j < spacedim; ++j)
883 for (
unsigned int l = 0;
l < dim; ++
l)
886 result[i][0][
l] * data.covariant[
point][j][0];
887 for (
unsigned int jr = 1; jr < dim; ++jr)
890 result[i][jr][
l] * data.covariant[
point][j][jr];
895 for (
unsigned int i = 0; i < spacedim; ++i)
896 for (
unsigned int j = 0; j < spacedim; ++j)
897 for (
unsigned int l = 0;
l < spacedim; ++
l)
899 jacobian_pushed_forward_grads[
point][i][j][
l] =
900 tmp[i][j][0] * data.covariant[
point][
l][0];
901 for (
unsigned int lr = 1; lr < dim; ++lr)
903 jacobian_pushed_forward_grads[
point][i][j][
l] +=
904 tmp[i][j][lr] * data.covariant[
point][
l][lr];
920 typename DoFHandlerType>
922 maybe_update_jacobian_2nd_derivatives(
923 const typename ::QProjector<dim>::DataSetDescriptor data_set,
935 const unsigned int n_q_points = jacobian_2nd_derivatives.size();
940 &data.third_derivative(
point + data_set, 0);
944 for (
unsigned int k = 0; k < data.n_shape_functions; ++k)
946 const unsigned int comp_k =
949 for (
unsigned int j = 0; j < dim; ++j)
950 for (
unsigned int l = 0;
l < dim; ++
l)
951 for (
unsigned int m = 0; m < dim; ++m)
953 (third[k][j][
l][m] * data.local_dof_values[k]);
958 for (
unsigned int i = 0; i < spacedim; ++i)
959 for (
unsigned int j = 0; j < dim; ++j)
960 for (
unsigned int l = 0;
l < dim; ++
l)
961 for (
unsigned int m = 0; m < dim; ++m)
962 jacobian_2nd_derivatives[
point][i][j][
l][m] =
978 typename DoFHandlerType>
980 maybe_update_jacobian_pushed_forward_2nd_derivatives(
981 const typename ::QProjector<dim>::DataSetDescriptor data_set,
989 &jacobian_pushed_forward_2nd_derivatives)
994 const unsigned int n_q_points =
995 jacobian_pushed_forward_2nd_derivatives.size();
997 double tmp[spacedim][spacedim][spacedim][spacedim];
1001 &data.third_derivative(
point + data_set, 0);
1005 for (
unsigned int k = 0; k < data.n_shape_functions; ++k)
1007 const unsigned int comp_k =
1010 for (
unsigned int j = 0; j < dim; ++j)
1011 for (
unsigned int l = 0;
l < dim; ++
l)
1012 for (
unsigned int m = 0; m < dim; ++m)
1014 (third[k][j][
l][m] * data.local_dof_values[k]);
1018 for (
unsigned int i = 0; i < spacedim; ++i)
1019 for (
unsigned int j = 0; j < spacedim; ++j)
1020 for (
unsigned int l = 0;
l < dim; ++
l)
1021 for (
unsigned int m = 0; m < dim; ++m)
1023 jacobian_pushed_forward_2nd_derivatives
1025 result[i][0][
l][m] * data.covariant[
point][j][0];
1026 for (
unsigned int jr = 1; jr < dim; ++jr)
1027 jacobian_pushed_forward_2nd_derivatives[
point][i][j]
1029 result[i][jr][
l][m] *
1030 data.covariant[
point][j][jr];
1034 for (
unsigned int i = 0; i < spacedim; ++i)
1035 for (
unsigned int j = 0; j < spacedim; ++j)
1036 for (
unsigned int l = 0;
l < spacedim; ++
l)
1037 for (
unsigned int m = 0; m < dim; ++m)
1040 jacobian_pushed_forward_2nd_derivatives[
point][i][j]
1042 data.covariant[
point][
l][0];
1043 for (
unsigned int lr = 1; lr < dim; ++lr)
1045 jacobian_pushed_forward_2nd_derivatives[
point][i]
1048 data.covariant[
point][
l][lr];
1052 for (
unsigned int i = 0; i < spacedim; ++i)
1053 for (
unsigned int j = 0; j < spacedim; ++j)
1054 for (
unsigned int l = 0;
l < spacedim; ++
l)
1055 for (
unsigned int m = 0; m < spacedim; ++m)
1057 jacobian_pushed_forward_2nd_derivatives
1059 tmp[i][j][
l][0] * data.covariant[
point][m][0];
1060 for (
unsigned int mr = 1; mr < dim; ++mr)
1061 jacobian_pushed_forward_2nd_derivatives[
point][i][j]
1063 tmp[i][j][
l][mr] * data.covariant[
point][m][mr];
1078 typename DoFHandlerType>
1080 maybe_update_jacobian_3rd_derivatives(
1081 const typename ::QProjector<dim>::DataSetDescriptor data_set,
1084 InternalData & data,
1087 const std::vector<unsigned int> &
fe_to_real,
1090 const UpdateFlags update_flags = data.update_each;
1093 const unsigned int n_q_points = jacobian_3rd_derivatives.size();
1098 &data.fourth_derivative(
point + data_set, 0);
1102 for (
unsigned int k = 0; k < data.n_shape_functions; ++k)
1104 const unsigned int comp_k =
1107 for (
unsigned int j = 0; j < dim; ++j)
1108 for (
unsigned int l = 0;
l < dim; ++
l)
1109 for (
unsigned int m = 0; m < dim; ++m)
1110 for (
unsigned int n = 0; n < dim; ++n)
1112 (fourth[k][j][
l][m][n] *
1113 data.local_dof_values[k]);
1119 for (
unsigned int i = 0; i < spacedim; ++i)
1120 for (
unsigned int j = 0; j < dim; ++j)
1121 for (
unsigned int l = 0;
l < dim; ++
l)
1122 for (
unsigned int m = 0; m < dim; ++m)
1123 for (
unsigned int n = 0; n < dim; ++n)
1124 jacobian_3rd_derivatives[
point][i][j][
l][m][n] =
1125 result[i][j][
l][m][n];
1140 typename DoFHandlerType>
1142 maybe_update_jacobian_pushed_forward_3rd_derivatives(
1143 const typename ::QProjector<dim>::DataSetDescriptor data_set,
1146 InternalData & data,
1149 const std::vector<unsigned int> &
fe_to_real,
1151 &jacobian_pushed_forward_3rd_derivatives)
1153 const UpdateFlags update_flags = data.update_each;
1156 const unsigned int n_q_points =
1157 jacobian_pushed_forward_3rd_derivatives.size();
1159 double tmp[spacedim][spacedim][spacedim][spacedim][spacedim];
1163 &data.fourth_derivative(
point + data_set, 0);
1167 for (
unsigned int k = 0; k < data.n_shape_functions; ++k)
1169 const unsigned int comp_k =
1172 for (
unsigned int j = 0; j < dim; ++j)
1173 for (
unsigned int l = 0;
l < dim; ++
l)
1174 for (
unsigned int m = 0; m < dim; ++m)
1175 for (
unsigned int n = 0; n < dim; ++n)
1177 (fourth[k][j][
l][m][n] *
1178 data.local_dof_values[k]);
1182 for (
unsigned int i = 0; i < spacedim; ++i)
1183 for (
unsigned int j = 0; j < spacedim; ++j)
1184 for (
unsigned int l = 0;
l < dim; ++
l)
1185 for (
unsigned int m = 0; m < dim; ++m)
1186 for (
unsigned int n = 0; n < dim; ++n)
1188 tmp[i][j][
l][m][n] = result[i][0][
l][m][n] *
1189 data.covariant[
point][j][0];
1190 for (
unsigned int jr = 1; jr < dim; ++jr)
1191 tmp[i][j][
l][m][n] +=
1192 result[i][jr][
l][m][n] *
1193 data.covariant[
point][j][jr];
1197 for (
unsigned int i = 0; i < spacedim; ++i)
1198 for (
unsigned int j = 0; j < spacedim; ++j)
1199 for (
unsigned int l = 0;
l < spacedim; ++
l)
1200 for (
unsigned int m = 0; m < dim; ++m)
1201 for (
unsigned int n = 0; n < dim; ++n)
1203 jacobian_pushed_forward_3rd_derivatives
1205 tmp[i][j][0][m][n] *
1206 data.covariant[
point][
l][0];
1207 for (
unsigned int lr = 1; lr < dim; ++lr)
1208 jacobian_pushed_forward_3rd_derivatives[
point][i]
1211 tmp[i][j][lr][m][n] *
1212 data.covariant[
point][
l][lr];
1216 for (
unsigned int i = 0; i < spacedim; ++i)
1217 for (
unsigned int j = 0; j < spacedim; ++j)
1218 for (
unsigned int l = 0;
l < spacedim; ++
l)
1219 for (
unsigned int m = 0; m < spacedim; ++m)
1220 for (
unsigned int n = 0; n < dim; ++n)
1222 tmp[i][j][
l][m][n] =
1223 jacobian_pushed_forward_3rd_derivatives[
point][i]
1226 data.covariant[
point][m][0];
1227 for (
unsigned int mr = 1; mr < dim; ++mr)
1228 tmp[i][j][
l][m][n] +=
1229 jacobian_pushed_forward_3rd_derivatives[
point]
1232 data.covariant[
point][m][mr];
1236 for (
unsigned int i = 0; i < spacedim; ++i)
1237 for (
unsigned int j = 0; j < spacedim; ++j)
1238 for (
unsigned int l = 0;
l < spacedim; ++
l)
1239 for (
unsigned int m = 0; m < spacedim; ++m)
1240 for (
unsigned int n = 0; n < spacedim; ++n)
1242 jacobian_pushed_forward_3rd_derivatives
1244 tmp[i][j][
l][m][0] *
1245 data.covariant[
point][n][0];
1246 for (
unsigned int nr = 1; nr < dim; ++nr)
1247 jacobian_pushed_forward_3rd_derivatives[
point][i]
1250 tmp[i][j][
l][m][nr] *
1251 data.covariant[
point][n][nr];
1270 typename DoFHandlerType>
1272 maybe_compute_face_data(
1273 const ::Mapping<dim, spacedim> &mapping,
1274 const typename ::Triangulation<dim, spacedim>::cell_iterator
1276 const unsigned int face_no,
1277 const unsigned int subface_no,
1278 const std::vector<double> &weights,
1285 const UpdateFlags update_flags = data.update_each;
1289 const unsigned int n_q_points = output_data.
boundary_forms.size();
1298 for (
unsigned int d = 0;
d != dim - 1; ++
d)
1301 data.unit_tangentials.size(),
1304 data.aux[
d].size() <=
1306 .unit_tangentials[face_no +
1314 .unit_tangentials[face_no +
1323 if (dim == spacedim)
1325 for (
unsigned int i = 0; i < n_q_points; ++i)
1334 (face_no == 0 ? -1 : +1);
1364 data.contravariant[
point].transpose()[0];
1366 (face_no == 0 ? -1. : +1.) *
1373 data.contravariant[
point].transpose();
1377 cell_normal /= cell_normal.
norm();
1398 const double area_ratio =
1400 cell->subface_case(face_no), subface_no);
1418 data.covariant[
point].transpose();
1431 typename DoFHandlerType>
1433 do_fill_fe_face_values(
1434 const ::Mapping<dim, spacedim> &mapping,
1435 const typename ::Triangulation<dim, spacedim>::cell_iterator
1437 const unsigned int face_no,
1438 const unsigned int subface_no,
1439 const typename ::QProjector<dim>::DataSetDescriptor data_set,
1443 InternalData & data,
1446 const std::vector<unsigned int> &
fe_to_real,
1450 maybe_compute_q_points<dim, spacedim, VectorType, DoFHandlerType>(
1458 maybe_update_Jacobians<dim, spacedim, VectorType, DoFHandlerType>(
1461 maybe_update_jacobian_grads<dim, spacedim, VectorType, DoFHandlerType>(
1464 maybe_update_jacobian_pushed_forward_grads<dim,
1475 maybe_update_jacobian_2nd_derivatives<dim,
1486 maybe_update_jacobian_pushed_forward_2nd_derivatives<dim,
1497 maybe_update_jacobian_3rd_derivatives<dim,
1508 maybe_update_jacobian_pushed_forward_3rd_derivatives<dim,
1519 maybe_compute_face_data<dim, spacedim, VectorType, DoFHandlerType>(
1535 template <
int dim,
int spacedim,
typename VectorType,
typename DoFHandlerType>
1551 const unsigned int n_q_points = quadrature.
size();
1555 internal::MappingFEFieldImplementation::
1556 maybe_compute_q_points<dim, spacedim, VectorType, DoFHandlerType>(
1564 internal::MappingFEFieldImplementation::
1565 maybe_update_Jacobians<dim, spacedim, VectorType, DoFHandlerType>(
1573 const std::vector<double> &weights = quadrature.
get_weights();
1590 if (dim == spacedim)
1599 Assert(det > 1
e-12 * Utilities::fixed_power<dim>(
1600 cell->diameter() / std::sqrt(
double(dim))),
1602 cell->center(), det,
point)));
1611 for (
unsigned int i = 0; i < spacedim; ++i)
1612 for (
unsigned int j = 0; j < dim; ++j)
1616 for (
unsigned int i = 0; i < dim; ++i)
1617 for (
unsigned int j = 0; j < dim; ++j)
1618 G[i][j] = DX_t[i] * DX_t[j];
1625 Assert(spacedim - dim == 1,
1626 ExcMessage(
"There is no cell normal in codim 2."));
1638 if (cell->direction_flag() ==
false)
1663 internal::MappingFEFieldImplementation::
1664 maybe_update_jacobian_grads<dim, spacedim, VectorType, DoFHandlerType>(
1674 internal::MappingFEFieldImplementation::
1675 maybe_update_jacobian_pushed_forward_grads<dim,
1687 internal::MappingFEFieldImplementation::maybe_update_jacobian_2nd_derivatives<
1699 internal::MappingFEFieldImplementation::
1700 maybe_update_jacobian_pushed_forward_2nd_derivatives<dim,
1712 internal::MappingFEFieldImplementation::maybe_update_jacobian_3rd_derivatives<
1725 internal::MappingFEFieldImplementation::
1726 maybe_update_jacobian_pushed_forward_3rd_derivatives<dim,
1742 template <
int dim,
int spacedim,
typename VectorType,
typename DoFHandlerType>
1746 const unsigned int face_no,
1760 internal::MappingFEFieldImplementation::
1761 do_fill_fe_face_values<dim, spacedim, VectorType, DoFHandlerType>(
1767 cell->face_orientation(face_no),
1768 cell->face_flip(face_no),
1769 cell->face_rotation(face_no),
1780 template <
int dim,
int spacedim,
typename VectorType,
typename DoFHandlerType>
1785 const unsigned int face_no,
1786 const unsigned int subface_no,
1800 internal::MappingFEFieldImplementation::
1801 do_fill_fe_face_values<dim, spacedim, VectorType, DoFHandlerType>(
1808 cell->face_orientation(
1810 cell->face_flip(face_no),
1811 cell->face_rotation(face_no),
1813 cell->subface_case(face_no)),
1825 namespace MappingFEFieldImplementation
1833 typename DoFHandlerType>
1844 MappingFEField<dim, spacedim, VectorType, DoFHandlerType>::
1845 InternalData *
>(&mapping_data) !=
nullptr),
1847 const typename ::MappingFEField<dim,
1850 DoFHandlerType>::InternalData
1851 &data =
static_cast<
1853 MappingFEField<dim, spacedim, VectorType, DoFHandlerType>::
1854 InternalData &
>(mapping_data);
1856 switch (mapping_kind)
1863 "update_contravariant_transformation"));
1865 for (
unsigned int i = 0; i < output.size(); ++i)
1877 "update_contravariant_transformation"));
1881 "update_volume_elements"));
1883 for (
unsigned int i = 0; i < output.size(); ++i)
1887 output[i] /= data.volume_elements[i];
1901 "update_contravariant_transformation"));
1903 for (
unsigned int i = 0; i < output.size(); ++i)
1919 typename DoFHandlerType>
1921 transform_differential_forms(
1930 MappingFEField<dim, spacedim, VectorType, DoFHandlerType>::
1931 InternalData *
>(&mapping_data) !=
nullptr),
1933 const typename ::MappingFEField<dim,
1936 DoFHandlerType>::InternalData
1937 &data =
static_cast<
1939 MappingFEField<dim, spacedim, VectorType, DoFHandlerType>::
1940 InternalData &
>(mapping_data);
1942 switch (mapping_kind)
1949 "update_contravariant_transformation"));
1951 for (
unsigned int i = 0; i < output.size(); ++i)
1966 template <
int dim,
int spacedim,
typename VectorType,
typename DoFHandlerType>
1976 internal::MappingFEFieldImplementation::
1977 transform_fields<dim, spacedim, 1, VectorType, DoFHandlerType>(input,
1985 template <
int dim,
int spacedim,
typename VectorType,
typename DoFHandlerType>
1995 internal::MappingFEFieldImplementation::
1996 transform_differential_forms<dim, spacedim, 1, VectorType, DoFHandlerType>(
1997 input, mapping_kind, mapping_data, output);
2002 template <
int dim,
int spacedim,
typename VectorType,
typename DoFHandlerType>
2020 template <
int dim,
int spacedim,
typename VectorType,
typename DoFHandlerType>
2033 switch (mapping_kind)
2039 "update_covariant_transformation"));
2041 for (
unsigned int q = 0; q < output.size(); ++q)
2042 for (
unsigned int i = 0; i < spacedim; ++i)
2043 for (
unsigned int j = 0; j < spacedim; ++j)
2044 for (
unsigned int k = 0; k < spacedim; ++k)
2046 output[q][i][j][k] = data.
covariant[q][j][0] *
2049 for (
unsigned int J = 0; J < dim; ++J)
2051 const unsigned int K0 = (0 == J) ? 1 : 0;
2052 for (
unsigned int K = K0; K < dim; ++K)
2053 output[q][i][j][k] += data.
covariant[q][j][J] *
2068 template <
int dim,
int spacedim,
typename VectorType,
typename DoFHandlerType>
2086 template <
int dim,
int spacedim,
typename VectorType,
typename DoFHandlerType>
2097 std::unique_ptr<typename Mapping<dim, spacedim>::InternalDataBase> mdata(
2108 template <
int dim,
int spacedim,
typename VectorType,
typename DoFHandlerType>
2117 unsigned int comp_i =
2129 template <
int dim,
int spacedim,
typename VectorType,
typename DoFHandlerType>
2150 for (
unsigned int d = 0;
d < dim; ++
d)
2151 initial_p_unit[
d] = 0.5;
2164 std::unique_ptr<typename Mapping<dim, spacedim>::InternalDataBase> mdata(
2165 get_data(update_flags, point_quadrature));
2178 template <
int dim,
int spacedim,
typename VectorType,
typename DoFHandlerType>
2187 const unsigned int n_shapes = mdata.
shape_values.size();
2207 const double eps = 1.e-12 * cell->diameter();
2208 const unsigned int newton_iteration_limit = 20;
2209 unsigned int newton_iteration = 0;
2218 const unsigned int comp_k =
2221 for (
unsigned int j = 0; j < dim; ++j)
2225 for (
unsigned int j = 0; j < dim; ++j)
2227 f[j] = DF[j] * p_minus_F;
2228 for (
unsigned int l = 0;
l < dim; ++
l)
2229 df[j][
l] = -DF[j] * DF[
l];
2235 double step_length = 1;
2248 for (
unsigned int i = 0; i < dim; ++i)
2249 p_unit_trial[i] -= step_length * delta[i];
2259 if (f_trial.
norm() < p_minus_F.
norm())
2261 p_real = p_real_trial;
2262 p_unit = p_unit_trial;
2263 p_minus_F = f_trial;
2266 else if (step_length > 0.05)
2273 if (newton_iteration > newton_iteration_limit)
2290 template <
int dim,
int spacedim,
typename VectorType,
typename DoFHandlerType>
2298 template <
int dim,
int spacedim,
typename VectorType,
typename DoFHandlerType>
2307 template <
int dim,
int spacedim,
typename VectorType,
typename DoFHandlerType>
2308 std::unique_ptr<Mapping<dim, spacedim>>
2311 return std_cxx14::make_unique<
2316 template <
int dim,
int spacedim,
typename VectorType,
typename DoFHandlerType>
2338 dof_cell->get_mg_dof_indices(data.local_dof_indices);
2340 dof_cell->get_dof_indices(data.local_dof_indices);
2345 for (
unsigned int i = 0; i < data.local_dof_values.size(); ++i)
2346 data.local_dof_values[i] =
2348 data.local_dof_indices[i]);
2352 #define SPLIT_INSTANTIATIONS_COUNT 2
2353 #ifndef SPLIT_INSTANTIATIONS_INDEX
2354 # define SPLIT_INSTANTIATIONS_INDEX 0
2356 #include "mapping_fe_field.inst"