Home
last modified time | relevance | path

Searched refs:vres (Results 1 – 8 of 8) sorted by relevance

/petsc/src/ksp/ksp/interface/
H A Ditres.c35 PetscErrorCode KSPInitialResidual(KSP ksp, Vec vsoln, Vec vt1, Vec vt2, Vec vres, Vec vb) in KSPInitialResidual() argument
42 PetscValidHeaderSpecific(vres, VEC_CLASSID, 5); in KSPInitialResidual()
52 PetscCall(PCDiagonalScaleLeft(ksp->pc, vt2, vres)); in KSPInitialResidual()
54 PetscCall(KSP_PCApply(ksp, vt2, vres)); in KSPInitialResidual()
55 PetscCall(PCDiagonalScaleLeft(ksp->pc, vres, vres)); in KSPInitialResidual()
57 PetscCall(PCApplySymmetricLeft(ksp->pc, vt2, vres)); in KSPInitialResidual()
62 PetscCall(PCDiagonalScaleLeft(ksp->pc, vb, vres)); in KSPInitialResidual()
64 PetscCall(KSP_PCApply(ksp, vb, vres)); in KSPInitialResidual()
65 PetscCall(PCDiagonalScaleLeft(ksp->pc, vres, vres)); in KSPInitialResidual()
67 PetscCall(PCApplySymmetricLeft(ksp->pc, vb, vres)); in KSPInitialResidual()
[all …]
/petsc/src/ts/tutorials/hamiltonian/
H A Dex1.c44 PetscScalar *vres; in RHSFunction2() local
48 PetscCall(VecGetArray(Vres, &vres)); in RHSFunction2()
49 vres[0] = -user->omega * user->omega * x[0]; in RHSFunction2()
50 PetscCall(VecRestoreArray(Vres, &vres)); in RHSFunction2()
H A Dex3.c1245 PetscScalar *vres; in RHSFunctionV() local
1262 PetscCall(VecGetArray(Vres, &vres)); in RHSFunctionV()
1265 for (d = 0; d < dim; ++d) vres[p * dim + d] = q_p * E[p * dim + d] / m_p; in RHSFunctionV()
1279 …LD, "Residual: %.12g %.12g\n", (double)PetscRealPart(vres[p * dim + 0]), (double)PetscRealPart(vre… in RHSFunctionV()
1280 …scAbsScalar(vres[p * dim + 1]) < PETSC_SMALL, PETSC_COMM_SELF, PETSC_ERR_PLIB, "Y velocity should … in RHSFunctionV()
1284 PetscCall(VecRestoreArray(Vres, &vres)); in RHSFunctionV()
H A Dex2.c1969 PetscScalar *vres; in RHSFunctionV() local
1986 PetscCall(VecGetArray(Vres, &vres)); in RHSFunctionV()
1989 for (d = 0; d < dim; ++d) vres[p * dim + d] = q_p * E[p * dim + d] / m_p; in RHSFunctionV()
2003 …LD, "Residual: %.12g %.12g\n", (double)PetscRealPart(vres[p * dim + 0]), (double)PetscRealPart(vre… in RHSFunctionV()
2004 …scAbsScalar(vres[p * dim + 1]) < PETSC_SMALL, PETSC_COMM_SELF, PETSC_ERR_PLIB, "Y velocity should … in RHSFunctionV()
2008 PetscCall(VecRestoreArray(Vres, &vres)); in RHSFunctionV()
H A Dex4.c2574 PetscScalar *vres; in RHSFunctionV() local
2591 PetscCall(VecGetArray(Vres, &vres)); in RHSFunctionV()
2594 for (d = 0; d < dim; ++d) vres[p * dim + d] = q_p * E[p * dim + d] / m_p; in RHSFunctionV()
2608 …LD, "Residual: %.12g %.12g\n", (double)PetscRealPart(vres[p * dim + 0]), (double)PetscRealPart(vre… in RHSFunctionV()
2609 …scAbsScalar(vres[p * dim + 1]) < PETSC_SMALL, PETSC_COMM_SELF, PETSC_ERR_PLIB, "Y velocity should … in RHSFunctionV()
2613 PetscCall(VecRestoreArray(Vres, &vres)); in RHSFunctionV()
/petsc/src/dm/impls/swarm/tests/
H A Dex4.c202 PetscScalar *vres; in RHSFunctionV() local
206 PetscCall(VecGetArray(Vres, &vres)); in RHSFunctionV()
209 for (p = 0; p < Np; ++p) vres[p] = -PetscSqr(omega) * x[p]; in RHSFunctionV()
211 PetscCall(VecRestoreArray(Vres, &vres)); in RHSFunctionV()
H A Dex5.c189 PetscScalar *vres; in RHSFunctionV() local
199 PetscCall(VecGetArray(Vres, &vres)); in RHSFunctionV()
207 for (d = 0; d < dim; ++d) vres[p * dim + d] = -PetscSqr(omega) * x[p * dim + d]; in RHSFunctionV()
210 PetscCall(VecRestoreArray(Vres, &vres)); in RHSFunctionV()
H A Dex6.c627 PetscScalar *vres; in RHSFunctionV() local
639 PetscCall(VecGetArray(Vres, &vres)); in RHSFunctionV()
650 for (d = 0; d < dim; ++d) vres[p * dim + d] = E[p * dim + d] - PetscSqr(omega) * x[p * dim + d]; in RHSFunctionV()
653 PetscCall(VecRestoreArray(Vres, &vres)); in RHSFunctionV()