← Back to team overview

dolfin team mailing list archive

Re: Fwd: A minimal c++ Function test and some bugs

 

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

Attachment: signature.asc
Description: Digital signature


References