| /petsc/src/sys/classes/draw/utils/ |
| H A D | hists.c | 21 int numValues; member 80 h->numValues = 0; in PetscDrawHGCreate() 139 hist->numValues = 0; in PetscDrawHGReset() 195 if (hist->numValues >= hist->maxValues) { in PetscDrawHGAddValue() 209 if (!hist->numValues && (hist->xmin == PETSC_MAX_REAL) && (hist->xmax == PETSC_MIN_REAL)) { in PetscDrawHGAddValue() 218 } else if (hist->numValues == 1) { in PetscDrawHGAddValue() 232 hist->values[hist->numValues] = value; in PetscDrawHGAddValue() 233 hist->weights[hist->numValues] = 1.; in PetscDrawHGAddValue() 234 ++hist->numValues; in PetscDrawHGAddValue() 263 if (hist->numValues >= hist->maxValues) { in PetscDrawHGAddWeightedValue() [all …]
|
| H A D | bars.c | 137 PetscInt numValues, i, idx, *perm, nplot; in PetscDrawBarDraw() local 154 numValues = bar->numBins; in PetscDrawBarDraw() 160 for (i = 0; i < numValues; i++) { in PetscDrawBarDraw() 168 …nplot = numValues; /* number of points to actually plot; if some are lower than requested toleran… in PetscDrawBarDraw() 174 PetscCall(PetscMalloc1(numValues, &perm)); in PetscDrawBarDraw() 175 for (i = 0; i < numValues; i++) perm[i] = i; in PetscDrawBarDraw() 176 PetscCall(PetscSortRealWithPermutation(numValues, values, perm)); in PetscDrawBarDraw() 178 for (i = 0; i < numValues; i++) { in PetscDrawBarDraw() 179 if (values[perm[numValues - i - 1]] < bar->sorttolerance) { in PetscDrawBarDraw() 197 idx = (bar->sort ? perm[numValues - i - 1] : i); in PetscDrawBarDraw()
|
| /petsc/src/ts/characteristic/impls/da/ |
| H A D | slda.c | 36 PetscInt dim, numValues; in CharacteristicSetUp_DA() local 42 numValues = 4 + MAX_COMPONENTS; in CharacteristicSetUp_DA() 48 PetscCall(PetscMPIIntCast(numValues, &blockLen[1])); in CharacteristicSetUp_DA()
|
| /petsc/src/dm/impls/plex/ |
| H A D | plexreorder.c | 94 PetscInt numValues, numPoints = 0; in DMPlexGetOrdering() local 99 PetscCall(ISGetLocalSize(valueIS, &numValues)); in DMPlexGetOrdering() 101 …PetscCall(PetscCalloc4(numCells, &sperm, numValues, &values, numValues, &vsize, numValues + 1, &vo… in DMPlexGetOrdering() 102 PetscCall(PetscArraycpy(values, valuesTmp, numValues)); in DMPlexGetOrdering() 103 PetscCall(PetscSortInt(numValues, values)); in DMPlexGetOrdering() 106 for (v = 0; v < numValues; ++v) { in DMPlexGetOrdering() 108 if (v < numValues - 1) voff[v + 2] += vsize[v] + voff[v + 1]; in DMPlexGetOrdering() 118 PetscCall(PetscFindInt(val, numValues, values, &vloc)); in DMPlexGetOrdering() 122 …for (v = 0; v < numValues; ++v) PetscCheck(voff[v + 1] - voff[v] == vsize[v], PETSC_COMM_SELF, PET… in DMPlexGetOrdering()
|
| H A D | plexsection.c | 523 PetscInt bd2, field, numComps, numValues; in DMCreateLocalSection_Plex() local 527 …PetscCall(PetscDSGetBoundary(dsBC, bd, NULL, &type, NULL, &label, &numValues, &values, &field, &nu… in DMCreateLocalSection_Plex() 544 for (v = 0; v < numValues; ++v) { in DMCreateLocalSection_Plex() 564 for (v = 0; v < numValues; ++v) { in DMCreateLocalSection_Plex()
|
| H A D | plexproject.c | 947 PetscInt p, spDim, totDim, numValues; in DMProjectLocal_Generic_Plex() local 972 PetscCall(DMPlexVecGetClosure(plex, section, localX, p, &numValues, NULL)); in DMProjectLocal_Generic_Plex() 973 …numValues == totDim, PETSC_COMM_SELF, PETSC_ERR_ARG_SIZ, "The output section point (%" PetscInt_FM… in DMProjectLocal_Generic_Plex() 1001 PetscCall(DMGetWorkArray(dm, numValues, MPIU_SCALAR, &values)); in DMProjectLocal_Generic_Plex() 1051 PetscCall(PetscArrayzero(values, numValues)); in DMProjectLocal_Generic_Plex() 1082 PetscCall(PetscArrayzero(values, numValues)); in DMProjectLocal_Generic_Plex() 1095 PetscCall(DMRestoreWorkArray(dm, numValues, MPIU_SCALAR, &values)); in DMProjectLocal_Generic_Plex()
|
| H A D | plexsubmesh.c | 210 PetscInt numValues, v, cStart, cEnd, nroots; in DMPlexLabelComplete_Internal() local 213 PetscCall(DMLabelGetNumValues(label, &numValues)); in DMPlexLabelComplete_Internal() 217 for (v = 0; v < numValues; ++v) { in DMPlexLabelComplete_Internal() 248 PetscInt numValues, v; in DMPlexLabelComplete_Internal() local 253 PetscCall(ISGetLocalSize(valueIS, &numValues)); in DMPlexLabelComplete_Internal() 255 for (v = 0; v < numValues; ++v) { in DMPlexLabelComplete_Internal() 268 PetscCall(ISGetLocalSize(valueIS, &numValues)); in DMPlexLabelComplete_Internal() 270 for (v = 0; v < numValues; ++v) { in DMPlexLabelComplete_Internal() 326 PetscInt numValues, v, csStart, csEnd, chStart, chEnd; in DMPlexLabelAddCells() local 331 PetscCall(DMLabelGetNumValues(label, &numValues)); in DMPlexLabelAddCells() [all …]
|
| H A D | plextree.c | 3853 PetscInt numValues = 0; in DMPlexTransferVecTree_Interpolate() local 3867 numValues += clDof; in DMPlexTransferVecTree_Interpolate() 3871 PetscCall(PetscSectionGetDof(localCoarse, p, &numValues)); in DMPlexTransferVecTree_Interpolate() 3876 numValues += dim * (1 + numFVcomps); in DMPlexTransferVecTree_Interpolate() 3878 PetscCall(PetscSectionSetDof(rootValuesSec, p, numValues)); in DMPlexTransferVecTree_Interpolate() 3889 PetscInt numValues; in DMPlexTransferVecTree_Interpolate() local 3894 PetscCall(PetscSectionGetDof(rootValuesSec, p, &numValues)); in DMPlexTransferVecTree_Interpolate() 3895 if (!numValues) continue; in DMPlexTransferVecTree_Interpolate() 3899 PetscInt closureSize = numValues; in DMPlexTransferVecTree_Interpolate() 3906 pVal += (numValues - dim * (1 + numFVcomps)); in DMPlexTransferVecTree_Interpolate() [all …]
|
| H A D | plexfem.c | 5122 PetscInt field, numValues, v; in DMPlexComputeBdResidual_Internal() local 5127 …PetscCall(PetscDSGetBoundary(prob, bd, &wf, &type, NULL, &label, &numValues, &values, &field, NULL… in DMPlexComputeBdResidual_Internal() 5141 for (v = 0; v < numValues; ++v) { in DMPlexComputeBdResidual_Internal() 5906 …dJacobianSingleByLabel(DM dm, PetscWeakForm wf, DMLabel label, PetscInt numValues, const PetscInt … in DMPlexComputeBdJacobianSingleByLabel() argument 5945 for (v = 0; v < numValues; ++v) { in DMPlexComputeBdJacobianSingleByLabel() 6097 …omputeBdJacobianSingle(DM dm, PetscWeakForm wf, DMLabel label, PetscInt numValues, const PetscInt … in DMPlexComputeBdJacobianSingle() argument 6109 …PetscCall(DMPlexComputeBdJacobianSingleByLabel(dm, wf, label, numValues, values, fieldI, facetIS, … in DMPlexComputeBdJacobianSingle() 6134 PetscInt fieldI, numValues; in DMPlexComputeBdJacobian_Internal() local 6138 …PetscCall(PetscDSGetBoundary(prob, bd, &wf, &type, NULL, &label, &numValues, &values, &fieldI, NUL… in DMPlexComputeBdJacobian_Internal() 6143 …PetscCall(DMPlexComputeBdJacobianSingleByLabel(dm, wf, label, numValues, values, fieldI, facetIS, … in DMPlexComputeBdJacobian_Internal()
|
| H A D | plex.c | 1730 PetscInt numValues, v; in DMPlexView_Ascii() local 1734 PetscCall(DMLabelGetNumValues(label, &numValues)); in DMPlexView_Ascii() 1735 …tscViewerASCIIPrintf(viewer, " %s: %" PetscInt_FMT " strata with value/size (", name, numValues)); in DMPlexView_Ascii() 1743 PetscCall(PetscMalloc1(numValues, &values)); in DMPlexView_Ascii() 1744 PetscCall(PetscArraycpy(values, is_values_local, numValues)); in DMPlexView_Ascii() 1745 PetscCall(PetscSortInt(numValues, values)); in DMPlexView_Ascii() 1750 for (v = 0; v < numValues; ++v) { in DMPlexView_Ascii() 4631 PetscInt numValues, maxValues = 0, v; in DMPlexStratify() local 4633 PetscCall(DMLabelGetNumValues(label, &numValues)); in DMPlexStratify() 4634 …PetscCallMPI(MPIU_Allreduce(&numValues, &maxValues, 1, MPIU_INT, MPI_MAX, PetscObjectComm((PetscOb… in DMPlexStratify() [all …]
|
| /petsc/src/dm/impls/plex/tests/ |
| H A D | ex11.c | 119 PetscInt numValues, maxValues = 0, v; in TestEmptyStrata() local 135 PetscCall(DMLabelGetNumValues(label, &numValues)); in TestEmptyStrata() 136 …PetscCallMPI(MPIU_Allreduce(&numValues, &maxValues, 1, MPIU_INT, MPI_MAX, PetscObjectComm((PetscOb… in TestEmptyStrata() 137 for (v = numValues; v < maxValues; ++v) PetscCall(DMLabelAddStratum(label, v)); in TestEmptyStrata()
|
| /petsc/src/tao/tutorials/ |
| H A D | ex4.c | 549 PetscInt numValues; in TaylorTest() local 569 for (numValues = 0, h = ctx->hStart; h >= ctx->hMin; h *= ctx->hFactor) numValues++; in TaylorTest() 570 PetscCall(PetscCalloc2(numValues, &Js, numValues, &hs)); in TaylorTest() 582 for (j = 1; j < numValues; j++) { in TaylorTest()
|
| /petsc/src/binding/petsc4py/src/petsc4py/PETSc/ |
| H A D | DMLabel.pyx | 285 cdef PetscInt numValues = 0 286 CHKERR(DMLabelGetNumValues(self.dmlabel, &numValues)) 287 return toInt(numValues)
|
| /petsc/src/dm/label/ |
| H A D | dmlabel.c | 1203 PetscErrorCode DMLabelGetNumValues(DMLabel label, PetscInt *numValues) in DMLabelGetNumValues() argument 1207 PetscAssertPointer(numValues, 2); in DMLabelGetNumValues() 1208 *numValues = label->numStrata; in DMLabelGetNumValues() 1789 PetscInt numValues, numPoints, v, q; in DMLabelPermute() local 1797 PetscCall(DMLabelGetNumValues(*labelNew, &numValues)); in DMLabelPermute() 1800 for (v = 0; v < numValues; ++v) { in DMLabelPermute()
|
| /petsc/src/ksp/ksp/utils/dm/ |
| H A D | dmproject.c | 98 PetscInt numValues, i; in DMGlobalToLocalSolve() local 100 PetscCall(DMPlexVecGetClosure(dm, NULL, mask, cStart, &numValues, NULL)); in DMGlobalToLocalSolve() 101 PetscCall(PetscMalloc1(numValues, &ones)); in DMGlobalToLocalSolve() 102 for (i = 0; i < numValues; i++) ones[i] = 1.; in DMGlobalToLocalSolve()
|
| /petsc/src/dm/impls/plex/hdf5/ |
| H A D | plexhdf5.c | 1482 PetscInt numValues, v; in DMPlexLabelsView_HDF5_Internal() local 1495 PetscCall(ISGetLocalSize(valueIS, &numValues)); in DMPlexLabelsView_HDF5_Internal() 1497 …PetscCall(ISCreateGeneral(PetscObjectComm((PetscObject)dm), numValues, values, PETSC_COPY_VALUES, … in DMPlexLabelsView_HDF5_Internal() 1502 PetscCall(ISGetLocalSize(globalValueIS, &numValues)); in DMPlexLabelsView_HDF5_Internal() 1504 for (v = 0; v < numValues; ++v) { in DMPlexLabelsView_HDF5_Internal()
|
| /petsc/src/dm/impls/forest/p4est/ |
| H A D | pforest.h | 858 PetscInt numValues, numValuesGlobal, cLocalStart, count; in DMSetUp_pforest() local 872 PetscCall(DMLabelGetNumValues(adaptLabel, &numValues)); in DMSetUp_pforest() 873 …PetscCallMPI(MPIU_Allreduce(&numValues, &numValuesGlobal, 1, MPIU_INT, MPI_MAX, PetscObjectComm((P… in DMSetUp_pforest()
|