| /petsc/src/mat/tests/ |
| H A D | ex246.cxx | 6 static PetscErrorCode GenEntries(PetscInt sdim, PetscInt M, PetscInt N, const PetscInt *J, const Pe… in GenEntries() argument 15 …for (d = 0; d < sdim; d++) diff += (coords[J[j] * sdim + d] - coords[K[k] * sdim + d]) * (coords[J… in GenEntries() 24 PetscInt sdim; member in MyIMatrix 27 …, PetscReal *gcoords) : htool::VirtualGenerator<PetscScalar>(), coords(gcoords), sdim(spacedim) { } in MyIMatrix() 37 …scInt d = 0; d < sdim; d++) diff += (coords[J[j] * sdim + d] - coords[K[k] * sdim + d]) * (coords[… in copy_submatrix()
|
| H A D | ex241.c | 5 static PetscErrorCode GenEntries(PetscInt sdim, PetscInt M, PetscInt N, const PetscInt *J, const Pe… in GenEntries() argument 14 …for (d = 0; d < sdim; d++) diff += (coords[J[j] * sdim + d] - coords[K[k] * sdim + d]) * (coords[J… in GenEntries() 21 static PetscErrorCode GenEntriesRectangular(PetscInt sdim, PetscInt M, PetscInt N, const PetscInt *… in GenEntriesRectangular() argument 30 …d = 0; d < sdim; d++) diff += (coords[0][J[j] * sdim + d] - coords[1][K[k] * sdim + d]) * (coords[… in GenEntriesRectangular()
|
| H A D | ex268.c | 5 static PetscErrorCode GenEntries(PetscInt sdim, PetscInt M, PetscInt N, const PetscInt *J, const Pe… in GenEntries() argument 14 …for (d = 0; d < sdim; d++) diff += (coords[J[j] * sdim + d] - coords[K[k] * sdim + d]) * (coords[J… in GenEntries()
|
| H A D | ex66.c | 6 static PetscScalar GenEntry_Symm(PetscInt sdim, PetscReal x[], PetscReal y[], PetscCtx ctx) in GenEntry_Symm() argument 9 PetscReal clength = sdim == 3 ? 0.2 : 0.1; in GenEntry_Symm() 12 for (d = 0; d < sdim; d++) diff += (x[d] - y[d]) * (x[d] - y[d]); in GenEntry_Symm() 17 static PetscScalar GenEntry_Unsymm(PetscInt sdim, PetscReal x[], PetscReal y[], PetscCtx ctx) in GenEntry_Unsymm() argument 20 PetscReal clength = sdim == 3 ? 0.2 : 0.1; in GenEntry_Unsymm() 23 for (d = 0; d < sdim; d++) nx += x[d] * x[d]; in GenEntry_Unsymm() 24 for (d = 0; d < sdim; d++) ny += y[d] * y[d]; in GenEntry_Unsymm() 25 for (d = 0; d < sdim; d++) diff += (x[d] - y[d]) * (x[d] - y[d]); in GenEntry_Unsymm()
|
| /petsc/src/ksp/ksp/tutorials/ |
| H A D | ex21.c | 11 static PetscScalar RBF(PetscInt sdim, PetscReal x[], PetscReal y[], PetscCtx ctx) in RBF() argument 20 for (d = 0; d < sdim; d++) diff += (x[d] - y[d]) * (x[d] - y[d]) / (l[d] * l[d]); in RBF() 32 PetscInt basisord, leafsize, sdim, n, its, i; in main() local 43 sdim = 2; in main() 44 PetscCall(PetscOptionsGetInt(NULL, NULL, "-sdim", &sdim, NULL)); in main() 55 PetscCall(PetscMalloc1(sdim * n, &coords)); in main() 56 PetscCall(PetscRandomGetValuesReal(r, sdim * n, coords)); in main() 62 PetscCall(PetscMalloc1(sdim, &fctx.l)); in main() 63 PetscCall(PetscRandomGetValuesReal(r, sdim, fctx.l)); in main() 64 PetscCall(PetscOptionsGetRealArray(NULL, NULL, "-l", fctx.l, (i = sdim, &i), NULL)); in main() [all …]
|
| H A D | ex82.c | 5 static PetscErrorCode GenEntries(PetscInt sdim, PetscInt M, PetscInt N, const PetscInt *J, const Pe… in GenEntries() argument 16 …for (d = 0; d < sdim; d++) diff += (coords[J[j] * sdim + d] - coords[K[k] * sdim + d]) * (coords[J… in GenEntries()
|
| /petsc/src/dm/impls/plex/tests/ |
| H A D | ex26.c | 30 PetscInt sdim, d, pStart, pEnd, p, numCS, set; in main() local 54 PetscCall(DMGetDimension(dm, &sdim)); in main() 91 switch (sdim) { in main() 109 …ctComm((PetscObject)dm), PETSC_ERR_ARG_OUTOFRANGE, "No layout for dimension %" PetscInt_FMT, sdim); in main() 138 PetscCall(PetscMalloc2(sdim + 1, &pStartDepth, sdim + 1, &pEndDepth)); in main() 139 …for (d = 0; d <= sdim; ++d) PetscCall(DMPlexGetDepthStratum(dm, d, &pStartDepth[d], &pEndDepth[d])… in main() 141 PetscCall(PetscSectionSetFieldComponents(section, fieldU, sdim)); in main() 143 PetscCall(PetscSectionSetFieldComponents(section, fieldS, sdim * (sdim + 1) / 2)); in main() 178 switch (sdim) { in main() 186 …ctComm((PetscObject)dm), PETSC_ERR_ARG_OUTOFRANGE, "No layout for dimension %" PetscInt_FMT, sdim); in main() [all …]
|
| H A D | ex64.c | 32 PetscInt sdim, d, pStart, pEnd, p, numCS, set; in main() local 48 PetscCall(DMGetDimension(dm, &sdim)); in main() 58 PetscCall(PetscMalloc2(sdim + 1, &pStartDepth, sdim + 1, &pEndDepth)); in main() 59 …for (d = 0; d <= sdim; ++d) PetscCall(DMPlexGetDepthStratum(dm, d, &pStartDepth[d], &pEndDepth[d])… in main() 61 PetscCall(PetscSectionSetFieldComponents(section, fieldU, sdim)); in main() 63 PetscCall(PetscSectionSetFieldComponents(section, fieldS, sdim * (sdim + 1) / 2)); in main() 98 switch (sdim) { in main() 106 …ctComm((PetscObject)dm), PETSC_ERR_ARG_OUTOFRANGE, "No layout for dimension %" PetscInt_FMT, sdim); in main() 161 for (d = 0; d <= sdim; ++d) { in main() 235 cval[offUA + sdim] = 0.; in main() [all …]
|
| H A D | ex26f90.F90 | 29 PetscInt :: sdim, d, pStart, pEnd, p, numCS, set, j 120 PetscCallA(DMGetDimension(dm, sdim, ierr)) 152 select case (sdim) 176 write (IOBuffer, '("No layout for dimension ",I2)') sdim 203 allocate (pStartDepth(sdim + 1)) 204 allocate (pEndDepth(sdim + 1)) 205 do d = 1, sdim + 1 210 PetscCallA(PetscSectionSetFieldComponents(section, fieldU, sdim, ierr)) 212 PetscCallA(PetscSectionSetFieldComponents(section, fieldS, sdim*(sdim + 1)/2, ierr)) 226 select case (sdim) [all …]
|
| H A D | ex98.c | 11 PetscInt sdim, s, pStart, pEnd, p, numVS, numPoints; in main() local 34 PetscCall(DMGetDimension(dm, &sdim)); in main() 38 PetscCall(PetscSectionSetFieldComponents(section, field, sdim)); in main() 45 PetscCall(PetscSectionSetDof(section, p, sdim)); in main() 46 PetscCall(PetscSectionSetFieldDof(section, p, 0, sdim)); in main() 78 constraints[0] = setID[s] % sdim; in main()
|
| H A D | ex62f90.F90 | 28 PetscInt :: sdim, d, pStart, pEnd, p, numCS, set, i, j 103 PetscCallA(DMGetDimension(dm, sdim, ierr)) 135 select case (sdim) 147 write (IOBuffer, '("No layout for dimension ",I2)') sdim 190 allocate (pStartDepth(sdim + 1)) 191 allocate (pEndDepth(sdim + 1)) 192 do d = 1, sdim + 1 197 PetscCallA(PetscSectionSetFieldComponents(section, fieldU, sdim, ierr)) 199 PetscCallA(PetscSectionSetFieldComponents(section, fieldS, sdim*(sdim + 1)/2, ierr)) 209 select case (sdim) [all …]
|
| H A D | ex98f90.F90 | 15 PetscInt :: sdim, s, pStart, pEnd, p, numVS, numPoints 41 PetscCallA(DMGetDimension(dm, sdim, ierr)) 46 PetscCallA(PetscSectionSetFieldComponents(section, 0_kPI, sdim, ierr)) 53 PetscCallA(PetscSectionSetDof(section, p, sdim, ierr)) 54 PetscCallA(PetscSectionSetFieldDof(section, p, 0_kPI, sdim, ierr)) 90 constraints(1) = mod(setID(s), sdim)
|
| /petsc/src/mat/impls/htool/ |
| H A D | htool.hpp | 20 PetscInt sdim; member in WrapperHtool 24 …nelFn *&g, void *kernelctx) : VirtualGenerator<PetscScalar>(), kernel(g), sdim(dim), ctx(kernelctx… in WrapperHtool() 30 PetscCallAbort(PETSC_COMM_SELF, kernel(sdim, M, N, rows, cols, ptr, ctx)); in copy_submatrix()
|
| H A D | htool.cxx | 817 static PetscErrorCode GenEntriesTranspose(PetscInt sdim, PetscInt M, PetscInt N, const PetscInt *ro… in GenEntriesTranspose() argument 823 PetscCall(generator->kernel(sdim, N, M, cols, rows, ptr, generator->kernelctx)); in GenEntriesTranspose()
|
| /petsc/src/dm/impls/plex/ |
| H A D | plexglvis.c | 279 PetscInt dim, sdim, dof = 0, off = 0, i, q, vStart, vEnd, numPoints, *points = NULL; in DMPlexGetPointMFEMVertexIDs_Internal() local 284 sdim = dim; in DMPlexGetPointMFEMVertexIDs_Internal() 288 PetscCall(DMGetCoordinateDim(dm, &sdim)); in DMPlexGetPointMFEMVertexIDs_Internal() 291 off = off / sdim; in DMPlexGetPointMFEMVertexIDs_Internal() 302 for (q = 0; q < dof / sdim; q++) vids[q] = off / sdim + q; in DMPlexGetPointMFEMVertexIDs_Internal() 456 PetscInt bf, p, sdim, dim, depth, novl, minl; in DMPlexView_GLVis_ASCII() local 533 PetscCall(DMGetCoordinateDim(dm, &sdim)); in DMPlexView_GLVis_ASCII() 626 PetscCall(PetscViewerASCIIPrintf(viewer, "%" PetscInt_FMT "\n", sdim)); in DMPlexView_GLVis_ASCII() 692 PetscCall(VecCreateSeq(PETSC_COMM_SELF, (cEnd - cStart - novl) * vpc * sdim, &hovec)); in DMPlexView_GLVis_ASCII() 702 …sdim || csize == vpc * sdim * 2, PETSC_COMM_SELF, PETSC_ERR_SUP, "Unsupported closure size %" Pets… in DMPlexView_GLVis_ASCII() [all …]
|
| H A D | plexsubmesh.c | 3381 PetscInt totSubPoints = 0, maxConeSize, dim, sdim, cdim, p, d, coordinate_type; in DMPlexCreateSubmeshGeneric_Interpolated() local 3449 PetscCall(DMGetDimension(subdm, &sdim)); in DMPlexCreateSubmeshGeneric_Interpolated() 3450 if (sdim > 0) { in DMPlexCreateSubmeshGeneric_Interpolated() 3452 sdim = dim; in DMPlexCreateSubmeshGeneric_Interpolated() 3458 PetscCallMPI(MPIU_Allreduce(&lsdim, &sdim, 1, MPIU_INT, MPI_MAX, comm)); in DMPlexCreateSubmeshGeneric_Interpolated() 3459 PetscCall(DMSetDimension(subdm, sdim)); in DMPlexCreateSubmeshGeneric_Interpolated() 3465 firstSubPoint[sdim] = 0; in DMPlexCreateSubmeshGeneric_Interpolated() 3466 firstSubPoint[0] = firstSubPoint[sdim] + numSubPoints[sdim]; in DMPlexCreateSubmeshGeneric_Interpolated() 3467 if (sdim > 1) firstSubPoint[sdim - 1] = firstSubPoint[0] + numSubPoints[0]; in DMPlexCreateSubmeshGeneric_Interpolated() 3468 if (sdim > 2) firstSubPoint[sdim - 2] = firstSubPoint[sdim - 1] + numSubPoints[sdim - 1]; in DMPlexCreateSubmeshGeneric_Interpolated() [all …]
|
| /petsc/src/dm/interface/ |
| H A D | dmglvis.c | 25 PetscInt sdim; in DMView_GLVis() local 30 PetscCall(DMGetCoordinateDim(dm, &sdim)); in DMView_GLVis() 36 PetscCall(PetscViewerGLVisInitWindow_Internal(view, PETSC_TRUE, sdim, name)); in DMView_GLVis()
|
| /petsc/src/ksp/pc/impls/h2opus/ |
| H A D | pch2opus.c | 27 PetscInt sdim; member 59 if (pch2opus->sdim) PetscFunctionReturn(PETSC_SUCCESS); in PCH2OpusInferCoordinates_Private() 66 PetscInt n, sdim; in PCH2OpusInferCoordinates_Private() local 69 PetscCall(DMGetDimension(dm, &sdim)); in PCH2OpusInferCoordinates_Private() 72 PetscCall(PCSetCoordinates(pc, sdim, n / sdim, (PetscScalar *)coords)); in PCH2OpusInferCoordinates_Private() 83 pch2opus->sdim = 0; in PCReset_H2OPUS() 89 static PetscErrorCode PCSetCoordinates_H2OPUS(PC pc, PetscInt sdim, PetscInt nlocc, PetscReal *coor… in PCSetCoordinates_H2OPUS() argument 95 if (pch2opus->sdim && sdim == pch2opus->sdim && nlocc == pch2opus->nlocc) { in PCSetCoordinates_H2OPUS() 96 PetscCall(PetscArraycmp(pch2opus->coords, coords, sdim * nlocc, &reset)); in PCSetCoordinates_H2OPUS() 102 PetscCall(PetscMalloc1(sdim * nlocc, &pch2opus->coords)); in PCSetCoordinates_H2OPUS() [all …]
|
| /petsc/src/dm/impls/da/ |
| H A D | grglvis.c | 342 PetscInt dim, sdim, i, vid[8], mid, cid, cdof; in DMDAView_GLVis_ASCII() local 371 PetscCall(DMGetCoordinateDim(da, &sdim)); in DMDAView_GLVis_ASCII() 384 PetscCall(PetscViewerASCIIPrintf(viewer, "%" PetscInt_FMT "\n", sdim)); in DMDAView_GLVis_ASCII() 459 PetscCall(PetscViewerASCIIPrintf(viewer, "VDim: %" PetscInt_FMT "\n", sdim)); in DMDAView_GLVis_ASCII() 477 PetscCall(PetscViewerASCIIPrintf(viewer, "%" PetscInt_FMT "\n", sdim)); in DMDAView_GLVis_ASCII() 478 cdof = sdim; in DMDAView_GLVis_ASCII() 495 for (c = 0; c < cdof / sdim; c++) { in DMDAView_GLVis_ASCII() 497 …for (d = 0; d < sdim; d++) PetscCall(PetscViewerASCIIPrintf(viewer, fmt, PetscRealPart(array[cdof … in DMDAView_GLVis_ASCII()
|
| H A D | da.c | 888 PetscInt i, j, sdim, tmp, dim; in DMDAMapMatStencilToGlobal() local 905 sdim = dim + (dof > 1 ? 1 : 0); /* Dimensions in MatStencil's (k,j,i,c) view */ in DMDAMapMatStencilToGlobal() 917 …for (j = 0; j < sdim; j++) { /* Iter over, ex… in DMDAMapMatStencilToGlobal() 923 if (dof > 1) dxm += sdim; /* c is already counted in sdim */ in DMDAMapMatStencilToGlobal() 924 else dxm += sdim + 1; /* skip the unused c */ in DMDAMapMatStencilToGlobal()
|
| /petsc/src/ksp/ksp/impls/gmres/agmres/ |
| H A D | agmresdeflation.c | 106 PetscBLASInt sdim = 0; in KSPAGMRESSchurForm() local 130 …PetscCallBLAS("LAPACKgges", LAPACKgges_("V", "V", "N", NULL, &KspSize, A, &ldA, B, &ldB, &sdim, wr… in KSPAGMRESSchurForm()
|
| /petsc/src/dm/impls/composite/ |
| H A D | pack.c | 1336 PetscInt i, n, tnf, *sdim; in DMSetUpGLVisViewer_Composite() local 1357 PetscCall(PetscMalloc3(tnf, &fecs, tnf, &sdim, tnf, &Ufds)); in DMSetUpGLVisViewer_Composite() 1367 sdim[tnf + f] = sd[f]; in DMSetUpGLVisViewer_Composite() 1371 …PetscCall(PetscViewerGLVisSetFields(viewer, tnf, (const char **)fecs, sdim, DMCompositeSampleGLVis… in DMSetUpGLVisViewer_Composite() 1373 PetscCall(PetscFree3(fecs, sdim, Ufds)); in DMSetUpGLVisViewer_Composite()
|
| /petsc/src/dm/dt/dualspace/interface/ |
| H A D | dualspace.c | 1005 PetscInt dof, off, f, sdim; in PetscDualSpacePushForwardSubspaces_Internal() local 1015 PetscCall(DMGetDimension(sdm, &sdim)); in PetscDualSpacePushForwardSubspaces_Internal() 1020 for (j = 0; j < sdim; j++) J[i * sdim + j] = J[i * dim + j]; in PetscDualSpacePushForwardSubspaces_Internal()
|
| /petsc/src/mat/interface/ |
| H A D | matrix.c | 1792 …PetscInt *starts = mat->stencil.starts, *dxm = (PetscInt *)idxm, *dxn = (PetscInt *)idxn, sdim = d… in MatSetValuesStencil() local 1810 for (j = 0; j < 3 - sdim; j++) dxm++; in MatSetValuesStencil() 1820 for (j = 0; j < 3 - sdim; j++) dxn++; in MatSetValuesStencil() 1907 …PetscInt *starts = mat->stencil.starts, *dxm = (PetscInt *)idxm, *dxn = (PetscInt *)idxn, sdim = d… in MatSetValuesBlockedStencil() local 1926 for (j = 0; j < 3 - sdim; j++) dxm++; in MatSetValuesBlockedStencil() 1928 for (j = 0; j < sdim - 1; j++) { in MatSetValuesBlockedStencil() 1936 for (j = 0; j < 3 - sdim; j++) dxn++; in MatSetValuesBlockedStencil() 1938 for (j = 0; j < sdim - 1; j++) { in MatSetValuesBlockedStencil() 6509 PetscInt sdim = dim - (1 - (PetscInt)mat->stencil.noc); in MatZeroRowsStencil() local 6523 for (j = 0; j < 3 - sdim; ++j) dxm++; in MatZeroRowsStencil() [all …]
|