|
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:                 bange...@colostate.edu
                           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 dealii+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/f1107e55-6c00-4bc2-8280-57f664c39246%40colostate.edu.

Reply via email to