[petsc-users] template function as argument to MatShellSetOperation

2015-01-12 Thread Marco Cisternino
Hi PETSc users, 
I'm trying to set my matrix multiplication with MatShellSetOperation. 
The question is: is it possible to pass a c++ template function as my matrix 
multiplication to MatShellSetOperation? 
And if yes, how? 
Thanks for any suggestions. 

Marco 



Re: [petsc-users] template function as argument to MatShellSetOperation

2015-01-12 Thread Matthew Knepley
On Mon, Jan 12, 2015 at 7:59 AM, Marco Cisternino 
marco.cistern...@optimad.it wrote:

 Hi PETSc users,
 I'm trying to set my matrix multiplication with MatShellSetOperation.
 The question is: is it possible to pass a c++ template function as my
 matrix multiplication to MatShellSetOperation?


No. You will need to write a C wrapper.

  Thanks,

Matt


 And if yes, how?
 Thanks for any suggestions.

 Marco




-- 
What most experimenters take for granted before they begin their
experiments is infinitely more interesting than any results to which their
experiments lead.
-- Norbert Wiener