Home
last modified time | relevance | path

Searched +full:- +full:m (Results 1 – 25 of 1083) sorted by relevance

12345678910>>...44

/petsc/src/dm/impls/da/
H A Dda3.c13 DM_DA *dd = (DM_DA *)da->data; in DMView_DA_3d()
50 …PetscCall(PetscViewerASCIIPrintf(viewer, " Load Balance - Grid Points: Min %" PetscInt_FMT " avg… in DMView_DA_3d()
56M %" PetscInt_FMT " N %" PetscInt_FMT " P %" PetscInt_FMT " m %" PetscInt_FMT " n %" PetscInt_FMT … in DMView_DA_3d()
66 last = last - 3; in DMView_DA_3d()
76 PetscReal ymin = -1.0, ymax = (PetscReal)dd->N; in DMView_DA_3d()
77 PetscReal xmin = -1.0, xmax = (PetscReal)((dd->M + 2) * dd->P), x, y, ycoord, xcoord; in DMView_DA_3d()
94 for (k = 0; k < dd->P; k++) { in DMView_DA_3d()
96 ymax = (PetscReal)(dd->N - 1); in DMView_DA_3d()
97 …for (xmin = (PetscReal)(k * (dd->M + 1)); xmin < (PetscReal)(dd->M + (k * (dd->M + 1))); xmin++) P… in DMView_DA_3d()
98 xmin = (PetscReal)(k * (dd->M + 1)); in DMView_DA_3d()
[all …]
H A Dda1.c13 DM_DA *dd = (DM_DA *)da->data; in DMView_DA_1d()
48 …PetscCall(PetscViewerASCIIPrintf(viewer, " Load Balance - Grid Points: Min %" PetscInt_FMT " avg… in DMView_DA_1d()
55 …r, "Processor [%d] M %" PetscInt_FMT " m %" PetscInt_FMT " w %" PetscInt_FMT " s %" PetscInt_FMT "… in DMView_DA_1d()
62 double ymin = -1, ymax = 1, xmin = -1, xmax = dd->M, x; in DMView_DA_1d()
81 …for (xmin_tmp = 0; xmin_tmp < dd->M; xmin_tmp++) PetscCall(PetscDrawLine(draw, (double)xmin_tmp, y… in DMView_DA_1d()
83 xmax = dd->M - 1; in DMView_DA_1d()
95 xmin = dd->xs / dd->w; in DMView_DA_1d()
96 xmax = (dd->xe / dd->w) - 1; in DMView_DA_1d()
102 base = dd->base / dd->w; in DMView_DA_1d()
125 DM_DA *dd = (DM_DA *)da->data; in DMSetUp_DA_1D()
[all …]
H A Dda2.c8 DM_DA *dd = (DM_DA *)da->data; in DMView_DA_2d()
43 …PetscCall(PetscViewerASCIIPrintf(viewer, " Load Balance - Grid Points: Min %" PetscInt_FMT " avg… in DMView_DA_2d()
50M %" PetscInt_FMT " N %" PetscInt_FMT " m %" PetscInt_FMT " n %" PetscInt_FMT " w %" PetscInt_FMT … in DMView_DA_2d()
57 double ymin = -1 * dd->s - 1, ymax = dd->N + dd->s; in DMView_DA_2d()
58 double xmin = -1 * dd->s - 1, xmax = dd->M + dd->s; in DMView_DA_2d()
77 ymax = dd->N - 1; in DMView_DA_2d()
78 …for (xmin = 0; xmin < dd->M; xmin++) PetscCall(PetscDrawLine(draw, xmin, ymin, xmin, ymax, PETSC_D… in DMView_DA_2d()
80 xmax = dd->M - 1; in DMView_DA_2d()
81 …for (ymin = 0; ymin < dd->N; ymin++) PetscCall(PetscDrawLine(draw, xmin, ymin, xmax, ymin, PETSC_D… in DMView_DA_2d()
89 xmin = dd->xs / dd->w; in DMView_DA_2d()
[all …]
/petsc/src/mat/tests/
H A Dex226.c1 static char help[] = "Benchmark for MatMatMult() of AIJ matrices using different 2d finite-differen…
5 /* Converts 3d grid coordinates (i,j,k) for a grid of size m \times n to global indexing. Pass k = …
6 PetscInt global_index(PetscInt i, PetscInt j, PetscInt k, PetscInt m, PetscInt n) in global_index() argument
8 return i + j * m + k * m * n; in global_index()
14 PetscInt i, M, N, Istart, Iend, n = 7, j, J, Ii, m = 8, k, o = 1; in main() local
22 PetscCall(PetscOptionsGetInt(NULL, NULL, "-m", &m, NULL)); in main()
23 PetscCall(PetscOptionsGetInt(NULL, NULL, "-n", &n, NULL)); in main()
24 PetscCall(PetscOptionsGetInt(NULL, NULL, "-o", &o, NULL)); in main()
25 PetscCall(PetscOptionsHasName(NULL, NULL, "-result_view", &mat_view)); in main()
26 PetscCall(PetscOptionsGetString(NULL, NULL, "-stencil", stencil, sizeof(stencil), NULL)); in main()
[all …]
H A Dex246.cxx6 static PetscErrorCode GenEntries(PetscInt sdim, PetscInt M, PetscInt N, const PetscInt *J, const Pe… in GenEntries() argument
12 for (j = 0; j < M; j++) { in GenEntries()
15 … d < sdim; d++) diff += (coords[J[j] * sdim + d] - coords[K[k] * sdim + d]) * (coords[J[j] * sdim … in GenEntries()
16 ptr[j + M * k] = 1.0 / (1.0e-2 + PetscSqrtReal(diff)); in GenEntries()
29 …virtual void copy_submatrix(PetscInt M, PetscInt N, const PetscInt *J, const PetscInt *K, PetscSca… in copy_submatrix() argument
34 …for (PetscInt j = 0; j < M; j++) /* could be optimized by the user how they see fit, e.g., vectori… in copy_submatrix()
37 … d < sdim; d++) diff += (coords[J[j] * sdim + d] - coords[K[k] * sdim + d]) * (coords[J[j] * sdim … in copy_submatrix()
38 ptr[j + M * k] = 1.0 / (1.0e-2 + PetscSqrtReal(diff)); in copy_submatrix()
47 PetscInt m = 100, dim = 3, M, begin = 0; in main() local
57 PetscCall(PetscOptionsGetInt(NULL, NULL, "-m_local", &m, NULL)); in main()
[all …]
/petsc/src/ts/tests/
H A Dex4.c3 Solve the convection-diffusion equation:
9 u = exp(-20.0*(pow(x-0.5,2.0)+pow(y-0.5,2.0))) at t=0
16 static char help[] = "Solve the convection-diffusion equation. \n\n";
21 PetscInt m; /* the number of mesh points in x-direction */ member
22 PetscInt n; /* the number of mesh points in y-direction */
23 PetscReal dx; /* the grid space in x-direction */
24 PetscReal dy; /* the grid space in y-direction */
60 data.m = 9; in main()
64 data.dx = 1.0 / (data.m + 1.0); in main()
66 mn = (data.m) * (data.n); in main()
[all …]
/petsc/src/ksp/ksp/tutorials/output/
H A Dex21_1.out3 0: ||M*A - I|| NORM2 abs 0.999692 rel 1.
4 1: ||M*A - I|| NORM2 abs 0.999647 rel 0.999956
5 2: ||M*A - I|| NORM2 abs 0.999715 rel 1.00002
6 3: ||M*A - I|| NORM2 abs 0.999848 rel 1.00016
7 4: ||M*A - I|| NORM2 abs 0.999899 rel 1.00021
8 5: ||M*A - I|| NORM2 abs 0.999856 rel 1.00016
9 6: ||M*A - I|| NORM2 abs 0.999789 rel 1.0001
10 7: ||M*A - I|| NORM2 abs 0.999662 rel 0.99997
11 8: ||M*A - I|| NORM2 abs 0.999398 rel 0.999706
12 9: ||M*A - I|| NORM2 abs 0.99895 rel 0.999259
[all …]
H A Dex21_2.out3 0: ||M*A - I|| NORM2 abs 0.999692 rel 1.
4 1: ||M*A - I|| NORM2 abs 0.999715 rel 1.00002
5 2: ||M*A - I|| NORM2 abs 0.999899 rel 1.00021
6 3: ||M*A - I|| NORM2 abs 0.999789 rel 1.0001
7 4: ||M*A - I|| NORM2 abs 0.999398 rel 0.999706
8 5: ||M*A - I|| NORM2 abs 0.998234 rel 0.998542
9 6: ||M*A - I|| NORM2 abs 0.994504 rel 0.994811
10 7: ||M*A - I|| NORM2 abs 0.9799 rel 0.980202
11 8: ||M*A - I|| NORM2 abs 0.92246 rel 0.922744
12 9: ||M*A - I|| NORM2 abs 0.724701 rel 0.724924
[all …]
/petsc/src/ksp/ksp/tests/
H A Dex3.c4 -m <size> : problem size\n\n";
6 /* Addendum: piggy-backing on this example to test KSPChebyshev methods */
14 Ke[1] = -.125 * H; in FormElementStiffness()
16 Ke[3] = -.125 * H; in FormElementStiffness()
17 Ke[4] = -.125 * H; in FormElementStiffness()
19 Ke[6] = -.125 * H; in FormElementStiffness()
22 Ke[9] = -.125 * H; in FormElementStiffness()
24 Ke[11] = -.125 * H; in FormElementStiffness()
25 Ke[12] = -.125 * H; in FormElementStiffness()
27 Ke[14] = -.125 * H; in FormElementStiffness()
[all …]
H A Dex4.c2 -m <size> : problem size\n\n";
9 Ke[1] = -.125 * H; in FormElementStiffness()
11 Ke[3] = -.125 * H; in FormElementStiffness()
12 Ke[4] = -.125 * H; in FormElementStiffness()
14 Ke[6] = -.125 * H; in FormElementStiffness()
17 Ke[9] = -.125 * H; in FormElementStiffness()
19 Ke[11] = -.125 * H; in FormElementStiffness()
20 Ke[12] = -.125 * H; in FormElementStiffness()
22 Ke[14] = -.125 * H; in FormElementStiffness()
40 PetscInt i, m = 2, N, M, its, idx[4], count, *rows; in main() local
[all …]
/petsc/src/ksp/ksp/tutorials/
H A Dex3.c4 -m <size> : problem size\n\n";
9 petscsys.h - base PETSc routines petscvec.h - vectors
10 petscmat.h - matrices
11 petscis.h - index sets petscksp.h - Krylov subspace methods
12 petscviewer.h - viewers petscpc.h - preconditioners
16 /* Declare user-defined routines */
26 PetscInt M; /* number of elements (global) */ in main() local
34 PetscInt idx[4], count, *rows, i, m = 5, start, end, its; in main() local
38 PetscCall(PetscOptionsGetInt(NULL, NULL, "-m", &m, NULL)); in main()
39 N = (m + 1) * (m + 1); in main()
[all …]
H A Dex77.c3 static char help[] = "Solves a linear system with a block of right-hand sides using KSPHPDDM.\n\n";
14 PetscReal norm, deflation = -1.0; in main()
15 PetscInt m, M, N = 5, i; in main() local
27 PetscCall(PetscOptionsGetString(NULL, NULL, "-f", name, sizeof(name), &flg)); in main()
29 PetscCall(PetscOptionsGetInt(NULL, NULL, "-N", &N, NULL)); in main()
30 PetscCall(PetscOptionsGetBool(NULL, NULL, "-breakdown", &breakdown, NULL)); in main()
31 PetscCall(PetscOptionsGetReal(NULL, NULL, "-ksp_hpddm_deflation_tol", &deflation, NULL)); in main()
39 …PetscCall(PetscOptionsFList("-mat_type", "Matrix type", "MatSetType", MatList, deft, type, 256, &f… in main()
48 PetscCall(MatGetSize(A, &M, NULL)); in main()
50 if (rank > 1) PetscCall(MatSetSizes(B, 0, 0, M, M)); in main()
[all …]
/petsc/src/ksp/ksp/utils/lmvm/dense/
H A Dcd_utils.c15 Mat_LMVM *lmvm = (Mat_LMVM *)B->data; in VecCyclicShift()
16 PetscInt m = lmvm->m; in VecCyclicShift() local
36 PetscCall(PetscArraycpy(dest, &src[d], m - d)); in VecCyclicShift()
37 PetscCall(PetscArraycpy(&dest[m - d], src, d)); in VecCyclicShift()
42 PetscCall(PetscDeviceRegisterMemory(dest, dest_memtype, m * sizeof(*dest))); in VecCyclicShift()
43 PetscCall(PetscDeviceRegisterMemory(src, src_memtype, m * sizeof(*src))); in VecCyclicShift()
44 PetscCall(PetscDeviceArrayCopy(dctx, dest, &src[d], m - d)); in VecCyclicShift()
45 PetscCall(PetscDeviceArrayCopy(dctx, &dest[m - d], src, d)); in VecCyclicShift()
52 static inline PetscInt recycle_index(PetscInt m, PetscInt idx) in recycle_index() argument
54 return idx % m; in recycle_index()
[all …]
/petsc/src/dm/impls/patch/tests/output/
H A Dex1_3.out3 Processor [0] M 4 N 4 m 2 n 2 w 1 s 1
5 Processor [1] M 4 N 4 m 2 n 2 w 1 s 1
7 Processor [2] M 4 N 4 m 2 n 2 w 1 s 1
9 Processor [3] M 4 N 4 m 2 n 2 w 1 s 1
11 Patch 0: (0, 0, 0)--(2, 2, 1)
12 Processor [0] M 3 N 3 m 2 n 2 w 1 s 0
14 Processor [1] M 3 N 3 m 2 n 2 w 1 s 0
16 Processor [2] M 3 N 3 m 2 n 2 w 1 s 0
18 Processor [3] M 3 N 3 m 2 n 2 w 1 s 0
23 [0] 0 <- (0,0)
[all …]
/petsc/src/ts/tutorials/autodiff/adolc-utils/
H A Ddrivers.cxx8 REQUIRES configuration of PETSc with option --download-adolc.
10 For documentation on ADOL-C, see
11 $PETSC_ARCH/externalpackages/ADOL-C-2.6.0/ADOL-C/doc/adolc-manual.pdf
14 /* --------------------------------------------------------------------------------
16 ----------------------------------------------------------------------------- */
21 assembled (not recommended for non-toy problems!).
24 tag - tape identifier
25 u_vec - vector at which to evaluate Jacobian
26 ctx - ADOL-C context, as defined above
29 A - Mat object corresponding to Jacobian
[all …]
/petsc/src/dm/tutorials/output/
H A Dex19_1.out1 1D -- DM_BOUNDARY_NONE
4 Processor [0] M 8 m 1 w 1 s 1
6 1D -- DM_BOUNDARY_GHOSTED
9 Processor [0] M 8 m 1 w 2 s 1
11 1D -- DM_BOUNDARY_PERIODIC
14 Processor [0] M 8 m 1 w 2 s 1
16 2D -- DM_BOUNDARY_NONE
19 Processor [0] M 8 N 8 m 1 n 1 w 2 s 1
21 2D -- DM_BOUNDARY_GHOSTED
24 Processor [0] M 8 N 8 m 1 n 1 w 2 s 1
[all …]
/petsc/src/mat/impls/sbaij/mpi/
H A Dmpiaijsbaij.c12 Mat M; in MatConvert_MPIAIJ_MPISBAIJ() local
13 Mat_MPIAIJ *mpimat = (Mat_MPIAIJ *)A->data; in MatConvert_MPIAIJ_MPISBAIJ()
15 PetscInt m, n, lm, ln, bs = A->rmap->bs; in MatConvert_MPIAIJ_MPISBAIJ() local
19 const PetscBool3 symmetric = A->symmetric, hermitian = A->hermitian, spd = A->spd; in MatConvert_MPIAIJ_MPISBAIJ()
22 PetscCall(MatGetSize(A, &m, &n)); in MatConvert_MPIAIJ_MPISBAIJ()
24 PetscCall(MatConvert_SeqAIJ_SeqSBAIJ_Preallocate(mpimat->A, &d_nnz)); in MatConvert_MPIAIJ_MPISBAIJ()
25 PetscCall(MatConvert_SeqAIJ_SeqBAIJ_Preallocate(mpimat->B, &o_nnz)); in MatConvert_MPIAIJ_MPISBAIJ()
26 PetscCall(MatCreate(PetscObjectComm((PetscObject)A), &M)); in MatConvert_MPIAIJ_MPISBAIJ()
27 PetscCall(MatSetSizes(M, lm, ln, m, n)); in MatConvert_MPIAIJ_MPISBAIJ()
28 PetscCall(MatSetType(M, MATMPISBAIJ)); in MatConvert_MPIAIJ_MPISBAIJ()
[all …]
/petsc/src/tao/leastsquares/tutorials/
H A Dcs1.c5 petsc.h - base PETSc routines petscvec.h - vectors
6 petscsys.h - system routines petscmat.h - matrices
7 petscis.h - index sets petscksp.h - Krylov subspace methods
8 petscviewer.h - viewers petscpc.h - preconditioners
16 0.5*||Ax-b||^2 + lambda*||D*x||_1
22 static char help[] = "Finds the least-squares solution to the under constraint linear model Ax = b,…
23 A is a M*N real matrix (M<N), x is sparse. \n\
24 …We find the sparse solution by solving 0.5*||Ax-b||^2 + lambda*||D*x||_1, where lambda (by default…
27 #define M 3 macro
37 /* User-defined application context */
[all …]
/petsc/src/dm/impls/stag/tests/output/
H A Dex50_dim-3_coords-true.out3 Processor [0] M 4 N 3 P 3 m 1 n 1 p 1 w 3 s 1
5 Lower left corner -1. -2. -3. : Upper right 1. 2. 3.
118 Processor [0] M 4 N 3 P 3 m 1 n 1 p 1 w 1 s 1
120 Lower left corner -1. -2. -3. : Upper right 1. 2. 3.
161 Processor [0] M 4 N 3 P 3 m 1 n 1 p 1 w 1 s 1
163 Lower left corner -1. -2. -3. : Upper right 1. 2. 3.
204 Processor [0] M 4 N 3 P 2 m 1 n 1 p 1 w 3 s 1
206 Lower left corner -1. -2. -3. : Upper right 1. 2. 0.
283 Processor [0] M 4 N 3 P 2 m 1 n 1 p 1 w 1 s 1
285 Lower left corner -1. -2. -3. : Upper right 1. 2. 0.
[all …]
/petsc/src/ksp/pc/impls/h2opus/
H A Dpch2opus.c13 Mat M; member
16 /* sampler for Newton-Schultz */
31 /* Newton-Schultz customization */
54 PC_H2OPUS *pch2opus = (PC_H2OPUS *)pc->data; in PCH2OpusInferCoordinates_Private()
59 if (pch2opus->sdim) PetscFunctionReturn(PETSC_SUCCESS); in PCH2OpusInferCoordinates_Private()
61 if (!dm) PetscCall(MatGetDM(pc->useAmat ? pc->mat : pc->pmat, &dm)); in PCH2OpusInferCoordinates_Private()
80 PC_H2OPUS *pch2opus = (PC_H2OPUS *)pc->data; in PCReset_H2OPUS()
83 pch2opus->sdim = 0; in PCReset_H2OPUS()
84 pch2opus->nlocc = 0; in PCReset_H2OPUS()
85 PetscCall(PetscFree(pch2opus->coords)); in PCReset_H2OPUS()
[all …]
/petsc/src/binding/petsc4py/demo/legacy/bratu2d/
H A Dbratu2df90.f903 ! $$ f2py -m bratu2df90 -c bratu2df90.f90
5 subroutine bratu2d (m, n, alpha, x, f) argument
6 !f2py intent(hide) :: m = shape(x,0)
8 integer :: m, n local
10 real(kind=8), intent(in), target :: x(m,n)
11 real(kind=8), intent(inout) :: f(m,n)
15 ! setup 5-points stencil
16 u => x(2:m-1, 2:n-1) ! center
17 uN => x(2:m-1, 1:n-2) ! north
18 uS => x(2:m-1, 3:n ) ! south
[all …]
/petsc/src/ksp/pc/impls/deflation/
H A Ddeflationspace.c5 PetscScalar db4[] = {-0.12940952255092145, 0.22414386804185735, 0.836516303737469, 0.48296291314469…
7 PetscScalar db8[] = {-0.010597401784997278, 0.032883011666982945, 0.030841381835986965, -0.18703481…
9-0.00011747678400228192, 0.0006754494059985568, -0.0003917403729959771, -0.00487035299301066, 0.…
10 …0.128747426620186, 0.00047248457399797254, -0.2840155429624281, -0.015829105256023893, 0.…
12 PetscScalar biorth22[] = {0.0, -0.1767766952966369, 0.3535533905932738, 1.0606601717798214, 0.35355…
14-1.009999956941423e-12, 8.519459636796214e-09, -1.111944952595278e-08, -1.0798819539621958e-08, 6.…
16 static PetscErrorCode PCDeflationCreateSpaceWave(MPI_Comm comm, PetscInt m, PetscInt n, PetscInt M,… in PCDeflationCreateSpaceWave() argument
25 PetscCall(MatSetSizes(defl, m, n, M, N)); in PCDeflationCreateSpaceWave()
33 k = ncoeffs - 2; in PCDeflationCreateSpaceWave()
38 Iidx[i] = i + ilo * 2 - k; in PCDeflationCreateSpaceWave()
[all …]
/petsc/src/ksp/pc/tests/
H A Dex6.c2 -m <size> : problem size\n\
3 -x1, -x2 <size> : no of subdomains in x and y directions\n\n";
11 Ke[1] = -.125 * H; in FormElementStiffness()
13 Ke[3] = -.125 * H; in FormElementStiffness()
14 Ke[4] = -.125 * H; in FormElementStiffness()
16 Ke[6] = -.125 * H; in FormElementStiffness()
19 Ke[9] = -.125 * H; in FormElementStiffness()
21 Ke[11] = -.125 * H; in FormElementStiffness()
22 Ke[12] = -.125 * H; in FormElementStiffness()
24 Ke[14] = -.125 * H; in FormElementStiffness()
[all …]
/petsc/src/mat/impls/baij/mpi/
H A Dmpiaijbaij.c10 Mat M; in MatConvert_MPIAIJ_MPIBAIJ() local
11 Mat_MPIAIJ *mpimat = (Mat_MPIAIJ *)A->data; in MatConvert_MPIAIJ_MPIBAIJ()
13 PetscInt m, n, lm, ln, bs = A->rmap->bs; in MatConvert_MPIAIJ_MPIBAIJ() local
18 …PetscBool3 sym = A->symmetric, hermitian = A->hermitian, structurally_symmetric = A->structurally_… in MatConvert_MPIAIJ_MPIBAIJ()
20 PetscCall(MatGetSize(A, &m, &n)); in MatConvert_MPIAIJ_MPIBAIJ()
22 PetscCall(MatConvert_SeqAIJ_SeqBAIJ_Preallocate(mpimat->A, &d_nnz)); in MatConvert_MPIAIJ_MPIBAIJ()
23 PetscCall(MatConvert_SeqAIJ_SeqBAIJ_Preallocate(mpimat->B, &o_nnz)); in MatConvert_MPIAIJ_MPIBAIJ()
24 PetscCall(MatCreate(PetscObjectComm((PetscObject)A), &M)); in MatConvert_MPIAIJ_MPIBAIJ()
25 PetscCall(MatSetSizes(M, lm, ln, m, n)); in MatConvert_MPIAIJ_MPIBAIJ()
26 PetscCall(MatSetType(M, MATMPIBAIJ)); in MatConvert_MPIAIJ_MPIBAIJ()
[all …]
/petsc/src/ts/tests/output/
H A Dex21_2_bdf_ngmres_fas_ngs.out3 Processor [0] M 17 N 17 m 1 n 2 w 1 s 1
5 Processor [1] M 17 N 17 m 1 n 2 w 1 s 1
9 Processor [0] M 17 N 17 m 1 n 2 w 2 s 1
11 Processor [1] M 17 N 17 m 1 n 2 w 2 s 1
16 Processor [0] M 9 N 9 m 1 n 2 w 1 s 1
18 Processor [1] M 9 N 9 m 1 n 2 w 1 s 1
22 Processor [0] M 9 N 9 m 1 n 2 w 2 s 1
24 Processor [1] M 9 N 9 m 1 n 2 w 2 s 1
28 Processor [0] M 5 N 5 m 1 n 2 w 1 s 1
30 Processor [1] M 5 N 5 m 1 n 2 w 1 s 1
[all …]

12345678910>>...44