Stefano, a fix was pushed in maint/master.

That was an issue (stack overflow) not flagged by the compiler or valgrind directly for that matter - good catch.

To register a method without dense output:
    const PetscReal
      A[2][2] = {{0,0},
                 {1.,0}},
      b[2] = {0.5,0.5},
      *bembed = NULL,*Binterp = NULL;
ierr = TSRKRegister("myrk",2,2,&A[0][0],&b[0],NULL,bembed,0,Binterp);CHKERRQ(ierr);


or with dense output:
    const PetscReal
       A[2][2] = {{0,0},
                 {1.,0}},
      b[2] = {0.5,0.5},
      *bembed = NULL,Binterp[2][2] ={{1.,-0.5},{0,0.5}};
ierr = TSRKRegister("myrk",2,2,&A[0][0],&b[0],NULL,bembed,2,&Binterp[0][0]);CHKERRQ(ierr);



Emil

On 11/16/16 6:51 AM, Stefano Zampini wrote:
Emil,

I think that TSInterpolate_RK is broken.

From the manual page of TSRKRegister

http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/TS/TSRKRegister.html

binterp is supposed to be a matrix but we are passing in the b vector in
TSRKRegisterAll. Also, the NULL case for binterp is not taken into account.

Could you please provide a fix in maint?

Thanks,
--
Stefano

Reply via email to