| /petsc/src/binding/petsc4py/test/ |
| H A D | test_dmstag.py | 356 cdof = cda.getDof() 384 self.assertEqual(cdof, tuple(kargs['dofs'])) 411 self.assertEqual(cdof, ddof) 432 self.assertEqual(cdim + 1, len(cdof)) 443 centries_per_element, cdof[0] + cdof[1] 448 cdof[0] + 2 * cdof[1] + cdof[2], 453 cdof[0] 454 + 3 * cdof[1] 455 + 3 * cdof[2] 456 + cdof[3],
|
| /petsc/src/vec/is/section/interface/ |
| H A D | section.c | 128 PetscInt dof, cdof, fcdof = 0; in PetscSectionCopy_Internal() local 133 if (force_constrained) cdof = dof; in PetscSectionCopy_Internal() 134 else PetscCall(PetscSectionGetConstraintDof(section, p, &cdof)); in PetscSectionCopy_Internal() 135 if (cdof) PetscCall(PetscSectionSetConstraintDof(newSection, p, cdof)); in PetscSectionCopy_Internal() 139 if (cdof) { in PetscSectionCopy_Internal() 148 PetscInt off, cdof, fcdof = 0; in PetscSectionCopy_Internal() local 155 PetscCall(PetscSectionGetConstraintDof(newSection, p, &cdof)); in PetscSectionCopy_Internal() 156 if (cdof) { in PetscSectionCopy_Internal() 1444 const PetscInt cdof = s->bc ? s->bc->atlasDof[p] : 0; in PetscSectionGetConstrainedStorageSize() local 1445 n += s->atlasDof[p] > 0 ? s->atlasDof[p] - cdof : 0; in PetscSectionGetConstrainedStorageSize() [all …]
|
| /petsc/src/vec/is/section/interface/hdf5/ |
| H A D | sectionhdf5.c | 13 PetscInt *dofs, *offs, *cdofs, *coffs, *cinds, dof, cdof, m, moff, i; in PetscSectionView_HDF5_SingleField() local 24 PetscCall(PetscSectionGetConstraintDof(s, p, &cdof)); in PetscSectionView_HDF5_SingleField() 25 m += cdof; in PetscSectionView_HDF5_SingleField() 45 PetscCall(PetscSectionGetConstraintDof(s, p, &cdof)); in PetscSectionView_HDF5_SingleField() 47 cdofs[n] = cdof; in PetscSectionView_HDF5_SingleField() 49 for (i = 0; i < cdof; ++i) cinds[m++] = cpinds[i]; in PetscSectionView_HDF5_SingleField() 129 PetscInt pStart, pEnd, p, M, m, i, cdof; in PetscSectionLoad_HDF5_SingleField_SetConstraintIndices() local 145 PetscCall(PetscSectionGetConstraintDof(s, p, &cdof)); in PetscSectionLoad_HDF5_SingleField_SetConstraintIndices() 146 for (i = 0; i < cdof; ++i) coffsets[m++] = coffs[p - pStart] + i; in PetscSectionLoad_HDF5_SingleField_SetConstraintIndices() 166 PetscCall(PetscSectionGetConstraintDof(s, p, &cdof)); in PetscSectionLoad_HDF5_SingleField_SetConstraintIndices() [all …]
|
| /petsc/src/binding/petsc4py/src/petsc4py/PETSc/ |
| H A D | DMUtils.pyx | 116 cdef PetscInt cdof = 0 117 CHKERR(DMInterpolationGetDof(self.dminterp, &cdof)) 118 return toInt(cdof) 153 cdef PetscInt cdof = asInt(dof) 154 CHKERR(DMInterpolationSetDof(self.dminterp, cdof))
|
| /petsc/src/dm/impls/da/ |
| H A D | grglvis.c | 201 PetscInt ien, jen, ken, nc, nl, cdof, deg; in DMSetUpGLVisViewer_DMDA() local 219 cdof = nl / (nc * dim); in DMSetUpGLVisViewer_DMDA() 224 … PetscCheck(degd <= cdof, PETSC_COMM_SELF, PETSC_ERR_SUP, "Cell dofs %" PetscInt_FMT, cdof); in DMSetUpGLVisViewer_DMDA() 225 if (degd == cdof) break; in DMSetUpGLVisViewer_DMDA() 342 PetscInt dim, sdim, i, vid[8], mid, cid, cdof; in DMDAView_GLVis_ASCII() local 465 cdof = nc ? nl / nc : 0; in DMDAView_GLVis_ASCII() 478 cdof = sdim; in DMDAView_GLVis_ASCII() 495 for (c = 0; c < cdof / sdim; c++) { in DMDAView_GLVis_ASCII() 497 …m; d++) PetscCall(PetscViewerASCIIPrintf(viewer, fmt, PetscRealPart(array[cdof * i + c * sdim + d]… in DMDAView_GLVis_ASCII()
|
| /petsc/src/dm/impls/plex/ |
| H A D | plexsection.c | 274 PetscInt Nf, cdof, maxDof = 0, pStart, pEnd, p, bc, f, d; in DMPlexCreateSectionBCIndicesField() local 282 PetscCall(PetscSectionGetConstraintDof(section, p, &cdof)); in DMPlexCreateSectionBCIndicesField() 283 maxDof = PetscMax(maxDof, cdof); in DMPlexCreateSectionBCIndicesField() 368 PetscInt cdof, d; in DMPlexCreateSectionBCIndices() local 370 PetscCall(PetscSectionGetConstraintDof(section, p, &cdof)); in DMPlexCreateSectionBCIndices() 371 if (cdof) { in DMPlexCreateSectionBCIndices() 387 if (cdof != numConst) PetscCall(PetscSectionSetConstraintDof(section, p, numConst)); in DMPlexCreateSectionBCIndices() 389 for (d = 0; d < cdof; ++d) indices[d] = d; in DMPlexCreateSectionBCIndices()
|
| H A D | plexpreallocate.c | 544 PetscInt dof, cdof, off, d; in DMPlexCreateAdjacencySection_Static() local 548 PetscCall(PetscSectionGetConstraintDof(section, p, &cdof)); in DMPlexCreateAdjacencySection_Static() 553 for (d = off; d < off + dof - cdof; ++d) { in DMPlexCreateAdjacencySection_Static() 575 PetscInt numAdj = PETSC_DETERMINE, dof, cdof, off, goff, d, q, anDof; in DMPlexCreateAdjacencySection_Static() local 579 PetscCall(PetscSectionGetConstraintDof(section, p, &cdof)); in DMPlexCreateAdjacencySection_Static() 582 for (d = 0; d < dof - cdof; ++d) { in DMPlexCreateAdjacencySection_Static() 611 …for (d = goff; d < goff + dof - cdof; ++d) PetscCall(PetscSectionAddDof(sectionAdj, d, ndof - ncdo… in DMPlexCreateAdjacencySection_Static() 615 … for (d = goff; d < goff + dof - cdof; ++d) PetscCall(PetscSectionAddDof(sectionAdj, d, anDof)); in DMPlexCreateAdjacencySection_Static() 627 PetscInt numAdj = PETSC_DETERMINE, dof, cdof, off, goff, d, q, anDof, anOff; in DMPlexCreateAdjacencySection_Static() local 631 PetscCall(PetscSectionGetConstraintDof(section, p, &cdof)); in DMPlexCreateAdjacencySection_Static() [all …]
|
| H A D | plextree.c | 2090 PetscInt dof, cdof, numPointsWithDofs, offset, *pointsWithDofs, nleaves, l; in DMPlexComputeInterpolatorTree() local 2097 PetscCall(PetscSectionGetConstraintDof(globalFine, p, &cdof)); in DMPlexComputeInterpolatorTree() 2098 if ((dof - cdof) > 0) numPointsWithDofs++; in DMPlexComputeInterpolatorTree() 2104 PetscCall(PetscSectionGetConstraintDof(globalFine, p, &cdof)); in DMPlexComputeInterpolatorTree() 2105 if ((dof - cdof) > 0) pointsWithDofs[offset++] = l; in DMPlexComputeInterpolatorTree() 3298 PetscInt l, nleaves, dof, cdof, numPointsWithDofs, offset, *pointsWithDofs, numIndices; in DMPlexTransferInjectorTree() local 3305 PetscCall(PetscSectionGetConstraintDof(globalFine, p, &cdof)); in DMPlexTransferInjectorTree() 3306 if ((dof - cdof) > 0) { in DMPlexTransferInjectorTree() 3321 PetscCall(PetscSectionGetConstraintDof(globalFine, p, &cdof)); in DMPlexTransferInjectorTree() 3322 if ((dof - cdof) > 0) { in DMPlexTransferInjectorTree() [all …]
|
| H A D | plex.c | 327 PetscInt cdof, vdof; in DMPlexVecView1D() local 330 PetscCall(PetscSectionGetDof(s, eStart, &cdof)); in DMPlexVecView1D() 332 if (cdof) { in DMPlexVecView1D() 2931 PetscInt pStart, pEnd, dof, cdof, num_fields; in DMCreateMatrix_Plex() local 2950 PetscCall(PetscSectionGetConstraintDof(sectionGlobal, p, &cdof)); in DMCreateMatrix_Plex() 2957 for (PetscInt i = 0; i < dof - cdof; ++i) pblocks[offset - localStart + i] = dof - cdof; in DMCreateMatrix_Plex() 2959 … if (bstate == PETSC_BOOL3_FALSE && dof - cdof) pblocks[offset - localStart] = -(dof - cdof); in DMCreateMatrix_Plex() 2962 bdof = cdof && (dof - cdof) ? 1 : dof; in DMCreateMatrix_Plex() 2978 PetscCall(PetscSectionGetFieldConstraintDof(sectionGlobal, p, field, &cdof)); in DMCreateMatrix_Plex() 2981 …for (PetscInt i = 0; i < dof - cdof; i++) pblocks[offset - localStart + i] = (dof - cdof) / num_no… in DMCreateMatrix_Plex() [all …]
|
| /petsc/include/petsc/private/ |
| H A D | dmimpl.h | 475 PetscInt dof, cdof; in DMGetGlobalOffset_Private() local 481 PetscCall(PetscSectionGetConstraintDof(dm->globalSection, point, &cdof)); in DMGetGlobalOffset_Private() 482 *end = *start + dof - cdof + (dof < 0 ? 1 : 0); in DMGetGlobalOffset_Private() 488 const PetscInt cdof = s->bc ? s->bc->atlasDof[point - s->bc->pStart] : 0; in DMGetGlobalOffset_Private() local 490 *end = *start + dof - cdof + (dof < 0 ? 1 : 0); in DMGetGlobalOffset_Private()
|
| /petsc/src/dm/interface/ |
| H A D | dmi.c | 14 PetscInt dof, cdof; in DMCreateGlobalVector_Section_Private() local 17 PetscCall(PetscSectionGetConstraintDof(gSection, p, &cdof)); in DMCreateGlobalVector_Section_Private() 19 if (dof - cdof > 0) { in DMCreateGlobalVector_Section_Private() 22 blockSize = dof - cdof; in DMCreateGlobalVector_Section_Private() 24 blockSize = PetscGCD(dof - cdof, blockSize); in DMCreateGlobalVector_Section_Private()
|
| H A D | dmperiodicity.c | 428 PetscInt p = 0, q, dof, cdof, d, offDG; in DMLocalizeCoordinates() local 430 PetscCall(PetscSectionGetDof(csDG, c, &cdof)); in DMLocalizeCoordinates() 431 if (!cdof) continue; in DMLocalizeCoordinates()
|
| H A D | dm.c | 1128 PetscInt bdof, cdof, dof, off, c, cind; in DMGetLocalToGlobalMapping() local 1132 PetscCall(PetscSectionGetConstraintDof(section, p, &cdof)); in DMGetLocalToGlobalMapping() 1136 bdof = cdof && (dof - cdof) ? 1 : dof; in DMGetLocalToGlobalMapping() 1140 if (cind < cdof && c == cdofs[cind]) { in DMGetLocalToGlobalMapping() 3165 PetscInt dof, gdof, cdof, gcdof, off, goff, d, e; in DMLocalToGlobalBegin() local 3169 PetscCall(PetscSectionGetConstraintDof(s, p, &cdof)); in DMLocalToGlobalBegin() 3175 …gdof: %" PetscInt_FMT " cdof: %" PetscInt_FMT " gcdof: %" PetscInt_FMT, p, dof, gdof, cdof, gcdof); in DMLocalToGlobalBegin() 3180 } else if (cdof == gcdof) { in DMLocalToGlobalBegin() 3186 if ((cind < cdof) && (d == cdofs[cind])) { in DMLocalToGlobalBegin() 3192 …gdof: %" PetscInt_FMT " cdof: %" PetscInt_FMT " gcdof: %" PetscInt_FMT, p, dof, gdof, cdof, gcdof); in DMLocalToGlobalBegin() [all …]
|
| /petsc/src/dm/dt/dualspace/interface/ |
| H A D | dualspace.c | 975 PetscInt dof, cdof; in PetscDualSpaceGetInteriorSection() local 978 PetscCall(PetscSectionGetConstraintDof(full_section, p, &cdof)); in PetscDualSpaceGetInteriorSection() 979 PetscCall(PetscSectionSetDof(sp->intPointSection, p, dof - cdof)); in PetscDualSpaceGetInteriorSection() 1438 PetscInt dof, cdof, off, d; in PetscDualSpaceCreateInteriorDataDefault() local 1441 PetscCall(PetscSectionGetConstraintDof(section, p, &cdof)); in PetscDualSpaceCreateInteriorDataDefault() 1442 if (!(dof - cdof)) continue; in PetscDualSpaceCreateInteriorDataDefault() 1457 PetscInt dof, cdof, off, d; in PetscDualSpaceCreateInteriorDataDefault() local 1460 PetscCall(PetscSectionGetConstraintDof(section, p, &cdof)); in PetscDualSpaceCreateInteriorDataDefault() 1461 if (!(dof - cdof)) continue; in PetscDualSpaceCreateInteriorDataDefault()
|
| /petsc/src/vec/is/sf/utils/ |
| H A D | sfutils.c | 165 PetscInt dof, cdof, off, gdof, gcdof, goff, gsize, d, c; in PetscSFSetGraphSection() local 169 PetscCall(PetscSectionGetConstraintDof(localSection, p, &cdof)); in PetscSFSetGraphSection() 176 if (gsize != dof - cdof) { in PetscSFSetGraphSection() 177 …strained size %" PetscInt_FMT ", nor the unconstrained %" PetscInt_FMT, gsize, p, dof - cdof, dof); in PetscSFSetGraphSection() 178 cdof = 0; /* Ignore constraints */ in PetscSFSetGraphSection() 181 if ((c < cdof) && (cind[c] == d)) { in PetscSFSetGraphSection()
|
| /petsc/src/ts/tutorials/ |
| H A D | ex18.c | 871 PetscInt dof, cdof, d; in MonitorFunctionals() local 874 PetscCall(PetscSectionGetFieldConstraintDof(s, p, f, &cdof)); in MonitorFunctionals() 877 …for (d = 0; d < dof - cdof; ++d) xnorms[f * 2 + 0] = PetscMax(xnorms[f * 2 + 0], PetscAbsScalar(a[… in MonitorFunctionals() 878 for (d = 0; d < dof - cdof; ++d) xnorms[f * 2 + 1] += PetscAbsScalar(a[d]); in MonitorFunctionals()
|
| /petsc/src/ksp/pc/impls/patch/ |
| H A D | pcpatch.c | 1064 …PetscInt dof, off, cdof, coff, efdof, efoff, ifdof, ifoff, pdof, n = 0, cn = 0, ifn = 0, efn … in PCPatchCreateCellPatches() local 1068 PetscCall(PetscSectionGetDof(cellCounts, v, &cdof)); in PCPatchCreateCellPatches() 1116 … cdof, PETSC_COMM_SELF, PETSC_ERR_ARG_SIZ, "Number of cells in patch %" PetscInt_FMT " is %" Petsc… in PCPatchCreateCellPatches() 1123 for (n = 0; n < cdof; n++) { in PCPatchCreateCellPatches() 2486 PetscInt cdof; in PCSetUp_PATCH() local 2487 PetscCall(PetscSectionGetConstraintDof(s, p, &cdof)); in PCSetUp_PATCH() 2488 numGlobalBcs += cdof; in PCSetUp_PATCH() 2523 PetscInt off, cdof, d; in PCSetUp_PATCH() local 2526 PetscCall(PetscSectionGetConstraintDof(s, p, &cdof)); in PCSetUp_PATCH() 2528 for (d = 0; d < cdof; ++d) globalBcs[numGlobalBcs++] = off + ind[d]; in PCSetUp_PATCH()
|
| /petsc/src/dm/label/ |
| H A D | dmlabel.c | 2595 PetscInt pStart, pEnd, p, dof, cdof, off, globalOff = 0, nroots; in PetscSectionCreateGlobalSectionLabel() local 2622 PetscCall(PetscSectionGetConstraintDof(s, p, &cdof)); in PetscSectionCreateGlobalSectionLabel() 2623 … if (!includeConstraints && cdof > 0) PetscCall(PetscSectionSetConstraintDof(*gsection, p, cdof)); in PetscSectionCreateGlobalSectionLabel() 2638 cdof = (!includeConstraints && s->bc) ? s->bc->atlasDof[p] : 0; in PetscSectionCreateGlobalSectionLabel() 2640 off += (*gsection)->atlasDof[p] > 0 ? (*gsection)->atlasDof[p] - cdof : 0; in PetscSectionCreateGlobalSectionLabel()
|
| /petsc/src/dm/impls/plex/hdf5/ |
| H A D | plexhdf5.c | 2881 PetscInt dof, cdof, i, j, off, goff; in DMPlexSectionLoad_HDF5_Internal_CreateDataSF() local 2888 PetscCall(PetscSectionGetConstraintDof(leafSection, p, &cdof)); in DMPlexSectionLoad_HDF5_Internal_CreateDataSF() 2891 PetscBool constrained = (PetscBool)(j < cdof && i == cinds[j]); in DMPlexSectionLoad_HDF5_Internal_CreateDataSF()
|
| /petsc/src/dm/impls/forest/p4est/ |
| H A D | pforest.h | 3907 PetscInt cdof, off; in PforestLocalizeCell() local 3910 PetscCall(PetscSectionGetDof(newSection, cell, &cdof)); in PforestLocalizeCell() 3911 if (!cdof) PetscFunctionReturn(PETSC_SUCCESS); in PforestLocalizeCell()
|
| /petsc/src/ksp/pc/impls/bddc/ |
| H A D | bddcprivate.c | 2654 PetscInt s, pp, p = closure[k], off, dof, cdof; in PCBDDCDetectDisconnectedComponents() local 2656 PetscCall(PetscSectionGetConstraintDof(subSection, p, &cdof)); in PCBDDCDetectDisconnectedComponents() 2659 for (s = 0; s < dof - cdof; s++) { in PCBDDCDetectDisconnectedComponents() 2667 PetscCall(PetscSectionGetConstraintDof(subSection, pp, &cdof)); in PCBDDCDetectDisconnectedComponents() 2670 for (s = 0; s < dof - cdof; s++) { in PCBDDCDetectDisconnectedComponents()
|