(Sorry you didn't get a reply earlier.) That's generally right: DM gives what is basically a distributed "function space". Actual fields in that space are Vecs. You can have one or more Vecs. The implementation of VecLoad will depend on the file format.
Mike Michell <mi.mike1...@gmail.com> writes: > Dear PETSc developer team, > > I am a user of PETSc DMPlex for a finite-volume solver. So far, I have > loaded a mesh file made by Gmsh as a DMPlex object without pre-computed > solution field. > But what if I need to load the mesh as well as solution fields that are > computed by other codes sharing the same physical domain, what is a smart > way to do that? In other words, how can I load a DM object from a mesh file > along with a defined solution field? > I can think of that; load mesh to a DM object first, then declare a local > (or global) vector to read & map the external solution field onto the PETSc > data structure. But I can feel that this might not be the best way. > > Thanks, > Mike