Home
last modified time | relevance | path

Searched refs:nrm (Results 1 – 25 of 46) sorted by relevance

12

/petsc/src/mat/tests/
H A Dex27.c10 PetscReal nrm, tol = 10 * PETSC_SMALL; in main() local
25 PetscCall(MatNorm(A[0], NORM_1, &nrm)); in main()
26 …if (nrm > tol) PetscCall(PetscPrintf(PETSC_COMM_WORLD, "Error: MatNorm(), norm1=: %g\n", (double)n… in main()
34 PetscCall(MatNorm(A[0], NORM_1, &nrm)); in main()
35 …if (nrm > tol) PetscCall(PetscPrintf(PETSC_COMM_WORLD, "Error: MatNorm(), norm1=: %g\n", (double)n… in main()
H A Dex88.c56 PetscReal nrm; in TestMatrix() local
97 PetscCall(VecNorm(W2, NORM_2, &nrm)); in TestMatrix()
99 …PetscCheck(nrm <= PETSC_SMALL, PETSC_COMM_SELF, PETSC_ERR_PLIB, "MatMultAdd(A,x,x,y) produces inco… in TestMatrix()
106 PetscCall(VecNorm(W2, NORM_2, &nrm)); in TestMatrix()
108 …PetscCheck(nrm <= PETSC_SMALL, PETSC_COMM_SELF, PETSC_ERR_PLIB, "MatMultAdd(A,x,y,y) produces inco… in TestMatrix()
119 PetscCall(VecNorm(W2, NORM_2, &nrm)); in TestMatrix()
121 …PetscCheck(nrm <= PETSC_SMALL, PETSC_COMM_SELF, PETSC_ERR_PLIB, "MatMultTransposeAdd(A,x,x,y) prod… in TestMatrix()
128 PetscCall(VecNorm(W2, NORM_2, &nrm)); in TestMatrix()
130 …PetscCheck(nrm <= PETSC_SMALL, PETSC_COMM_SELF, PETSC_ERR_PLIB, "MatMultTransposeAdd(A,x,y,y) prod… in TestMatrix()
142 PetscCall(VecNorm(W3, NORM_2, &nrm)); in TestMatrix()
[all …]
H A Dex239.c12 PetscReal nrm = 1; in main() local
23 PetscCall(VecNorm(output, NORM_2, &nrm)); in main()
24 …PetscCheck(nrm <= PETSC_SMALL, PETSC_COMM_SELF, PETSC_ERR_PLIB, "PETSc generated wrong result. Sho… in main()
/petsc/src/mat/impls/mffd/
H A Dmffddef.c50 PetscReal nrm, sum, umin = hctx->umin; in MatMFFDCompute_DS() local
62 PetscCall(VecNormBegin(a, NORM_2, &nrm)); in MatMFFDCompute_DS()
65 PetscCall(VecNormEnd(a, NORM_2, &nrm)); in MatMFFDCompute_DS()
67 if (nrm == 0.0) { in MatMFFDCompute_DS()
78 *h = dot * ctx->error_rel / (nrm * nrm); in MatMFFDCompute_DS()
79 …s not a number sum = %g dot = %g norm = %g", (double)sum, (double)PetscRealPart(dot), (double)nrm); in MatMFFDCompute_DS()
/petsc/src/mat/tutorials/
H A Dex2.c16 PetscReal nrm; in main() local
108 PetscCall(VecNorm(Z, NORM_2, &nrm)); in main()
109 …if (nrm > 100.0 * PETSC_MACHINE_EPSILON) PetscCall(PetscPrintf(PETSC_COMM_WORLD, "Test1; error nor… in main()
138 PetscCall(VecNorm(Z, NORM_2, &nrm)); in main()
139 …if (nrm > 100.0 * PETSC_MACHINE_EPSILON) PetscCall(PetscPrintf(PETSC_COMM_WORLD, "Test2; error nor… in main()
150 PetscCall(VecNorm(Z, NORM_2, &nrm)); in main()
151 …if (nrm > 100.0 * PETSC_MACHINE_EPSILON) PetscCall(PetscPrintf(PETSC_COMM_WORLD, "Test3; error nor… in main()
/petsc/src/vec/vec/tests/
H A Dex62.c14 PetscReal nrm, ans; in main() local
34 PetscCall(VecNorm(x, NORM_2, &nrm)); in main()
41 …PetscCheck(PetscAbs(nrm - ans) < PETSC_SMALL, PETSC_COMM_WORLD, PETSC_ERR_PLIB, "Diff is too big, … in main()
/petsc/src/dm/tests/
H A Dex32.c8 PetscReal nrm, gnrm; in CompareGhostedCoords() local
14 PetscCall(VecNorm(tmp, NORM_INFINITY, &nrm)); in CompareGhostedCoords()
15 PetscCallMPI(MPIU_Allreduce(&nrm, &gnrm, 1, MPIU_REAL, MPIU_MAX, PETSC_COMM_WORLD)); in CompareGhostedCoords()
H A Dex10k.kokkos.cxx34 PetscReal nrm; in main() local
101 PetscCall(VecNorm(g, NORM_2, &nrm)); in main()
102 PetscCheck(nrm < PETSC_SMALL, PETSC_COMM_WORLD, PETSC_ERR_PLIB, "gg is not equal to g"); in main()
186 PetscCall(VecNorm(g, NORM_2, &nrm)); in main()
187 PetscCheck(nrm < PETSC_SMALL, PETSC_COMM_WORLD, PETSC_ERR_PLIB, "gg is not equal to g"); in main()
H A Dex36.c358 PetscReal nrm; in da_test_RefineCoords1D() local
364 PetscCall(VecNorm(afexact, NORM_2, &nrm)); in da_test_RefineCoords1D()
366 …PetscInt_FMT "=>%" PetscInt_FMT ", interp err = %1.4e\n", mx, Mx, (double)(nrm / PetscSqrtReal((Pe… in da_test_RefineCoords1D()
443 PetscReal nrm; in da_test_RefineCoords2D() local
450 PetscCall(VecNorm(afexact, NORM_2, &nrm)); in da_test_RefineCoords2D()
452 …MT " x %" PetscInt_FMT "], interp err = %1.4e\n", mx, my, Mx, My, (double)(nrm / PetscSqrtReal((Pe… in da_test_RefineCoords2D()
536 PetscReal nrm; in da_test_RefineCoords3D() local
543 PetscCall(VecNorm(afexact, NORM_2, &nrm)); in da_test_RefineCoords3D()
545 …" PetscInt_FMT "], interp err = %1.4e\n", mx, my, mz, Mx, My, Mz, (double)(nrm / PetscSqrtReal((Pe… in da_test_RefineCoords3D()
/petsc/src/vec/vec/utils/
H A Dvinv.c115 PetscErrorCode VecStrideNorm(Vec v, PetscInt start, NormType ntype, PetscReal *nrm) in VecStrideNorm() argument
125 PetscAssertPointer(nrm, 4); in VecStrideNorm()
135 …PetscCallMPI(MPIU_Allreduce(&tnorm, nrm, 1, MPIU_REAL, MPIU_SUM, PetscObjectComm((PetscObject)v))); in VecStrideNorm()
136 *nrm = PetscSqrtReal(*nrm); in VecStrideNorm()
140 …PetscCallMPI(MPIU_Allreduce(&tnorm, nrm, 1, MPIU_REAL, MPIU_SUM, PetscObjectComm((PetscObject)v))); in VecStrideNorm()
146 …PetscCallMPI(MPIU_Allreduce(&tnorm, nrm, 1, MPIU_REAL, MPIU_MAX, PetscObjectComm((PetscObject)v))); in VecStrideNorm()
181 PetscErrorCode VecStrideMax(Vec v, PetscInt start, PetscInt *idex, PetscReal *nrm) in VecStrideMax() argument
190 PetscAssertPointer(nrm, 4); in VecStrideMax()
204 *nrm = max; in VecStrideMax()
208 … PetscCallMPI(MPIU_Allreduce(&max, nrm, 1, MPIU_REAL, MPIU_MAX, PetscObjectComm((PetscObject)v))); in VecStrideMax()
[all …]
/petsc/src/ksp/ksp/impls/gcr/
H A Dgcr.c26 PetscReal norm_r = 0.0, nrm; in KSPSolve_GCR_cycle() local
51 PetscCall(VecDotNorm2(r, v, &r_dot_v, &nrm)); in KSPSolve_GCR_cycle()
52 nrm = PetscSqrtReal(nrm); in KSPSolve_GCR_cycle()
53 r_dot_v = r_dot_v / nrm; in KSPSolve_GCR_cycle()
54 PetscCall(VecScale(v, 1.0 / nrm)); in KSPSolve_GCR_cycle()
55 PetscCall(VecScale(s, 1.0 / nrm)); in KSPSolve_GCR_cycle()
/petsc/src/dm/impls/forest/tests/
H A Dex3.c13 PetscReal nrm; in main() local
135 PetscCall(VecNorm(g2, NORM_INFINITY, &nrm)); in main()
136 …PetscCheck(PetscAbsReal(nrm) <= PETSC_SMALL, PETSC_COMM_WORLD, PETSC_ERR_PLIB, "Invalid difference… in main()
/petsc/src/ksp/ksp/tests/
H A Dex61.c13 PetscReal nrm; in main() local
72 PetscCall(VecNorm(Z, NORM_2, &nrm)); in main()
73 PetscCall(PetscPrintf(PETSC_COMM_SELF, "Test1; error norm=%e\n", (double)nrm)); in main()
/petsc/src/mat/interface/
H A Dmatnull.c389 PetscReal nrm, tol = 10. * PETSC_SQRT_MACHINE_EPSILON; in MatNullSpaceTest() local
415 PetscCall(VecNorm(r, NORM_2, &nrm)); in MatNullSpaceTest()
416 if (nrm >= tol) consistent = PETSC_FALSE; in MatNullSpaceTest()
419 …etscCall(PetscPrintf(PetscObjectComm((PetscObject)sp), "|| A * 1/sqrt(N) || = %g\n", (double)nrm)); in MatNullSpaceTest()
427 PetscCall(VecNorm(l, NORM_2, &nrm)); in MatNullSpaceTest()
428 if (nrm >= tol) consistent = PETSC_FALSE; in MatNullSpaceTest()
431 …Printf(PetscObjectComm((PetscObject)sp), "|| A * v[%" PetscInt_FMT "] || = %g\n", j, (double)nrm)); in MatNullSpaceTest()
/petsc/src/ksp/ksp/tutorials/
H A Dex25.c37 PetscReal nrm; in main() local
62 PetscCall(VecNorm(b2, NORM_MAX, &nrm)); in main()
63 PetscCall(PetscPrintf(PETSC_COMM_WORLD, "Residual norm %g\n", (double)nrm)); in main()
H A Dex29.c246 PetscReal nrm; in ComputeMatrix() local
257 PetscCall(MatNorm(J2, NORM_FROBENIUS, &nrm)); in ComputeMatrix()
258 PetscCall(PetscPrintf(PETSC_COMM_WORLD, "Error MATIS %g\n", (double)nrm)); in ComputeMatrix()
H A Dex34.c285 PetscReal nrm; in ComputeMatrix() local
296 PetscCall(MatNorm(J2, NORM_FROBENIUS, &nrm)); in ComputeMatrix()
297 PetscCall(PetscPrintf(PETSC_COMM_WORLD, "Error MATIS %g\n", (double)nrm)); in ComputeMatrix()
/petsc/src/snes/tutorials/
H A Dex5f.F90334 PetscReal xnorm, snorm, fnorm, nrm
341 call VecNorm(f, NORM_INFINITY, nrm, ierr)
343 if (nrm <= 1.e-5) reason = SNES_CONVERGED_FNORM_ABS
H A Dex7.c406 PetscReal *coef, nrm; in TestFreeField() local
500 PetscCall(VecNorm(etaComp[i], NORM_INFINITY, &nrm)); in TestFreeField()
501 PetscCall(PetscPrintf(PETSC_COMM_SELF, " Slice %" PetscInt_FMT ": %g\n", i, (double)nrm)); in TestFreeField()
509 PetscCall(VecNorm(etaHat, NORM_INFINITY, &nrm)); in TestFreeField()
510 …PetscCheck(nrm < PETSC_SMALL, PetscObjectComm((PetscObject)dm), PETSC_ERR_PLIB, "Free field test f… in TestFreeField()
/petsc/src/tao/unconstrained/tutorials/
H A Dburgers_spectral.c607 PetscReal nrm; in MonitorError() local
613 PetscCall(VecDot(temp, appctx->SEMop.mass, &nrm)); in MonitorError()
615 nrm = PetscSqrtReal(nrm); in MonitorError()
616 PetscCall(PetscPrintf(PETSC_COMM_WORLD, "Error for initial conditions %g\n", (double)nrm)); in MonitorError()
H A Dspectraladjointassimilation.c617 PetscReal nrm; in MonitorError() local
625 PetscCall(VecDot(temp, appctx->SEMop.mass, &nrm)); in MonitorError()
626 nrm = PetscSqrtReal(nrm); in MonitorError()
638 …PetscCall(PetscPrintf(PETSC_COMM_WORLD, "%3" PetscInt_FMT " %g %g %g\n", its, (double)nrm, (double… in MonitorError()
/petsc/src/tao/interface/
H A Dtaosolver_hj.c94 PetscReal nrm, gnorm; in TaoTestHessian() local
153 PetscCall(MatNorm(D, NORM_FROBENIUS, &nrm)); in TaoTestHessian()
157 …viewer, " ||H - Hfd||_F/||H||_F = %g, ||H - Hfd||_F = %g\n", (double)(nrm / gnorm), (double)nrm)); in TaoTestHessian()
/petsc/src/snes/impls/ntrdc/
H A Dntrdc.c35 PetscReal nrm; in SNESTRDC_KSPConverged_Private() local
42 PetscCall(VecNorm(x, NORM_2, &nrm)); in SNESTRDC_KSPConverged_Private()
43 if (nrm >= neP->delta) { in SNESTRDC_KSPConverged_Private()
44 …fo(snes, "Ending linear iteration early, delta=%g, length=%g\n", (double)neP->delta, (double)nrm)); in SNESTRDC_KSPConverged_Private()
/petsc/src/ksp/pc/impls/eisens/
H A Deisen.c29 static PetscErrorCode PCNorm_Eisenstat(Mat mat, NormType type, PetscReal *nrm) in PCNorm_Eisenstat() argument
37 PetscCall(MatNorm(eis->A, type, nrm)); in PCNorm_Eisenstat()
/petsc/src/dm/impls/stag/tutorials/
H A Dex2.c547 PetscReal nrm; in AttachNullspace() local
554 PetscCall(VecNorm(constantPressure, NORM_2, &nrm)); in AttachNullspace()
555 PetscCall(VecScale(constantPressure, 1.0 / nrm)); in AttachNullspace()

12