[petsc-dev] TSSetArtificialForcingFunction()

Barry Smith bsmith at mcs.anl.gov
Fri Feb 1 23:25:37 CST 2013


On Feb 1, 2013, at 11:11 PM, Jed Brown <jedbrown at mcs.anl.gov> wrote:

> 
> On Fri, Feb 1, 2013 at 4:49 PM, Barry Smith <bsmith at mcs.anl.gov> wrote:
> Should we add something like TSSetManufactoredForcingFunction() with which the user would provide the extra forcing term that makes TSSetSolutionFunction() the exact solution. Then when -ts_test is used TS automatically adds the artificial forcing term and compares the computed solution with the solution function provided by the user.
> 
> I don't know how we would implement this except to call the user just like an RHSFunction.

 Yes, that is what I was thinking. They would provide this just like any other terms but by putting it in a different place it doesn't "interfer" with the problem they "want to solve" so they may be more likely to do it. If we tell people just put it into your RHSFunction they may not do it or may FIU by not putting in the terms for the problem they "want to solve". Basically turning the testing into something orthogonal to the usual stuff they provide ….

 Barry

> The user's dofs may not have coordinates and even if they did, the forcing term should be integrated using quadrature consistent with the rest of the discretization.
> 
> I think just having the monitor for the difference and some examples that really check errors would be enough.
> 
> 
>   Then in each TS example we can provide a solution and its forcing making it far more likely that people who copy examples also put in a test function?
> 
> 




More information about the petsc-dev mailing list