Lines Matching defs:off
938 PetscInt point = closure[cl], depth, dof, off, d, p;
944 PetscCall(PetscSectionGetOffset(coordSection, point, &off));
950 PetscCall(PetscViewerASCIIPrintf(viewer, "%g", (double)PetscRealPart(a[off + p * dim + d])));
1045 PetscInt dof, off, s;
1048 PetscCall(PetscSectionGetOffset(mesh->supportSection, p, &off));
1049 for (s = off; s < off + dof; ++s) PetscCall(PetscViewerASCIISynchronizedPrintf(viewer, "[%d]: %" PetscInt_FMT " ----> %" PetscInt_FMT "\n", rank, p, mesh->supports[s]));
1055 PetscInt dof, off, c;
1058 PetscCall(PetscSectionGetOffset(mesh->coneSection, p, &off));
1059 for (c = off; c < off + dof; ++c) PetscCall(PetscViewerASCIISynchronizedPrintf(viewer, "[%d]: %" PetscInt_FMT " <---- %" PetscInt_FMT " (%" PetscInt_FMT ")\n", rank, p, mesh->cones[c], mesh->coneOrientations[c]));
1089 PetscInt dof, off;
1093 PetscCall(PetscSectionGetOffset(coordSection, p, &off));
1095 PetscCall(PetscViewerASCIISynchronizedPrintf(viewer, " (%4" PetscInt_FMT ") dof %2" PetscInt_FMT " offset %3" PetscInt_FMT, p, dof, off));
1096 PetscCall(DMPlexView_Ascii_Coordinates(viewer, cs, dof, &array[off]));
1102 PetscCall(PetscSectionGetOffset(coordSectionCell, p, &off));
1104 PetscCall(PetscViewerASCIISynchronizedPrintf(viewer, " (%4" PetscInt_FMT ") dof %2" PetscInt_FMT " offset %3" PetscInt_FMT, p, dof, off));
1105 PetscCall(DMPlexView_Ascii_Coordinates(viewer, cs, dof, &arrayCell[off]));
1269 PetscInt off, dof, d;
1274 PetscCall(PetscSectionGetOffset(coordSection, v, &off));
1278 tcoords[d] = (double)(scale * PetscRealPart(coords[off + d]));
3206 PetscInt off;
3211 PetscCall(PetscSectionGetOffset(mesh->coneSection, p, &off));
3212 *cone = PetscSafePointerPlusOffset(mesh->cones, off);
3445 PetscInt dof, off, c;
3451 PetscCall(PetscSectionGetOffset(mesh->coneSection, p, &off));
3458 mesh->cones[off + c] = cone[c];
3461 for (c = 0; c < dof; ++c) mesh->cones[off + c] = cone[c];
3497 PetscInt off;
3506 PetscCall(PetscSectionGetOffset(mesh->coneSection, p, &off));
3508 *coneOrientation = &mesh->coneOrientations[off];
3535 PetscInt dof, off, c;
3541 PetscCall(PetscSectionGetOffset(mesh->coneSection, p, &off));
3548 PetscCall(PetscSectionGetDof(mesh->coneSection, mesh->cones[off + c], &cdof));
3550 mesh->coneOrientations[off + c] = o;
3553 for (c = 0; c < dof; ++c) mesh->coneOrientations[off + c] = coneOrientation[c];
3577 PetscInt dof, off;
3588 PetscCall(PetscSectionGetOffset(mesh->coneSection, p, &off));
3589 mesh->cones[off + conePos] = conePoint;
3615 PetscInt dof, off;
3625 PetscCall(PetscSectionGetOffset(mesh->coneSection, p, &off));
3626 mesh->coneOrientations[off + conePos] = coneOrientation;
3672 PetscInt off;
3681 PetscCall(PetscSectionGetOffset(mesh->coneSection, p, &off));
3682 if (cone) *cone = PetscSafePointerPlusOffset(mesh->cones, off);
3683 if (ornt) *ornt = PetscSafePointerPlusOffset(mesh->coneOrientations, off);
3796 PetscInt off;
3801 PetscCall(PetscSectionGetOffset(mesh->supportSection, p, &off));
3802 *support = PetscSafePointerPlusOffset(mesh->supports, off);
3827 PetscInt dof, off, c;
3834 PetscCall(PetscSectionGetOffset(mesh->supportSection, p, &off));
3838 mesh->supports[off + c] = support[c];
3862 PetscInt dof, off;
3868 PetscCall(PetscSectionGetOffset(mesh->supportSection, p, &off));
3872 mesh->supports[off + supportPos] = supportPoint;
3985 const PetscInt off = s->atlasOff[ps];
3988 *arr = mesh->cones + off;
3989 *ornt = mesh->coneOrientations + off;
3993 const PetscInt off = s->atlasOff[ps];
3996 *arr = mesh->supports + off;
4018 PetscInt off = 0, tmpSize, t;
4034 closure[off++] = p;
4035 closure[off++] = 0;
4037 closure[off++] = tmp[t];
4038 closure[off++] = tmpO ? tmpO[t] : 0;
4044 closure[off++] = p;
4045 closure[off++] = ornt;
4050 closure[off++] = tmp[arr[t]];
4051 closure[off++] = tmpO ? DMPolytopeTypeComposeOrientation(ft, ornt, tmpO[t]) : 0;
4398 PetscInt dof, off, c;
4401 PetscCall(PetscSectionGetOffset(mesh->coneSection, p, &off));
4402 for (c = off; c < off + dof; ++c) PetscCall(PetscSectionAddDof(mesh->supportSection, mesh->cones[c], 1));
4410 PetscInt dof, off, c;
4413 PetscCall(PetscSectionGetOffset(mesh->coneSection, p, &off));
4414 for (c = off; c < off + dof; ++c) {
4848 PetscInt dof, off, p, c, m;
4861 PetscCall(PetscSectionGetOffset(mesh->supportSection, points[0], &off));
4862 for (joinSize = 0; joinSize < dof; ++joinSize) join[i][joinSize] = mesh->supports[off + joinSize];
4868 PetscCall(PetscSectionGetOffset(mesh->supportSection, points[p], &off));
4870 const PetscInt point = mesh->supports[off + c];
5057 PetscInt dof, off, p, c, m;
5070 PetscCall(PetscSectionGetOffset(mesh->coneSection, points[0], &off));
5071 for (meetSize = 0; meetSize < dof; ++meetSize) meet[i][meetSize] = mesh->cones[off + meetSize];
5077 PetscCall(PetscSectionGetOffset(mesh->coneSection, points[p], &off));
5079 const PetscInt point = mesh->cones[off + c];
6184 const PetscInt off = oft + PetscSqr(k - 1);
6185 const PetscInt ofk = off + PetscSqr(k - 1);
6235 for (o = off + j * (k - 1); o < off + (j + 1) * (k - 1); ++o)
6381 PetscInt dof, off, d;
6385 PetscCall(PetscSectionGetOffset(section, point, &off));
6386 varr = PetscSafePointerPlusOffset(vArray, off);
6393 PetscInt dof, off, d;
6398 PetscCall(PetscSectionGetOffset(section, cp, &off));
6399 varr = PetscSafePointerPlusOffset(vArray, off);
6446 PetscInt dof, off;
6449 PetscCall(PetscSectionGetOffset(*clSec, point, &off));
6452 pts = PetscSafePointerPlusOffset((PetscInt *)cla, off);
6492 PetscInt dof, off, d;
6496 PetscCall(PetscSectionGetOffset(section, point, &off));
6497 varr = PetscSafePointerPlusOffset(vArray, off);
6913 PetscInt off, cind = 0, k;
6917 PetscCall(PetscSectionGetOffset(section, point, &off));
6918 a = &array[off];
6981 PetscInt off, cind = 0, k;
6985 PetscCall(PetscSectionGetOffset(section, point, &off));
6986 a = &array[off];
7215 PetscInt pStart, pEnd, p, numPoints, off, dof;
7223 for (p = 0, off = 0; p <= numPoints; ++p, off += dof) {
7243 for (k = 0; k < dof; ++k) a[k] += values[off + k];
7245 for (k = 0; k < dof; ++k) a[k] += values[off + dof - k - 1];
7255 a[k] += values[off + k];
7263 a[k] += values[off + dof - k - 1];
7387 PetscInt dof, off;
7394 for (p = 0, off = 0; p < numPoints; p++, off += dof) {
7399 PetscCall(updatePoint_private(section, point, dof, insert, PETSC_FALSE, perm, flip, clperm, values, off, array));
7403 for (p = 0, off = 0; p < numPoints; p++, off += dof) {
7408 PetscCall(updatePoint_private(section, point, dof, insert, PETSC_TRUE, perm, flip, clperm, values, off, array));
7412 for (p = 0, off = 0; p < numPoints; p++, off += dof) {
7417 PetscCall(updatePointBC_private(section, point, dof, insert, perm, flip, clperm, values, off, array));
7421 for (p = 0, off = 0; p < numPoints; p++, off += dof) {
7426 PetscCall(updatePoint_private(section, point, dof, add, PETSC_FALSE, perm, flip, clperm, values, off, array));
7430 for (p = 0, off = 0; p < numPoints; p++, off += dof) {
7435 PetscCall(updatePoint_private(section, point, dof, add, PETSC_TRUE, perm, flip, clperm, values, off, array));
7439 for (p = 0, off = 0; p < numPoints; p++, off += dof) {
7444 PetscCall(updatePointBC_private(section, point, dof, add, perm, flip, clperm, values, off, array));
7609 . off - The global offset of this point
7620 Note: The indices could be local or global, depending on the value of 'off'.
7622 PetscErrorCode DMPlexGetIndicesPoint_Internal(PetscSection section, PetscBool islocal, PetscInt point, PetscInt off, PetscInt *loff, PetscBool setBC, const PetscInt perm[], const PetscInt indperm[], PetscInt indices[])
7638 indices[ind] = off + k;
7648 indices[ind] = -(off + k + 1);
7651 indices[ind] = off + k - (islocal ? 0 : cind);
7666 . off - The offset of this point in the (local or global) indexed space - should match islocal and (usually) the section
7686 The section is only used for field layout, so islocal is technically a statement about the offset (off). At some point
7698 PetscErrorCode DMPlexGetIndicesPointFields_Internal(PetscSection section, PetscBool islocal, PetscInt point, PetscInt off, PetscInt foffs[], PetscBool setBC, const PetscInt ***perms, PetscInt permsoff, const PetscInt indperm[], PetscInt indices[])
7718 indices[ind] = off + foff + b;
7727 indices[ind] = -(off + foff + b + 1);
7730 indices[ind] = off + foff + b - (islocal ? 0 : cind);
8302 PetscInt off = 0, idxOff;
8312 PetscCall(DMPlexGetIndicesPoint_Internal(section, isLocal, pnt, idxOff < 0 ? -(idxOff + 1) : idxOff, &off, PETSC_FALSE, perm, clperm, idx));
8564 PetscInt numFields, numSubcells, maxFPoints, numFPoints, numCPoints, numFIndices, numCIndices, dof, off, globalOff, pStart, pEnd, p, q, r, s, f;
8686 for (p = 0, off = 0; p < numFPoints; p++) {
8690 PetscCall(DMPlexGetIndicesPoint_Internal(fsection, PETSC_FALSE, ftotpoints[2 * p], globalOff < 0 ? -(globalOff + 1) : globalOff, &off, PETSC_FALSE, perm, fclperm, findices));
8692 for (p = 0, off = 0; p < numCPoints; p++) {
8696 PetscCall(DMPlexGetIndicesPoint_Internal(csection, PETSC_FALSE, cpoints[2 * p], globalOff < 0 ? -(globalOff + 1) : globalOff, &off, PETSC_FALSE, perm, cclperm, cindices));
8728 PetscInt numFields, numSubcells, maxFPoints, numFPoints, numCPoints, numFIndices, numCIndices, dof, off, globalOff, pStart, pEnd, p, q, r, s, f;
8844 for (p = 0, off = 0; p < numFPoints; p++) {
8848 PetscCall(DMPlexGetIndicesPoint_Internal(fsection, PETSC_FALSE, ftotpoints[2 * p], globalOff < 0 ? -(globalOff + 1) : globalOff, &off, PETSC_FALSE, perm, fclperm, findices));
8850 for (p = 0, off = 0; p < numCPoints; p++) {
8854 PetscCall(DMPlexGetIndicesPoint_Internal(csection, PETSC_FALSE, cpoints[2 * p], globalOff < 0 ? -(globalOff + 1) : globalOff, &off, PETSC_FALSE, perm, cclperm, cindices));
9322 PetscInt cval, dof, off;
9327 PetscCall(PetscSectionGetOffset(section, p, &off));
9328 for (PetscInt d = 0; d < dof; d++) v[off + d] = cval;
9433 For submeshes with cohesive cells (see DMPlexConstructCohesiveCells()), we allow a special case where some of the boundary of a face (edges and vertices) are not duplicated. We call these special boundary points "unsplit", since the same edge or vertex appears in both copies of the face. These unsplit points throw off our counting, so we have to explicitly account for them here.
10716 PetscInt pStart, pEnd, p, sStart, sEnd, dof, aDof, aOff, off, nnz, annz, m, n, q, a, offset, *i, *j;
10761 PetscCall(PetscSectionGetFieldOffset(cSec, p, f, &off));
10762 for (q = 0; q < dof; q++) i[off + q + 1] = i[off + q] + annz;
10774 PetscCall(PetscSectionGetOffset(cSec, p, &off));
10775 for (q = 0; q < dof; q++) i[off + q + 1] = i[off + q] + annz;
11008 SETERRQ(PetscObjectComm((PetscObject)dm), PETSC_ERR_SUP, "Plex Throughput Monitor is not supported if logging is turned off or the default log handler is not running. Reconfigure using --with-log and run with -log_view.");