Lines Matching defs:array

268 . u      - The array of local vectors
420 const PetscScalar *array;
486 PetscCall(VecGetArrayRead(fv, &array));
496 PetscCall(DMPlexPointLocalRead(fdm, c, array, &a));
551 PetscCall(VecRestoreArrayRead(fv, &array));
1065 const PetscScalar *array, *arrayCell = NULL;
1084 PetscCall(VecGetArrayRead(coordinates, &array));
1096 PetscCall(DMPlexView_Ascii_Coordinates(viewer, cs, dof, &array[off]));
1112 PetscCall(VecRestoreArrayRead(coordinates, &array));
1431 const PetscScalar *array;
1437 PetscCall(DMPlexGetCellCoordinates(dm, c, &isDG, &numCoords, &array, &cellCoords));
1454 PetscCall(DMPlexRestoreCellCoordinates(dm, c, &isDG, &numCoords, &array, &cellCoords));
1534 PetscScalar *array, nid;
1579 PetscCall(VecGetArray(cown, &array));
1580 for (c = 0; c < numVertices; c++) array[c] = nid;
1581 PetscCall(VecRestoreArray(cown, &array));
1595 PetscCall(VecGetArray(acown, &array));
1604 ectn += (array[i + start[c]] != nid) ? 0 : 1;
1609 PetscCall(VecRestoreArray(acown, &array));
1737 { // Extract array of DMLabel values so it can be sorted
3188 . cone - An array of points which are on the in-edges for point `p`, the length of `cone` is the result of `DMPlexGetConeSize()`
3198 You must call `DMPlexRestoreCone()` after you finish using the array.
3302 . expandedPoints - (optional) An array of index sets with recursively expanded cones
3303 - sections - (optional) An array of sections which describe mappings from points to their cone points
3395 . expandedPoints - (optional) An array of recursively expanded cones
3396 - sections - (optional) An array of sections which describe mappings from points to their cone points
3433 - cone - An array of points which are on the in-edges for point `p`, its length must have been previously provided with `DMPlexSetConeSize()`
3476 . coneOrientation - An array of orientations which are on the in-edges for point `p`. An orientation is an
3488 You must call `DMPlexRestoreConeOrientation()` after you finish using the returned array.
3520 - coneOrientation - An array of orientations. Its length is given by the result of `DMPlexSetConeSize()`
3640 + cone - An array of points which are on the in-edges for point `p`
3641 - ornt - An array of orientations which are on the in-edges for point `p`. An orientation is an
3652 You must also call `DMPlexRestoreOrientedCone()` after you finish using the returned array.
3696 . cone - An array of points which are on the in-edges for point p
3697 - ornt - An array of orientations which are on the in-edges for point `p`. An orientation is an
3778 . support - An array of points which are on the out-edges for point `p`, its length is that obtained from `DMPlexGetSupportSize()`
3788 You must also call `DMPlexRestoreSupport()` after you finish using the returned array.
3814 - support - An array of points which are on the out-edges for point `p`, its length is that obtained from `DMPlexGetSupportSize()`
4218 otherwise the provided array is used to hold the values
4255 DMPlexRestoreTransitiveClosure - Restore the array of points on the transitive closure of the in-edges or out-edges for this point in the DAG
4817 DMPlexGetJoin - Get an array for the join of the set of points
4889 DMPlexRestoreJoin - Restore an array for the join of the set of points obtained with `DMPlexGetJoin()`
4927 DMPlexGetFullJoin - Get an array for the join of the set of points
5026 DMPlexGetMeet - Get an array for the meet of the set of points
5098 DMPlexRestoreMeet - Restore an array for the meet of the set of points obtained with `DMPlexGetMeet()`
5128 DMPlexGetFullMeet - Get an array for the meet of the set of points
5873 . coneOrientations - The array of cone orientations for all points
6345 PetscScalar *array;
6374 PetscCall(DMGetWorkArray(dm, size, MPIU_SCALAR, &array));
6376 array = *values;
6387 for (d = 0; d < dof; ++d, ++offset) array[offset] = varr[d];
6401 for (d = 0; d < dof; ++d, ++offset) array[offset] = varr[d];
6403 for (d = dof - 1; d >= 0; --d, ++offset) array[offset] = varr[d];
6410 *values = array;
6412 PetscCheck(size <= *csize, PETSC_COMM_SELF, PETSC_ERR_ARG_OUTOFRANGE, "Size of input array %" PetscInt_FMT " < actual size %" PetscInt_FMT, *csize, size);
6479 static inline PetscErrorCode DMPlexVecGetClosure_Static(DM dm, PetscSection section, PetscInt numPoints, const PetscInt points[], const PetscInt clperm[], const PetscScalar vArray[], PetscInt *size, PetscScalar array[])
6500 for (d = 0; d < dof; d++) array[clperm[offset + perm[d]]] = varr[d];
6502 for (d = 0; d < dof; d++) array[clperm[offset + d]] = varr[d];
6505 for (d = 0; d < dof; d++) array[clperm[offset + d]] *= flip[d];
6509 for (d = 0; d < dof; d++) array[offset + perm[d]] = varr[d];
6511 for (d = 0; d < dof; d++) array[offset + d] = varr[d];
6514 for (d = 0; d < dof; d++) array[offset + d] *= flip[d];
6524 static inline PetscErrorCode DMPlexVecGetClosure_Fields_Static(DM dm, PetscSection section, PetscInt numPoints, const PetscInt points[], PetscInt numFields, const PetscInt clperm[], const PetscScalar vArray[], PetscInt *size, PetscScalar array[])
6548 for (b = 0; b < fdof; b++) array[clperm[offset + perm[b]]] = varr[b];
6550 for (b = 0; b < fdof; b++) array[clperm[offset + b]] = varr[b];
6553 for (b = 0; b < fdof; b++) array[clperm[offset + b]] *= flip[b];
6557 for (b = 0; b < fdof; b++) array[offset + perm[b]] = varr[b];
6559 for (b = 0; b < fdof; b++) array[offset + b] = varr[b];
6562 for (b = 0; b < fdof; b++) array[offset + b] *= flip[b];
6574 DMPlexVecGetOrientedClosure - Get an array of the values on the closure of 'point' with a given orientation, optionally applying the closure permutation.
6587 + csize - The size of the input values array, or `NULL`; on output the number of values in the closure
6588 - values - An array to use for the values, or *values = `NULL` to have it allocated automatically;
6589 if the user provided `NULL`, it is a borrowed array and should not be freed, use `DMPlexVecRestoreClosure()` to return it
6594 `DMPlexVecGetOrientedClosure()`/`DMPlexVecRestoreClosure()` only allocates the values array if it set to `NULL` in the
6599 The `csize` argument is present in the Fortran binding. Since the Fortran `values` array contains its length information this argument may not be needed.
6643 PetscCheck(*csize >= asize, PETSC_COMM_SELF, PETSC_ERR_ARG_OUTOFRANGE, "Provided array size %" PetscInt_FMT " not sufficient to hold closure size %" PetscInt_FMT, *csize, asize);
6651 /* Cleanup array */
6661 DMPlexVecGetClosure - Get an array of the values on the closure of 'point'
6672 + csize - The size of the input values array, or `NULL`; on output the number of values in the closure
6673 - values - An array to use for the values, or *values = `NULL` to have it allocated automatically;
6674 if the user provided `NULL`, it is a borrowed array and should not be freed, use `DMPlexVecRestoreClosure()` to return it
6682 `DMPlexVecGetClosure()`/`DMPlexVecRestoreClosure()` only allocates the values array if it set to `NULL` in the
6709 The `csize` argument is present in the Fortran binding. Since the Fortran `values` array contains its length information this argument may not be needed.
6728 DMPlexVecGetClosureAtDepth - Get an array of the values on the closure of 'point' that are at a specific depth
6740 + csize - The size of the input values array, or `NULL`; on output the number of values in the closure
6741 - values - An array to use for the values, or *values = `NULL` to have it allocated automatically;
6742 if the user provided `NULL`, it is a borrowed array and should not be freed, use `DMPlexVecRestoreClosure()` to return it
6750 `DMPlexVecGetClosureAtDepth()`/`DMPlexVecRestoreClosure()` only allocates the values array if it set to `NULL` in the
6777 The `csize` argument is present in the Fortran binding. Since the Fortran `values` array contains its length information this argument may not be needed.
6793 PetscScalar *array;
6829 /* Get array */
6842 PetscCall(DMGetWorkArray(dm, asize, MPIU_SCALAR, &array));
6844 array = *values;
6848 if (numFields > 0) PetscCall(DMPlexVecGetClosure_Fields_Static(dm, section, Np, points, numFields, perm, vArray, &size, array));
6849 else PetscCall(DMPlexVecGetClosure_Static(dm, section, Np, points, perm, vArray, &size, array));
6852 /* Cleanup array */
6856 *values = array;
6858 PetscCheck(size <= *csize, PETSC_COMM_SELF, PETSC_ERR_ARG_OUTOFRANGE, "Size of input array %" PetscInt_FMT " < actual size %" PetscInt_FMT, *csize, size);
6865 DMPlexVecRestoreClosure - Restore the array of the values on the closure of 'point' obtained with `DMPlexVecGetClosure()`
6875 - values - The array of values
6880 The array values are discarded and not copied back into `v`. In order to copy values back to `v`, use `DMPlexVecSetClosure()`
6883 The `csize` argument is present in the Fortran binding. Since the Fortran `values` array contains its length information this argument may not be needed.
6908 static inline PetscErrorCode updatePoint_private(PetscSection section, PetscInt point, PetscInt dof, void (*fuse)(PetscScalar *, PetscScalar), PetscBool setBC, const PetscInt perm[], const PetscScalar flip[], const PetscInt clperm[], const PetscScalar values[], PetscInt offset, PetscScalar array[])
6918 a = &array[off];
6976 static inline PetscErrorCode updatePointBC_private(PetscSection section, PetscInt point, PetscInt dof, void (*fuse)(PetscScalar *, PetscScalar), const PetscInt perm[], const PetscScalar flip[], const PetscInt clperm[], const PetscScalar values[], PetscInt offset, PetscScalar array[])
6986 a = &array[off];
7026 static inline PetscErrorCode updatePointFields_private(PetscSection section, PetscInt point, const PetscInt *perm, const PetscScalar *flip, PetscInt f, void (*fuse)(PetscScalar *, PetscScalar), PetscBool setBC, const PetscInt clperm[], const PetscScalar values[], PetscInt *offset, PetscScalar array[])
7037 a = &array[foff];
7096 static inline PetscErrorCode updatePointFieldsBC_private(PetscSection section, PetscInt point, const PetscInt perm[], const PetscScalar flip[], PetscInt f, PetscInt Ncc, const PetscInt comps[], void (*fuse)(PetscScalar *, PetscScalar), const PetscInt clperm[], const PetscScalar values[], PetscInt *offset, PetscScalar array[])
7109 a = &array[foff];
7213 PetscScalar *array;
7222 PetscCall(VecGetArray(v, &array));
7240 a = &array[coff];
7269 PetscCall(VecRestoreArray(v, &array));
7274 DMPlexVecSetClosure - Set an array of the values on the closure of `point`
7283 . values - The array of values
7298 PetscScalar *array;
7322 /* Get array */
7323 PetscCall(VecGetArray(v, &array));
7338 PetscCall(updatePointFields_private(section, point, perm, flip, f, insert, PETSC_FALSE, clperm, values, &offset, array));
7346 PetscCall(updatePointFields_private(section, point, perm, flip, f, insert, PETSC_TRUE, clperm, values, &offset, array));
7354 PetscCall(updatePointFieldsBC_private(section, point, perm, flip, f, -1, NULL, insert, clperm, values, &offset, array));
7362 PetscCall(updatePointFields_private(section, point, perm, flip, f, add, PETSC_FALSE, clperm, values, &offset, array));
7370 PetscCall(updatePointFields_private(section, point, perm, flip, f, add, PETSC_TRUE, clperm, values, &offset, array));
7378 PetscCall(updatePointFieldsBC_private(section, point, perm, flip, f, -1, NULL, add, clperm, values, &offset, array));
7399 PetscCall(updatePoint_private(section, point, dof, insert, PETSC_FALSE, perm, flip, clperm, values, off, array));
7408 PetscCall(updatePoint_private(section, point, dof, insert, PETSC_TRUE, perm, flip, clperm, values, off, array));
7417 PetscCall(updatePointBC_private(section, point, dof, insert, perm, flip, clperm, values, off, array));
7426 PetscCall(updatePoint_private(section, point, dof, add, PETSC_FALSE, perm, flip, clperm, values, off, array));
7435 PetscCall(updatePoint_private(section, point, dof, add, PETSC_TRUE, perm, flip, clperm, values, off, array));
7444 PetscCall(updatePointBC_private(section, point, dof, add, perm, flip, clperm, values, off, array));
7454 /* Cleanup array */
7455 PetscCall(VecRestoreArray(v, &array));
7482 PetscScalar *array;
7496 /* Get array */
7497 PetscCall(VecGetArray(v, &array));
7521 PetscCall(updatePointFields_private(section, point, perm, flip, f, insert, PETSC_FALSE, NULL, values, &offset, array));
7531 PetscCall(updatePointFields_private(section, point, perm, flip, f, insert, PETSC_TRUE, NULL, values, &offset, array));
7541 PetscCall(updatePointFieldsBC_private(section, point, perm, flip, f, Ncc, comps, insert, NULL, values, &offset, array));
7551 PetscCall(updatePointFields_private(section, point, perm, flip, f, add, PETSC_FALSE, NULL, values, &offset, array));
7561 PetscCall(updatePointFields_private(section, point, perm, flip, f, add, PETSC_TRUE, NULL, values, &offset, array));
7571 /* Cleanup array */
7572 PetscCall(VecRestoreArray(v, &array));
7603 DMPlexGetIndicesPoint_Internal - Add the indices for dofs on a point to an index array
7613 - indperm - A permutation of the entire indices array, or NULL
7667 . foffs - array of length numFields containing the offset in canonical point ordering (the location in indices) of each field
7675 . indices - array to hold indices (as defined by section) of each dof associated with point
7692 When the middle component is constrained, we get the array {10, -12, 12} for (islocal=TRUE, setBC=FALSE).
8457 DMPlexMatSetClosure - Set an array of the values on the closure of 'point'
8467 . values - The array of values
8482 DMPlexMatSetClosureGeneral - Set an array of the values on the closure of 'point' using a different row and column section
8497 . values - The array of values
10138 /* Technically 1 too big, but easier than fiddling with empty adjacency array */