Home
last modified time | relevance | path

Searched refs:ndim (Results 1 – 25 of 27) sorted by relevance

12

/petsc/src/mat/impls/cufft/
H A Dcufft.cu10 PetscInt ndim; member
20 PetscInt ndim = cufft->ndim, *dim = cufft->dim; in MatMult_SeqCUFFT() local
28 switch (ndim) { in MatMult_SeqCUFFT()
39 …COMM_SELF, PETSC_ERR_USER, "Cannot create plan for %" PetscInt_FMT "-dimensional transform", ndim); in MatMult_SeqCUFFT()
43 …PetscCallCUDA(cudaMemcpy(devArray, x_array, sizeof(cufftComplex) * dim[ndim], cudaMemcpyHostToDevi… in MatMult_SeqCUFFT()
47 …PetscCallCUDA(cudaMemcpy(y_array, devArray, sizeof(cufftComplex) * dim[ndim], cudaMemcpyDeviceToHo… in MatMult_SeqCUFFT()
57 PetscInt ndim = cufft->ndim, *dim = cufft->dim; in MatMultTranspose_SeqCUFFT() local
65 switch (ndim) { in MatMultTranspose_SeqCUFFT()
76 …COMM_SELF, PETSC_ERR_USER, "Cannot create plan for %" PetscInt_FMT "-dimensional transform", ndim); in MatMultTranspose_SeqCUFFT()
80 …PetscCallCUDA(cudaMemcpy(devArray, x_array, sizeof(cufftComplex) * dim[ndim], cudaMemcpyHostToDevi… in MatMultTranspose_SeqCUFFT()
[all …]
/petsc/src/mat/impls/fft/
H A Dfft.c43 PetscErrorCode MatCreateFFT(MPI_Comm comm, PetscInt ndim, const PetscInt dim[], MatType mattype, Ma… in MatCreateFFT() argument
53 PetscCheck(ndim >= 1, comm, PETSC_ERR_USER, "ndim %" PetscInt_FMT " must be > 0", ndim); in MatCreateFFT()
60 for (i = 0; i < ndim; i++) { in MatCreateFFT()
65 PetscCall(PetscMalloc1(ndim, &fft->dim)); in MatCreateFFT()
66 PetscCall(PetscArraycpy(fft->dim, dim, ndim)); in MatCreateFFT()
68 fft->ndim = ndim; in MatCreateFFT()
H A Dfft.h6 PetscInt ndim; member
/petsc/src/mat/impls/fft/fftw/
H A Dfftw.c46 PetscInt ndim = fft->ndim, *dim = fft->dim; in MatMult_SeqFFTW() local
58 switch (ndim) { in MatMult_SeqFFTW()
84 if (ndim) { in MatMult_SeqFFTW()
85 iodims[ndim - 1].n = (ptrdiff_t)dim[ndim - 1]; in MatMult_SeqFFTW()
86 iodims[ndim - 1].is = iodims[ndim - 1].os = 1; in MatMult_SeqFFTW()
87 for (i = ndim - 2; i >= 0; --i) { in MatMult_SeqFFTW()
92 …fftw->p_forward = fftw_plan_guru64_dft((int)ndim, (fftw_iodim64 *)iodims, 0, NULL, (fftw_complex *… in MatMult_SeqFFTW()
94 if (ndim) { in MatMult_SeqFFTW()
95 iodims[ndim - 1].n = (int)dim[ndim - 1]; in MatMult_SeqFFTW()
96 iodims[ndim - 1].is = iodims[ndim - 1].os = 1; in MatMult_SeqFFTW()
[all …]
/petsc/src/dm/tutorials/
H A Dex13f90.F9037 …max, kgmax, ib1, ibn, jb1, jbn, kb1, kbn, imax, jmax, kmax, itime, maxstep, nscreen, dof, stw, ndim
63 ndim = 3 ! 3D code
91 allocate (grid(ndim, ib1:ibn, jb1:jbn, kb1:kbn))
100 call petsc_to_local(CoordDM, coords, array, grid, ndim, stw)
107 call local_to_petsc(CoordDM, coords, array, grid, ndim, stw)
/petsc/src/tao/unconstrained/tutorials/
H A Deptorsion3.c49 PetscInt ndim; /* problem dimension */ member
101 user.ndim = mx * my; in main()
108 PetscCall(VecCreateSeq(PETSC_COMM_SELF, user.ndim, &user.y)); in main()
138 …PetscCall(MatCreateShell(PETSC_COMM_SELF, user.ndim, user.ndim, user.ndim, user.ndim, (void *)&use… in main()
144 PetscCall(MatCreateSeqAIJ(PETSC_COMM_SELF, user.ndim, user.ndim, 5, NULL, &H)); in main()
438 PetscInt i, j, ndim = user->ndim; in FormHessian() local
452 for (j = 0; j < ndim; j++) { in FormHessian()
464 for (i = 0; i < ndim; i++) { in FormHessian()
H A Deptorsion1.c49 PetscInt ndim; /* problem dimension */ member
99 user.ndim = mx * my; in main()
106 PetscCall(VecCreateSeq(PETSC_COMM_SELF, user.ndim, &user.y)); in main()
124 …PetscCall(MatCreateShell(PETSC_COMM_SELF, user.ndim, user.ndim, user.ndim, user.ndim, (void *)&use… in main()
130 PetscCall(MatCreateSeqAIJ(PETSC_COMM_SELF, user.ndim, user.ndim, 5, NULL, &H)); in main()
422 PetscInt i, j, ndim = user->ndim; in FormHessian() local
436 for (j = 0; j < ndim; j++) { in FormHessian()
448 for (i = 0; i < ndim; i++) { in FormHessian()
/petsc/src/binding/petsc4py/src/petsc4py/include/petsc4py/
H A Dpybuffer.h65 view->ndim = 0; in PyPetscBuffer_FillInfo()
71 view->ndim = 1; in PyPetscBuffer_FillInfo()
/petsc/src/mat/tests/
H A Dex112.c22 PetscInt n = 10, N, ndim = 4, dim[4], DIM, i; in main() local
41 for (DIM = 0; DIM < ndim; DIM++) dim[DIM] = n; /* size of transformation in DIM-dimension */ in main()
H A Dex142.c21 int n = 10, N, Ny, ndim = 4, i, dim[4], DIM; in main() local
46 for (DIM = 0; DIM < ndim; DIM++) dim[DIM] = n; /* size of real space vector in DIM-dimension */ in main()
H A Dex121.c21 PetscInt n = 10, N, ndim = 4, dim[4], DIM, i, j; in main() local
41 for (DIM = 0; DIM < ndim; DIM++) dim[DIM] = n; /* size of transformation in DIM-dimension */ in main()
/petsc/src/vec/vec/utils/
H A Dvecio.c171 …PetscCheck(v->ndim == 1, PETSC_COMM_SELF, PETSC_ERR_FILE_UNEXPECTED, "Vector in file is not of dim… in VecLoad_ADIOS()
184 sel = adios_selection_boundingbox(v->ndim, &rstart_t, &N_t); in VecLoad_ADIOS()
/petsc/src/ts/tutorials/
H A Dex11.h675 …alar *ul, const PetscScalar *ur, PetscScalar *flux, const PetscReal *nn, int ndim, PetscReal gamma) in godunovflux() argument
688 i__1 = ndim; in godunovflux()
694 if (ndim == 3) { in godunovflux()
713 i__1 = ndim; in godunovflux()
715 } else if (ndim == 2) { in godunovflux()
732 i__1 = ndim; in godunovflux()
756 pl = (gamma - 1.) * (ul[ndim + 1] - rl * .5 * (d__1 * d__1 + d__2 * d__2 + d__3 * d__3)); in godunovflux()
763 pr = (gamma - 1.) * (ur[ndim + 1] - rr * .5 * (d__1 * d__1 + d__2 * d__2 + d__3 * d__3)); in godunovflux()
778 if (ndim == 3) flux[3] = rhom * unm * ubm; in godunovflux()
779 …flux[ndim + 1] = (rhom * .5 * (unm * unm + utm * utm + ubm * ubm) + gamm / (gamm - 1.) * pm) * unm; in godunovflux()
/petsc/src/binding/petsc4py/src/
H A Dpyapicompat.h17 int ndim; member
/petsc/src/binding/petsc4py/src/petsc4py/PETSc/
H A DDMDA.pyx98 cdef PetscInt ndim = PETSC_DECIDE
120 if dim is not None: ndim = asInt(dim)
122 if ndim==PETSC_DECIDE: ndim = gdim
127 ndim, &m, &n, &p,
140 CHKERR(DMDACreateND(ccomm, ndim, ndof,
144 if setup and ndim > 0: CHKERR(DMSetUp(newda))
178 cdef PetscInt ndim = 0, ndof = 0
187 &ndim,
208 CHKERR(DMDACreateND(comm, ndim, ndof,
H A DDMStag.pyx101 # ndim
102 cdef PetscInt ndim = asInt(dim)
109 assert(nsizes==ndim)
116 assert(ndofs==ndim+1)
140 assert(nprocs==ndim)
145 nranges = asStagOwnershipRanges(ownership_ranges, ndim, &m, &n, &p, &lx, &ly, &lz)
146 assert(nranges==ndim)
H A Ddlpack.pxi50 int ndim
H A Dpetscvec.pxi466 cdef int64_t ndim = 1
474 s1 = oarray_p(empty_p(<PetscInt>ndim), NULL, <void**>&shape_arr)
475 s2 = oarray_p(empty_p(<PetscInt>ndim), NULL, <void**>&strides_arr)
480 (_, _, ndim, s1, s2) = ctx0
487 ctx0 = (dtype, devId, ndim, s1, s2)
H A DVec.pyx580 cdef int64_t ndim = 0
594 ndim = ptr.dl_tensor.ndim
596 for s in shape[:ndim]:
633 cdef object s1 = oarray_p(empty_p(<PetscInt>ndim), NULL, <void**>&shape_arr)
634 cdef object s2 = oarray_p(empty_p(<PetscInt>ndim), NULL, <void**>&strides_arr)
635 for i in range(ndim):
638 …ttr('__dltensor_ctx__', (ptr.dl_tensor.ctx.device_type, ptr.dl_tensor.ctx.device_id, ndim, s1, s2))
694 ndim = ptr.dl_tensor.ndim
697 s1 = oarray_p(empty_p(ndim), NULL, <void**>&shape_arr)
698 s2 = oarray_p(empty_p(ndim), NULL, <void**>&strides_arr)
[all …]
H A Dpetscmat.pxi966 "rows.ndim=%d") % (PyArray_NDIM(ai)))
971 "cols.ndim=%d") % (PyArray_NDIM(aj)))
976 "vals.ndim=%d") % (PyArray_NDIM(av)))
1228 cdef int64_t ndim = 2
1236 s1 = oarray_p(empty_p(<PetscInt>ndim), NULL, <void**>&shape_arr)
1237 s2 = oarray_p(empty_p(<PetscInt>ndim), NULL, <void**>&strides_arr)
1246 (_, _, ndim, s1, s2) = ctx0
1253 ctx0 = (dtype, devId, ndim, s1, s2)
H A DMat.pyx1588 "coordinates.ndim=%d") % (PyArray_NDIM(xyz)))
3164 cdef PetscInt ndim, ndof
3168 ndim = asDims(dims, &cdims[0], &cdims[1], &cdims[2])
3172 CHKERR(MatSetStencil(self.mat, ndim, cdims, cstarts, ndof))
5998 cdef int64_t ndim = 0
5999 (device_type, device_id, ndim, shape, strides) = mat_get_dlpack_ctx(self)
6038 shape_strides = <int64_t*>malloc(sizeof(int64_t)*2*ndim)
6039 for i in range(ndim):
6041 for i in range(ndim):
6042 shape_strides[i+ndim] = strides[i]
[all …]
H A DDMSwarm.pyx708 "coordinates.ndim=%d") % (PyArray_NDIM(xyz)))
759 "coordinates.ndim=%d") % (PyArray_NDIM(xyz)))
H A DPC.pyx757 "coordinates.ndim=%d") % (PyArray_NDIM(xyz)))
759 cdef PetscInt ndim = <PetscInt> PyArray_DIM(xyz, 1)
761 CHKERR(PCSetCoordinates(self.pc, ndim, nvtx, coords))
/petsc/src/dm/tests/
H A Dex27.c25 PetscInt dim[3] = {10, 10, 10}, ndim = 3; in main() local
47 PetscCall(PetscOptionsGetIntArray(NULL, NULL, "-dim", dim, &ndim, NULL)); in main()
H A Dex28.c27 PetscInt dim[3] = {10, 10, 10}, ndim = 3; in main() local
50 PetscCall(PetscOptionsGetIntArray(NULL, NULL, "-dim", dim, &ndim, NULL)); in main()

12