[petsc-dev] sor smoothers

Mark F. Adams mfadams at lbl.gov
Mon Sep 9 10:49:38 CDT 2013


> 
> 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, get rid of PCMGResidualDefault, make a MatResidualDefault, and have all (yuck) SetUp_MatXXX set this default.  I guess there is no base class SetUp ….  the make a MatResidual_SeqAIJ that just does a dumb residual for now.

2) Get rid of PCMGSetResidual and clean up the several places (6 + the header) that I see it in the repo.  And get rid of mglevels[l]->residual.

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




More information about the petsc-dev mailing list