[petsc-users] Structured (DMDA) vs Unstructured (DMPlex) meshes
Matthew Knepley
knepley at gmail.com
Mon Jul 17 14:30:41 CDT 2023
On Mon, Jul 17, 2023 at 12:48 PM Barry Smith <bsmith at petsc.dev> wrote:
>
> The largest potential advantage of DMDA is likely the possibility of
> easily using geometric multigrid if it is appropriate for the problem (or
> subproblem of the problem) you are solving. The second advantage is, this
> depends on your PDE and discretization, the simplicity of your code, and
> what part of PETSc it depends on, if it doesn't depend on DMPLEX (and
> doesn't need to) then that is a good thing. Disadvantage of DMDA is lack
> of flexibility in discretization, handling of non-standard boundary
> conditions, geometry.
>
I will be more specific about the discretizations. DMDA supports collocated
discretizations. If you have this, I would definitely recommend it, since
the array programming style is easy. However, if you have mixed FEM, or
higher order, or staggered discretizations, or complex BC, you need
something else.
There should be no difference in the solver since all the DMs just build
Vec and Mat objects and hand them off. There is a potential difference for
matrix-free operation. Right now, Plex is slow there, so we are putting in
an interface to libCEED for that.
Thanks,
Matt
> > On Jul 17, 2023, at 12:42 PM, Miguel Angel Salazar de Troya <
> miguel.salazar at corintis.com> wrote:
> >
> > Hello,
> >
> > I am trying to understand if I should make the effort to make my code
> use structured meshes instead of unstructured ones. My domain is cartesian
> so that is the first check for structured meshes. However, the problem size
> I am looking at is ~20 million degrees of freedom. My understanding is that
> for this problem size, most of the time is spent on the solver. In this
> case, do structured meshes still have an advantage? Can they run Krylov
> methods faster than when using structured meshes? What about other solvers
> and preconditioners?
> >
> > Thanks,
> > Miguel
>
>
--
What most experimenters take for granted before they begin their
experiments is infinitely more interesting than any results to which their
experiments lead.
-- Norbert Wiener
https://www.cse.buffalo.edu/~knepley/ <http://www.cse.buffalo.edu/~knepley/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20230717/4e6be5fe/attachment.html>
More information about the petsc-users
mailing list