| /petsc/src/dm/impls/plex/ |
| H A D | plexfvm.c | 7 …const PetscScalar *cellgeom, const PetscFVCellGeom *cg, const PetscScalar *cx, const PetscScalar *… in DMPlexApplyLimiter_Internal() argument 20 …dmCell, lim, dim, dof, cell, field, childFace, fStart, fEnd, cellPhi, x, cellgeom, cg, cx, cgrad)); in DMPlexApplyLimiter_Internal() 47 PetscReal phi, flim = 0.5 * PetscRealPart(ncx[d] - cx[d]) * fact; in DMPlexApplyLimiter_Internal() 88 PetscScalar *cx[2]; in DMPlexReconstructGradients_Internal() local 103 PetscCall(DMPlexPointLocalFieldRead(dm, cells[c], field, x, &cx[c])); in DMPlexReconstructGradients_Internal() 105 PetscCall(DMPlexPointLocalRead(dm, cells[c], x, &cx[c])); in DMPlexReconstructGradients_Internal() 110 PetscScalar delta = cx[1][pd] - cx[0][pd]; in DMPlexReconstructGradients_Internal() 124 PetscScalar *cx; in DMPlexReconstructGradients_Internal() local 132 PetscCall(DMPlexPointLocalFieldRead(dm, cell, field, x, &cx)); in DMPlexReconstructGradients_Internal() 134 PetscCall(DMPlexPointLocalRead(dm, cell, x, &cx)); in DMPlexReconstructGradients_Internal() [all …]
|
| H A D | plexvtu.c | 447 const PetscScalar *x, *cx = NULL; in DMPlexVTKWriteAll_VTU() local 455 if (cellCoords) PetscCall(VecGetArrayRead(cellCoords, &cx)); in DMPlexVTKWriteAll_VTU() 489 y[cnt * 3 + 0] = (PetscVTUReal)PetscRealPart(cx[off + i * dimEmbed + 0]); in DMPlexVTKWriteAll_VTU() 490 … y[cnt * 3 + 1] = (PetscVTUReal)((dimEmbed > 1) ? PetscRealPart(cx[off + i * dimEmbed + 1]) : 0.0); in DMPlexVTKWriteAll_VTU() 495 … for (i = 0; i < dof; i++) y[cnt * 3 + i] = (PetscVTUReal)PetscRealPart(cx[off + i]); in DMPlexVTKWriteAll_VTU() 513 if (cellCoords) PetscCall(VecRestoreArrayRead(cellCoords, &cx)); in DMPlexVTKWriteAll_VTU()
|
| H A D | plexfem.c | 1093 PetscScalar *cx, *cgrad; in DMPlexInsertBoundaryValuesRiemann() local 1099 PetscCall(DMPlexPointLocalRead(dm, cells[0], x, &cx)); in DMPlexInsertBoundaryValuesRiemann() 1103 for (d = 0; d < pdim; ++d) fx[d] = cx[d] + DMPlex_DotD_Internal(dim, &cgrad[d * dim], dx); in DMPlexInsertBoundaryValuesRiemann()
|
| /petsc/src/dm/tutorials/ |
| H A D | swarm_ex1.c | 292 PetscReal cx[2]; member 315 sep2 = (array_x[p] - zone->cx[0]) * (array_x[p] - zone->cx[0]); in collect_zone() 316 sep2 += (array_y[p] - zone->cx[1]) * (array_y[p] - zone->cx[1]); in collect_zone() 325 sep2 = (array_x[p] - zone->cx[0]) * (array_x[p] - zone->cx[0]); in collect_zone() 326 sep2 += (array_y[p] - zone->cx[1]) * (array_y[p] - zone->cx[1]); in collect_zone() 412 zone->cx[0] = 0.5; in ex1_4() 413 zone->cx[1] = 0.5; in ex1_4() 417 zone->cx[0] = -0.5; in ex1_4() 418 zone->cx[1] = 0.5; in ex1_4() 422 zone->cx[0] = 0.5; in ex1_4() [all …]
|
| H A D | swarm_ex3.c | 221 PetscReal cx, cy, vx, vy; in ex3_1() local 223 cx = array[2 * p]; in ex3_1() 226 vy = -cx; in ex3_1()
|
| /petsc/src/dm/interface/ |
| H A D | dmceed.c | 47 PetscErrorCode VecGetCeedVector(Vec X, Ceed ceed, CeedVector *cx) in VecGetCeedVector() argument 56 PetscCallCEED(CeedVectorCreate(ceed, n, cx)); in VecGetCeedVector() 57 PetscCallCEED(CeedVectorSetArray(*cx, PetscMemType2Ceed(memtype), CEED_USE_POINTER, x)); in VecGetCeedVector() 61 PetscErrorCode VecRestoreCeedVector(Vec X, CeedVector *cx) in VecRestoreCeedVector() argument 65 PetscCallCEED(CeedVectorDestroy(cx)); in VecRestoreCeedVector() 69 PetscErrorCode VecGetCeedVectorRead(Vec X, Ceed ceed, CeedVector *cx) in VecGetCeedVectorRead() argument 78 PetscCallCEED(CeedVectorCreate(ceed, n, cx)); in VecGetCeedVectorRead() 79 …PetscCallCEED(CeedVectorSetArray(*cx, PetscMemType2Ceed(memtype), CEED_USE_POINTER, (PetscScalar *… in VecGetCeedVectorRead() 83 PetscErrorCode VecRestoreCeedVectorRead(Vec X, CeedVector *cx) in VecRestoreCeedVectorRead() argument 87 PetscCallCEED(CeedVectorDestroy(cx)); in VecRestoreCeedVectorRead()
|
| /petsc/src/ksp/ksp/tutorials/ |
| H A D | ex77.c | 8 Vec cx, cb; /* columns of X and B */ in main() local 117 PetscCall(VecCreateFromOptions(PETSC_COMM_WORLD, NULL, 1, m * N, M, &cx)); in main() 121 PetscCall(KSPSolve(ksp, cb, cx)); in main() 122 PetscCall(VecDestroy(&cx)); in main()
|
| H A D | ex49.c | 156 PetscScalar cx = coords[2 * i + 0]; in ConstructQ12D_GNx() local 159 J00 = J00 + GNi[0][i] * cx; /* J_xx = dx/dxi */ in ConstructQ12D_GNx() 161 J10 = J10 + GNi[1][i] * cx; /* J_yx = dx/deta */ in ConstructQ12D_GNx()
|
| H A D | ex70.c | 79 PetscScalar cx = coords[2 * i]; in EvaluateDerivatives() local 82 J00 += dN[0][i] * cx; /* J_xx = dx/dxi */ in EvaluateDerivatives() 84 J10 += dN[1][i] * cx; /* J_yx = dx/deta */ in EvaluateDerivatives()
|
| H A D | ex42.c | 189 PetscScalar cx = coords[NSD * n + 0]; in ShapeFunctionQ13D_Evaluate_dx() local 194 J00 = J00 + GNi[0][n] * cx; /* J_xx */ in ShapeFunctionQ13D_Evaluate_dx() 198 J10 = J10 + GNi[1][n] * cx; /* J_yx = dy/dxi */ in ShapeFunctionQ13D_Evaluate_dx() 202 J20 = J20 + GNi[2][n] * cx; /* J_zx */ in ShapeFunctionQ13D_Evaluate_dx()
|
| H A D | ex43.c | 151 PetscScalar cx = coords[2 * i]; in ConstructQ12D_GNx() local 154 J00 = J00 + GNi[0][i] * cx; /* J_xx = dx/dxi */ in ConstructQ12D_GNx() 156 J10 = J10 + GNi[1][i] * cx; /* J_yx = dx/deta */ in ConstructQ12D_GNx()
|
| /petsc/src/ts/tutorials/advection-diffusion-reaction/ |
| H A D | ex4.c | 141 PetscScalar rho, c, rhoxx, cxx, cx, rhox, kcxrhox; in IFunction() local 197 cx = .5 * (u[i + 1].c - u[i - 1].c) / hx; in IFunction() 198 kcxrhox = appctx->kappa * (cxx * rho + cx * rhox); in IFunction()
|
| /petsc/src/ts/tutorials/ |
| H A D | ex11.h | 588 static PetscScalar s, c0, p0, r0, u0, w0, x0, x2, ri, cx, sgn0, wsp0, gasc1, gasc2, gasc3, gasc4; in riemannsolver() local 645 cx = sgn0 * .5 * gasc1 / gasc2 * ((*xp - *xcen) / *dtt - ri); in riemannsolver() 646 *uxm = ri + sgn0 * 2. * gasc4 * cx; in riemannsolver() 648 d__1 = cx * cx / (*gam * s); in riemannsolver() 650 *px = cx * cx * *rx / *gam; in riemannsolver()
|
| H A D | ex18.c | 922 PetscScalar *cx; in MonitorFunctionals() local 925 PetscCall(DMPlexPointGlobalFieldRead(dm, c, 1, x, &cx)); in MonitorFunctionals() 926 if (!cx) continue; /* not a global cell */ in MonitorFunctionals() 933 PetscCall((*func->func)(dm, time, cg->centroid, cx, ftmp, func->ctx)); in MonitorFunctionals()
|
| H A D | ex11.c | 992 const PetscScalar *cx = NULL; in MonitorVTK() local 998 PetscCall(DMPlexPointGlobalRead(dm, c, x, &cx)); in MonitorVTK() 1000 if (!vtkVal || !cx) continue; /* ghost, or not a global cell */ in MonitorVTK() 1003 PetscCall((*flink->func)(mod, time, cg->centroid, cx, ftmp, flink->ctx)); in MonitorVTK()
|
| /petsc/src/ksp/pc/interface/ |
| H A D | precon.c | 538 Vec cy, cx; in PCMatApplyTranspose_Private() local 575 PetscCall(MatDenseGetColumnVecRead(X, n1, &cx)); in PCMatApplyTranspose_Private() 577 if (!transpose) PetscCall(PCApply(pc, cx, cy)); in PCMatApplyTranspose_Private() 578 else PetscCall(PCApplyTranspose(pc, cx, cy)); in PCMatApplyTranspose_Private() 580 PetscCall(MatDenseRestoreColumnVecRead(X, n1, &cx)); in PCMatApplyTranspose_Private()
|
| /petsc/src/dm/impls/plex/tests/ |
| H A D | ex3.c | 665 PetscScalar cx[3] = {0., 0., 0.}; in TestFVGrad() local 669 cx[v] = 1.; in TestFVGrad() 673 cx[(w + 1) % dim] = cg->centroid[(w + 2) % dim]; in TestFVGrad() 674 cx[(w + 2) % dim] = -cg->centroid[(w + 1) % dim]; in TestFVGrad() 676 PetscCall(DMPlexVecSetClosure(dmfv, NULL, locX, c, cx, INSERT_ALL_VALUES)); in TestFVGrad()
|
| /petsc/src/ksp/ksp/interface/ |
| H A D | itfunc.c | 1203 Vec cb, cx; in KSPMatSolve_Private() local 1291 PetscCall(MatDenseGetColumnVecWrite(X, n2, &cx)); in KSPMatSolve_Private() 1292 PetscCall(KSPSolve_Private(ksp, cb, cx)); in KSPMatSolve_Private() 1293 PetscCall(MatDenseRestoreColumnVecWrite(X, n2, &cx)); in KSPMatSolve_Private()
|
| /petsc/src/snes/tutorials/ |
| H A D | ex16.c | 882 PetscReal cx = ((PetscReal)i) / ((PetscReal)(mx - 1)); in FormCoordinates() local 886 PetscReal ang = (cx - 0.5) * user->arc; in FormCoordinates()
|
| /petsc/src/mat/impls/aij/seq/seqhipsparse/ |
| H A D | aijhipsparse.hip.cxx | 3263 Mat_SeqAIJHIPSPARSE *cx; in MatAXPY_SeqAIJHIPSPARSE() local 3270 cx = (Mat_SeqAIJHIPSPARSE *)X->spptr; in MatAXPY_SeqAIJHIPSPARSE() 3280 …PetscCheck(cx->format == MAT_HIPSPARSE_CSR, PetscObjectComm((PetscObject)X), PETSC_ERR_GPU, "only … in MatAXPY_SeqAIJHIPSPARSE() 3282 csrx = (CsrMatrix *)cx->mat->mat; in MatAXPY_SeqAIJHIPSPARSE() 3302 …PetscCallHIPSPARSE(hipsparse_csr_spgeam_bufferSize(cy->handle, Y->rmap->n, Y->cmap->n, &a, cx->mat… in MatAXPY_SeqAIJHIPSPARSE() 3306 …PetscCallHIPSPARSE(hipsparse_csr_spgeam(cy->handle, Y->rmap->n, Y->cmap->n, &a, cx->mat->descr, x-… in MatAXPY_SeqAIJHIPSPARSE() 3313 …PetscCallHIPSPARSE(hipsparse_csr_spgeam(cy->handle, Y->rmap->n, Y->cmap->n, &a, cx->mat->descr, x-… in MatAXPY_SeqAIJHIPSPARSE()
|
| /petsc/src/mat/impls/aij/seq/seqcusparse/ |
| H A D | aijcusparse.cu | 3870 Mat_SeqAIJCUSPARSE *cx; in MatAXPY_SeqAIJCUSPARSE() local 3877 cx = (Mat_SeqAIJCUSPARSE *)X->spptr; in MatAXPY_SeqAIJCUSPARSE() 3887 …PetscCheck(cx->format == MAT_CUSPARSE_CSR, PetscObjectComm((PetscObject)X), PETSC_ERR_GPU, "only M… in MatAXPY_SeqAIJCUSPARSE() 3889 csrx = (CsrMatrix *)cx->mat->mat; in MatAXPY_SeqAIJCUSPARSE() 3910 …PetscCallCUSPARSE(cusparse_csr_spgeam_bufferSize(cy->handle, Y->rmap->n, Y->cmap->n, &a, cx->mat->… in MatAXPY_SeqAIJCUSPARSE() 3914 …PetscCallCUSPARSE(cusparse_csr_spgeam(cy->handle, Y->rmap->n, Y->cmap->n, &a, cx->mat->descr, x->n… in MatAXPY_SeqAIJCUSPARSE() 3921 …PetscCallCUSPARSE(cusparse_csr_spgeam(cy->handle, Y->rmap->n, Y->cmap->n, &a, cx->mat->descr, x->n… in MatAXPY_SeqAIJCUSPARSE()
|
| /petsc/share/petsc/datafiles/meshes/ |
| H A D | testcase3D.cas | 5356 (sol/cx 0.2) 8850 (cx-virtual-id-list (4196 4197 4198 4199)) 8851 (cx-surface-id-map ((3 4199) (2 4198) (1 4197) (0 4196))) 8852 (cx-surface-type ((0 0) (1 0) (2 0) (3 0))) 8853 (cx-surface-def-list ((4199 () (zone-surface 4199 5) #f) (4198 () (zone-surface 4198 6) #f) (4197 (… 8854 (cx-surface-list #((0 ((face-color #f) (edge-color #f) (zid 8) (type zone-surf) (name slab) (status… 8859 (cx-case-version (24 1 0)))))
|