Let's try another suggestion. If you want to use your ImageFunction as a coefficient in a PDE, you will need to have both a Mesh and a FunctionSpace *outside* your ImageFunction. That would also help you with the initialization.
Here's a sketch of what it might look like:
#include <MyProblem.h>
int main()
{
Image image("image.jpg");
ImageMesh mesh(image);
MyProblemFunctionSpace V(mesh);
ImageFunction f(image);
MyProblemBilinearForm a(V, V);
MyProblemLinearForm L(V);
L.f = f;
VariationalProblem problem(a, L);
Function u;
problem.solve(u);
}
--
Anders
signature.asc
Description: Digital signature
_______________________________________________ DOLFIN-dev mailing list [email protected] http://www.fenics.org/mailman/listinfo/dolfin-dev
