After additional tests I noticed that I'm not only overwriting the
target_component-component with the new values, but also the other
components, but with 0 instead. But instead I do not want to touch them.
How can I do that (if possible)?
Thanks!
Am Donnerstag, 27. Februar 2020 17:00:12 UTC+1 schrieb Wolfgang Bangerth:
>
>
> > |
> > Functions::InterpolatedTensorProductGridData<dim>
> interpolator(this->coordinate_values,
> >
> this->data_storage);
> >
> > VectorFunctionFromScalarFunctionObject<dim>
> interpolator_object(&interpolator.value,
>
> The error...
>
> > but the compilation fails with
> > error: ISO C++ forbids taking the address of a bound member function to
> > form a pointer to member function. Say
> > ‘&dealii::Functions::InterpolatedTensorProductGridData<2>::value’.
>
> ...comes from the line above. The problem is that
> &object.functionname
> is simply not something that C++ understands. What you need is a
> function object that takes a Point and returns a double. You can use
> std::bind(&Functions::InterpolatedTensorProductGridData<dim>::value,
> &interpolator)
> as this argument, or maybe more modern, write
> [&interpolator] (const Point<dim> &p) { return interpolator.value(p); }
> in place of the first constructor argument to interpolator_object.
>
> Best
> W.
> --
> ------------------------------------------------------------------------
> Wolfgang Bangerth email: [email protected]
> <javascript:>
> www: http://www.math.colostate.edu/~bangerth/
>
--
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see
https://groups.google.com/d/forum/dealii?hl=en
---
You received this message because you are subscribed to the Google Groups
"deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/dealii/15dd3b86-8f89-412d-abec-30392e70b221%40googlegroups.com.