| /petsc/src/dm/impls/plex/tests/ |
| H A D | ex17.c | 46 PetscInt cStart, cEnd, c; in TestCentroidLocation() local 52 PetscCall(DMPlexGetHeightStratum(dm, 0, &cStart, &cEnd)); in TestCentroidLocation() 54 PetscCall(VecCreateSeq(PETSC_COMM_SELF, (cEnd - cStart) * cdim, &points)); in TestCentroidLocation() 57 for (c = cStart; c < cEnd; ++c) { in TestCentroidLocation() 59 PetscInt off = (c - cStart) * cdim, d; in TestCentroidLocation() 68 if (n != (cEnd - cStart)) { in TestCentroidLocation() 70 …!= c + cStart) PetscCall(PetscPrintf(PETSC_COMM_SELF, "Could not locate centroid of cell %" PetscI… in TestCentroidLocation() 72 …F, PETSC_ERR_PLIB, "Located %" PetscInt_FMT " points instead of %" PetscInt_FMT, n, cEnd - cStart); in TestCentroidLocation() 74 …cStart; c < cEnd; ++c) PetscCheck(cells[c - cStart].index == c, PETSC_COMM_SELF, PETSC_ERR_PLIB, "… in TestCentroidLocation()
|
| H A D | ex20.c | 10 PetscInt cStart, cEnd; in main() local 20 PetscCall(DMPlexGetHeightStratum(dm, 0, &cStart, &cEnd)); in main() 23 if (cEnd > cStart) PetscCall(DMLabelSetValue(adaptLabel, cStart, DM_ADAPT_REFINE)); in main()
|
| H A D | ex75.c | 8 PetscInt dim = 1, d, cStart, cEnd, c, q, degree = 2, coordSize, offset; in main() local 36 PetscCall(DMPlexGetHeightStratum(dm, 0, &cStart, &cEnd)); in main() 37 PetscCall(PetscSectionSetChart(coordSec, cStart, cEnd)); in main() 38 for (c = cStart; c < cEnd; ++c) { in main() 50 for (c = cStart; c < cEnd; ++c) { in main()
|
| H A D | dmplexcomputecellgeometryfem.F90 | 9 PetscInt :: cStart 41 PetscCallA(DMPlexGetHeightStratum(dm, zero, cStart, PETSC_NULL_INTEGER, ierr)) 42 PetscCallA(DMPlexComputeCellGeometryFEM(dm, cStart, q, v, J, invJ, detJ, ierr)) 75 PetscCallA(DMPlexGetHeightStratum(dm, zero, cStart, PETSC_NULL_INTEGER, ierr)) 76 PetscCallA(DMPlexComputeCellGeometryFEM(dm, cStart, q, v, J, invJ, detJ, ierr))
|
| H A D | ex32.c | 9 PetscInt dim, depth, cStart, cEnd, c; in CheckMesh() local 14 PetscCall(DMPlexGetHeightStratum(dm, 0, &cStart, &cEnd)); in CheckMesh() 15 for (c = cStart; c < cEnd; ++c) { in CheckMesh()
|
| H A D | ex100.c | 68 PetscInt cStart, cEnd; in main() local 78 PetscCall(DMPlexGetHeightStratum(dm_read, 0, &cStart, &cEnd)); in main() 79 for (PetscInt cell = cStart; cell < cEnd; cell++) { in main() 95 …if (cell == cStart) PetscCall(PetscArraycpy(ref_cell_bounding_box_size, cell_bounding_box_size, cd… in main() 100 …FMT " in dimension %" PetscInt_FMT ". Relative difference = %g\n", cell, cStart, d, (double)differ… in main()
|
| H A D | ex16.c | 18 PetscInt cStart, cEnd, cStartSub, cEndSub; in CreateHalfCellsLabel() local 24 PetscCall(DMPlexGetHeightStratum(dm, 0, &cStart, &cEnd)); in CreateHalfCellsLabel() 26 cStartSub = cStart; in CreateHalfCellsLabel() 41 PetscInt cStart, cEnd, cdim; in CreateHalfDomainLabel() local 48 PetscCall(DMPlexGetHeightStratum(dm, 0, &cStart, &cEnd)); in CreateHalfDomainLabel() 50 for (PetscInt c = cStart; c < cEnd; ++c) { in CreateHalfDomainLabel()
|
| H A D | ex9.c | 221 PetscInt numRuns, cStart, cEnd, c, i; in TestCone() local 235 PetscCall(DMPlexGetHeightStratum(dm, 0, &cStart, &cEnd)); in TestCone() 238 for (c = cStart; c < cEnd; ++c) { in TestCone() 248 numRuns = (cEnd - cStart) * user->iterations; in TestCone() 264 PetscInt numRuns, cStart, cEnd, c, i; in TestTransitiveClosure() local 278 PetscCall(DMPlexGetHeightStratum(dm, 0, &cStart, &cEnd)); in TestTransitiveClosure() 281 for (c = cStart; c < cEnd; ++c) { in TestTransitiveClosure() 293 numRuns = (cEnd - cStart) * user->iterations; in TestTransitiveClosure() 311 PetscInt numRuns, cStart, cEnd, c, i; in TestVecClosure() local 348 PetscCall(DMPlexGetHeightStratum(dm, 0, &cStart, &cEnd)); in TestVecClosure() [all …]
|
| /petsc/src/dm/dt/dualspace/impls/refined/ |
| H A D | dualspacerefined.c | 37 PetscInt cStart, cEnd, c; in PetscDualSpaceRefinedSetCellSpaces_Refined() local 44 PetscCall(DMPlexGetHeightStratum(dm, 0, &cStart, &cEnd)); in PetscDualSpaceRefinedSetCellSpaces_Refined() 45 for (c = 0; c < cEnd - cStart; c++) { in PetscDualSpaceRefinedSetCellSpaces_Refined() 47 PetscCall(PetscDualSpaceDestroy(&sp->pointSpaces[c + cStart - pStart])); in PetscDualSpaceRefinedSetCellSpaces_Refined() 48 sp->pointSpaces[c + cStart - pStart] = cellSpaces[c]; in PetscDualSpaceRefinedSetCellSpaces_Refined() 66 PetscInt cStart, cEnd, c, spdim; in PetscDualSpaceSetUp_Refined() local 75 PetscCall(DMPlexGetHeightStratum(dm, 0, &cStart, &cEnd)); in PetscDualSpaceSetUp_Refined() 76 for (c = cStart; c < cEnd; c++) { in PetscDualSpaceSetUp_Refined() 85 for (c = cStart; c < cEnd; c++) { in PetscDualSpaceSetUp_Refined() 92 if ((c > cStart) && sp->pointSpaces[c - pStart] != sp->pointSpaces[c - 1 - pStart]) break; in PetscDualSpaceSetUp_Refined() [all …]
|
| /petsc/src/dm/impls/plex/tutorials/ |
| H A D | dmplexgetrestoreclosureindices.F90 | 17 PetscInt :: cStart, cEnd 36 PetscCallA(DMPlexGetHeightStratum(dm, zero, cStart, cEnd, ierr)) 42 …PetscCallA(DMPlexGetClosureIndices(cdm, gS, gS, cStart, PETSC_TRUE, nIdx, indices, offsets, PETSC_… 43 allocate (idxMatrix(nIdx, cEnd - cStart)) 44 idxMatrix(1:nIdx, cStart + 1) = indices 47 …PetscCallA(DMPlexRestoreClosureIndices(cdm, gS, gS, cStart, PETSC_TRUE, nIdx, indices, offsets, PE…
|
| H A D | ex10.c | 23 PetscInt cStart, cEnd, c; in CreateDomainLabel() local 29 PetscCall(DMPlexGetHeightStratum(dm, 0, &cStart, &cEnd)); in CreateDomainLabel() 30 for (c = cStart; c < cEnd; ++c) { in CreateDomainLabel() 59 PetscInt dim, Nv, v, cStart, cEnd, c; in AdaptMesh() local 109 PetscCall(DMPlexGetHeightStratum(dmCur, 0, &cStart, &cEnd)); in AdaptMesh() 110 for (c = cStart; c < cEnd; ++c) { in AdaptMesh()
|
| H A D | ex16.c | 50 PetscInt dim, cStart, cEnd; in ReadCGNSDM() local 56 PetscCall(DMPlexGetHeightStratum(*dm, 0, &cStart, &cEnd)); in ReadCGNSDM() 57 PetscCall(DMPlexGetCellType(*dm, cStart, &dm_polytope)); in ReadCGNSDM() 58 for (PetscInt i = cStart + 1; i < cEnd; i++) { in ReadCGNSDM()
|
| H A D | ex8.c | 34 PetscInt dim, Nf = 1, c, cStart, cEnd; in main() local 76 PetscCall(DMPlexGetHeightStratum(dm, 0, &cStart, &cEnd)); in main() 77 for (c = cStart; c < cEnd; c++) { in main() 80 PetscCall(PetscPrintf(PETSC_COMM_SELF, "Element #%" PetscInt_FMT "\n", c - cStart)); in main() 143 for (c = cStart; c < cEnd; ++c) { in main() 151 … PetscCall(PetscPrintf(PETSC_COMM_SELF, "Element #%" PetscInt_FMT " coordinates\n", c - cStart)); in main()
|
| H A D | ex18.c | 12 PetscInt dim, cStart, cEnd, fStart, fEnd; in surfArea() local 27 PetscCall(DMPlexGetHeightStratum(dm, 0, &cStart, &cEnd)); in surfArea() 28 for (PetscInt ii = cStart; ii < cEnd; ++ii) { in surfArea() 47 PetscCall(DMPlexGetHeightStratum(dm, 0, &cStart, &cEnd)); in surfArea() 48 for (PetscInt ii = cStart; ii < cEnd; ++ii) { in surfArea()
|
| /petsc/src/dm/impls/plex/ |
| H A D | plexorient.c | 92 PetscInt cStart, cEnd, fStart, fEnd; in DMPlexCheckFace_Internal() local 96 PetscCall(ISGetPointRange(cellIS, &cStart, &cEnd, &cells)); in DMPlexCheckFace_Internal() 98 PetscCall(DMPlexGetPointDepth(dm, cells ? cells[cStart] : cStart, &dim)); in DMPlexCheckFace_Internal() 104 indC[Ns] = GetPointIndex(supp[s], cStart, cEnd, cells); in DMPlexCheckFace_Internal() 168 …l(DM dm, PetscInt *faceFIFO, PetscInt *fTop, PetscInt *fBottom, PetscInt cStart, PetscInt fStart, … in DMPlexCheckFace_Old_Internal() argument 181 seenA = PetscBTLookup(seenCells, support[0] - cStart); in DMPlexCheckFace_Old_Internal() 182 flippedA = PetscBTLookup(flippedCells, support[0] - cStart) ? 1 : 0; in DMPlexCheckFace_Old_Internal() 183 seenB = PetscBTLookup(seenCells, support[1] - cStart); in DMPlexCheckFace_Old_Internal() 184 flippedB = PetscBTLookup(flippedCells, support[1] - cStart) ? 1 : 0; in DMPlexCheckFace_Old_Internal() 220 PetscCall(PetscBTSet(flippedCells, support[0] - cStart)); in DMPlexCheckFace_Old_Internal() [all …]
|
| H A D | plexadapt.c | 3 static PetscErrorCode DMPlexLabelToVolumeConstraint(DM dm, DMLabel adaptLabel, PetscInt cStart, Pet… in DMPlexLabelToVolumeConstraint() argument 10 for (c = cStart; c < cEnd; c++) { in DMPlexLabelToVolumeConstraint() 19 maxVolumes[c - cStart] = vol; in DMPlexLabelToVolumeConstraint() 45 maxVolumes[c - cStart] = vol / refRatio; in DMPlexLabelToVolumeConstraint() 47 maxVolumes[c - cStart] = vol; in DMPlexLabelToVolumeConstraint() 49 maxVolumes[c - cStart] = vol * refRatio; in DMPlexLabelToVolumeConstraint() 55 static PetscErrorCode DMPlexLabelToMetricConstraint(DM dm, DMLabel adaptLabel, PetscInt cStart, Pet… in DMPlexLabelToMetricConstraint() argument 79 for (c = cStart; c < cEnd; ++c) { in DMPlexLabelToMetricConstraint() 173 PetscInt dim, cStart, cEnd, c; in DMPlexRefine_Internal() local 182 PetscCall(DMPlexGetHeightStratum(dm, 0, &cStart, &cEnd)); in DMPlexRefine_Internal() [all …]
|
| H A D | plexglvis.c | 51 PetscInt dim, cStart, cEnd, vStart, vEnd; in DMSetUpGLVisViewer_Plex() local 58 PetscCall(DMPlexGetHeightStratum(dm, 0, &cStart, &cEnd)); in DMSetUpGLVisViewer_Plex() 67 for (c = cStart, totc = 0; c < cEnd; c++) { in DMSetUpGLVisViewer_Plex() 68 if (gNum[c - cStart] >= 0) { in DMSetUpGLVisViewer_Plex() 157 for (i = 0, cum = 0; i < cEnd - cStart; i++) { in DMSetUpGLVisViewer_Plex() 161 PetscCall(PetscSectionGetFieldOffset(s, i + cStart, f, &off)); in DMSetUpGLVisViewer_Plex() 184 for (i = 0, cum = 0; i < cEnd - cStart; i++) { in DMSetUpGLVisViewer_Plex() 188 PetscCall(PetscSectionGetFieldOffset(s, i + cStart, f, &off)); in DMSetUpGLVisViewer_Plex() 457 PetscInt cStart, cEnd, vStart, vEnd, nvert; in DMPlexView_GLVis_ASCII() local 527 PetscCall(DMPlexGetHeightStratum(dm, 0, &cStart, &cEnd)); in DMPlexView_GLVis_ASCII() [all …]
|
| H A D | plexvtu.c | 56 …PetscInt dim, vStart, vEnd, cStart, cEnd, pStart, pEnd, cellHeight, numLabelCells, hasLabel, … in DMPlexGetVTKConnectivity() local 65 PetscCall(DMPlexGetHeightStratum(dm, cellHeight, &cStart, &cEnd)); in DMPlexGetVTKConnectivity() 72 for (c = cStart; c < cEnd; ++c) { in DMPlexGetVTKConnectivity() 128 PetscInt cStart, cEnd, cellHeight; in DMPlexGetNonEmptyComm_Private() local 133 PetscCall(DMPlexGetHeightStratum(dm, cellHeight, &cStart, &cEnd)); in DMPlexGetNonEmptyComm_Private() 134 color = (cStart < cEnd) ? 0 : 1; in DMPlexGetNonEmptyComm_Private() 175 …PetscInt dimEmbed, cellHeight, cStart, cEnd, vStart, vEnd, numLabelCells, hasLabel… in DMPlexVTKWriteAll_VTU() local 185 PetscCall(DMPlexGetHeightStratum(dm, cellHeight, &cStart, &cEnd)); in DMPlexVTKWriteAll_VTU() 208 for (c = cStart; c < cEnd; ++c) { in DMPlexVTKWriteAll_VTU() 282 if (cEnd > cStart) PetscCall(PetscSectionGetDof(section, cStart, &bs)); in DMPlexVTKWriteAll_VTU() [all …]
|
| H A D | plexpartition.c | 20 PetscInt dim, depth, overlap, cStart, cEnd, c, v; in DMPlexCreatePartitionerGraph_Overlap() local 54 PetscCall(DMPlexGetHeightStratum(ovdm, height, &cStart, &cEnd)); in DMPlexCreatePartitionerGraph_Overlap() 55 PetscCall(DMPlexCreateNumbering_Plex(ovdm, cStart, cEnd, 0, NULL, sfPoint, &cellNumbering)); in DMPlexCreatePartitionerGraph_Overlap() 62 for (*numVertices = 0, c = cStart; c < cEnd; ++c) { in DMPlexCreatePartitionerGraph_Overlap() 64 if (cellNum[c - cStart] < 0) continue; in DMPlexCreatePartitionerGraph_Overlap() 68 for (c = cStart, v = 0; c < cEnd; ++c) { in DMPlexCreatePartitionerGraph_Overlap() 71 if (cellNum[c - cStart] < 0) continue; in DMPlexCreatePartitionerGraph_Overlap() 75 if (point != c && cStart <= point && point < cEnd) ++vsize; in DMPlexCreatePartitionerGraph_Overlap() 82 for (c = cStart, v = 0; c < cEnd; ++c) { in DMPlexCreatePartitionerGraph_Overlap() 86 if (cellNum[c - cStart] < 0) continue; in DMPlexCreatePartitionerGraph_Overlap() [all …]
|
| /petsc/src/dm/dt/fe/interface/ |
| H A D | fegeom.c | 85 PetscErrorCode PetscFEGeomGetChunk(PetscFEGeom *geom, PetscInt cStart, PetscInt cEnd, PetscFEGeom *… in PetscFEGeomGetChunk() argument 100 (*chunkGeom)->numCells = cEnd - cStart; in PetscFEGeomGetChunk() 102 (*chunkGeom)->v = PetscSafePointerPlusOffset(geom->v, Nq * dE * cStart); in PetscFEGeomGetChunk() 103 (*chunkGeom)->J = PetscSafePointerPlusOffset(geom->J, Nq * dE * dE * cStart); in PetscFEGeomGetChunk() 104 (*chunkGeom)->invJ = PetscSafePointerPlusOffset(geom->invJ, Nq * dE * dE * cStart); in PetscFEGeomGetChunk() 105 (*chunkGeom)->detJ = PetscSafePointerPlusOffset(geom->detJ, Nq * cStart); in PetscFEGeomGetChunk() 106 (*chunkGeom)->n = PetscSafePointerPlusOffset(geom->n, Nq * dE * cStart); in PetscFEGeomGetChunk() 107 (*chunkGeom)->face = PetscSafePointerPlusOffset(geom->face, cStart); in PetscFEGeomGetChunk() 108 (*chunkGeom)->suppJ[0] = PetscSafePointerPlusOffset(geom->suppJ[0], Nq * dE * dE * cStart); in PetscFEGeomGetChunk() 109 (*chunkGeom)->suppJ[1] = PetscSafePointerPlusOffset(geom->suppJ[1], Nq * dE * dE * cStart); in PetscFEGeomGetChunk() [all …]
|
| /petsc/src/ts/tests/ |
| H A D | ex28.c | 65 PetscInt dim, d, cStart, cEnd, c, Np, p; in SetInitialCoordinates() local 77 PetscCall(DMPlexGetHeightStratum(dm, 0, &cStart, &cEnd)); in SetInitialCoordinates() 78 PetscCall(DMPlexGetCellType(dm, cStart, &ct)); in SetInitialCoordinates() 84 for (c = cStart; c < cEnd; ++c) { in SetInitialCoordinates() 126 PetscInt dim, d, cStart, cEnd, c, Np, p, n; in SetInitialConditions() local 134 PetscCall(DMPlexGetHeightStratum(dm, 0, &cStart, &cEnd)); in SetInitialConditions() 135 …d - cStart) * Np, PETSC_COMM_SELF, PETSC_ERR_ARG_SIZ, "TS solution local size %" PetscInt_FMT " !=… in SetInitialConditions() 138 for (c = cStart; c < cEnd; ++c) { in SetInitialConditions() 153 PetscInt dim, cStart, cEnd, c, Np = user->particlesPerCell, p; in CreateParticles() local 168 PetscCall(DMPlexGetHeightStratum(dm, 0, &cStart, &cEnd)); in CreateParticles() [all …]
|
| H A D | ex27.c | 68 PetscInt dim, d, cStart, cEnd, c, Np, p; in SetInitialCoordinates() local 83 PetscCall(DMPlexGetHeightStratum(dm, 0, &cStart, &cEnd)); in SetInitialCoordinates() 84 PetscCall(DMPlexGetCellType(dm, cStart, &ct)); in SetInitialCoordinates() 91 for (c = cStart; c < cEnd; ++c) { in SetInitialCoordinates() 114 for (c = cStart; c < cEnd; ++c) { in SetInitialCoordinates() 140 PetscInt dim, d, cStart, cEnd, c, Np, p, n; in SetInitialConditions() local 148 PetscCall(DMPlexGetHeightStratum(dm, 0, &cStart, &cEnd)); in SetInitialConditions() 151 for (c = cStart; c < cEnd; ++c) { in SetInitialConditions() 166 PetscInt dim, cStart, cEnd, c, Np = user->N, p; in CreateParticles() local 188 PetscCall(DMPlexGetHeightStratum(dm, 0, &cStart, &cEnd)); in CreateParticles() [all …]
|
| /petsc/src/dm/impls/swarm/tests/ |
| H A D | ex3.c | 36 PetscInt dim, cStart, cEnd, c, Np = user->particlesPerCell, p; in CreateParticles() local 50 PetscCall(DMPlexGetHeightStratum(dm, 0, &cStart, &cEnd)); in CreateParticles() 51 PetscCall(DMSwarmSetLocalSizes(*sw, (cEnd - cStart) * Np, 0)); in CreateParticles() 54 for (c = cStart; c < cEnd; ++c) { in CreateParticles()
|
| /petsc/src/dm/dt/tests/ |
| H A D | ex5.c | 13 PetscInt dim = 2, Nc = 3, cStart, cEnd; in main() local 34 PetscCall(DMPlexGetHeightStratum(dm, 0, &cStart, &cEnd)); in main() 35 if (cEnd > cStart) { in main() 38 PetscCall(DMPlexGetConeSize(dm, cStart, &coneSize)); in main() 55 PetscCall(DMPlexGetCone(dm, cStart, &cone)); in main()
|
| /petsc/src/dm/dt/fe/tests/ |
| H A D | ex1.c | 188 PetscInt depth, cStart, cEnd, cell, chunkSize = cbs, Nch = 0, Nf, f, totDim, i, k; in TestIntegration() local 198 PetscCall(DMPlexGetHeightStratum(dm, 0, &cStart, &cEnd)); in TestIntegration() 199 PetscCall(DMGetCellDS(dm, cStart, &ds, NULL)); in TestIntegration() 211 for (cell = cStart; cell < cEnd; cell += chunkSize, ++Nch) { in TestIntegration() 233 PetscCall(PetscFEGeomRestoreChunk(affineGeom, cStart, cEnd, &chunkGeom)); in TestIntegration() 241 PetscInt N = (cEnd - cStart) * Nf * its; in TestIntegration() 271 PetscInt cStart, cEnd, Nf, N; in TestIntegration2() local 274 PetscCall(DMPlexGetHeightStratum(dm, 0, &cStart, &cEnd)); in TestIntegration2() 278 N = (cEnd - cStart) * Nf * eventInfo.count; in TestIntegration2()
|