On 05/03/2018 03:54 AM, 'Maxi Miller' via deal.II User Group wrote:
|
GridTools::transform
(&Step15::MinimalSurfaceProblem<dim>::rescale_body_length,local_triangulation);
}
|
but during compilation I get the following error:
|
/opt/dealii/include/deal.II/grid/grid_tools.h:2632:40:error:must
use‘.*’or‘->*’to call pointer-to-member functionin‘predicate
(...)’,e.g.‘(...->*predicate)(...)’
cell->vertex(v)=predicate(cell->vertex(v))
|
The function wants a pointer to a free function, but you pass a pointer
to a member function as argument. You have two options:
* If you can, make the member function `static` so that it doesn't need
an object to work on any more.
* Create a bound member function pointer using
boost::bind (&Step15::MinimalSurfaceProblem<dim>
::rescale_body_length,
this,
std_cxx11::_1)
or (if your compiler supports C++11), using a lambda function:
[&this](const Point<dim> &p) -> Point<dim>
{ return this->rescale_body_length(p); }
Best
W.
--
------------------------------------------------------------------------
Wolfgang Bangerth email: [email protected]
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].
For more options, visit https://groups.google.com/d/optout.