Actual source code: dascatter.c
1: /*$Id: dascatter.c,v 1.23 2001/03/23 23:25:00 balay Exp $*/
2:
3: /*
4: Code for manipulating distributed regular arrays in parallel.
5: */
7: #include src/dm/da/daimpl.h
9: /*@C
10: DAGetScatter - Gets the local-to-global, local-to-global, and
11: local-to-local vector scatter contexts for a distributed array.
13: Not Collective, but VecScatter is parallel if DA is parallel
15: Input Parameter:
16: . da - the distributed array
18: Output Parameters:
19: + ltog - local-to-global scatter context (may be PETSC_NULL)
20: . gtol - global-to-local scatter context (may be PETSC_NULL)
21: - ltol - local-to-local scatter context (may be PETSC_NULL)
23: Level: developer
25: Notes:
26: The output contexts are valid only as long as the input da is valid.
27: If you delete the da, the scatter contexts will become invalid.
29: .keywords: distributed array, get, scatter, context, global-to-local,
30: local-to-global, local-to-local
32: .seealso: DAGlobalToLocalBegin(), DAGlobalToLocalEnd(), DALocalToGlobal()
33: @*/
34: int DAGetScatter(DA da,VecScatter *ltog,VecScatter *gtol,VecScatter *ltol)
35: {
38: if (ltog) *ltog = da->ltog;
39: if (gtol) *gtol = da->gtol;
40: if (ltol) *ltol = da->ltol;
41: return(0);
42: }
43: