sandialabs / compadre

Compadre (Compatible Particle Discretization and Remap)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Specify solution and store residual on particles

kuberry opened this issue · comments

The current ProblemsT class has a solve() function that permits a flag to enable saving the residual to the particles (overwriting the solution) rather than storing the solution.
The process is: 1.) provide A and b, then solve Ax=b 2.) compute r=Ax-b 3.) Store r as the solution fields on the particles.

For the purposes of visual debugging, it would also be useful to specify an exact solution (i.e. x), and then rather than solving Ax=b, just compute r=Ax-b and store this on the particles.

Propose naming the function residual(optional string postfix)
It could also replace the the residual writing currently in solve().