[petsc-users] A problem with MatFDColoringSetFunction

Barry Smith bsmith at petsc.dev
Tue Jan 11 23:33:44 CST 2022



> On Jan 11, 2022, at 8:04 PM, Jed Brown <jed at jedbrown.org> wrote:
> 
> Barry Smith <bsmith at petsc.dev> writes:
> 
>>  Thanks for the alternative. 
>> 
>>  @jed does this mean we need to do our casting of functions like this everywhere?
> 
> Whenever our interfaces accept a function with a non-unique prototype, the interface should take void(*)(void) instead of PetscErrorCode(*)(void).

  Great. I didn't realise when I did the initial PetscErrorCode(*)(void). that void(*)(void)  was a special portable castable function prototype I have made an issue.

> 
> I think we should also be a bit more judicious about where we absolutely need this hack.



More information about the petsc-users mailing list