[ignore last message from me, here is a revised plan]

> 
> PCMGResidualDefault would just call MatResidual instead MatMult, then VecAYPX.

> PetscObjectStateQuery() and PetscObjectGetId() (need to add the latter
> function, but the information is at h->id).


OK, is this the plan:

1) I should add a residual method to Mat, make a MatResidualDefault, and have 
all (yuck) SetUp_MatXXX set this default.  I guess there is no base class SetUp 
….  then make a MatResidual_SeqAIJ that just does a dumb residual for now.

2) PCMGResidualDefault call MatResidual instead MatMult, then VecAYPX.

3) Add fields in Mat: mat_res_state, vec_res_state, vec_res_id.  I need to know 
the types but I can do this in the next phase.

BTW, if we have 64 bits for State then it seems like we could fold the ID into 
this State ...

These steps can be one checkin and Jed can do the above State and ID stuff, 
then I can make a new branch and write the local code to have 
MatResidual_SeqAIJ look at the ID and States and call the SOR residual of we 
match up.  And this will be hardwired for SOR in that if we have a match we 
assume it was done by SOR.

Mark

Reply via email to