Lines Matching defs:offset

1095             PetscCall(PetscViewerASCIISynchronizedPrintf(viewer, "  (%4" PetscInt_FMT ") dof %2" PetscInt_FMT " offset %3" PetscInt_FMT, p, dof, off));
1104 PetscCall(PetscViewerASCIISynchronizedPrintf(viewer, " (%4" PetscInt_FMT ") dof %2" PetscInt_FMT " offset %3" PetscInt_FMT, p, dof, off));
2946 PetscInt bdof, offset;
2949 PetscCall(PetscSectionGetOffset(sectionGlobal, p, &offset));
2957 for (PetscInt i = 0; i < dof - cdof; ++i) pblocks[offset - localStart + i] = dof - cdof;
2959 if (bstate == PETSC_BOOL3_FALSE && dof - cdof) pblocks[offset - localStart] = -(dof - cdof);
2973 PetscInt num_comp, bdof, offset;
2977 PetscCall(PetscSectionGetFieldOffset(sectionGlobal, p, field, &offset));
2981 for (PetscInt i = 0; i < dof - cdof; i++) pblocks[offset - localStart + i] = (dof - cdof) / num_nodes;
6070 PetscInt k, f, Nc, c, i, j, size = 0, offset = 0, foffset = 0;
6093 for (c = 0; c < Nc; c++, offset++) perm[offset] = (k - 1) * Nc + c + foffset;
6095 for (c = 0; c < Nc; c++, offset++) perm[offset] = i * Nc + c + foffset;
6096 for (c = 0; c < Nc; c++, offset++) perm[offset] = k * Nc + c + foffset;
6097 foffset = offset;
6102 for (i = 0; i < dof * Nc; ++i, ++offset) perm[offset] = i + foffset;
6103 foffset = offset;
6129 for (c = 0; c < Nc; ++c, ++offset) perm[offset] = ovlb * Nc + c + foffset;
6131 for (c = 0; c < Nc; ++c, ++offset) perm[offset] = o * Nc + c + foffset;
6132 for (c = 0; c < Nc; ++c, ++offset) perm[offset] = ovrb * Nc + c + foffset;
6135 for (c = 0; c < Nc; ++c, ++offset) perm[offset] = (oel + (k - 2) - i) * Nc + c + foffset;
6137 for (c = 0; c < Nc; ++c, ++offset) perm[offset] = o * Nc + c + foffset;
6138 for (c = 0; c < Nc; ++c, ++offset) perm[offset] = (oer + i) * Nc + c + foffset;
6141 for (c = 0; c < Nc; ++c, ++offset) perm[offset] = ovlt * Nc + c + foffset;
6143 for (c = 0; c < Nc; ++c, ++offset) perm[offset] = o * Nc + c + foffset;
6144 for (c = 0; c < Nc; ++c, ++offset) perm[offset] = ovrt * Nc + c + foffset;
6145 foffset = offset;
6150 for (i = 0; i < dof * Nc; ++i, ++offset) perm[offset] = i + foffset;
6151 foffset = offset;
6212 for (c = 0; c < Nc; ++c, ++offset) perm[offset] = ovblf * Nc + c + foffset;
6214 for (c = 0; c < Nc; ++c, ++offset) perm[offset] = o * Nc + c + foffset;
6215 for (c = 0; c < Nc; ++c, ++offset) perm[offset] = ovbrf * Nc + c + foffset;
6218 for (c = 0; c < Nc; ++c, ++offset) perm[offset] = (oebl + i) * Nc + c + foffset;
6221 for (c = 0; c < Nc; ++c, ++offset) perm[offset] = o * Nc + c + foffset;
6223 for (c = 0; c < Nc; ++c, ++offset) perm[offset] = (oebr + (k - 2) - i) * Nc + c + foffset;
6226 for (c = 0; c < Nc; ++c, ++offset) perm[offset] = ovblb * Nc + c + foffset;
6228 for (c = 0; c < Nc; ++c, ++offset) perm[offset] = o * Nc + c + foffset;
6229 for (c = 0; c < Nc; ++c, ++offset) perm[offset] = ovbrb * Nc + c + foffset;
6234 for (c = 0; c < Nc; ++c, ++offset) perm[offset] = (oelf + (k - 2) - j) * Nc + c + foffset;
6236 for (c = 0; c < Nc; ++c, ++offset) perm[offset] = o * Nc + c + foffset;
6237 for (c = 0; c < Nc; ++c, ++offset) perm[offset] = (oerf + j) * Nc + c + foffset;
6240 for (c = 0; c < Nc; ++c, ++offset) perm[offset] = (ofl + i * (k - 1) + j) * Nc + c + foffset;
6242 for (c = 0; c < Nc; ++c, ++offset) perm[offset] = (oc + (j * (k - 1) + i) * (k - 1) + n) * Nc + c + foffset;
6243 for (c = 0; c < Nc; ++c, ++offset) perm[offset] = (ofr + j * (k - 1) + i) * Nc + c + foffset;
6246 for (c = 0; c < Nc; ++c, ++offset) perm[offset] = (oelb + j) * Nc + c + foffset;
6248 for (c = 0; c < Nc; ++c, ++offset) perm[offset] = o * Nc + c + foffset;
6249 for (c = 0; c < Nc; ++c, ++offset) perm[offset] = (oerb + (k - 2) - j) * Nc + c + foffset;
6254 for (c = 0; c < Nc; ++c, ++offset) perm[offset] = ovtlf * Nc + c + foffset;
6256 for (c = 0; c < Nc; ++c, ++offset) perm[offset] = o * Nc + c + foffset;
6257 for (c = 0; c < Nc; ++c, ++offset) perm[offset] = ovtrf * Nc + c + foffset;
6260 for (c = 0; c < Nc; ++c, ++offset) perm[offset] = (oetl + (k - 2) - i) * Nc + c + foffset;
6262 for (c = 0; c < Nc; ++c, ++offset) perm[offset] = (oft + i * (k - 1) + n) * Nc + c + foffset;
6263 for (c = 0; c < Nc; ++c, ++offset) perm[offset] = (oetr + i) * Nc + c + foffset;
6266 for (c = 0; c < Nc; ++c, ++offset) perm[offset] = ovtlb * Nc + c + foffset;
6268 for (c = 0; c < Nc; ++c, ++offset) perm[offset] = o * Nc + c + foffset;
6269 for (c = 0; c < Nc; ++c, ++offset) perm[offset] = ovtrb * Nc + c + foffset;
6271 foffset = offset;
6276 for (i = 0; i < dof * Nc; ++i, ++offset) perm[offset] = i + foffset;
6277 foffset = offset;
6284 PetscCheck(offset == size, PetscObjectComm((PetscObject)dm), PETSC_ERR_PLIB, "Number of permutation entries %" PetscInt_FMT " != %" PetscInt_FMT, offset, size);
6348 PetscInt pStart, pEnd, p, numPoints, size = 0, offset = 0;
6387 for (d = 0; d < dof; ++d, ++offset) array[offset] = varr[d];
6401 for (d = 0; d < dof; ++d, ++offset) array[offset] = varr[d];
6403 for (d = dof - 1; d >= 0; --d, ++offset) array[offset] = varr[d];
6481 PetscInt offset = 0, p;
6500 for (d = 0; d < dof; d++) array[clperm[offset + perm[d]]] = varr[d];
6502 for (d = 0; d < dof; d++) array[clperm[offset + d]] = varr[d];
6505 for (d = 0; d < dof; d++) array[clperm[offset + d]] *= flip[d];
6509 for (d = 0; d < dof; d++) array[offset + perm[d]] = varr[d];
6511 for (d = 0; d < dof; d++) array[offset + d] = varr[d];
6514 for (d = 0; d < dof; d++) array[offset + d] *= flip[d];
6517 offset += dof;
6520 *size = offset;
6526 PetscInt offset = 0, f;
6548 for (b = 0; b < fdof; b++) array[clperm[offset + perm[b]]] = varr[b];
6550 for (b = 0; b < fdof; b++) array[clperm[offset + b]] = varr[b];
6553 for (b = 0; b < fdof; b++) array[clperm[offset + b]] *= flip[b];
6557 for (b = 0; b < fdof; b++) array[offset + perm[b]] = varr[b];
6559 for (b = 0; b < fdof; b++) array[offset + b] = varr[b];
6562 for (b = 0; b < fdof; b++) array[offset + b] *= flip[b];
6565 offset += fdof;
6569 *size = offset;
6908 static inline PetscErrorCode updatePoint_private(PetscSection section, PetscInt point, PetscInt dof, void (*fuse)(PetscScalar *, PetscScalar), PetscBool setBC, const PetscInt perm[], const PetscScalar flip[], const PetscInt clperm[], const PetscScalar values[], PetscInt offset, PetscScalar array[])
6922 for (k = 0; k < dof; ++k) fuse(&a[k], values[clperm[offset + perm[k]]] * (flip ? flip[perm[k]] : 1.));
6924 for (k = 0; k < dof; ++k) fuse(&a[k], values[clperm[offset + k]] * (flip ? flip[k] : 1.));
6928 for (k = 0; k < dof; ++k) fuse(&a[k], values[offset + perm[k]] * (flip ? flip[perm[k]] : 1.));
6930 for (k = 0; k < dof; ++k) fuse(&a[k], values[offset + k] * (flip ? flip[k] : 1.));
6942 fuse(&a[k], values[clperm[offset + perm[k]]] * (flip ? flip[perm[k]] : 1.));
6950 fuse(&a[k], values[clperm[offset + k]] * (flip ? flip[k] : 1.));
6960 fuse(&a[k], values[offset + perm[k]] * (flip ? flip[perm[k]] : 1.));
6968 fuse(&a[k], values[offset + k] * (flip ? flip[k] : 1.));
6976 static inline PetscErrorCode updatePointBC_private(PetscSection section, PetscInt point, PetscInt dof, void (*fuse)(PetscScalar *, PetscScalar), const PetscInt perm[], const PetscScalar flip[], const PetscInt clperm[], const PetscScalar values[], PetscInt offset, PetscScalar array[])
6993 fuse(&a[k], values[clperm[offset + perm[k]]] * (flip ? flip[perm[k]] : 1.));
7000 fuse(&a[k], values[clperm[offset + k]] * (flip ? flip[k] : 1.));
7009 fuse(&a[k], values[offset + perm[k]] * (flip ? flip[perm[k]] : 1.));
7016 fuse(&a[k], values[offset + k] * (flip ? flip[k] : 1.));
7026 static inline PetscErrorCode updatePointFields_private(PetscSection section, PetscInt point, const PetscInt *perm, const PetscScalar *flip, PetscInt f, void (*fuse)(PetscScalar *, PetscScalar), PetscBool setBC, const PetscInt clperm[], const PetscScalar values[], PetscInt *offset, PetscScalar array[])
7029 PetscInt fdof, foff, fcdof, foffset = *offset;
7092 *offset += fdof;
7096 static inline PetscErrorCode updatePointFieldsBC_private(PetscSection section, PetscInt point, const PetscInt perm[], const PetscScalar flip[], PetscInt f, PetscInt Ncc, const PetscInt comps[], void (*fuse)(PetscScalar *, PetscScalar), const PetscInt clperm[], const PetscScalar values[], PetscInt *offset, PetscScalar array[])
7099 PetscInt fdof, foff, fcdof, foffset = *offset;
7207 *offset += fdof;
7326 PetscInt offset = 0, f;
7338 PetscCall(updatePointFields_private(section, point, perm, flip, f, insert, PETSC_FALSE, clperm, values, &offset, array));
7346 PetscCall(updatePointFields_private(section, point, perm, flip, f, insert, PETSC_TRUE, clperm, values, &offset, array));
7354 PetscCall(updatePointFieldsBC_private(section, point, perm, flip, f, -1, NULL, insert, clperm, values, &offset, array));
7362 PetscCall(updatePointFields_private(section, point, perm, flip, f, add, PETSC_FALSE, clperm, values, &offset, array));
7370 PetscCall(updatePointFields_private(section, point, perm, flip, f, add, PETSC_TRUE, clperm, values, &offset, array));
7378 PetscCall(updatePointFieldsBC_private(section, point, perm, flip, f, -1, NULL, add, clperm, values, &offset, array));
7459 /* Check whether the given point is in the label. If not, update the offset to skip this point */
7460 static inline PetscErrorCode CheckPoint_Private(DMLabel label, PetscInt labelId, PetscSection section, PetscInt point, PetscInt f, PetscInt *offset, PetscBool *contains)
7470 *offset += fdof;
7486 PetscInt offset = 0, f;
7508 offset += fdof;
7519 PetscCall(CheckPoint_Private(label, labelId, section, point, f, &offset, &contains));
7521 PetscCall(updatePointFields_private(section, point, perm, flip, f, insert, PETSC_FALSE, NULL, values, &offset, array));
7529 PetscCall(CheckPoint_Private(label, labelId, section, point, f, &offset, &contains));
7531 PetscCall(updatePointFields_private(section, point, perm, flip, f, insert, PETSC_TRUE, NULL, values, &offset, array));
7539 PetscCall(CheckPoint_Private(label, labelId, section, point, f, &offset, &contains));
7541 PetscCall(updatePointFieldsBC_private(section, point, perm, flip, f, Ncc, comps, insert, NULL, values, &offset, array));
7549 PetscCall(CheckPoint_Private(label, labelId, section, point, f, &offset, &contains));
7551 PetscCall(updatePointFields_private(section, point, perm, flip, f, add, PETSC_FALSE, NULL, values, &offset, array));
7559 PetscCall(CheckPoint_Private(label, labelId, section, point, f, &offset, &contains));
7561 PetscCall(updatePointFields_private(section, point, perm, flip, f, add, PETSC_TRUE, NULL, values, &offset, array));
7609 . off - The global offset of this point
7610 . loff - The local offset of each field
7666 . off - The offset of this point in the (local or global) indexed space - should match islocal and (usually) the section
7667 . foffs - array of length numFields containing the offset in canonical point ordering (the location in indices) of each field
7670 . permsoff - offset
7686 The section is only used for field layout, so islocal is technically a statement about the offset (off). At some point
7688 offset could be obtained from the section instead of passing it explicitly as we do now.
7741 This version believes the globalSection offsets for each field, rather than just the point offset
7743 . foffs - The offset into 'indices' for each field, since it is segregated by field
10716 PetscInt pStart, pEnd, p, sStart, sEnd, dof, aDof, aOff, off, nnz, annz, m, n, q, a, offset, *i, *j;
10780 offset = 0;
10796 for (s = 0; s < aDof; s++) j[offset++] = aOff + s;
10813 for (s = 0; s < aDof; s++) j[offset++] = aOff + s;