[petsc-users] Questions about AMG and Jacobian Contruction

Jed Brown jed at jedbrown.org
Sun Jul 14 09:12:27 CDT 2019


Yingjie Wu via petsc-users <petsc-users at mcs.anl.gov> writes:

> Respected PETSc developers:
> Hi,
> I have some questions about some functions of AMG and the construction time
> of Jacobian matrix in the process of using. Please help me to answer them.
>
> 1. I see some functions about AMG in the list of PETSc functions. I wonder
> if DMDA is necessary to construct vectors when using AMG precondition.
> (Because the geometry described in my PDE is irregular,it contains a lot of
> pipes and connections, instead of using DMDA to manage vectors, I define
> discrete solution vectors by myself.)

It is not used by AMG.  Geometric MG either uses a DM (of which DMDA is
one, but there are unstructured choices) or requires the user to call
functions like PCMGSetInterpolation.  AMG is probably a better choice
for your problem (unless the pipe networks are such that a direct solver
is practical; note that Approximate Minimum Degree ordering may be
better than Nested Dissection).

> 2. As far as I know, besides V-cycle, AMG method also needs auxiliary
> matrix B and transfer matrix P (transfer matrix from fine mesh to coarse
> mesh). Are these transformation matrices built-in or can they be provided
> by users in PETSc?

I'm not sure what your B represents, but see PCMGSetInterpolation to specify P.

> 3. At present, in my program, I use -snes_mf_operator to solve the
> non-linear PDE problem. Although I do not directly construct Jacobian
> matrix, it is also expensive to construct preconditioning matrix (provided
> by users). Can I control the update and decomposition time of the
> preconditioning matrix, such as updating the preconditioning matrix every
> two Newton steps and then ILU factorization? Can these controls be
> implemented in SNESMonitor?

See SNESSetLagJacobian (-snes_lag_jacobian) and SNESSetLagPreconditioner
(-snes_lag_preconditioner).


More information about the petsc-users mailing list