Home
last modified time | relevance | path

Searched refs:vc (Results 1 – 18 of 18) sorted by relevance

/petsc/src/dm/impls/stag/tests/
H A Dex20.c27 Vec vc, vf; in main() local
32 PetscCall(MatCreateVecs(Ai, &vc, &vf)); in main()
33 PetscCall(VecSet(vc, 1.0)); in main()
34 PetscCall(MatMult(Ai, vc, vf)); in main()
39 PetscCall(VecDestroy(&vc)); in main()
44 Vec vf, vc; in main() local
49 PetscCall(MatCreateVecs(Ar, &vf, &vc)); in main()
51 PetscCall(MatMult(Ar, vf, vc)); in main()
52 PetscCall(VecGetSize(vc, &size)); in main()
53 PetscCall(VecNorm(vc, NORM_1, &norm)); in main()
[all …]
/petsc/src/ts/tutorials/advection-diffusion-reaction/
H A Dreaction_diffusion.c33 PetscScalar uc, uxx, uyy, vc, vxx, vyy; in RHSFunction() local
74 vc = u[j][i].v; in RHSFunction()
75 vxx = (-2.0 * vc + u[j][i - 1].v + u[j][i + 1].v) * sx; in RHSFunction()
76 vyy = (-2.0 * vc + u[j - 1][i].v + u[j + 1][i].v) * sy; in RHSFunction()
77 f[j][i].u = appctx->D1 * (uxx + uyy) - uc * vc * vc + appctx->gamma * (1.0 - uc); in RHSFunction()
78 f[j][i].v = appctx->D2 * (vxx + vyy) + uc * vc * vc - (appctx->gamma + appctx->kappa) * vc; in RHSFunction()
98 PetscScalar uc, vc; in RHSJacobian() local
154 vc = u[j][i].v; in RHSJacobian()
177 entries[4] = -2.0 * appctx->D1 * (sx + sy) - vc * vc - appctx->gamma; in RHSJacobian()
180 entries[5] = -2.0 * uc * vc; in RHSJacobian()
[all …]
H A Dex5adj_mf.c65 PetscScalar uc, uxx, uyy, vc, vxx, vyy, ucb, vcb; in MyRHSMatMultTranspose() local
102 vc = u[j][i].v; in MyRHSMatMultTranspose()
106 y[j][i].u = appctx->D1 * (uxx + uyy) - ucb * (vc * vc + appctx->gamma) + vc * vc * vcb; in MyRHSMatMultTranspose()
107 …y[j][i].v = appctx->D2 * (vxx + vyy) - 2.0 * uc * vc * ucb + (2.0 * uc * vc - appctx->gamma - appc… in MyRHSMatMultTranspose()
124 PetscScalar uc, uxx, uyy, vc, vxx, vyy, ucb, vcb; in MyIMatMultTranspose() local
161 vc = u[j][i].v; in MyIMatMultTranspose()
165 y[j][i].u = appctx->D1 * (uxx + uyy) - ucb * (vc * vc + appctx->gamma) + vc * vc * vcb; in MyIMatMultTranspose()
166 …y[j][i].v = appctx->D2 * (vxx + vyy) - 2.0 * uc * vc * ucb + (2.0 * uc * vc - appctx->gamma - appc… in MyIMatMultTranspose()
185 PetscScalar uc, uxx, uyy, vc, vxx, vyy, ucb, vcb; in MyIMatMult() local
222 vc = u[j][i].v; in MyIMatMult()
[all …]
/petsc/src/ts/tutorials/autodiff/
H A Dadr_ex5adj.cxx365 PetscScalar uc, uxx, uyy, vc, vxx, vyy; in IFunctionLocalPassive() local
385 vc = u[j][i].v; in IFunctionLocalPassive()
386 vxx = (-2.0 * vc + u[j][i - 1].v + u[j][i + 1].v) * sx; in IFunctionLocalPassive()
387 vyy = (-2.0 * vc + u[j - 1][i].v + u[j + 1][i].v) * sy; in IFunctionLocalPassive()
388 … f[j][i].u = udot[j][i].u - appctx->D1 * (uxx + uyy) + uc * vc * vc - appctx->gamma * (1.0 - uc); in IFunctionLocalPassive()
389 …].v = udot[j][i].v - appctx->D2 * (vxx + vyy) - uc * vc * vc + (appctx->gamma + appctx->kappa) * v… in IFunctionLocalPassive()
405 adouble uc, uxx, uyy, vc, vxx, vyy; in IFunctionActive() local
481 vc = u_a[j][i].v; in IFunctionActive()
482 vxx = (-2.0 * vc + u_a[j][i - 1].v + u_a[j][i + 1].v) * sx; in IFunctionActive()
483 vyy = (-2.0 * vc + u_a[j - 1][i].v + u_a[j + 1][i].v) * sy; in IFunctionActive()
[all …]
H A Dadr_ex5adj_mf.cxx253 PetscScalar uc, uxx, uyy, vc, vxx, vyy; in IFunctionLocalPassive() local
273 vc = u[j][i].v; in IFunctionLocalPassive()
274 vxx = (-2.0 * vc + u[j][i - 1].v + u[j][i + 1].v) * sx; in IFunctionLocalPassive()
275 vyy = (-2.0 * vc + u[j - 1][i].v + u[j + 1][i].v) * sy; in IFunctionLocalPassive()
276 … f[j][i].u = udot[j][i].u - appctx->D1 * (uxx + uyy) + uc * vc * vc - appctx->gamma * (1.0 - uc); in IFunctionLocalPassive()
277 …].v = udot[j][i].v - appctx->D2 * (vxx + vyy) - uc * vc * vc + (appctx->gamma + appctx->kappa) * v… in IFunctionLocalPassive()
293 adouble uc, uxx, uyy, vc, vxx, vyy; in IFunctionActive() local
369 vc = u_a[j][i].v; in IFunctionActive()
370 vxx = (-2.0 * vc + u_a[j][i - 1].v + u_a[j][i + 1].v) * sx; in IFunctionActive()
371 vyy = (-2.0 * vc + u_a[j - 1][i].v + u_a[j + 1][i].v) * sy; in IFunctionActive()
[all …]
/petsc/src/ts/tests/
H A Dex24.c22 PetscScalar uc, vc; in RHSJacobian() local
78 vc = u[j][i].v; in RHSJacobian()
101 entries[4] = -2.0 * appctx->D1 * (sx + sy) - vc * vc - appctx->gamma; in RHSJacobian()
104 entries[5] = -2.0 * uc * vc; in RHSJacobian()
118 entries[4] = -2.0 * appctx->D2 * (sx + sy) + 2.0 * uc * vc - appctx->gamma - appctx->kappa; in RHSJacobian()
120 entries[5] = vc * vc; in RHSJacobian()
/petsc/src/mat/tests/
H A Dex47.c10 PetscViewer va, vb, vc; in main() local
40 PetscCall(PetscViewerBinaryOpen(PETSC_COMM_WORLD, file, FILE_MODE_READ, &vc)); in main()
44 PetscCall(MatLoad(C, vc)); in main()
45 PetscCall(PetscViewerDestroy(&vc)); in main()
/petsc/src/dm/dt/tests/
H A Dex16.c56 PetscInt vc = coffset + c * c_stride; in PetscFEVectorTest() local
58 const PetscReal *v_Tc = &v_Tp[vc * dblock]; in PetscFEVectorTest()
/petsc/src/ksp/ksp/utils/dm/
H A Ddmproject.c255 Vec vc, vf; in DMAdaptInterpolator() local
261 PetscCall(MatDenseGetColumnVecRead(MC, k, &vc)); in DMAdaptInterpolator()
262 PetscCall(PetscObjectSetName((PetscObject)vc, name)); in DMAdaptInterpolator()
263 PetscCall(VecViewFromOptions(vc, NULL, "-dm_adapt_interp_view_coarse")); in DMAdaptInterpolator()
264 PetscCall(MatDenseRestoreColumnVecRead(MC, k, &vc)); in DMAdaptInterpolator()
400 Vec vc, vf; in DMCheckInterpolator() local
402 PetscCall(MatDenseGetColumnVecRead(MC, k, &vc)); in DMCheckInterpolator()
404 PetscCall(MatMult(In, vc, tmp)); in DMCheckInterpolator()
406 PetscCall(VecViewFromOptions(vc, NULL, "-dm_interpolator_adapt_error")); in DMCheckInterpolator()
414 PetscCall(MatDenseRestoreColumnVecRead(MC, k, &vc)); in DMCheckInterpolator()
/petsc/src/ksp/ksp/impls/cg/pipecg2/
H A Dpipecg2.c82 …MergedOpsShort_Private(Vec vx, Vec vr, Vec vz, Vec vw, Vec vp, Vec vq, Vec vc, Vec vd, Vec vg0, Ve… in VecMergedOpsShort_Private() argument
96 PetscCall(VecGetArray(vc, (PetscScalar **)&pc)); in VecMergedOpsShort_Private()
286 PetscCall(VecRestoreArray(vc, (PetscScalar **)&pc)); in VecMergedOpsShort_Private()
304 static PetscErrorCode VecMergedOps_Private(Vec vx, Vec vr, Vec vz, Vec vw, Vec vp, Vec vq, Vec vc, … in VecMergedOps_Private() argument
318 PetscCall(VecGetArray(vc, (PetscScalar **)&pc)); in VecMergedOps_Private()
515 PetscCall(VecRestoreArray(vc, (PetscScalar **)&pc)); in VecMergedOps_Private()
/petsc/src/ts/tutorials/hamiltonian/
H A Dex3.c530 const PetscInt vc = vcStart + q; in InitializeParticles_Centroid() local
533 PetscCall(DMPlexComputeCellGeometryFVM(vdm, vc, &vvolume, vcentroid, NULL)); in InitializeParticles_Centroid()
643 for (PetscInt vc = vcStart; vc < vcEnd; ++vc) { in InitializeWeights() local
644 const PetscInt p = pidx[vc * Ns + 0]; in InitializeWeights()
651 PetscCall(DMPlexGetCellCoordinates(vdm, vc, &visDG, &vNc, &varray, &vcoords)); in InitializeWeights()
652 …scInt_FMT " has invalid coordinates (vNc=%" PetscInt_FMT ", dim=%" PetscInt_FMT ")", vc, vNc, dim); in InitializeWeights()
672 PetscCall(DMPlexRestoreCellCoordinates(vdm, vc, &visDG, &vNc, &varray, &vcoords)); in InitializeWeights()
H A Dex2.c1340 for (PetscInt vc = vcStart; vc < vcEnd; ++vc) { in InitializeWeights() local
1341 const PetscInt p = pidx[vc * Ns + 0]; in InitializeWeights()
1348 PetscCall(DMPlexGetCellCoordinates(vdm, vc, &visDG, &vNc, &varray, &vcoords)); in InitializeWeights()
1357 PetscCall(DMPlexRestoreCellCoordinates(vdm, vc, &visDG, &vNc, &varray, &vcoords)); in InitializeWeights()
H A Dex4.c1954 for (PetscInt vc = vcStart; vc < vcEnd; ++vc) { in InitializeWeights() local
1955 const PetscInt p = pidx[vc * Ns + 0]; in InitializeWeights()
1962 PetscCall(DMPlexGetCellCoordinates(vdm, vc, &visDG, &vNc, &varray, &vcoords)); in InitializeWeights()
1971 PetscCall(DMPlexRestoreCellCoordinates(vdm, vc, &visDG, &vNc, &varray, &vcoords)); in InitializeWeights()
/petsc/src/dm/impls/network/
H A Dnetwork.c2470 PetscInt nedges, *vptr = NULL, vc, *rows_v; /* suppress maybe-uninitialized warning */ in DMCreateMatrix_Network() local
2576 vc = (v == cone[0]) ? cone[1] : cone[0]; in DMCreateMatrix_Network()
2577 PetscCall(DMNetworkIsGhostVertex(dm, vc, &ghost_vc)); in DMCreateMatrix_Network()
2579 PetscCall(PetscSectionGetDof(network->DofSection, vc, &ncols)); in DMCreateMatrix_Network()
2688 vc = (v == cone[0]) ? cone[1] : cone[0]; in DMCreateMatrix_Network()
2690 PetscCall(DMNetworkGetGlobalVecOffset(dm, vc, ALL_COMPONENTS, &cstart)); in DMCreateMatrix_Network()
2691 PetscCall(PetscSectionGetDof(network->DofSection, vc, &ncols)); in DMCreateMatrix_Network()
/petsc/src/mat/impls/aij/seq/
H A Daij.c2275 PetscScalar vc, vr; in MatIsTranspose_SeqAIJ() local
2279 vc = va[aptr[i]]; in MatIsTranspose_SeqAIJ()
2281 if (i != idr || PetscAbsScalar(vc - vr) > tol) { in MatIsTranspose_SeqAIJ()
2327 PetscScalar vc, vr; in MatIsHermitianTranspose_SeqAIJ() local
2331 vc = va[aptr[i]]; in MatIsHermitianTranspose_SeqAIJ()
2333 if (i != idr || PetscAbsScalar(vc - PetscConj(vr)) > tol) { in MatIsHermitianTranspose_SeqAIJ()
/petsc/share/petsc/datafiles/meshes/
H A Dtestcase3D.cas1351 (vc-fvar/dual-ts-cycle-type 0)
1352 (vc-fvar/dual-ts-implicit-relax 0.9)
1353 (vc-fvar/dual-ts-minmax-eff-relax (0.01 1.))
1354 (vc-fvar/dual-ts-limit-eff-relax? #f)
3068 (vc-fvar/default 0)
3069 (vc-fvar/patch 0)
3070 (vc-fvar/amg-stabilization 0)
3071 (vc-fvar/amg-method 0)
3072 (vc-fvar/cycle-type 0)
3073 (vc-fvar/amg-beta 0.7)
[all …]
/petsc/src/dm/impls/plex/
H A Dplexcreate.c1322 const PetscInt vc = firstVertex + numXVertices * numYVertices + ey * numXEdges + ex; in DMPlexCreateSquareMesh_Simplex_CrissCross() local
1334 const PetscInt verts[] = {v0, vc, v1, vc, v2, vc, v3, vc}; in DMPlexCreateSquareMesh_Simplex_CrissCross()
/petsc/src/ksp/pc/impls/bddc/
H A Dbddcprivate.c666 PetscInt ord = order, test = ii[i + 1] - ii[i], vc = vcount[i]; in PCBDDCNedelecSupport() local
683 if (vc != ecount[e]) { in PCBDDCNedelecSupport()
688 for (PetscInt k = 0; k < vc; k++) { in PCBDDCNedelecSupport()