
DMStagVecGetArray — PETSc 3.23.0 documentation
This function returns a (dim+1)-dimensional array for a dim-dimensional DMSTAG. The first 1-3 dimensions indicate an element in the global numbering, using the standard C ordering.
petsc.org
ConvertToAIJ () should perhaps be placed somewhere 408: in mat/utils to avoid code duplication, but then the DMStag and DMDA code would need to include the private Mat headers. 409: Since it is only used in two places, I have simply duplicated the code to avoid the need to exposure the private 410: Mat routines in parts of DM.
Source files - PETSc
# Data Management (DM) `DM` objects are used to manage communication between the algebraic structures in PETSc (`Vec` and `Mat`) and mesh data structures in PDE-based (or other) simulations. See, for structured grids `DMDA`, for staggered grids `DMSTAG`, and for unstructured grids `DMPLEX`.
DMStagVecSplitToDMDA - Argonne National Laboratory
PetscErrorCode DMStagVecSplitToDMDA(DM dm,Vec vec,DMStagStencilLocation loc,PetscInt c,DM *pda,Vec *pdavec) Logically Collective High-level helper function which accepts a DMStag, a global vector, and location/dof, and generates a corresponding DMDA and Vec .
petsc/src/dm/impls/stag/tutorials/ex6.c at main - GitHub
This example uses the dual grid of the one pictured in Fig. 1. of the paper, so that velocities are on face boundaries, shear stresses are defined on vertices (2D) or edges (3D), and normal stresses are defined on elements.
DMStagVecRestoreArray — PETSc v3.22.3-337-gb7b2c57cd5a …
#include "petscdmstag.h" #include "petscdmproduct.h" PetscErrorCode DMStagVecRestoreArray (DM dm, Vec vec, void * array) Logically Collective Input Parameters #
Vec — PETSc 3.19.5 documentation - web.cels.anl.gov
Edit on GitLab. Index of all Vec routines Table of Contents for all manual pages Index of all manual pages
DMStagMigrateVec — PETSc v3.23.0-46-g09b68a49ed2 …
vec - the source vector, compatible with dm. dmTo - the compatible destination DMSTAG object. vecTo - the destination vector, compatible with dmTo. Notes# Extra dof are ignored, and unfilled dof are zeroed. Currently only implemented to migrate global vectors to global vectors. For the definition of compatibility of DM s, see DMGetCompatibility ...
binwalk/src/signatures/jboot.rs at master · ReFirmLabs/binwalk
if let Ok(stag_header) = parse_jboot_stag_header(&file_data[offset..]) // Sanity check on the stag header reported size; it is expected that this // type of header describes a kernel, and should not take up the entire firmware image
DMStagVecRestoreArray — PETSc v3.23.0-6-gd9d7fd11dca …
vec - the Vec object. Output Parameter# array - the array. See Also# DMSTAG: Staggered, Structured Grid, DMSTAG, DMStagVecGetArray(), DMDAVecRestoreArray(), DMDAVecRestoreArrayDOF() Level# beginner. Location# src/dm/impls/stag/stagutils.c. Examples# src/dm/impls/stag/tutorials/ex1.c src/dm/impls/stag/tutorials/ex2.c src/dm/impls/stag/tutorials ...