Lines Matching +full:- +full:m

6 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()
58 PetscCall(PetscOptionsGetInt(NULL, NULL, "-dim", &dim, NULL)); in main()
59 PetscCall(PetscOptionsGetBool(NULL, NULL, "-symmetric", &sym, NULL)); in main()
60 PetscCall(PetscOptionsGetReal(NULL, NULL, "-mat_htool_epsilon", &epsilon, NULL)); in main()
62 M = size * m; in main()
63 PetscCall(PetscOptionsGetInt(NULL, NULL, "-M", &M, NULL)); in main()
64 PetscCall(PetscMalloc1(m * dim, &coords)); in main()
66 PetscCall(PetscRandomGetValuesReal(rdm, m * dim, coords)); in main()
67 PetscCall(PetscCalloc1(M * dim, &gcoords)); in main()
68 PetscCallMPI(MPI_Exscan(&m, &begin, 1, MPIU_INT, MPI_SUM, PETSC_COMM_WORLD)); in main()
69 PetscCall(PetscArraycpy(gcoords + begin * dim, coords, m * dim)); in main()
70 …PetscCallMPI(MPIU_Allreduce(MPI_IN_PLACE, gcoords, M * dim, MPIU_REAL, MPI_SUM, PETSC_COMM_WORLD)); in main()
72 …l(MatCreateHtoolFromKernel(PETSC_COMM_WORLD, m, m, M, M, dim, coords, coords, NULL, imatrix, &A));… in main()
77 PetscCall(MatViewFromOptions(A, NULL, "-A_view")); in main()
78 …(MatCreateHtoolFromKernel(PETSC_COMM_WORLD, m, m, M, M, dim, coords, coords, kernel, gcoords, &B))… in main()
83 PetscCall(MatViewFromOptions(B, NULL, "-B_view")); in main()
89 PetscCall(MatAXPY(R, -1.0, P, SAME_NONZERO_PATTERN)); in main()
91 …m / relative) <= epsilon, PETSC_COMM_WORLD, PETSC_ERR_PLIB, "||A(!symmetric)-A(symmetric)|| = %g (… in main()
112 args: -m_local 120 -mat_htool_epsilon 1.0e-2
114 args: -symmetric
116 args: -mat_htool_block_tree_consistency false