Home
last modified time | relevance | path

Searched full:array (Results 1 – 25 of 904) sorted by relevance

12345678910>>...37

/petsc/src/mat/ftn-mod/
H A Dpetscmatmod.F9060 subroutine MatDenseGetArrayF901d(v, array, ierr) argument
61 PetscScalar, pointer :: array(:)
64 call MatDenseGetArray(v, array, ierr)
70 subroutine MatDenseRestoreArrayF901d(v, array, ierr) argument
71 PetscScalar, pointer :: array(:)
74 call MatDenseRestoreArray(v, array, ierr)
80 subroutine MatDenseGetArrayReadF901d(v, array, ierr) argument
81 PetscScalar, pointer :: array(:)
84 call MatDenseGetArrayRead(v, array, ierr)
90 subroutine MatDenseRestoreArrayReadF901d(v, array, ierr) argument
[all …]
H A Dpetscmat.h9028 subroutine MatDenseGetArray1d(A, array, ierr)
31 PetscScalar, pointer :: array(:)
35 subroutine MatDenseGetArray2d(A, array, ierr)
38 PetscScalar, pointer :: array(:, :)
45 subroutine MatDenseRestoreArray1d(A, array, ierr)
48 PetscScalar, pointer :: array(:)
52 subroutine MatDenseRestoreArray2d(A, array, ierr)
55 PetscScalar, pointer :: array(:, :)
62 subroutine MatDenseGetArrayRead1d(A, array, ierr)
65 PetscScalar, pointer :: array(:)
[all …]
/petsc/src/dm/ftn-mod/
H A Dpetscdmda.h9025 subroutine DMDAVecGetArray1(da, vec, array, ierr)
30 PetscScalar, pointer :: array(:)
33 subroutine DMDAVecGetArray2(da, vec, array, ierr)
38 PetscScalar, pointer :: array(:, :)
41 subroutine DMDAVecGetArray3(da, vec, array, ierr)
46 PetscScalar, pointer :: array(:, :, :)
49 subroutine DMDAVecGetArray4(da, vec, array, ierr)
54 PetscScalar, pointer :: array(:, :, :, :)
60 subroutine DMDAVecRestoreArray1(da, vec, array, ierr)
65 PetscScalar, pointer :: array(:)
[all …]
/petsc/src/sys/ftn-custom/
H A Df90_cwrap.c98 …F90Array1dCreate - given a `F90Array1d` passed from Fortran associate with it a C array, its start…
103 + array - the C address pointer
104 . type - the MPI datatype of the array
105 . start - the first index of the array
106 . len - the length of the array
121 PetscErrorCode F90Array1dCreate(void *array, MPI_Datatype type, PetscInt start, PetscInt len, F90Ar… in F90Array1dCreate() argument
125 if (!len) array = PETSC_NULL_SCALAR_Fortran; in F90Array1dCreate()
126 f90array1dcreatescalar_(array, &start, &len, ptr PETSC_F90_2PTR_PARAM(ptrd)); in F90Array1dCreate()
128 if (!len) array = PETSC_NULL_REAL_Fortran; in F90Array1dCreate()
129 f90array1dcreatereal_(array, &start, &len, ptr PETSC_F90_2PTR_PARAM(ptrd)); in F90Array1dCreate()
[all …]
/petsc/src/ksp/ksp/tutorials/
H A Dex81a.c12 Mat array[Q * Q], A, a; in main() local
25 for (i = 0; i < Q * Q; ++i) array[i] = NULL; in main()
28 …(PETSC_COMM_WORLD, PETSC_DECIDE, PETSC_DECIDE, size, size, 1, NULL, 0, NULL, array + (Q + 1) * i)); in main()
30 …TSC_COMM_WORLD, 2, PETSC_DECIDE, PETSC_DECIDE, size, size, 1, NULL, 0, NULL, array + (Q + 1) * i)); in main()
32 …TSC_COMM_WORLD, 2, PETSC_DECIDE, PETSC_DECIDE, size, size, 1, NULL, 0, NULL, array + (Q + 1) * i)); in main()
34 PetscCall(MatAssemblyBegin(array[(Q + 1) * i], MAT_FINAL_ASSEMBLY)); in main()
35 PetscCall(MatAssemblyEnd(array[(Q + 1) * i], MAT_FINAL_ASSEMBLY)); in main()
36 PetscCall(MatShift(array[(Q + 1) * i], 100 + i + 1)); in main()
38 PetscCall(MatDuplicate(array[(Q + 1) * i], MAT_COPY_VALUES, &a)); in main()
39 PetscCall(MatDestroy(array + (Q + 1) * i)); in main()
[all …]
H A Dex81.c11 Mat array[Q * Q], A, a; in main() local
33 for (i = 0; i < Q * Q; ++i) array[i] = NULL; in main()
36 …(PETSC_COMM_WORLD, PETSC_DECIDE, PETSC_DECIDE, size, size, 1, NULL, 0, NULL, array + (Q + 1) * i)); in main()
38 …TSC_COMM_WORLD, 2, PETSC_DECIDE, PETSC_DECIDE, size, size, 1, NULL, 0, NULL, array + (Q + 1) * i)); in main()
40 …TSC_COMM_WORLD, 2, PETSC_DECIDE, PETSC_DECIDE, size, size, 1, NULL, 0, NULL, array + (Q + 1) * i)); in main()
42 PetscCall(MatAssemblyBegin(array[(Q + 1) * i], MAT_FINAL_ASSEMBLY)); in main()
43 PetscCall(MatAssemblyEnd(array[(Q + 1) * i], MAT_FINAL_ASSEMBLY)); in main()
44 PetscCall(MatShift(array[(Q + 1) * i], 100 + i + 1)); in main()
46 PetscCall(MatDuplicate(array[(Q + 1) * i], MAT_COPY_VALUES, &a)); in main()
47 PetscCall(MatDestroy(array + (Q + 1) * i)); in main()
[all …]
/petsc/include/
H A Dpetscbt.h26 static inline PetscErrorCode PetscBTMemzero(PetscCount m, PetscBT array) in PetscBTMemzero() argument
28 return PetscArrayzero(array, PetscBTLength(m)); in PetscBTMemzero()
31 static inline PetscErrorCode PetscBTDestroy(PetscBT *array) in PetscBTDestroy() argument
33 return (*array) ? PetscFree(*array) : PETSC_SUCCESS; in PetscBTDestroy()
36 static inline PetscErrorCode PetscBTCreate(PetscCount m, PetscBT *array) in PetscBTCreate() argument
38 return PetscCalloc1(PetscBTLength(m), array); in PetscBTCreate()
46 static inline PetscByte PetscBTLookup(PetscBT array, PetscCount index) in PetscBTLookup() argument
48 return array[PetscBTIndex_Internal(index)] & PetscBTMask_Internal(index); in PetscBTLookup()
51 static inline PetscErrorCode PetscBTSet(PetscBT array, PetscCount index) in PetscBTSet() argument
54 array[PetscBTIndex_Internal(index)] |= PetscBTMask_Internal(index); in PetscBTSet()
[all …]
/petsc/systems/Apple/iOS/examples/Basic/examples.xcodeproj/
H A Dbarrysmith.mode1v38 <array>
169 </array>
185 <array/>
198 <array/>
200 <array/>
202 <array>
205 </array>
207 <array>
210 <array>
220 </array>
[all …]
/petsc/src/dm/impls/da/
H A Ddagetarray.c4 DMDAVecGetArray - Returns a multiple dimension array that shares data with
14 . array - the array
21 In C, the indexing is "backwards" from what expects: array[k][j][i] NOT array[i][j][k]!
27 …The accessible indices are `array[zs:zs+zm-1][ys:ys+ym-1][xs:xs+xm-1]` where the values are obtain…
31 …Use `DMDAVecGetArray()` and pass for the array type `PetscScalar`,pointer :: array(:,...,:) of the…
35 The order of the indices is `array(xs:xs+xm-1,ys:ys+ym-1,zs:zs+zm-1)` (when dof is 1) otherwise
36 `array(0:dof-1,xs:xs+xm-1,ys:ys+ym-1,zs:zs+zm-1)` where the values are obtained from
43 PetscErrorCode DMDAVecGetArray(DM da, Vec vec, void *array) in DMDAVecGetArray() argument
50 PetscAssertPointer(array, 3); in DMDAVecGetArray()
67 PetscCall(VecGetArray1d(vec, gxm * dof, gxs * dof, (PetscScalar **)array)); in DMDAVecGetArray()
[all …]
/petsc/src/dm/impls/plex/
H A Dplexpoint.c38 DMPlexPointLocalRead - return read access to a point in local array
45 - array - array to index into
56 DMPlexPointLocalRead(dm,point,array,&ptr);
62 PetscErrorCode DMPlexPointLocalRead(DM dm, PetscInt point, const PetscScalar *array, void *ptr) in DMPlexPointLocalRead() argument
68 PetscAssertPointer(array, 3); in DMPlexPointLocalRead()
71 *(const PetscScalar **)ptr = (start < end) ? array + start : NULL; in DMPlexPointLocalRead()
76 DMPlexPointLocalRef - return read/write access to a point in local array
83 - array - array to index into
94 DMPlexPointLocalRef(dm,point,array,&ptr);
100 PetscErrorCode DMPlexPointLocalRef(DM dm, PetscInt point, PetscScalar *array, void *ptr) in DMPlexPointLocalRef() argument
[all …]
/petsc/src/sys/utils/
H A Dsorti.c56 + X - array to partition
59 - lo,hi - lower and upper bound of the array
89 + X - array to partition
92 - lo,hi - lower and upper bound of the array
243 PetscSortedInt - Determines whether the `PetscInt` array is sorted.
249 - X - array of `PetscInt`
252 . sorted - flag whether the array is sorted
268 PetscSortedInt64 - Determines whether the `PetscInt64` array is sorted.
274 - X - array of `PetscInt64`
277 . sorted - flag whether the array is sorted
[all …]
/petsc/src/ts/tutorials/autodiff/adolc-utils/
H A Dinit.cxx12 Wrapper function for allocating contiguous memory in a 2d array
15 m,n - number of rows and columns of array, respectively
18 A - pointer to array for which memory is allocated
34 A - array to free memory of
47 Shift indices in an array of type T to endow it with ghost points.
51 da - distributed array upon which variables are defined
52 cgs - contiguously allocated 1-array with as many entries as there are
56 array - contiguously allocated array of the appropriate dimension with
57 ghost points, pointing to the 1-array
60 PetscErrorCode GiveGhostPoints(DM da, T *cgs, void *array) in GiveGhostPoints() argument
[all …]
/petsc/src/mat/impls/dense/mpi/cupm/hip/
H A Dmatmpidensehip.hip.cxx80 MatDenseHIPPlaceArray - Allows one to replace the GPU array in a `MATDENSEHIP` matrix with an
81 array provided by the user. This is useful to avoid copying an array into a matrix.
87 - array - the array in column major order
92 Adding `const` to `array` was an oversight, see notes in `VecPlaceArray()`.
94 You can return to the original array with a call to `MatDenseHIPResetArray()`. The user is
95 responsible for freeing this array; it will not be freed when the matrix is destroyed. The
96 array must have been allocated with `hipMalloc()`.
101 PetscErrorCode MatDenseHIPPlaceArray(Mat mat, const PetscScalar *array) in MatDenseHIPPlaceArray() argument
104 PetscCall(MatDenseCUPMPlaceArray<DeviceType::HIP>(mat, array)); in MatDenseHIPPlaceArray()
109 MatDenseHIPResetArray - Resets the matrix array to that it previously had before the call to
[all …]
/petsc/src/mat/impls/dense/mpi/cupm/cuda/
H A Dmatmpidensecuda.cu79 MatDenseCUDAPlaceArray - Allows one to replace the GPU array in a `MATDENSECUDA` matrix with an
80 array provided by the user. This is useful to avoid copying an array into a matrix.
86 - array - the array in column major order
91 Adding `const` to `array` was an oversight, see notes in `VecPlaceArray()`.
93 You can return to the original array with a call to `MatDenseCUDAResetArray()`. The user is
94 responsible for freeing this array; it will not be freed when the matrix is destroyed. The
95 array must have been allocated with `cudaMalloc()`.
100 PetscErrorCode MatDenseCUDAPlaceArray(Mat mat, const PetscScalar *array) in MatDenseCUDAPlaceArray() argument
103 PetscCall(MatDenseCUPMPlaceArray<DeviceType::CUDA>(mat, array)); in MatDenseCUDAPlaceArray()
108 MatDenseCUDAResetArray - Resets the matrix array to that it previously had before the call to
[all …]
/petsc/src/vec/is/ao/interface/
H A Dao.c264 AOPetscToApplicationPermuteInt - Permutes an array of blocks of integers
272 - array - The integer array
275 . array - The permuted array
280 The length of the array should be $block*N$, where `N` is length
283 The permutation takes `array[i_pet] --> array[i_app]`, where `i_app` is
289 PetscErrorCode AOPetscToApplicationPermuteInt(AO ao, PetscInt block, PetscInt array[]) in AOPetscToApplicationPermuteInt() argument
293 PetscAssertPointer(array, 3); in AOPetscToApplicationPermuteInt()
294 PetscUseTypeMethod(ao, petsctoapplicationpermuteint, block, array); in AOPetscToApplicationPermuteInt()
299 AOApplicationToPetscPermuteInt - Permutes an array of blocks of integers
307 - array - The integer array
[all …]
/petsc/src/sys/ftn-src/
H A Df90_fwrap.F905 subroutine F90Array1dCreateScalar(array, start, len1, ptr) argument
9 PetscScalar, target :: array(start:start + len1 - 1)
12 ptr => array
15 subroutine F90Array1dCreateReal(array, start, len1, ptr) argument
19 PetscReal, target :: array(start:start + len1 - 1)
22 ptr => array
25 subroutine F90Array1dCreateInt(array, start, len1, ptr) argument
29 PetscInt, target :: array(start:start + len1 - 1)
32 ptr => array
35 subroutine F90Array1dCreateMPIInt(array, start, len1, ptr) argument
[all …]
/petsc/src/vec/vec/impls/seq/cupm/cuda/
H A Dvecseqcupm.cu39 VecCreateSeqCUDA - Creates a standard, sequential, array-style vector.
70 VecCreateSeqCUDAWithArrays - Creates a sequential, array-style vector using CUDA, where the
71 user provides the complete array space to store the vector values.
88 If the user-provided array is `NULL`, then `VecCUDAPlaceArray()` can be used at a later stage to
89 SET the array for storing the vector values. Otherwise, the array must be allocated on the
113 VecCreateSeqCUDAWithArray - Creates a sequential, array-style vector using CUDA, where the
114 user provides the device array space to store the vector values.
130 If the user-provided array is `NULL`, then `VecCUDAPlaceArray()` can be used at a later stage to
131 SET the array for storing the vector values. Otherwise, the array must be allocated on the
134 The array is NOT freed when the vector is destroyed via `VecDestroy()`. The user must free the
[all …]
/petsc/src/vec/vec/impls/seq/cupm/hip/
H A Dvecseqcupm.hip.cxx39 VecCreateSeqHIP - Creates a standard, sequential, array-style vector.
70 VecCreateSeqHIPWithArrays - Creates a sequential, array-style vector using HIP, where the
71 user provides the complete array space to store the vector values.
88 If the user-provided array is `NULL`, then `VecHIPPlaceArray()` can be used at a later stage to
89 SET the array for storing the vector values. Otherwise, the array must be allocated on the
113 VecCreateSeqHIPWithArray - Creates a sequential, array-style vector using HIP, where the
114 user provides the device array space to store the vector values.
130 If the user-provided array is `NULL`, then `VecHIPPlaceArray()` can be used at a later stage to
131 SET the array for storing the vector values. Otherwise, the array must be allocated on the
134 The array is NOT freed when the vector is destroyed via `VecDestroy()`. The user must free the
[all …]
/petsc/lib/petsc/bin/
H A DPetscBinaryIO_tests.py19 array = np.array([1.1, 2.2, 3.3])
21 vec[...] = array
28 self.assertTrue(np.allclose(array, result))
32 array = np.array([1.1, 2.2, 3.3])
33 PetscBinaryIO().writeBinaryFile('test.dat', [array.view(Vec),])
41 self.assertTrue(np.allclose(array, vec[...]))
46 indices = np.array([3,4,5])
64 vals = np.array([1.1,2.1,3.1])
65 counts = np.array([0,2,3])
66 cols = np.array([0,1,1])
[all …]
/petsc/include/petsc/private/
H A Dmempoison.h54 PetscInt *array;
56 PetscMalloc1(15, &array);
58 array[0] = 10;
59 array[1] = 15;
61 PetscPoisonMemoryRegion(array, 15 * sizeof(*array));
63 array[0] = 10;
65 PetscInt v = array[15];
68 PetscPoisonMemoryRegion(array, 15 * sizeof(*array));
70 PetscPoisonMemoryRegion(array + 5, 1 * sizeof(*array));
72 PetscUnpoisonMemoryRegion(array, 1 * sizeof(*array));
[all …]
H A Ddmplextransformimpl.h35 PetscInt *ctOrderOld; /* [i] = ct: An array with original cell types in depth order */
36 …PetscInt *ctOrderInvOld; /* [ct] = i: An array with the ordinal numbers for each original cell…
38 PetscInt *ctOrderNew; /* [i] = ct: An array with produced cell types in depth order */
39 …PetscInt *ctOrderInvNew; /* [ct] = i: An array with the ordinal numbers for each produced cell…
86 PetscInt *Nt; /* The array of the number of target types */
87 DMPolytopeType **target; /* The array of target types */
88 PetscInt **size; /* The array of the number of each target type */
89 PetscInt **cone; /* The array of cones for each target cell */
90 PetscInt **ornt; /* The array of orientation for each target cell */
99 PetscInt *Nt; // The array of the number of target types
[all …]
/petsc/src/mat/utils/
H A Dfreespace.c11 a->array = a->array_head; in PetscFreeSpaceGet()
45 Copy a linket list obtained from matrix symbolic ILU or LU factorization into a contiguous array
50 . space - an allocated array with length nnz of factored matrix.
53 - bdiag - array of length n+1. bdiag[i] points to diagonal of U(i,:), and bdiag[n] points to entry…
56 . space - column indices are copied into this array with contiguous layout of L and U
63 PetscInt row, nnz, *bj, *array, total, bi_temp; in PetscFreeSpaceContiguous_LU() local
73 array = (*head)->array_head; in PetscFreeSpaceContiguous_LU()
77 /* copy array entries into bj for this row */ in PetscFreeSpaceContiguous_LU()
89 PetscCall(PetscArraycpy(bj, array, nnzL)); in PetscFreeSpaceContiguous_LU()
100 PetscCall(PetscArraycpy(bj, array + nnzL + 1, nnzU)); in PetscFreeSpaceContiguous_LU()
[all …]
/petsc/src/sys/classes/viewer/impls/matlab/
H A Dvmatlab.c11 PetscViewerMatlabPutArray - Puts an array into the `PETSCVIEWERMATLAB` viewer.
13 Not Collective, only processor zero saves `array`
17 . m - the first dimensions of `array`
18 . n - the second dimensions of `array`
19 . array - the array (represented in one dimension)
20 - name - the MATLAB name of `array`
25 Only writes `array` values on processor 0.
29 PetscErrorCode PetscViewerMatlabPutArray(PetscViewer mfile, int m, int n, const PetscScalar *array,… in PetscViewerMatlabPutArray() argument
38 PetscCall(PetscInfo(mfile, "Putting MATLAB array %s\n", name)); in PetscViewerMatlabPutArray()
44 PetscCall(PetscArraycpy(mxGetPr(mat), array, m * n)); in PetscViewerMatlabPutArray()
[all …]
/petsc/src/sys/tests/
H A Dex14.c8 PetscScalar a, array[10]; in main() local
18 PetscCall(PetscOptionsRealArray("-rarray", "Input a real array", "ex14.c", rarray, &n, NULL)); in main()
25 PetscCall(PetscOptionsScalarArray("-array", "Input a scalar array", "ex14.c", array, &n, NULL)); in main()
29 if (PetscImaginaryPart(array[i]) < 0.0) { in main()
30 …COMM_SELF, " %g - %gi\n", (double)PetscRealPart(array[i]), (double)PetscAbsReal(PetscImaginaryPart… in main()
32 …(PETSC_COMM_SELF, " %g + %gi\n", (double)PetscRealPart(array[i]), (double)PetscImaginaryPart(array in main()
45 args: -array 1.0,-2-3i,4.5+6.2i,4.5,6.8+4i,i,-i,-1.2i -rarray 1,2,3 -a 1.5+2.1i
/petsc/include/petsc/private/kernels/
H A Dblockinvert.h40 A - square bs by bs array stored in column major order
41 pivots - integer work array of length bs
42 W - bs by 1 work array
56 W - square bs by bs work array
108 v - array of length bs
109 A - square bs by bs array
110 w - array of length bs
126 v - array of length bs
127 A - square bs by bs array
128 w - array of length bs
[all …]

12345678910>>...37