Ed Bueler <elbue...@alaska.edu> writes:
> Jed's "more information" answer about unstructured grids is a bit vague,
> but it must be the one that motivates the difference.

VecGetArray is most commonly used for algebraic operations that know
nothing about the geometry/discretization.  DM* functions are normally
used to access vectors in a discretization-aware way, such as DMDA with
{k,j,i} indexing or DMPlex with indexing by topological "points".  If
you're doing something unstructured without a DM, you probably have some
analogous data structure and I would suggest making a Vec accessor in
the language of that discretization.  If you really think the flat array
of structs that you're getting from VecGetArray (with an awkward cast)
is the best interface for your unstructured discretization, I would
still suggest making that trivial wrapper.

Attachment: signature.asc
Description: PGP signature

Reply via email to