| /petsc/src/vec/vec/impls/nest/ |
| H A D | vecnest.c | 51 Vec_Nest *bx = (Vec_Nest *)x->data; in VecCopy_Nest() local 57 for (i = 0; i < bx->nb; i++) PetscCall(VecCopy(bx->v[i], by->v[i])); in VecCopy_Nest() 63 Vec_Nest *bx = (Vec_Nest *)x->data; in VecDuplicate_Nest() local 69 PetscCall(PetscMalloc1(bx->nb, &sub)); in VecDuplicate_Nest() 70 for (i = 0; i < bx->nb; i++) PetscCall(VecDuplicate(bx->v[i], &sub[i])); in VecDuplicate_Nest() 71 PetscCall(VecCreateNest(PetscObjectComm((PetscObject)x), bx->nb, bx->is, sub, &Y)); in VecDuplicate_Nest() 72 for (i = 0; i < bx->nb; i++) PetscCall(VecDestroy(&sub[i])); in VecDuplicate_Nest() 80 Vec_Nest *bx = (Vec_Nest *)x->data; in VecDot_Nest() local 87 nr = bx->nb; in VecDot_Nest() 90 PetscCall(VecDot(bx->v[i], by->v[i], &x_dot_y)); in VecDot_Nest() [all …]
|
| /petsc/src/dm/tests/ |
| H A D | ex15.c | 14 DMBoundaryType bx = DM_BOUNDARY_NONE, by = DM_BOUNDARY_NONE, bz = DM_BOUNDARY_NONE; in main() local 26 if (dim > 0) bx = DM_BOUNDARY_PERIODIC; in main() 30 if (bx == DM_BOUNDARY_NONE) { in main() 38 PetscCall(DMDACreate1d(PETSC_COMM_WORLD, bx, M1, dof, s, NULL, &da_c)); in main() 39 PetscCall(DMDACreate1d(PETSC_COMM_WORLD, bx, M2, dof, s, NULL, &da_f)); in main() 41 …PetscCall(DMDACreate2d(PETSC_COMM_WORLD, bx, by, DMDA_STENCIL_BOX, M1, M1, PETSC_DECIDE, PETSC_DEC… in main() 42 …PetscCall(DMDACreate2d(PETSC_COMM_WORLD, bx, by, DMDA_STENCIL_BOX, M2, M2, PETSC_DECIDE, PETSC_DEC… in main() 44 …PetscCall(DMDACreate3d(PETSC_COMM_WORLD, bx, by, bz, DMDA_STENCIL_BOX, M1, M1, M1, PETSC_DECIDE, P… in main() 45 …PetscCall(DMDACreate3d(PETSC_COMM_WORLD, bx, by, bz, DMDA_STENCIL_BOX, M2, M2, M2, PETSC_DECIDE, P… in main()
|
| H A D | ex33.c | 13 DMBoundaryType bx = DM_BOUNDARY_NONE, by = DM_BOUNDARY_NONE, bz = DM_BOUNDARY_NONE; in main() local 36 if (pt == 1) bx = DM_BOUNDARY_PERIODIC; in main() 39 bx = DM_BOUNDARY_PERIODIC; in main() 56 …PetscCall(DMDACreate2d(PETSC_COMM_WORLD, bx, by, stencil_type, M, N, PETSC_DECIDE, PETSC_DECIDE, d… in main() 58 …PetscCall(DMDACreate3d(PETSC_COMM_WORLD, bx, by, bz, stencil_type, M, N, P, PETSC_DECIDE, PETSC_DE… in main() 60 PetscCall(DMDACreate1d(PETSC_COMM_WORLD, bx, M, dof, stencil_width, NULL, &da)); in main() 85 …PetscCall(DMDACreate2d(PETSC_COMM_WORLD, bx, by, stencil_type, M, N, PETSC_DECIDE, PETSC_DECIDE, d… in main() 87 …PetscCall(DMDACreate3d(PETSC_COMM_WORLD, bx, by, bz, stencil_type, M, N, P, PETSC_DECIDE, PETSC_DE… in main() 89 PetscCall(DMDACreate1d(PETSC_COMM_WORLD, bx, M, dof, stencil_width, NULL, &da2)); in main()
|
| H A D | ex23.c | 11 DMBoundaryType bx = DM_BOUNDARY_NONE, by = DM_BOUNDARY_NONE, bz = DM_BOUNDARY_NONE; in main() local 29 if (pt == 1) bx = DM_BOUNDARY_PERIODIC; in main() 32 bx = DM_BOUNDARY_PERIODIC; in main() 44 …PetscCall(DMDACreate2d(PETSC_COMM_WORLD, bx, by, stencil_type, M, N, m, n, dof, stencil_width, 0, … in main() 46 …PetscCall(DMDACreate3d(PETSC_COMM_WORLD, bx, by, bz, stencil_type, M, N, P, m, n, p, dof, stencil_… in main() 48 PetscCall(DMDACreate1d(PETSC_COMM_WORLD, bx, M, dof, stencil_width, NULL, &da)); in main() 102 …idth %" PetscInt_FMT " stencil_type %d periodic %d\n", stencil_width, (int)stencil_type, (int)bx)); in main() 112 …idth %" PetscInt_FMT " stencil_type %d periodic %d\n", stencil_width, (int)stencil_type, (int)bx)); in main()
|
| H A D | ex46.c | 13 DMBoundaryType bx = DM_BOUNDARY_NONE, by = DM_BOUNDARY_NONE, bz = DM_BOUNDARY_NONE; in main() local 38 if (flg) bx = DM_BOUNDARY_PERIODIC; in main() 41 if (flg) bx = DM_BOUNDARY_GHOSTED; in main() 82 …PetscCall(DMDACreate3d(PETSC_COMM_WORLD, bx, by, bz, stencil_type, M, N, P, m, n, p, w, s, lx, ly,… in main() 99 …PetscCall(DMDACreate3d(comm2, bx, by, bz, stencil_type, M, N, P, m, n, p, w, s, lx, ly, lz, &da2)); in main() 122 …PetscCall(DMDACreate3d(PETSC_COMM_WORLD, bx, by, bz, stencil_type, M, N, P, m, n, p, w, 0, lx, ly,… in main() 135 …PetscCall(DMDACreate3d(PETSC_COMM_WORLD, bx, by, bz2, stencil_type, M, N, P, m, n, p, w, s, lx, ly… in main() 147 …PetscCall(DMDACreate3d(PETSC_COMM_WORLD, bx, by, bz, stencil_type, M, N, P * 2, m, n, p, w, s, lx,… in main() 166 …PetscCall(DMDACreate3d(PETSC_COMM_WORLD, bx, by, bz, stencil_type, M, N, P, m, n, p, w, s, lx, ly,… in main() 179 …PetscCall(DMStagCreate3d(PETSC_COMM_WORLD, bx, by, bz, M, N, P, m, n, p, 1, 1, 1, 1, DMSTAG_STENCI… in main()
|
| H A D | ex21.c | 14 DMBoundaryType bx, by, bz; in test1_DAInjection3d() local 17 bx = DM_BOUNDARY_NONE; in test1_DAInjection3d() 25 bx = DM_BOUNDARY_PERIODIC; in test1_DAInjection3d() 32 …PetscCall(DMDACreate3d(PETSC_COMM_WORLD, bx, by, bz, DMDA_STENCIL_BOX, mx + 1, my + 1, mz + 1, PET… in test1_DAInjection3d() 68 …if (!bx && !by && !bz && norm > PETSC_SQRT_MACHINE_EPSILON) PetscCall(PetscPrintf(PETSC_COMM_WORLD… in test1_DAInjection3d()
|
| H A D | ex2.c | 11 DMBoundaryType bx = DM_BOUNDARY_PERIODIC; in main() local 28 PetscCall(PetscOptionsGetEnum(NULL, NULL, "-wrap", DMBoundaryTypes, (PetscEnum *)&bx, NULL)); in main() 33 PetscCall(DMDACreate1d(PETSC_COMM_WORLD, bx, M, dof, s, NULL, &da)); in main()
|
| H A D | ex4.c | 15 DMBoundaryType bx = DM_BOUNDARY_NONE, by = DM_BOUNDARY_NONE; in main() local 37 if (flg) bx = DM_BOUNDARY_PERIODIC; in main() 43 if (flg) bx = DM_BOUNDARY_GHOSTED; in main() 73 PetscCall(DMDACreate2d(PETSC_COMM_WORLD, bx, by, st, M, N, m, n, w, s, lx, ly, &da)); in main()
|
| H A D | ex38.c | 11 DMBoundaryType bx = DM_BOUNDARY_NONE, by = DM_BOUNDARY_NONE, bz = DM_BOUNDARY_NONE; in main() local 26 …PetscCall(DMDACreate3d(PETSC_COMM_WORLD, bx, by, bz, stencil_type, M, N, P, PETSC_DECIDE, PETSC_DE… in main()
|
| /petsc/src/dm/impls/da/ |
| H A D | daview.c | 15 DMBoundaryType bx, by, bz; in DMView_DA_Matlab() local 22 PetscCall(DMDAGetInfo(da, &dim, &m, &n, &p, 0, 0, 0, &dof, &swidth, &bx, &by, &bz, &stencil)); in DMView_DA_Matlab() 31 mxSetFieldByNumber(mx, 0, 6, mxCreateDoubleScalar((double)bx)); in DMView_DA_Matlab() 47 DMBoundaryType bx, by, bz; in DMView_DA_Binary() local 55 PetscCall(DMDAGetInfo(da, &dim, &m, &n, &p, &M, &N, &P, &dof, &swidth, &bx, &by, &bz, &stencil)); in DMView_DA_Binary() 65 PetscCall(PetscViewerBinaryWrite(viewer, &bx, 1, PETSC_ENUM)); in DMView_DA_Binary() 108 …Op PetscInt *p, PeOp PetscInt *dof, PeOp PetscInt *s, PeOp DMBoundaryType *bx, PeOp DMBoundaryType… in DMDAGetInfo() argument 132 if (bx) *bx = dd->bx; in DMDAGetInfo() 175 info->bx = dd->bx; in DMDAGetLocalInfo()
|
| H A D | fdda.c | 190 DMBoundaryType bx, by, bz; in DMCreateColoring_DA() local 219 PetscCall(DMDAGetInfo(da, &dim, NULL, NULL, NULL, &m, &n, &p, &nc, NULL, &bx, &by, &bz, NULL)); in DMCreateColoring_DA() 224 …PetscCheck(!((m == 1 && bx == DM_BOUNDARY_PERIODIC) || (n == 1 && by == DM_BOUNDARY_PERIODIC) || (… in DMCreateColoring_DA() 264 DMBoundaryType bx, by; in DMCreateColoring_DA_2d_MPIAIJ() local 275 PetscCall(DMDAGetInfo(da, &dim, &m, &n, NULL, &M, &N, NULL, &nc, &s, &bx, &by, NULL, &st)); in DMCreateColoring_DA_2d_MPIAIJ() 328 DMBoundaryType bx, by, bz; in DMCreateColoring_DA_3d_MPIAIJ() local 338 PetscCall(DMDAGetInfo(da, &dim, &m, &n, &p, &M, &N, &P, &nc, &s, &bx, &by, &bz, &st)); in DMCreateColoring_DA_3d_MPIAIJ() 340 …PetscCheck(bx != DM_BOUNDARY_PERIODIC || (m % col) == 0, PetscObjectComm((PetscObject)da), PETSC_E… in DMCreateColoring_DA_3d_MPIAIJ() 393 DMBoundaryType bx; in DMCreateColoring_DA_1d_MPIAIJ() local 402 PetscCall(DMDAGetInfo(da, &dim, &m, NULL, NULL, &M, NULL, NULL, &nc, &s, &bx, NULL, NULL, NULL)); in DMCreateColoring_DA_1d_MPIAIJ() [all …]
|
| H A D | da1.c | 131 DMBoundaryType bx = dd->bx; in DMSetUp_DA_1D() local 194 …PetscCheck((x >= s) || ((M <= 1) && (bx != DM_BOUNDARY_PERIODIC)), PETSC_COMM_SELF, PETSC_ERR_ARG_… in DMSetUp_DA_1D() 203 if (bx) Xs = xs - sDist; in DMSetUp_DA_1D() 211 if (bx) Xe = xe + sDist; in DMSetUp_DA_1D() 216 if (bx == DM_BOUNDARY_PERIODIC || bx == DM_BOUNDARY_MIRROR) { in DMSetUp_DA_1D() 240 if (bx == DM_BOUNDARY_PERIODIC) { /* Handle all cases with periodic first */ in DMSetUp_DA_1D() 252 } else if (bx == DM_BOUNDARY_MIRROR) { /* Handle all cases with periodic first */ in DMSetUp_DA_1D() 357 PetscErrorCode DMDACreate1d(MPI_Comm comm, DMBoundaryType bx, PetscInt M, PetscInt dof, PetscInt s,… in DMDACreate1d() argument 367 PetscCall(DMDASetBoundaryType(*da, bx, DM_BOUNDARY_NONE, DM_BOUNDARY_NONE)); in DMDACreate1d()
|
| H A D | da2.c | 195 DMBoundaryType bx = dd->bx; in DMSetUp_DA_2D() local 212 …PetscCheck(stencil_type != DMDA_STENCIL_BOX || (bx != DM_BOUNDARY_MIRROR && by != DM_BOUNDARY_MIRR… in DMSetUp_DA_2D() 299 …PetscCheck((x >= s) || ((m <= 1) && (bx != DM_BOUNDARY_PERIODIC)), PETSC_COMM_SELF, PETSC_ERR_ARG_… in DMSetUp_DA_2D() 301 …PetscCheck((x > s) || (bx != DM_BOUNDARY_MIRROR), PETSC_COMM_SELF, PETSC_ERR_ARG_OUTOFRANGE, "Loca… in DMSetUp_DA_2D() 311 if (bx) { in DMSetUp_DA_2D() 322 if (bx) { in DMSetUp_DA_2D() 331 if (bx == DM_BOUNDARY_PERIODIC || bx == DM_BOUNDARY_MIRROR) { in DMSetUp_DA_2D() 467 if (bx == DM_BOUNDARY_PERIODIC && by == DM_BOUNDARY_PERIODIC) { in DMSetUp_DA_2D() 497 } else if (bx == DM_BOUNDARY_PERIODIC) { /* Handle Left and Right Sides */ in DMSetUp_DA_2D() 562 } else if (bx == DM_BOUNDARY_MIRROR) { in DMSetUp_DA_2D() [all …]
|
| H A D | dacorn.c | 309 DMBoundaryType bx, by, bz; in DMDACreateCompatibleDMDA() local 324 bx = dd->bx; in DMDACreateCompatibleDMDA() 332 PetscCall(DMDACreate1d(PetscObjectComm((PetscObject)da), bx, M, nfields, s, dd->lx, nda)); in DMDACreateCompatibleDMDA() 334 …PetscCall(DMDACreate2d(PetscObjectComm((PetscObject)da), bx, by, stencil_type, M, N, m, n, nfields… in DMDACreateCompatibleDMDA() 336 …PetscCall(DMDACreate3d(PetscObjectComm((PetscObject)da), bx, by, bz, stencil_type, M, N, P, m, n, … in DMDACreateCompatibleDMDA()
|
| H A D | gr1.c | 30 DMBoundaryType bx, by, bz; in DMDASetUniformCoordinates() local 39 PetscCall(DMDAGetInfo(da, &dim, &M, &N, &P, NULL, NULL, NULL, NULL, NULL, &bx, &by, &bz, NULL)); in DMDASetUniformCoordinates() 48 if (bx == DM_BOUNDARY_PERIODIC) hx = (xmax - xmin) / M; in DMDASetUniformCoordinates() 54 if (bx == DM_BOUNDARY_PERIODIC) hx = (xmax - xmin) / (M); in DMDASetUniformCoordinates() 68 if (bx == DM_BOUNDARY_PERIODIC) hx = (xmax - xmin) / (M); in DMDASetUniformCoordinates() 90 if (bx == DM_BOUNDARY_PERIODIC || by == DM_BOUNDARY_PERIODIC || bz == DM_BOUNDARY_PERIODIC) { in DMDASetUniformCoordinates() 157 DMBoundaryType bx; in VecView_MPI_Draw_DA1d() local 180 …PetscCall(DMDAGetInfo(da, NULL, &N, NULL, NULL, NULL, NULL, NULL, &dof, NULL, &bx, NULL, NULL, NUL… in VecView_MPI_Draw_DA1d()
|
| H A D | dagtol.c | 42 …PetscCheck(dd->bx == DM_BOUNDARY_GHOSTED || dd->bx == DM_BOUNDARY_NONE || dd->s <= 0 || dd->m != 1… in DMLocalToGlobalBegin_DA() 43 …PetscCheck(dd->bx == DM_BOUNDARY_GHOSTED || dd->by == DM_BOUNDARY_NONE || dd->s <= 0 || dd->n != 1… in DMLocalToGlobalBegin_DA() 44 …PetscCheck(dd->bx == DM_BOUNDARY_GHOSTED || dd->bz == DM_BOUNDARY_NONE || dd->s <= 0 || dd->p != 1… in DMLocalToGlobalBegin_DA()
|
| H A D | da.c | 101 PetscErrorCode DMDAGetBoundaryType(DM da, PeOp DMBoundaryType *bx, PeOp DMBoundaryType *by, PeOp DM… in DMDAGetBoundaryType() argument 107 if (bx) PetscAssertPointer(bx, 2); in DMDAGetBoundaryType() 110 if (bx) *bx = dd->bx; in DMDAGetBoundaryType() 134 PetscErrorCode DMDASetBoundaryType(DM da, DMBoundaryType bx, DMBoundaryType by, DMBoundaryType bz) in DMDASetBoundaryType() argument 140 PetscValidLogicalCollectiveEnum(da, bx, 2); in DMDASetBoundaryType() 144 dd->bx = bx; in DMDASetBoundaryType() 1026 if (dd->bx == DM_BOUNDARY_PERIODIC || dd->interptype == DMDA_Q0) { in DMRefine_DA() 1054 PetscCall(DMDASetBoundaryType(da2, dd->bx, dd->by, dd->bz)); in DMRefine_DA() 1061 …PetscCall(DMDARefineOwnershipRanges(da, (PetscBool)(dd->bx == DM_BOUNDARY_PERIODIC || dd->interpty… in DMRefine_DA() 1069 …PetscCall(DMDARefineOwnershipRanges(da, (PetscBool)(dd->bx == DM_BOUNDARY_PERIODIC || dd->interpty… in DMRefine_DA() [all …]
|
| H A D | dacreate.c | 35 …irection", "DMDASetBoundaryType", DMBoundaryTypes, (PetscEnum)dd->bx, (PetscEnum *)&dd->bx, NULL)); in DMSetFromOptions_DA() 88 if (dd->bx == DM_BOUNDARY_PERIODIC || dd->interptype == DMDA_Q0) { in DMSetFromOptions_DA() 125 DMBoundaryType bx, by, bz; in DMLoad_DA() local 137 PetscCall(PetscViewerBinaryRead(viewer, &bx, 1, NULL, PETSC_ENUM)); in DMLoad_DA() 144 PetscCall(DMDASetBoundaryType(da, bx, by, bz)); in DMLoad_DA() 188 PetscCall(DMDASetBoundaryType(*subdm, da->bx, da->by, da->bz)); in DMCreateSubDM_DA() 238 PetscCall(DMDASetBoundaryType(da, dd->bx, dd->by, dd->bz)); in DMCreateFieldDecomposition_DA() 259 PetscCall(DMDASetBoundaryType(*newdm, da->bx, da->by, da->bz)); in DMClone_DA() 391 dd->bx = DM_BOUNDARY_NONE; in DMCreate_DA()
|
| /petsc/src/dm/tutorials/ |
| H A D | ex12.c | 20 DMBoundaryType bx = DM_BOUNDARY_NONE, by = DM_BOUNDARY_NONE; in main() local 29 …PetscCall(DMDACreate2d(PETSC_COMM_WORLD, bx, by, stype, M, N, PETSC_DECIDE, PETSC_DECIDE, 1, 1, NU… in main()
|
| H A D | ex3.c | 95 DMBoundaryType bx = DM_BOUNDARY_NONE, by = DM_BOUNDARY_NONE, bz = DM_BOUNDARY_NONE; in main() local 111 PetscCall(DMDACreate1d(PETSC_COMM_WORLD, bx, M, 1, 1, NULL, &dac)); in main() 113 …PetscCall(DMDACreate2d(PETSC_COMM_WORLD, bx, by, stype, M, N, PETSC_DECIDE, PETSC_DECIDE, 1, 1, NU… in main() 115 …PetscCall(DMDACreate3d(PETSC_COMM_WORLD, bx, by, bz, stype, M, N, P, PETSC_DECIDE, PETSC_DECIDE, P… in main()
|
| H A D | ex1.c | 44 DMBoundaryType bx = DM_BOUNDARY_NONE, by = DM_BOUNDARY_NONE; in main() local 63 …PetscCall(DMDACreate2d(PETSC_COMM_WORLD, bx, by, stype, M, N, PETSC_DECIDE, PETSC_DECIDE, 1, 1, NU… in main()
|
| H A D | ex5.c | 16 DMBoundaryType bx = DM_BOUNDARY_NONE, by = DM_BOUNDARY_NONE; in main() local 31 …PetscCall(DMDACreate2d(PETSC_COMM_WORLD, bx, by, stype, M, N, PETSC_DECIDE, PETSC_DECIDE, 1, 1, NU… in main()
|
| /petsc/src/ts/characteristic/impls/da/ |
| H A D | slda.c | 93 DMBoundaryType bx, by; in DMDAMapCoordsToPeriodicDomain() local 97 …PetscCall(DMDAGetInfo(da, &dim, &gx, &gy, NULL, NULL, NULL, NULL, NULL, NULL, &bx, &by, NULL, NULL… in DMDAMapCoordsToPeriodicDomain() 99 if (bx == DM_BOUNDARY_PERIODIC) { in DMDAMapCoordsToPeriodicDomain()
|
| /petsc/src/snes/tests/ |
| H A D | ex17.c | 339 Vec bx[2]; in block_system() local 363 bx[0] = x1; in block_system() 364 bx[1] = x2; in block_system() 365 PetscCall(VecCreateNest(PETSC_COMM_WORLD, 2, NULL, bx, &x)); in block_system() 371 bx[0] = r1; in block_system() 372 bx[1] = r2; in block_system() 373 PetscCall(VecCreateNest(PETSC_COMM_WORLD, 2, NULL, bx, &r)); in block_system()
|
| /petsc/src/ksp/ksp/tutorials/amrex/ |
| H A D | MyTest.cxx | 194 const Box &bx = mfi.fabbox(); in initData() local 196 amrex::ParallelFor(bx, [=] AMREX_GPU_DEVICE(int i, int j, int k) noexcept { in initData() 208 const Box &bx = mfi.fabbox(); in initData() local 210 amrex::ParallelFor(bx, [=] AMREX_GPU_DEVICE(int i, int j, int k) noexcept { in initData()
|