On Wed, Jul 25, 2012 at 5:46 PM, Chao Yang <chaoyang.cuboulder at gmail.com>wrote:
> In PETSc-3.3, DMMG has been completely replaced by using SNESSetDM() and > pc_mg. And it is shown in the changelog that resolution-dependent data > should be avoided in the user context. > > However, for a time-dependent problem, if a fully implicit time-stepping > is implemented by hand, then some solutions at previous time steps for both > fine and coarse meshes are needed in FormFunction. > How do you intend to represent these on coarse meshes? For maximum flexibility, you can follow the methodology in TSTheta (src/ts/impls/implicit/theta/theta.c) which uses DMGetNamedVector() to cache the state vectors on levels and DMRestrictHook_Theta() to update it when necessary. > In PETSc-3.2, there is an example using DMMG with time-stepping: > src/snes/examples/tutorials/ex54.c > Is there a substitute for it in PETS-3.3? > Uh, the example did not use DMMG. It did use PCMG, but only for the linear problem and only with Galerkin coarse operators, thus the user callbacks were never called on coarse grids. If you use rediscretized coarse operators or FAS, you need to be able to handle the callbacks from coarse grids. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20120725/e186903a/attachment.html>
