Skip to content

Commit

Permalink
Merge pull request #13177 from peterrum/point_values_fix_types_2
Browse files Browse the repository at this point in the history
FEPointEvaluation: fix types for multiple components
  • Loading branch information
bangerth committed Jan 6, 2022
2 parents 6f4b6a9 + b424655 commit 3ed06da
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions include/deal.II/matrix_free/fe_point_evaluation.h
Original file line number Diff line number Diff line change
Expand Up @@ -270,13 +270,13 @@ namespace internal
return value[component];
}

static Tensor<1, dim> &
static Tensor<1, dim, Number> &
access(gradient_type &value, const unsigned int component)
{
return value[component];
}

static const Tensor<1, dim> &
static const Tensor<1, dim, Number> &
access(const gradient_type &value, const unsigned int component)
{
return value[component];
Expand Down Expand Up @@ -926,9 +926,12 @@ FEPointEvaluation<n_components, dim, spacedim, Number>::evaluate(
Number>::set_gradient(val_and_grad.second,
j,
unit_gradients[i + j]);
gradients[i + j] = apply_transformation(
gradients[i + j] = static_cast<
typename internal::FEPointEvaluation::
EvaluatorTypeTraits<dim, n_components, double>::
gradient_type>(apply_transformation(
mapping_data.inverse_jacobians[i + j].transpose(),
unit_gradients[i + j]);
unit_gradients[i + j]));
}
}
}
Expand Down Expand Up @@ -1055,8 +1058,11 @@ FEPointEvaluation<n_components, dim, spacedim, Number>::integrate(
Assert(update_flags_mapping & update_inverse_jacobians,
ExcNotInitialized());
gradients[i + j] =
apply_transformation(mapping_data.inverse_jacobians[i + j],
gradients[i + j]);
static_cast<typename internal::FEPointEvaluation::
EvaluatorTypeTraits<dim, n_components, double>::
gradient_type>(
apply_transformation(mapping_data.inverse_jacobians[i + j],
gradients[i + j]));
internal::FEPointEvaluation::
EvaluatorTypeTraits<dim, n_components, Number>::get_gradient(
gradient, j, gradients[i + j]);
Expand Down

0 comments on commit 3ed06da

Please sign in to comment.