| /petsc/src/ksp/pc/impls/tfs/ |
| H A D | gs.c | 58 PetscInt nel; /* number of unique elements */ member 126 static PCTFS_gs_id *gsi_check_args(PetscInt *elms, PetscInt nel, PetscInt level); 180 PCTFS_gs_id *PCTFS_gs_init(PetscInt *elms, PetscInt nel, PetscInt level) in PCTFS_gs_init() argument 191 gs = gsi_check_args(elms, nel, level); in PCTFS_gs_init() 216 static PCTFS_gs_id *gsi_check_args(PetscInt *in_elms, PetscInt nel, PetscInt level) in gsi_check_args() argument 227 if (nel < 0) SETERRABORT(PETSC_COMM_WORLD, PETSC_ERR_PLIB, "can't have fewer than 0 elms!!!\n"); in gsi_check_args() 229 if (nel == 0) PetscCallAbort(PETSC_COMM_WORLD, PetscInfo(0, "I don't have any elements!!!\n")); in gsi_check_args() 239 for (i = j = 0; i < nel; i++) { in gsi_check_args() 243 k = nel; in gsi_check_args() 244 nel = j; in gsi_check_args() [all …]
|
| /petsc/src/dm/impls/da/ |
| H A D | dagetelem.c | 3 static PetscErrorCode DMDAGetElements_1D(DM dm, PetscInt *nel, PetscInt *nen, const PetscInt *e[]) in DMDAGetElements_1D() argument 31 *nel = da->ne; in DMDAGetElements_1D() 37 static PetscErrorCode DMDAGetElements_2D(DM dm, PetscInt *nel, PetscInt *nen, const PetscInt *e[]) in DMDAGetElements_2D() argument 96 *nel = da->ne; in DMDAGetElements_2D() 102 static PetscErrorCode DMDAGetElements_3D(DM dm, PetscInt *nel, PetscInt *nen, const PetscInt *e[]) in DMDAGetElements_3D() argument 175 *nel = da->ne; in DMDAGetElements_3D() 387 PetscErrorCode DMDAGetElements(DM dm, PetscInt *nel, PetscInt *nen, const PetscInt *e[]) in DMDAGetElements() argument 395 PetscAssertPointer(nel, 2); in DMDAGetElements() 403 *nel = dd->ne; in DMDAGetElements() 409 *nel = 0; in DMDAGetElements() [all …]
|
| H A D | grglvis.c | 343 PetscInt sx, sy, sz, ie, je, ke, ien, jen, ken, nel; in DMDAView_GLVis_ASCII() local 389 nel = ien; in DMDAView_GLVis_ASCII() 390 if (dim > 1) nel *= jen; in DMDAView_GLVis_ASCII() 391 if (dim > 2) nel *= ken; in DMDAView_GLVis_ASCII() 393 PetscCall(PetscViewerASCIIPrintf(viewer, "%" PetscInt_FMT "\n", nel)); in DMDAView_GLVis_ASCII() 448 if (nel) { in DMDAView_GLVis_ASCII()
|
| H A D | fdda.c | 767 PetscInt i, nel, nen, nv, dof, *gidx, n, N; in DMCreateMatrix_DA_IS() local 779 …PetscCall(DMDAGetElements(dm, &nel, &nen, &e_loc)); /* this will throw an error if the stencil typ… in DMCreateMatrix_DA_IS() 780 for (i = 0; i < nel * nen; i++) PetscCall(PetscBTSet(bt, e_loc[i])); in DMCreateMatrix_DA_IS() 810 …for (i = 0; i < nel; i++) PetscCall(MatSetValuesBlockedLocal(P, nen, e_loc + i * nen, nen, e_loc +… in DMCreateMatrix_DA_IS() 813 PetscCall(DMDARestoreElements(dm, &nel, &nen, &e_loc)); in DMCreateMatrix_DA_IS()
|
| /petsc/src/dm/impls/swarm/ |
| H A D | swarmpic_plex.c | 86 PetscInt q, npoints_q, e, nel, pcnt, ps, pe, d, k, r, Nfc; in private_DMSwarmInsertPointsUsingCellDM_PLEX_SubDivide() local 122 nel = pe - ps; in private_DMSwarmInsertPointsUsingCellDM_PLEX_SubDivide() 129 PetscCall(DMSwarmSetLocalSizes(dm, npoints_q * nel, -1)); in private_DMSwarmInsertPointsUsingCellDM_PLEX_SubDivide() 137 for (e = 0; e < nel; e++) { in private_DMSwarmInsertPointsUsingCellDM_PLEX_SubDivide() 160 PetscInt ii, jj, q, npoints_q, e, nel, npe, pcnt, ps, pe, d, k, nfaces, Nfc; in private_DMSwarmInsertPointsUsingCellDM_PLEX2D_Regular() local 212 nel = pe - ps; in private_DMSwarmInsertPointsUsingCellDM_PLEX2D_Regular() 219 PetscCall(DMSwarmSetLocalSizes(dm, npoints_q * nel, -1)); in private_DMSwarmInsertPointsUsingCellDM_PLEX2D_Regular() 227 for (e = 0; e < nel; e++) { in private_DMSwarmInsertPointsUsingCellDM_PLEX2D_Regular() 284 PetscInt dim, ps, pe, nel, nfaces, Nfc; in private_DMSwarmSetPointCoordinatesCellwise_PLEX() local 327 nel = pe - ps; in private_DMSwarmSetPointCoordinatesCellwise_PLEX() [all …]
|
| H A D | swarmpic_da.c | 91 PetscInt nel, npe, e, q, k, d; in private_DMSwarmInsertPointsUsingCellDM_DA_Q1() local 129 PetscCall(DMDAGetElements(dmc, &nel, &npe, &element_list)); in private_DMSwarmInsertPointsUsingCellDM_DA_Q1() 165 PetscCall(DMSwarmSetLocalSizes(dm, npoints_q * nel, -1)); in private_DMSwarmInsertPointsUsingCellDM_DA_Q1() 172 for (e = 0; e < nel; e++) { in private_DMSwarmInsertPointsUsingCellDM_DA_Q1() 191 PetscCall(DMDARestoreElements(dmc, &nel, &npe, &element_list)); in private_DMSwarmInsertPointsUsingCellDM_DA_Q1()
|
| H A D | swarmpic_sort.c | 271 PetscInt nel, npe; in DMSwarmSortGetAccess() local 273 PetscCall(DMDAGetElements(dm, &nel, &npe, &element)); in DMSwarmSortGetAccess() 274 ncells = nel; in DMSwarmSortGetAccess() 275 PetscCall(DMDARestoreElements(dm, &nel, &npe, &element)); in DMSwarmSortGetAccess()
|
| H A D | swarmpic.c | 756 PetscInt nel; in DMSwarmCreatePointPerCellCount() local 762 nel = 0; in DMSwarmCreatePointPerCellCount() 766 PetscCall(DMSwarmSortGetSizes(sw, &nel, NULL)); in DMSwarmCreatePointPerCellCount() 768 PetscCall(PetscMalloc1(nel, &sum)); in DMSwarmCreatePointPerCellCount() 769 for (e = 0; e < nel; e++) PetscCall(DMSwarmSortGetNumberOfPointsPerCell(sw, e, &sum[e])); in DMSwarmCreatePointPerCellCount() 787 nel = _nel; in DMSwarmCreatePointPerCellCount() 793 nel = pe - ps; in DMSwarmCreatePointPerCellCount() 799 PetscCall(method_DMShellGetNumberOfCells(dm, &nel)); in DMSwarmCreatePointPerCellCount() 804 PetscCall(PetscMalloc1(nel, &sum)); in DMSwarmCreatePointPerCellCount() 805 PetscCall(PetscArrayzero(sum, nel)); in DMSwarmCreatePointPerCellCount() [all …]
|
| /petsc/src/ksp/ksp/tutorials/ |
| H A D | ex71.c | 213 PetscInt nel, nen; /* Number of elements & element nodes */ in main() local 267 PetscCall(DMDAGetElements(da, &nel, &nen, &e_loc)); in main() 269 PetscCall(PetscMalloc1(nel * nen, &e_glo)); in main() 270 PetscCall(ISLocalToGlobalMappingApplyBlock(map, nen * nel, e_loc, e_glo)); in main() 278 PetscCall(PetscMalloc1(nel * nen, &el_glo)); in main() 279 PetscCall(ISLocalToGlobalMappingApplyBlock(map, nen * nel, e_loc, el_glo)); in main() 280 …PetscCall(ISLocalToGlobalMappingCreate(PetscObjectComm((PetscObject)map), user.dof, nen * nel, el_… in main() 298 PetscCall(PetscMalloc1(nel, &el_sizes)); in main() 299 for (i = 0; i < nel; i++) el_sizes[i] = user.dof * nen; in main() 300 PetscCall(MatSetVariableBlockSizes(lA, nel, el_sizes)); in main() [all …]
|
| H A D | ex54f.F90 | 29 PetscInt ki, kj, nel, ll, j1, i1, ndf, f4 108 nel = 4 ! nodes per element (quad) 126 do kj = 1, nel 133 do ki = 1, nel 259 subroutine thfx2d(ev, xl, shp, dd, ndm, ndf, nel, dir) argument 261 PetscInt ndm, ndf, nel, i 262 PetscReal ev(2), xl(ndm, nel), shp(3, *), dir 267 do i = 1, nel
|
| H A D | ex70.c | 342 PetscInt nel, npe, eidx; in AssembleStokes_A() local 361 PetscCall(DMDAGetElements(stokes_da, &nel, &npe, &element_list)); in AssembleStokes_A() 362 for (eidx = 0; eidx < nel; eidx++) { in AssembleStokes_A() 405 PetscInt nel, npe, eidx; in AssembleStokes_PC() local 424 PetscCall(DMDAGetElements(stokes_da, &nel, &npe, &element_list)); in AssembleStokes_PC() 425 for (eidx = 0; eidx < nel; eidx++) { in AssembleStokes_PC() 467 PetscInt nel, npe, eidx, i; in AssembleStokes_RHS() local 491 PetscCall(DMDAGetElements(stokes_da, &nel, &npe, &element_list)); in AssembleStokes_RHS() 492 for (eidx = 0; eidx < nel; eidx++) { in AssembleStokes_RHS() 526 PetscInt dim, nel, npe, q, k, d, ncurr, Nfc; in DMSwarmPICInsertPointsCellwise() local [all …]
|
| /petsc/src/dm/tests/ |
| H A D | ex50.c | 56 PetscInt nel, dof = 3, nex, ney, nez, gx = 0, gy = 0, gz = 0; in test_3d() local 74 nel = cEnd - cStart; in test_3d() 75 nex = nel; in test_3d() 82 nel = nex * ney * nez; in test_3d() 85 PetscCall(VecSetSizes(v, 3 * dof * dof * dof * nel, PETSC_DECIDE)); in test_3d()
|
| /petsc/src/dm/tutorials/ |
| H A D | ex11f90.F90 | 17 PetscInt nen, nel 66 PetscCallA(DMDAGetElements(ada, nen, nel, elements, ierr)) 67 do i = 1, nen*nel 70 PetscCallA(DMDARestoreElements(ada, nen, nel, elements, ierr))
|
| /petsc/src/dm/impls/da/ftn-custom/ |
| H A D | zda1f90.c | 44 PETSC_EXTERN void dmdagetelements_(DM *dm, PetscInt *nel, PetscInt *nen, F90Array1d *e, int *ierr P… in dmdagetelements_() argument 52 *ierr = DMDAGetElements(*dm, nel, nen, &fa); in dmdagetelements_() 54 …*ierr = F90Array1dCreate((PetscInt *)fa, MPIU_INT, 1, (*nel) * (*nen), e PETSC_F90_2PTR_PARAM(ptrd… in dmdagetelements_() 57 PETSC_EXTERN void dmdarestoreelements_(DM *dm, PetscInt *nel, PetscInt *nen, F90Array1d *e, int *ie… in dmdarestoreelements_() argument
|
| /petsc/src/binding/petsc4py/src/petsc4py/PETSc/ |
| H A D | DMDA.pyx | 1086 cdef PetscInt nel=0, nen=0 1094 CHKERR(DMDAGetElements(self.dm, &nel, &nen, &elems)) 1095 elements = array_i(nel*nen, elems) 1096 elements.shape = (toInt(nel), toInt(nen)) 1098 CHKERR(DMDARestoreElements(self.dm, &nel, &nen, &elems))
|
| /petsc/src/dm/impls/moab/ |
| H A D | dmmoab.cxx | 536 PetscErrorCode DMMoabGetLocalSize(DM dm, PetscInt *nel, PetscInt *neg, PetscInt *nvl, PetscInt *nvg) in DMMoabGetLocalSize() argument 540 if (nel) *nel = ((DM_Moab *)dm->data)->neleloc; in DMMoabGetLocalSize()
|
| /petsc/src/ksp/ksp/utils/dm/ |
| H A D | dmproject.c | 526 PetscInt k, p, e, npoints, nel, npe, Nfc; in DMSwarmProjectField_ApproxQ1_DA_2D() local 556 PetscCall(DMDAGetElements(dm, &nel, &npe, &element_list)); in DMSwarmProjectField_ApproxQ1_DA_2D() 595 PetscCall(DMDARestoreElements(dm, &nel, &npe, &element_list)); in DMSwarmProjectField_ApproxQ1_DA_2D()
|
| /petsc/src/ksp/pc/impls/bddc/ |
| H A D | bddcprivate.c | 1926 PetscInt nel; in PCBDDCComputeLocalTopologyInfo() local 1931 PetscCall(MatGetVariableBlockSizes(matis->A, &nel, NULL)); in PCBDDCComputeLocalTopologyInfo() 1932 if (matis->allow_repeated && nel) { in PCBDDCComputeLocalTopologyInfo() 1935 pcbddc->n_local_subs = nel; in PCBDDCComputeLocalTopologyInfo() 1937 PetscCall(PetscMalloc1(nel, &pcbddc->local_subs)); in PCBDDCComputeLocalTopologyInfo() 1938 for (PetscInt i = 0, c = 0; i < nel; i++) { in PCBDDCComputeLocalTopologyInfo()
|