Lines Matching refs:offsets
4387 PetscInt *offsets;
4408 PetscCall(PetscCalloc1(pEnd - pStart, &offsets));
4420 mesh->supports[offS + offsets[q]] = p;
4421 ++offsets[q];
4424 PetscCall(PetscFree(offsets));
4951 PetscInt *offsets, **closures;
4964 PetscCall(DMGetWorkArray(dm, numPoints * (depth + 2), MPIU_INT, &offsets));
4975 offsets[p * (depth + 2) + 0] = 0;
4980 for (i = offsets[p * (depth + 2) + d]; i < closureSize; ++i) {
4982 offsets[p * (depth + 2) + d + 1] = i;
4986 if (i == closureSize) offsets[p * (depth + 2) + d + 1] = i;
4988 PetscCheck(offsets[p * (depth + 2) + depth + 1] == closureSize, PetscObjectComm((PetscObject)dm), PETSC_ERR_PLIB, "Total size of closure %" PetscInt_FMT " should be %" PetscInt_FMT, offsets[p * (depth + 2) + depth + 1], closureSize);
4994 dof = offsets[d + 1] - offsets[d];
4995 for (joinSize = 0; joinSize < dof; ++joinSize) join[i][joinSize] = closures[0][(offsets[d] + joinSize) * 2];
5000 dof = offsets[p * (depth + 2) + d + 1] - offsets[p * (depth + 2) + d];
5002 const PetscInt point = closures[p][(offsets[p * (depth + 2) + d] + c) * 2];
5020 PetscCall(DMRestoreWorkArray(dm, numPoints * (depth + 2), MPIU_INT, &offsets));
5153 PetscInt *offsets, **closures;
5166 PetscCall(DMGetWorkArray(dm, numPoints * (height + 2), MPIU_INT, &offsets));
5177 offsets[p * (height + 2) + 0] = 0;
5182 for (i = offsets[p * (height + 2) + h]; i < closureSize; ++i) {
5184 offsets[p * (height + 2) + h + 1] = i;
5188 if (i == closureSize) offsets[p * (height + 2) + h + 1] = i;
5190 PetscCheck(offsets[p * (height + 2) + height + 1] == closureSize, PetscObjectComm((PetscObject)dm), PETSC_ERR_PLIB, "Total size of closure %" PetscInt_FMT " should be %" PetscInt_FMT, offsets[p * (height + 2) + height + 1], closureSize);
5196 dof = offsets[h + 1] - offsets[h];
5197 for (meetSize = 0; meetSize < dof; ++meetSize) meet[i][meetSize] = closures[0][(offsets[h] + meetSize) * 2];
5202 dof = offsets[p * (height + 2) + h + 1] - offsets[p * (height + 2) + h];
5204 const PetscInt point = closures[p][(offsets[p * (height + 2) + h] + c) * 2];
5222 PetscCall(DMRestoreWorkArray(dm, numPoints * (height + 2), MPIU_INT, &offsets));
7741 This version believes the globalSection offsets for each field, rather than just the point offset
7838 PETSC_INTERN PetscErrorCode DMPlexAnchorsGetSubMatModification(DM dm, PetscSection section, PetscInt numPoints, PetscInt numIndices, const PetscInt points[], const PetscInt ***perms, PetscInt *outNumPoints, PetscInt *outNumIndices, PetscInt *outPoints[], PetscInt offsets[], PetscScalar *outMat[])
7939 if (offsets) {
7940 for (PetscInt f = 0; f <= numFields; f++) offsets[f] = newOffsets[f];
8064 for (PetscInt f = 0; f <= numFields; f++) offsets[f] = newOffsets[f];
8068 PETSC_INTERN PetscErrorCode DMPlexAnchorsModifyMat_Internal(DM dm, PetscSection section, PetscInt numPoints, PetscInt numIndices, const PetscInt points[], const PetscInt ***perms, PetscInt numRows, PetscInt numCols, const PetscScalar values[], PetscInt *outNumPoints, PetscInt *outNumIndices, PetscInt *outPoints[], PetscScalar *outValues[], PetscInt offsets[], PetscBool multiplyRight, PetscBool multiplyLeft)
8076 PetscCall(DMPlexAnchorsGetSubMatModification(dm, section, numPoints, numIndices, points, perms, outNumPoints, &newNumIndices, outPoints, offsets, outValues ? &modMat : NULL));
8120 PETSC_INTERN PetscErrorCode DMPlexAnchorsModifyMat(DM dm, PetscSection section, PetscInt numPoints, PetscInt numIndices, const PetscInt points[], const PetscInt ***perms, const PetscScalar values[], PetscInt *outNumPoints, PetscInt *outNumIndices, PetscInt *outPoints[], PetscScalar *outValues[], PetscInt offsets[], PetscBool multiplyLeft)
8123 PetscCall(DMPlexAnchorsModifyMat_Internal(dm, section, numPoints, numIndices, points, perms, numIndices, numIndices, values, outNumPoints, outNumIndices, outPoints, outValues, offsets, PETSC_TRUE, multiplyLeft));
8167 PetscInt Nf, Ncl, Ni = 0, offsets[32], p, f;
8183 PetscCall(PetscArrayzero(offsets, 32));
8196 /* 2) Get number of indices on these points and field offsets from section */
8203 offsets[f + 1] += fdof;
8211 for (f = 1; f < Nf; ++f) offsets[f + 1] += offsets[f];
8212 PetscCheck(!Nf || offsets[Nf] == Ni, PetscObjectComm((PetscObject)dm), PETSC_ERR_PLIB, "Invalid size for closure %" PetscInt_FMT " should be %" PetscInt_FMT, offsets[Nf], Ni);
8221 PetscInt foffset = offsets[f];
8253 PetscCall(DMPlexAnchorsModifyMat_Internal(dm, section, Ncl, Ni, points, perms, nRows, nCols, values ? *values : NULL, &NclC, &NiC, &pointsC, values ? &valuesC : NULL, offsets, multiplyRight, multiplyLeft));
8280 for (f = 0; f <= Nf; f++) outOffsets[f] = offsets[f];
8287 PetscCall(DMPlexGetIndicesPointFieldsSplit_Internal(section, idxSection, pnt, offsets, perms, p, clperm, idx));
8295 /* Note that we pass a local section even though we're using global offsets. This is because global sections do
8298 PetscCall(DMPlexGetIndicesPointFields_Internal(section, isLocal, pnt, idxOff < 0 ? -(idxOff + 1) : idxOff, offsets, PETSC_FALSE, perms, p, clperm, idx));
8310 /* Note that we pass a local section even though we're using global offsets. This is because global sections do
8345 . outOffsets - Array, of length the number of fields plus 1, to write the field offsets into, or `NULL`
8388 . outOffsets - Array to write the field offsets into, or `NULL`