Dear All,

I have a reactive transport code that was first developed using structured grid and parallelized using PETSc. Both sequential version (with or without PETSc) and parallel version work fine. Recently I have finished the unstructured grid capability for the sequential version. Next step work is to modify the necessary part to make the code parallelized using unstructured grid.


For the structured grid code, it follows the following steps.

!domain decomposition

DMDACreate3D()

DMDAGetInfo()

DMDAGetCorners()

!timeloop begins

!calculate matrix entry and rhs
...
Solve Ax=b using PETSc

DMGlobalToLocalBegin()
DMGlobalToLocalEnd()
...
!end of timeloop


So far as I know, the domain decomposition part need to be modified. I plan to use PETSc DMPlex class to do this job. Is this the best way to port the code?

DMPlexCreateFromFile()

DMPlexDistribute()

!timeloop begins

!calculate matrix entry and rhs
...
Solve Ax=b using PETSc

DMGlobalToLocalBegin()
DMGlobalToLocalEnd()
...
!end of timeloop

Thanks,

Danyang

Reply via email to