| /petsc/src/dm/tests/ |
| H A D | ex21.c | 8 PetscErrorCode test1_DAInjection3d(PetscInt mx, PetscInt my, PetscInt mz) in test1_DAInjection3d() argument 32 …PetscCall(DMDACreate3d(PETSC_COMM_WORLD, bx, by, bz, DMDA_STENCIL_BOX, mx + 1, my + 1, mz + 1, PET… in test1_DAInjection3d() 97 PetscInt mx, my, mz; in main() local 103 mz = 2; in main() 106 PetscCall(PetscOptionsGetInt(NULL, NULL, "-mz", &mz, 0)); in main() 107 PetscCall(test1_DAInjection3d(mx, my, mz)); in main()
|
| H A D | ex32.c | 24 PetscInt mx, my, mz; in TestQ2Q1DA() local 30 mz = 13; in TestQ2Q1DA() 31 …UNDARY_NONE, DM_BOUNDARY_NONE, DM_BOUNDARY_NONE, DMDA_STENCIL_BOX, mx, my, mz, PETSC_DECIDE, PETSC… in TestQ2Q1DA() 36 …UNDARY_NONE, DM_BOUNDARY_NONE, DM_BOUNDARY_NONE, DMDA_STENCIL_BOX, mx, my, mz, PETSC_DECIDE, PETSC… in TestQ2Q1DA()
|
| H A D | ex53.c | 18 PetscInt mx = 4, my = 4, mz = 4; /* Dimensions of parent vector */ in main() local 44 PetscCall(PetscOptionsGetInt(NULL, NULL, "-mz", &mz, NULL)); in main() 53 …NDARY_NONE, DM_BOUNDARY_NONE, DM_BOUNDARY_NONE, DMDA_STENCIL_STAR, mx, my, mz, PETSC_DECIDE, PETSC… in main() 98 upper.k = mz; in main() 107 upper.k = mz; in main()
|
| H A D | ex36.c | 475 PetscErrorCode da_test_RefineCoords3D(PetscInt mx, PetscInt my, PetscInt mz) in da_test_RefineCoords3D() argument 486 …ONE, DM_BOUNDARY_NONE, DM_BOUNDARY_NONE, DMDA_STENCIL_BOX, mx + 1, my + 1, mz + 1, PETSC_DECIDE, P… in da_test_RefineCoords3D() 545 …" x %" PetscInt_FMT " x %" PetscInt_FMT "], interp err = %1.4e\n", mx, my, mz, Mx, My, Mz, (double… in da_test_RefineCoords3D() 570 PetscInt mx = 2, my = 2, mz = 2, l, nl, dim; in main() local 576 PetscCall(PetscOptionsGetInt(NULL, NULL, "-mz", &mz, 0)); in main() 585 else if (dim == 3) PetscCall(da_test_RefineCoords3D(mx, my, mz)); in main() 588 mz = mz * 2; in main()
|
| /petsc/src/mat/tests/ |
| H A D | ex111.c | 18 PetscInt mx, my, mz; /* number grid points in x, y and z direction */ member 59 user.coarse.mz = 4; in main() 63 PetscCall(PetscOptionsGetInt(NULL, NULL, "-Mz", &user.coarse.mz, NULL)); in main() 65 if (user.coarse.mz) Test_3D = PETSC_TRUE; in main() 69 user.fine.mz = user.ratio * (user.coarse.mz - 1) + 1; in main() 75 … PetscInt_FMT " %" PetscInt_FMT "\n", user.coarse.mx, user.coarse.my, user.coarse.mz, user.fine.mx, in main() 76 user.fine.my, user.fine.mz)); in main() 84 …DM_BOUNDARY_NONE, DMDA_STENCIL_STAR, user.fine.mx, user.fine.my, user.fine.mz, PETSC_DECIDE, PETSC… in main() 128 …NDARY_NONE, DMDA_STENCIL_STAR, user.coarse.mx, user.coarse.my, user.coarse.mz, PETSC_DECIDE, PETSC… in main()
|
| H A D | ex129.c | 140 PetscInt mx, my, mz; in ComputeRHS() local 144 PetscCall(DMDAGetInfo(da, 0, &mx, &my, &mz, 0, 0, 0, 0, 0, 0, 0, 0, 0)); in ComputeRHS() 145 h = 1.0 / ((mx - 1) * (my - 1) * (mz - 1)); in ComputeRHS() 185 PetscInt i, j, k, mx, my, mz, xm, ym, zm, xs, ys, zs, dof, k1, k2, k3; in ComputeMatrix() local 196 PetscCall(DMDAGetInfo(da, 0, &mx, &my, &mz, 0, 0, 0, &dof, 0, 0, 0, 0, 0)); in ComputeMatrix() 198 …x == mz, PETSC_COMM_SELF, PETSC_ERR_SUP, "This example only works with mx %" PetscInt_FMT " = my %… in ComputeMatrix() 202 Hz = 1.0 / (PetscReal)(mz - 1); in ComputeMatrix() 234 …if (i == 0 || j == 0 || k == 0 || i == mx - 1 || j == my - 1 || k == mz - 1) { /* boundary points … in ComputeMatrix()
|
| H A D | ex96.c | 19 PetscInt mx, my, mz; /* number grid points in x, y and z direction */ member 61 user.coarse.mz = 20; in main() 65 PetscCall(PetscOptionsGetInt(NULL, NULL, "-Mz", &user.coarse.mz, NULL)); in main() 68 if (user.coarse.mz) Test_3D = PETSC_TRUE; in main() 80 …NDARY_NONE, DMDA_STENCIL_STAR, user.coarse.mx, user.coarse.my, user.coarse.mz, Npx, Npy, Npz, 1, 1… in main()
|
| /petsc/src/binding/petsc4py/demo/legacy/bratu3d/ |
| H A D | bratu3d.py | 41 mx, my, mz = self.da.getSizes() 42 hx, hy, hz = [1.0/(m-1) for m in [mx, my, mz]] 48 min_k = min(k,mz-k-1)*hz 54 i==mx-1 or j==my-1 or k==mz-1): 68 mx, my, mz = self.da.getSizes() 69 hx, hy, hz = [1.0/m for m in [mx, my, mz]] 81 i==mx-1 or j==my-1 or k==mz-1): 102 mx, my, mz = self.da.getSizes() 103 hx, hy, hz = [1.0/m for m in [mx, my, mz]] 121 i==mx-1 or j==my-1 or k==mz-1):
|
| /petsc/src/ksp/ksp/tutorials/ |
| H A D | ex22f.F90 | 22 PetscInt mx, my, mz 30 …PetscCall(DMDAGetInfo(da, PETSC_NULL_INTEGER, mx, my, mz, PETSC_NULL_INTEGER, PETSC_NULL_INTEGER, … 31 h = 1.0/real((mx - 1)*(my - 1)*(mz - 1)) 42 PetscInt i, j, k, mx, my, mz, xm 52 …PetscCall(DMDAGetInfo(da, PETSC_NULL_INTEGER, mx, my, mz, PETSC_NULL_INTEGER, PETSC_NULL_INTEGER, … 56 Hz = 1.0/real(mz - 1) 68 … if (i == 0 .or. j == 0 .or. k == 0 .or. i == mx - 1 .or. j == my - 1 .or. k == mz - 1) then
|
| H A D | ex34.c | 31 PetscInt i, j, k, mx, my, mz, xm, ym, zm, xs, ys, zs, d, dof; in main() local 63 PetscCall(DMDAGetInfo(da, 0, &mx, &my, &mz, 0, 0, 0, 0, 0, 0, 0, 0, 0)); in main() 66 Hz = 1.0 / (PetscReal)mz; in main() 84 …_COMM_WORLD, "Error norm %g\n", (double)(norm / ((PetscReal)mx * (PetscReal)my * (PetscReal)mz)))); in main() 86 …_COMM_WORLD, "Error norm %g\n", (double)(norm / ((PetscReal)mx * (PetscReal)my * (PetscReal)mz)))); in main() 97 PetscInt d, dof, i, j, k, mx, my, mz, xm, ym, zm, xs, ys, zs; in ComputeRHS() local 105 PetscCall(DMDAGetInfo(da, 0, &mx, &my, &mz, 0, 0, 0, &dof, 0, 0, 0, 0, 0)); in ComputeRHS() 108 Hz = 1.0 / (PetscReal)mz; in ComputeRHS() 135 PetscInt dof, i, j, k, d, mx, my, mz, xm, ym, zm, xs, ys, zs, num, numi, numj, numk; in ComputeMatrix() local 144 PetscCall(DMDAGetInfo(da, 0, &mx, &my, &mz, 0, 0, 0, &dof, 0, 0, 0, 0, 0)); in ComputeMatrix() [all …]
|
| H A D | ex45.c | 76 PetscInt i, j, k, mx, my, mz, xm, ym, zm, xs, ys, zs; in ComputeRHS() local 84 PetscCall(DMDAGetInfo(dm, 0, &mx, &my, &mz, 0, 0, 0, 0, 0, 0, 0, 0, 0)); in ComputeRHS() 87 Hz = 1.0 / (PetscReal)(mz - 1); in ComputeRHS() 97 if (i == 0 || j == 0 || k == 0 || i == mx - 1 || j == my - 1 || k == mz - 1) { in ComputeRHS() 120 PetscInt i, j, k, mx, my, mz, xm, ym, zm, xs, ys, zs; in ComputeMatrix() local 127 PetscCall(DMDAGetInfo(da, 0, &mx, &my, &mz, 0, 0, 0, 0, 0, 0, 0, 0, 0)); in ComputeMatrix() 130 Hz = 1.0 / (PetscReal)(mz - 1); in ComputeMatrix() 142 if (i == 0 || j == 0 || k == 0 || i == mx - 1 || j == my - 1 || k == mz - 1) { in ComputeMatrix()
|
| H A D | ex42.c | 44 PetscInt mx, my, mz; member 53 PetscInt mx, my, mz, sex, sey, sez; in CellPropertiesCreate() local 59 PetscCall(DMDAGetElementsSizes(da_stokes, &mx, &my, &mz)); in CellPropertiesCreate() 62 cells->mz = mz; in CellPropertiesCreate() 63 cells->ncells = mx * my * mz; in CellPropertiesCreate() 68 PetscCall(PetscMalloc1(mx * my * mz, &cells->gpc)); in CellPropertiesCreate() 903 PetscInt sex, sey, sez, mx, my, mz; in AssembleA_Stokes() local 921 PetscCall(DMDAGetElementsSizes(stokes_da, &mx, &my, &mz)); in AssembleA_Stokes() 922 for (ek = sez; ek < sez + mz; ek++) { in AssembleA_Stokes() 989 PetscInt sex, sey, sez, mx, my, mz; in AssembleA_PCStokes() local [all …]
|
| /petsc/src/ksp/ksp/tests/ |
| H A D | ex32.c | 115 PetscInt mx, my, mz; in ComputeRHS() local 119 PetscCall(DMDAGetInfo(da, 0, &mx, &my, &mz, 0, 0, 0, 0, 0, 0, 0, 0, 0)); in ComputeRHS() 120 h = 1.0 / ((mx - 1) * (my - 1) * (mz - 1)); in ComputeRHS() 127 PetscInt i, j, k, mx, my, mz, xm, ym, zm, xs, ys, zs, dof, k1, k2, k3; in ComputeMatrix() local 132 PetscCall(DMDAGetInfo(da, 0, &mx, &my, &mz, 0, 0, 0, &dof, 0, 0, 0, 0, 0)); in ComputeMatrix() 134 …x == mz, PETSC_COMM_SELF, PETSC_ERR_SUP, "This example only works with mx %" PetscInt_FMT " = my %… in ComputeMatrix() 138 Hz = 1.0 / (PetscReal)(mz - 1); in ComputeMatrix() 167 …if (i == 0 || j == 0 || k == 0 || i == mx - 1 || j == my - 1 || k == mz - 1) { /* boundary points … in ComputeMatrix()
|
| /petsc/src/snes/tutorials/ |
| H A D | ex16.c | 197 PetscInt OnBoundary(PetscInt i, PetscInt j, PetscInt k, PetscInt mx, PetscInt my, PetscInt mz) in OnBoundary() argument 203 void BoundaryValue(PetscInt i, PetscInt j, PetscInt k, PetscInt mx, PetscInt my, PetscInt mz, Petsc… in BoundaryValue() argument 208 PetscReal p_z = ((PetscReal)k) / ((PetscReal)(mz - 1)); in BoundaryValue() 416 void GatherElementData(PetscInt mx, PetscInt my, PetscInt mz, Field ***x, CoordField ***c, PetscInt… in GatherElementData() argument 426 if (OnBoundary(i + ii, j + jj, k + kk, mx, my, mz)) { in GatherElementData() 427 BoundaryValue(i + ii, j + jj, k + kk, mx, my, mz, ex[idx], user); in GatherElementData() 560 void ApplyBCsElement(PetscInt mx, PetscInt my, PetscInt mz, PetscInt i, PetscInt j, PetscInt k, Pet… in ApplyBCsElement() argument 572 …if (OnBoundary(i + ii, j + jj, k + kk, mx, my, mz) || OnBoundary(i + ei, j + ej, k + ek, mx, my, m… in ApplyBCsElement() 604 PetscInt mx = info->mx, my = info->my, mz = info->mz; in FormJacobianLocal() local 629 if (zs + zm == mz) zee = zs + zm - 1; in FormJacobianLocal() [all …]
|
| H A D | ex48.c | 764 hx = thi->Lx / info->mz; in THIFunctionLocal() 879 PetscInt i, j, xs, ys, zs, xm, ym, zm, mx, my, mz; in THISurfaceStatistics() local 885 PetscCall(DMDAGetInfo(da, 0, &mz, &my, &mx, 0, 0, 0, 0, 0, 0, 0, 0, 0)); in THISurfaceStatistics() 887 PetscCheck(zs == 0 && zm == mz, PETSC_COMM_SELF, PETSC_ERR_PLIB, "Unexpected decomposition"); in THISurfaceStatistics() 1055 hx = thi->Lx / info->mz; 1299 PetscInt i, j, k, xs, ys, zs, xm, ym, zm, mx, my, mz, rstart, cstart; local 1302 PetscCall(DMDAGetInfo(daf, 0, &mz, &my, &mx, 0, 0, 0, 0, 0, 0, 0, 0, 0)); 1306 PetscCall(MatSetSizes(B, xm * ym * zm, xm * ym, mx * my * mz, mx * my)); 1317 …PetscScalar val = ((k == 0 || k == mz - 1) ? 0.5 : 1.) / (mz - 1.); /* Integration using trapezoid… 1365 PetscInt mx, my, mz, range[6]; local [all …]
|
| /petsc/src/dm/impls/da/ |
| H A D | dalocal.c | 87 const PetscInt mx = (da->Xe - da->Xs) / da->w, my = da->Ye - da->Ys, mz = da->Ze - da->Zs; in DMDAGetNumCells() local 88 const PetscInt nC = (mx) * (dim > 1 ? (my) * (dim > 2 ? (mz) : 1) : 1); in DMDAGetNumCells() 102 *numCellsZ = mz; in DMDAGetNumCells() 147 const PetscInt mx = (da->Xe - da->Xs) / da->w, my = da->Ye - da->Ys, mz = da->Ze - da->Zs; in DMDAGetNumVertices() local 150 const PetscInt nVz = dim > 2 ? (mz + 1) : 1; in DMDAGetNumVertices() 177 const PetscInt mx = (da->Xe - da->Xs) / da->w, my = da->Ye - da->Ys, mz = da->Ze - da->Zs; in DMDAGetNumFaces() local 178 const PetscInt nxF = (dim > 1 ? (my) * (dim > 2 ? (mz) : 1) : 1); in DMDAGetNumFaces() 180 const PetscInt nyF = mx * (dim > 2 ? mz : 1); in DMDAGetNumFaces() 183 const PetscInt nZF = dim > 2 ? (mz + 1) * nzF : 0; in DMDAGetNumFaces()
|
| H A D | dagetelem.c | 245 PetscErrorCode DMDAGetElementsSizes(DM da, PeOp PetscInt *mx, PeOp PetscInt *my, PeOp PetscInt *mz) in DMDAGetElementsSizes() argument 257 if (mz) PetscAssertPointer(mz, 4); in DMDAGetElementsSizes() 270 if (mz) *mz = 0; in DMDAGetElementsSizes() 274 if (mz) *mz = ze - zs - 1; /* fall through */ in DMDAGetElementsSizes()
|
| H A D | dainterp.c | 611 …l, i_start_ghost, j_start_ghost, l_start_ghost, cols[8], mx, m_c, my, n_c, mz, p_c, ratioi, ratioj… in DMCreateInterpolation_DA_3D_Q0() local 624 …PetscCall(DMDAGetInfo(daf, NULL, &mx, &my, &mz, NULL, NULL, NULL, &dof, NULL, NULL, NULL, NULL, NU… in DMCreateInterpolation_DA_3D_Q0() 627 ratiol = mz / Mz; in DMCreateInterpolation_DA_3D_Q0() 630 …PetscCheck(ratiol * Mz == mz, PetscObjectComm((PetscObject)daf), PETSC_ERR_ARG_WRONG, "Fine grid p… in DMCreateInterpolation_DA_3D_Q0() 697 …PetscCall(MatSetSizes(mat, m_f * n_f * p_f, col_scale * m_c * n_c * p_c, mx * my * mz, col_scale *… in DMCreateInterpolation_DA_3D_Q0() 739 PetscInt m_ghost, n_ghost, m_ghost_c, n_ghost_c, Mz, mz; in DMCreateInterpolation_DA_3D_Q1() local 751 …PetscCall(DMDAGetInfo(daf, NULL, &mx, &my, &mz, NULL, NULL, NULL, &dof, NULL, NULL, NULL, NULL, NU… in DMCreateInterpolation_DA_3D_Q1() 774 if (mz == Mz) { in DMCreateInterpolation_DA_3D_Q1() 778 ratiok = mz / Mz; in DMCreateInterpolation_DA_3D_Q1() 779 …k * Mz == mz, PETSC_COMM_SELF, PETSC_ERR_ARG_INCOMP, "Ratio between levels: mz/Mz must be integer… in DMCreateInterpolation_DA_3D_Q1() [all …]
|
| H A D | grvtk.c | 46 PetscInt dim, mx, my, mz, cdim, bs, maxnnodes, maxbs, i, j, k; in DMDAVTKWriteAll_VTS() local 56 …PetscCall(DMDAGetInfo(da, &dim, &mx, &my, &mz, NULL, NULL, NULL, &bs, NULL, NULL, NULL, NULL, NULL… in DMDAVTKWriteAll_VTS() 62 …PetscCheck(csize % (mx * my * mz) == 0, PETSC_COMM_SELF, PETSC_ERR_PLIB, "Coordinate vector size m… in DMDAVTKWriteAll_VTS() 63 cdim = csize / (mx * my * mz); in DMDAVTKWriteAll_VTS() 72 … PetscInt_FMT " %d %" PetscInt_FMT " %d %" PetscInt_FMT "\">\n", 0, mx - 1, 0, my - 1, 0, mz - 1)); in DMDAVTKWriteAll_VTS() 271 PetscInt dim, mx, my, mz, maxnnodes, maxbs, i, j, k; in DMDAVTKWriteAll_VTR() local 281 …PetscCall(DMDAGetInfo(da, &dim, &mx, &my, &mz, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NUL… in DMDAVTKWriteAll_VTR() 286 … PetscInt_FMT " %d %" PetscInt_FMT " %d %" PetscInt_FMT "\">\n", 0, mx - 1, 0, my - 1, 0, mz - 1)); in DMDAVTKWriteAll_VTR()
|
| H A D | daview.c | 171 if (dd->Po < 0) info->mz = dd->P; in DMDAGetLocalInfo() 172 else info->mz = dd->Po; in DMDAGetLocalInfo()
|
| H A D | dadd.c | 373 if (info.bz == DM_BOUNDARY_PERIODIC || (zs + zm != info.mz)) zsize += zol; in DMDASubDomainDA_Private() 394 if (zo + zsize > info.mz - 1) zsize -= zo + zsize - info.mz; in DMDASubDomainDA_Private() 408 PetscCall(DMDASetOffset(da[idx], xo, yo, zo, info.mx, info.my, info.mz)); in DMDASubDomainDA_Private()
|
| /petsc/src/dm/impls/stag/tests/ |
| H A D | ex14.c | 23 PetscInt lz[2] = {2, 4}, ranksz = 2, mz = 6; in main() local 37 …_COMM_WORLD, DM_BOUNDARY_NONE, DM_BOUNDARY_NONE, DM_BOUNDARY_NONE, mx, my, mz, ranksx, ranksy, ran… in main()
|
| H A D | ex1.c | 42 PetscInt lz[2] = {6, 7}, ranksz = 2, mz = 13; in main() local 56 …_COMM_WORLD, DM_BOUNDARY_NONE, DM_BOUNDARY_NONE, DM_BOUNDARY_NONE, mx, my, mz, ranksx, ranksy, ran… in main()
|
| /petsc/include/ |
| H A D | petscdmdatypes.h | 61 PetscInt mx, my, mz; /* global number of grid points in each direction */ member
|
| /petsc/src/snes/tests/ |
| H A D | ex20.c | 135 PetscInt i, j, k, mx, my, mz, xs, ys, zs, xm, ym, zm; in FormFunction() local 147 PetscCall(DMDAGetInfo(da, NULL, &mx, &my, &mz, 0, 0, 0, 0, 0, 0, 0, 0, 0)); in FormFunction() 150 hz = one / (PetscReal)(mz - 1); in FormFunction() 171 if (i > 0 && i < mx - 1 && j > 0 && j < my - 1 && k > 0 && k < mz - 1) { in FormFunction() 243 if (k < mz - 1) { in FormFunction() 291 if (k < mz - 1) { in FormFunction() 328 if (k < mz - 1) { in FormFunction() 365 if (k < mz - 1) { in FormFunction() 403 } else if (k == mz - 1) { in FormFunction() 447 PetscInt i, j, k, mx, my, mz, xs, ys, zs, xm, ym, zm; in FormJacobian() local [all …]
|