DMPlexGlobalVectorLoad#
Loads on-disk vector data into a global vector
Synopsis#
#include "petscdmplex.h"   
PetscErrorCode DMPlexGlobalVectorLoad(DM dm, PetscViewer viewer, DM sectiondm, PetscSF sf, Vec vec)
Collective
Input Parameters#
- dm - The - DMthat represents the topology
- viewer - The - PetscViewerthat represents the on-disk vector data
- sectiondm - The - DMthat contains the global section on which vec is defined, can be- NULL
- sf - The - PetscSFthat migrates the on-disk vector data into vec
- vec - The global vector to set values of 
Notes#
In general dm and sectiondm are two different objects, the former carrying the topology and the latter carrying the section, and have been given a topology name and a section name, respectively, with PetscObjectSetName(). In practice, however, they can be the same object (or in case sectiondm is NULL) if it carries both topology and section; in that case the name of the object is used as both the topology name and the section name.
Calling sequence#
       DMCreate(PETSC_COMM_WORLD, &dm);
       DMSetType(dm, DMPLEX);
       PetscObjectSetName((PetscObject)dm, "topologydm_name");
       DMPlexTopologyLoad(dm, viewer, &sfX);
       DMClone(dm, §iondm);
       PetscObjectSetName((PetscObject)sectiondm, "sectiondm_name");
       DMPlexSectionLoad(dm, viewer, sectiondm, sfX, &gsf, NULL);
       DMGetGlobalVector(sectiondm, &vec);
       PetscObjectSetName((PetscObject)vec, "vec_name");
       DMPlexGlobalVectorLoad(dm, viewer, sectiondm, gsf, vec);
       DMRestoreGlobalVector(sectiondm, &vec);
       PetscSFDestroy(&gsf);
       PetscSFDestroy(&sfX);
       DMDestroy(§iondm);
       DMDestroy(&dm);
See Also#
DMPlex: Unstructured Grids, DM, DMPLEX, DMPlexTopologyLoad(), DMPlexSectionLoad(), DMPlexLocalVectorLoad(), DMPlexGlobalVectorView(), DMPlexLocalVectorView(),
PetscSF, PetscViewer
Level#
advanced
Location#
Examples#
Index of all DMPlex routines
Table of Contents for all manual pages
Index of all manual pages