Home
last modified time | relevance | path

Searched refs:cval (Results 1 – 25 of 42) sorted by relevance

12

/petsc/src/mat/impls/sbaij/seq/
H A Dsbaij2.c293 PetscInt mbs = a->mbs, i, n, cval, j, jmin; in MatMult_SeqSBAIJ_2() local
323 cval = ib[j] * 2; in MatMult_SeqSBAIJ_2()
324 z[cval] += v[0] * x1 + v[1] * x2; in MatMult_SeqSBAIJ_2()
325 z[cval + 1] += v[2] * x1 + v[3] * x2; in MatMult_SeqSBAIJ_2()
327 z[2 * i] += v[0] * x[cval] + v[2] * x[cval + 1]; in MatMult_SeqSBAIJ_2()
328 z[2 * i + 1] += v[1] * x[cval] + v[3] * x[cval + 1]; in MatMult_SeqSBAIJ_2()
347 PetscInt mbs = a->mbs, i, n, cval, j, jmin; in MatMult_SeqSBAIJ_3() local
379 cval = ib[j] * 3; in MatMult_SeqSBAIJ_3()
380 z[cval] += v[0] * x1 + v[1] * x2 + v[2] * x3; in MatMult_SeqSBAIJ_3()
381 z[cval + 1] += v[3] * x1 + v[4] * x2 + v[5] * x3; in MatMult_SeqSBAIJ_3()
[all …]
/petsc/src/binding/petsc4py/src/petsc4py/PETSc/
H A DObject.pyx104 cdef const char *cval = NULL
105 CHKERR(PetscObjectGetType(self.obj[0], &cval))
106 return bytes2str(cval)
120 cdef const char *cval = NULL
121 prefix = str2bytes(prefix, &cval)
122 CHKERR(PetscObjectSetOptionsPrefix(self.obj[0], cval))
134 cdef const char *cval = NULL
135 CHKERR(PetscObjectGetOptionsPrefix(self.obj[0], &cval))
136 return bytes2str(cval)
148 cdef const char *cval = NULL
[all …]
H A DMatPartitioning.pyx96 cdef PetscMatPartitioningType cval = NULL
97 matpartitioning_type = str2bytes(matpartitioning_type, &cval)
98 CHKERR(MatPartitioningSetType(self.part, cval))
110 cdef PetscMatPartitioningType cval = NULL
111 CHKERR(MatPartitioningGetType(self.part, &cval))
112 return bytes2str(cval)
H A DPC.pyx303 cdef PetscPCType cval = NULL
304 pc_type = str2bytes(pc_type, &cval)
305 CHKERR(PCSetType(self.pc, cval))
317 cdef PetscPCType cval = NULL
318 CHKERR(PCGetType(self.pc, &cval))
319 return bytes2str(cval)
336 cdef const char *cval = NULL
337 prefix = str2bytes(prefix, &cval)
338 CHKERR(PCSetOptionsPrefix(self.pc, cval))
350 cdef const char *cval = NULL
[all …]
H A DPartitioner.pyx96 cdef PetscPartitionerType cval = NULL
97 part_type = str2bytes(part_type, &cval)
98 CHKERR(PetscPartitionerSetType(self.part, cval))
110 cdef PetscPartitionerType cval = NULL
111 CHKERR(PetscPartitionerGetType(self.part, &cval))
112 return bytes2str(cval)
H A DDMSwarm.pyx127 cdef const char *cval = NULL
133 str2bytes(fieldnames[i], &cval)
134 cfieldnames[i] = cval
154 cdef const char *cval = NULL
160 str2bytes(fieldnames[i], &cval)
161 cfieldnames[i] = cval
227 cdef const char *cval = NULL
233 str2bytes(fieldnames[i], &cval)
234 cfieldnames[i] = cval
254 cdef const char *cval = NULL
[all …]
H A DRandom.pyx108 cdef PetscRandomType cval = NULL
109 rnd_type = str2bytes(rnd_type, &cval)
110 CHKERR(PetscRandomSetType(self.rnd, cval))
122 cdef PetscRandomType cval = NULL
123 CHKERR(PetscRandomGetType(self.rnd, &cval))
124 return bytes2str(cval)
H A DDS.pyx91 cdef PetscDSType cval = NULL
92 ds_type = str2bytes(ds_type, &cval)
93 CHKERR(PetscDSSetType(self.ds, cval))
105 cdef PetscDSType cval = NULL
106 CHKERR(PetscDSGetType(self.ds, &cval))
107 return bytes2str(cval)
H A DRegressor.pyx208 cdef PetscRegressorType cval = NULL
209 regressor_type = str2bytes(regressor_type, &cval)
210 CHKERR(PetscRegressorSetType(self.regressor, cval))
313 cdef PetscRegressorLinearType cval = REGRESSOR_LINEAR_OLS
314 CHKERR(PetscRegressorLinearGetType(self.regressor, &cval))
315 return cval
H A DDM.pyx188 cdef PetscDMType cval = NULL
189 dm_type = str2bytes(dm_type, &cval)
190 CHKERR(DMSetType(self.dm, cval))
202 cdef PetscDMType cval = NULL
203 CHKERR(DMGetType(self.dm, &cval))
204 return bytes2str(cval)
280 cdef const char *cval = NULL
281 prefix = str2bytes(prefix, &cval)
282 CHKERR(DMSetOptionsPrefix(self.dm, cval))
294 cdef const char *cval = NULL
[all …]
H A DViewer.pyx445 cdef PetscViewerType cval = NULL
446 vwr_type = str2bytes(vwr_type, &cval)
447 CHKERR(PetscViewerSetType(self.vwr, cval))
459 cdef PetscViewerType cval = NULL
460 CHKERR(PetscViewerGetType(self.vwr, &cval))
461 return bytes2str(cval)
857 cdef const char *cval = NULL
858 name = str2bytes(name, &cval)
859 CHKERR(PetscViewerFileSetName(self.vwr, cval))
871 cdef const char *cval = NULL
[all …]
H A DScatter.pyx156 cdef PetscScatterType cval = NULL
157 scatter_type = str2bytes(scatter_type, &cval)
158 CHKERR(VecScatterSetType(self.sct, cval))
170 cdef PetscScatterType cval = NULL
171 CHKERR(VecScatterGetType(self.sct, &cval))
172 return bytes2str(cval)
H A DLog.pyx326 cdef const char *cval = NULL
327 CHKERR(PetscLogStageFindName(self.id, &cval))
328 return bytes2str(cval)
478 cdef const char *cval = NULL
479 CHKERR(PetscLogClassFindName(self.id, &cval))
480 return bytes2str(cval)
599 cdef const char *cval = NULL
600 CHKERR(PetscLogEventFindName(self.id, &cval))
601 return bytes2str(cval)
H A DTS.pyx277 cdef PetscTSType cval = NULL
278 ts_type = str2bytes(ts_type, &cval)
279 CHKERR(TSSetType(self.ts, cval))
300 cdef PetscTSRKType cval = NULL
301 ts_type = str2bytes(ts_type, &cval)
302 CHKERR(TSRKSetType(self.ts, cval))
323 cdef PetscTSARKIMEXType cval = NULL
324 ts_type = str2bytes(ts_type, &cval)
325 CHKERR(TSARKIMEXSetType(self.ts, cval))
372 cdef PetscTSType cval = NULL
[all …]
H A DSpace.pyx237 cdef PetscSpaceType cval = NULL
238 CHKERR(PetscSpaceGetType(self.space, &cval))
239 return bytes2str(cval)
256 cdef PetscSpaceType cval = NULL
257 space_type = str2bytes(space_type, &cval)
258 CHKERR(PetscSpaceSetType(self.space, cval))
754 cdef PetscDualSpaceType cval = NULL
755 CHKERR(PetscDualSpaceGetType(self.dualspace, &cval))
756 return bytes2str(cval)
773 cdef PetscDualSpaceType cval = NULL
[all …]
H A DDMDA.pyx695 cdef const char *cval = NULL
696 name = str2bytes(name, &cval)
697 CHKERR(DMDASetFieldName(self.dm, ival, cval))
717 cdef const char *cval = NULL
718 CHKERR(DMDAGetFieldName(self.dm, ival, &cval))
719 return bytes2str(cval)
806 cdef const char *cval = NULL
807 name = str2bytes(name, &cval)
808 CHKERR(DMDASetCoordinateName(self.dm, ival, cval))
826 cdef const char *cval = NULL
[all …]
H A DKSP.pyx515 cdef PetscKSPType cval = NULL
516 ksp_type = str2bytes(ksp_type, &cval)
517 CHKERR(KSPSetType(self.ksp, cval))
529 cdef PetscKSPType cval = NULL
530 CHKERR(KSPGetType(self.ksp, &cval))
531 return bytes2str(cval)
567 cdef const char *cval = NULL
568 prefix = str2bytes(prefix, &cval)
569 CHKERR(KSPSetOptionsPrefix(self.ksp, cval))
581 cdef const char *cval = NULL
[all …]
/petsc/src/dm/impls/plex/tests/
H A Dex26.c314 PetscScalar *cval, *xyz; in main() local
319 PetscCall(VecGetArray(UALoc, &cval)); in main()
332 cval[offUA + sdim] = 0.; in main()
334 cval[offUA + i] = 0; in main()
335 for (j = 0; j < clSize / sdim; ++j) cval[offUA + i] += xyz[j * sdim + i]; in main()
336 cval[offUA + i] = cval[offUA + i] * sdim / clSize; in main()
337 cval[offUA + sdim] += PetscSqr(cval[offUA + i]); in main()
342 PetscCall(VecRestoreArray(UALoc, &cval)); in main()
421 PetscScalar *cval = NULL, *xyz = NULL; in main() local
428 PetscCall(DMPlexVecGetClosure(dmS, NULL, S, cellID[cell], &clSize, &cval)); in main()
[all …]
H A Dex64.c217 PetscScalar *cval, *xyz; in main() local
222 PetscCall(VecGetArray(UALoc, &cval)); in main()
235 cval[offUA + sdim] = 0.; in main()
237 cval[offUA + i] = 0; in main()
238 for (j = 0; j < clSize / sdim; ++j) cval[offUA + i] += xyz[j * sdim + i]; in main()
239 cval[offUA + i] = cval[offUA + i] * sdim / clSize; in main()
240 cval[offUA + sdim] += PetscSqr(cval[offUA + i]); in main()
245 PetscCall(VecRestoreArray(UALoc, &cval)); in main()
313 PetscScalar *cval, *xyz; in main() local
318 PetscCall(VecGetArray(UALoc, &cval)); in main()
[all …]
H A Dex26f90.F9066 PetscScalar, dimension(:), pointer :: cval, xyz
351 PetscCallA(VecGetArray(UALoc, cval, ierr))
364 cval(offUA + i) = cval(offUA + i) + xyz(j/sdim + i)
366 cval(offUA + i) = cval(offUA + i)*sdim/closureSize
367 cval(offUA + sdim + 1) = cval(offUA + sdim + 1) + cval(offUA + i)**2
373 PetscCallA(VecRestoreArray(UALoc, cval, ierr))
449 …allA(DMPlexVecGetClosure(dmS, PETSC_NULL_SECTION, S, cellID(cell), PETSC_NULL_INTEGER, cval, ierr))
451 cval(1) = rank
452 cval(2) = csID(set)
453 cval(3) = 0.0_kPR
[all …]
H A Dex62f90.F9049 PetscScalar, dimension(:), pointer :: cval, xyz
335 PetscCallA(VecGetArray(UALoc, cval, ierr))
348 cval(offUA + i) = cval(offUA + i) + xyz(j/sdim + i)
350 cval(offUA + i) = cval(offUA + i)*sdim/closureSize
351 cval(offUA + sdim + 1) = cval(offUA + sdim + 1) + cval(offUA + i)**2
357 PetscCallA(VecRestoreArray(UALoc, cval, ierr))
433 …allA(DMPlexVecGetClosure(dmS, PETSC_NULL_SECTION, S, cellID(cell), PETSC_NULL_INTEGER, cval, ierr))
435 cval(1) = rank
436 cval(2) = csID(set)
437 cval(3) = 0.0_kPR
[all …]
/petsc/src/binding/petsc4py/src/petsc4py/include/petsc4py/
H A Dpyscalar.h27 Py_complex cval = PyComplex_AsCComplex(o); in PyPetscScalar_AsPetscScalar()
28 PetscReal a = (PetscReal)cval.real; in PyPetscScalar_AsPetscScalar()
29 PetscReal b = (PetscReal)cval.imag; in PyPetscScalar_AsPetscScalar()
/petsc/src/dm/impls/plex/generators/ctetgen/
H A Dctetgenerate.c253 PetscInt cval = b, eVal, fVal; in DMPlexGenerate_CTetgen() local
256 PetscCall(DMLabelSetValue(bodyLabel, c, cval)); in DMPlexGenerate_CTetgen()
263 if (eVal < 0) PetscCall(DMLabelSetValue(bodyLabel, p, cval)); in DMPlexGenerate_CTetgen()
267 if (fVal < 0) PetscCall(DMLabelSetValue(bodyLabel, p, cval)); in DMPlexGenerate_CTetgen()
528 PetscInt cval = b, eVal, fVal; in DMPlexRefine_CTetgen() local
531 PetscCall(DMLabelSetValue(bodyLabel, c, cval)); in DMPlexRefine_CTetgen()
538 if (eVal < 0) PetscCall(DMLabelSetValue(bodyLabel, p, cval)); in DMPlexRefine_CTetgen()
542 if (fVal < 0) PetscCall(DMLabelSetValue(bodyLabel, p, cval)); in DMPlexRefine_CTetgen()
/petsc/src/dm/impls/plex/generators/tetgen/
H A Dtetgenerate.cxx282 PetscInt cval = b, eVal, fVal; in DMPlexGenerate_Tetgen() local
285 PetscCall(DMLabelSetValue(bodyLabel, c, cval)); in DMPlexGenerate_Tetgen()
292 if (eVal < 0) PetscCall(DMLabelSetValue(bodyLabel, p, cval)); in DMPlexGenerate_Tetgen()
296 if (fVal < 0) PetscCall(DMLabelSetValue(bodyLabel, p, cval)); in DMPlexGenerate_Tetgen()
561 PetscInt cval = b, eVal, fVal; in DMPlexRefine_Tetgen() local
564 PetscCall(DMLabelSetValue(bodyLabel, c, cval)); in DMPlexRefine_Tetgen()
571 if (eVal < 0) PetscCall(DMLabelSetValue(bodyLabel, p, cval)); in DMPlexRefine_Tetgen()
575 if (fVal < 0) PetscCall(DMLabelSetValue(bodyLabel, p, cval)); in DMPlexRefine_Tetgen()
/petsc/src/snes/tutorials/
H A Dex73f90t.F90435 PetscScalar bval(1), cval(1), one
538 cval(1) = -one
550 PetscCallA(MatSetValues(Cmat, ione, row, ione, row, cval, INSERT_VALUES, ierr))
563 cval(1) = one
564 PetscCallA(MatSetValues(Dmat, ione, row, ione, row, cval, INSERT_VALUES, ierr))

12