Home
last modified time | relevance | path

Searched refs:npoints (Results 1 – 25 of 55) sorted by relevance

123

/petsc/src/dm/dt/tests/
H A Dex1.c8 static PetscErrorCode CheckPoints(const char *name, PetscInt npoints, const PetscReal *points, Pets… in CheckPoints() argument
14 PetscCall(PetscMalloc3(npoints * ndegrees, &B, npoints * ndegrees, &D, npoints * ndegrees, &D2)); in CheckPoints()
15 PetscCall(PetscDTLegendreEval(npoints, points, ndegrees, degrees, B, D, D2)); in CheckPoints()
17 for (i = 0; i < npoints; i++) { in CheckPoints()
35 static PetscErrorCode CheckQuadrature_Basics(PetscInt npoints, PetscReal alpha, PetscReal beta, con… in CheckQuadrature_Basics() argument
40 for (i = 1; i < npoints; i++) { in CheckQuadrature_Basics()
41 …, alpha = %g, beta = %g, i = %" PetscInt_FMT ", x[i] = %g, x[i-1] = %g", npoints, (double)alpha, (… in CheckQuadrature_Basics()
43 for (i = 0; i < npoints; i++) { in CheckQuadrature_Basics()
44 …_FMT " points, alpha = %g, beta = %g, i = %" PetscInt_FMT ", w[i] = %g", npoints, (double)alpha, (… in CheckQuadrature_Basics()
49 static PetscErrorCode CheckQuadrature(PetscInt npoints, PetscReal alpha, PetscReal beta, const Pets… in CheckQuadrature() argument
[all …]
H A Dex13.c7 …(PetscInt dim, PetscInt deg, PetscInt form, PetscInt jetDegree, PetscInt npoints, const PetscReal … in constructTabulationAndMass() argument
18 PetscCall(PetscMalloc1(Nbpt * Nf * Nk * npoints, &p_trimmed)); in constructTabulationAndMass()
19 PetscCall(PetscDTPTrimmedEvalJet(dim, npoints, points, deg, form, jetDegree, p_trimmed)); in constructTabulationAndMass()
29 const PetscReal *p_i = &p_trimmed[(i * Nf + f) * Nk * npoints]; in constructTabulationAndMass()
30 const PetscReal *p_j = &p_trimmed[(j * Nf + f) * Nk * npoints]; in constructTabulationAndMass()
32 for (PetscInt pt = 0; pt < npoints; pt++) v += p_i[pt] * p_j[pt] * weights[pt]; in constructTabulationAndMass()
48 PetscInt npoints; in test() local
72 PetscCall(PetscQuadratureGetData(q, NULL, NULL, &npoints, &points, &weights)); in test()
74 …PetscCall(constructTabulationAndMass(dim, deg, form, jetDegree, npoints, points, weights, &Nbpt, &… in test()
77 PetscCall(PetscMalloc1(Nbp * Nk * npoints, &p_scalar)); in test()
[all …]
H A Dex9.c10 PetscInt Npoly, npoints, i, j, k; in testOrthogonality() local
15 PetscCall(PetscQuadratureGetData(q, NULL, NULL, &npoints, &points, &weights)); in testOrthogonality()
17 PetscCall(PetscMalloc1(Npoly * npoints, &p)); in testOrthogonality()
18 PetscCall(PetscDTPKDEvalJet(dim, npoints, points, deg, 0, p)); in testOrthogonality()
24 … for (k = 0; k < npoints; k++) integral += weights[k] * p[i * npoints + k] * p[j * npoints + k]; in testOrthogonality()
35 PetscInt Np, Nk, i, j, l, d, npoints; in testDerivativesLegendre() local
58 PetscCall(PetscQuadratureGetData(q, NULL, NULL, &npoints, &points, &weights)); in testDerivativesLegendre()
59 PetscCall(PetscMalloc1(npoints * Np, &proj)); in testDerivativesLegendre()
60 PetscCall(PetscDTPKDEvalJet(dim, npoints, points, deg, 0, proj)); in testDerivativesLegendre()
62 for (j = 0; j < npoints; j++) proj[i * npoints + j] *= weights[j]; in testDerivativesLegendre()
[all …]
/petsc/src/dm/impls/swarm/
H A Dswarmpic_sort.c22 if (ctx->list) qsort(ctx->list, ctx->npoints, sizeof(SwarmPoint), sort_CompareSwarmPoint); in DMSwarmSortApplyCellIndexSort()
34 ctx->npoints = 0; in DMSwarmSortCreate()
45 PetscInt p, npoints; in DMSwarmSortSetup() local
62 PetscCall(DMSwarmGetLocalSize(dm, &npoints)); in DMSwarmSortSetup()
63 if (npoints != ctx->npoints) { in DMSwarmSortSetup()
64 PetscCall(PetscRealloc(sizeof(SwarmPoint) * npoints, &ctx->list)); in DMSwarmSortSetup()
65 ctx->npoints = npoints; in DMSwarmSortSetup()
67 PetscCall(PetscArrayzero(ctx->list, npoints)); in DMSwarmSortSetup()
72 for (p = 0; p < ctx->npoints; p++) { in DMSwarmSortSetup()
80 for (p = 0; p < ctx->npoints; p++) ctx->pcell_offsets[ctx->list[p].cell_index]++; in DMSwarmSortSetup()
[all …]
H A Dswarm_migrate.c17 PetscInt p, npoints, *rankval, n_points_recv; in DMSwarmMigrate_Push_Basic() local
26 PetscCall(DMSwarmDataBucketGetSizes(swarm->db, &npoints, NULL, NULL)); in DMSwarmMigrate_Push_Basic()
30 for (p = 0; p < npoints; ++p) { in DMSwarmMigrate_Push_Basic()
36 for (p = 0; p < npoints; p++) { in DMSwarmMigrate_Push_Basic()
43 for (p = 0; p < npoints; p++) { in DMSwarmMigrate_Push_Basic()
63 PetscCall(DMSwarmDataBucketGetSizes(swarm->db, &npoints, NULL, NULL)); in DMSwarmMigrate_Push_Basic()
64 for (p = 0; p < npoints; p++) { in DMSwarmMigrate_Push_Basic()
72 …PetscCall(DMSwarmDataBucketGetSizes(swarm->db, &npoints, NULL, NULL)); /* you need to update npoin… in DMSwarmMigrate_Push_Basic()
84 PetscCall(DMSwarmDataBucketGetSizes(swarm->db, &npoints, NULL, NULL)); in DMSwarmMigrate_Push_Basic()
85 …PetscCall(DMSwarmDataBucketSetSizes(swarm->db, npoints + n_points_recv, DMSWARM_DATA_BUCKET_BUFFER… in DMSwarmMigrate_Push_Basic()
[all …]
H A Dswarmpic_da.c9 PetscInt d, npoints = 0, cnt; in private_DMSwarmCreateCellLocalCoords_DA_Q1_Regular() local
16 npoints = np[0]; in private_DMSwarmCreateCellLocalCoords_DA_Q1_Regular()
19 npoints = np[0] * np[1]; in private_DMSwarmCreateCellLocalCoords_DA_Q1_Regular()
22 npoints = np[0] * np[1] * np[2]; in private_DMSwarmCreateCellLocalCoords_DA_Q1_Regular()
27 PetscCall(PetscMalloc1(dim * npoints, &xi)); in private_DMSwarmCreateCellLocalCoords_DA_Q1_Regular()
62 *_npoints = npoints; in private_DMSwarmCreateCellLocalCoords_DA_Q1_Regular()
87 static PetscErrorCode private_DMSwarmInsertPointsUsingCellDM_DA_Q1(DM dm, DM dmc, PetscInt npoints,… in private_DMSwarmInsertPointsUsingCellDM_DA_Q1() argument
108 np_dir[0] = np_dir[1] = np_dir[2] = npoints; in private_DMSwarmInsertPointsUsingCellDM_DA_Q1()
112 PetscCall(private_DMSwarmCreateCellLocalCoords_DA_Q1_Gauss(dim, npoints, &npoints_q, &xi)); in private_DMSwarmInsertPointsUsingCellDM_DA_Q1()
118 nsub = npoints; in private_DMSwarmInsertPointsUsingCellDM_DA_Q1()
H A Dswarmpic_plex.c157 …tscErrorCode private_DMSwarmInsertPointsUsingCellDM_PLEX2D_Regular(DM dm, DM dmc, PetscInt npoints) in private_DMSwarmInsertPointsUsingCellDM_PLEX2D_Regular() argument
181 PetscCall(PetscMalloc1(dim * npoints * npoints, &xi)); in private_DMSwarmInsertPointsUsingCellDM_PLEX2D_Regular()
183 ds = 1.0 / (PetscReal)(npoints - 1); in private_DMSwarmInsertPointsUsingCellDM_PLEX2D_Regular()
184 ds2 = 1.0 / (PetscReal)npoints; in private_DMSwarmInsertPointsUsingCellDM_PLEX2D_Regular()
185 for (jj = 0; jj < npoints; jj++) { in private_DMSwarmInsertPointsUsingCellDM_PLEX2D_Regular()
186 for (ii = 0; ii < npoints - jj; ii++) { in private_DMSwarmInsertPointsUsingCellDM_PLEX2D_Regular()
281 PetscErrorCode private_DMSwarmSetPointCoordinatesCellwise_PLEX(DM dm, DM dmc, PetscInt npoints, Pet… in private_DMSwarmSetPointCoordinatesCellwise_PLEX() argument
313 for (PetscInt p = 0; p < npoints; p++) { in private_DMSwarmSetPointCoordinatesCellwise_PLEX()
321 for (PetscInt p = 0; p < npoints; p++) { in private_DMSwarmSetPointCoordinatesCellwise_PLEX()
334 PetscCall(DMSwarmSetLocalSizes(dm, npoints * nel, PETSC_DECIDE)); in private_DMSwarmSetPointCoordinatesCellwise_PLEX()
[all …]
/petsc/src/dm/tutorials/
H A Dswarm_ex1.c60 PetscInt npoints[2], npoints_orig[2]; in ex1_1() local
72 PetscCall(DMSwarmGetLocalSize(dms, &npoints[0])); in ex1_1()
73 PetscCall(DMSwarmGetSize(dms, &npoints[1])); in ex1_1()
75 …cInt_FMT ",%" PetscInt_FMT ")\n", rank, npoints_orig[0], npoints_orig[1], npoints[0], npoints[1])); in ex1_1()
128 PetscInt npoints[2], npoints_orig[2]; in ex1_2() local
147 PetscCall(DMSwarmGetLocalSize(dms, &npoints[0])); in ex1_2()
148 PetscCall(DMSwarmGetSize(dms, &npoints[1])); in ex1_2()
150 …OUT_WORLD, "rank[%d] after(%" PetscInt_FMT ",%" PetscInt_FMT ")\n", rank, npoints[0], npoints[1])); in ex1_2()
159 PetscCall(DMSwarmGetLocalSize(dms, &npoints[0])); in ex1_2()
160 PetscCall(DMSwarmGetSize(dms, &npoints[1])); in ex1_2()
[all …]
H A Dswarm_ex3.c13 PetscInt p, n, bs, npoints, si, sj, milocal, mjlocal, mx, my; in _DMLocatePoints_DMDARegular_IS() local
24 npoints = n / bs; in _DMLocatePoints_DMDARegular_IS()
26 PetscCall(PetscMalloc1(npoints, &cellidx)); in _DMLocatePoints_DMDARegular_IS()
35 for (p = 0; p < npoints; p++) { in _DMLocatePoints_DMDARegular_IS()
56 PetscCall(ISCreateGeneral(PETSC_COMM_SELF, npoints, cellidx, PETSC_OWN_POINTER, iscell)); in _DMLocatePoints_DMDARegular_IS()
64 PetscInt p, bs, npoints, nfound; in DMLocatePoints_DMDARegular() local
69 PetscCall(VecGetLocalSize(pos, &npoints)); in DMLocatePoints_DMDARegular()
71 npoints = npoints / bs; in DMLocatePoints_DMDARegular()
73 PetscCall(PetscMalloc1(npoints, &cells)); in DMLocatePoints_DMDARegular()
76 for (p = 0; p < npoints; p++) { in DMLocatePoints_DMDARegular()
[all …]
H A Dex21.c113 PetscInt npoints, p; in pic_advect() local
115 PetscCall(DMSwarmGetLocalSize(swarm, &npoints)); in pic_advect()
119 for (p = 0; p < npoints; p++) { in pic_advect()
162 PetscInt npoints, p; in pic_advect() local
166 PetscCall(DMSwarmGetLocalSize(swarm, &npoints)); in pic_advect()
168 for (p = 0; p < npoints; p++) { in pic_advect()
/petsc/src/dm/dt/space/impls/poly/
H A Dspacepoly.c115 static PetscErrorCode CoordinateBasis(PetscInt dim, PetscInt npoints, const PetscReal points[], Pet… in CoordinateBasis() argument
118 PetscCall(PetscArrayzero(pScalar, (1 + dim) * Njet * npoints)); in CoordinateBasis()
123 … for (PetscInt pt = 0; pt < npoints; pt++) pScalar[b * Njet * npoints + j * npoints + pt] = 1.; in CoordinateBasis()
125 …for (PetscInt pt = 0; pt < npoints; pt++) pScalar[b * Njet * npoints + j * npoints + pt] = points[… in CoordinateBasis()
128 … for (PetscInt pt = 0; pt < npoints; pt++) pScalar[b * Njet * npoints + j * npoints + pt] = 1.; in CoordinateBasis()
135 static PetscErrorCode PetscSpaceEvaluate_Polynomial(PetscSpace sp, PetscInt npoints, const PetscRea… in PetscSpaceEvaluate_Polynomial() argument
146 PetscCall(PetscSpaceEvaluate(sp, npoints, points, B, D, H)); in PetscSpaceEvaluate_Polynomial()
159 PetscCall(DMGetWorkArray(dm, Nb * Njet * npoints, MPIU_REAL, &pScalar)); in PetscSpaceEvaluate_Polynomial()
164 PetscCall(CoordinateBasis(dim, npoints, points, jet, Njet, pScalar)); in PetscSpaceEvaluate_Polynomial()
166 PetscCall(PetscDTPKDEvalJet(dim, npoints, points, sp->degree, jet, pScalar)); in PetscSpaceEvaluate_Polynomial()
[all …]
/petsc/src/dm/dt/interface/
H A Ddt.c307 …PetscQuadrature q, PeOp PetscInt *dim, PeOp PetscInt *Nc, PeOp PetscInt *npoints, PeOp const Petsc… in PetscQuadratureGetData() argument
319 if (npoints) { in PetscQuadratureGetData()
320 PetscAssertPointer(npoints, 4); in PetscQuadratureGetData()
321 *npoints = q->numPoints; in PetscQuadratureGetData()
566 …QuadratureSetData(PetscQuadrature q, PetscInt dim, PetscInt Nc, PetscInt npoints, const PetscReal … in PetscQuadratureSetData() argument
572 if (npoints >= 0) q->numPoints = npoints; in PetscQuadratureSetData()
669 PetscInt dim, Nc, order, npoints, npointsRef, c, p, cp, d, e; in PetscQuadratureExpandComposite() local
679 PetscCall(PetscQuadratureGetData(q, &dim, &Nc, &npoints, &points, &weights)); in PetscQuadratureExpandComposite()
680 npointsRef = npoints * numSubelements; in PetscQuadratureExpandComposite()
684 for (p = 0; p < npoints; ++p) { in PetscQuadratureExpandComposite()
[all …]
/petsc/src/dm/dt/interface/ftn-custom/
H A Dzdtf90.c14 …aturegetdata_(PetscQuadrature *q, PetscInt *dim, PetscInt *Nc, PetscInt *npoints, F90Array1d *ptrP… in petscquadraturegetdata_() argument
18 *ierr = PetscQuadratureGetData(*q, dim, Nc, npoints, &points, &weights); in petscquadraturegetdata_()
20 …*ierr = F90Array1dCreate((void *)points, MPIU_REAL, 1, (*npoints) * (*dim), ptrP PETSC_F90_2PTR_PA… in petscquadraturegetdata_()
22 …*ierr = F90Array1dCreate((void *)weights, MPIU_REAL, 1, (*npoints) * (*Nc), ptrW PETSC_F90_2PTR_PA… in petscquadraturegetdata_()
25 …erestoredata_(PetscQuadrature *q, PetscInt *dim, PetscInt *Nc, PetscInt *npoints, F90Array1d *ptrP… in petscquadraturerestoredata_() argument
32 …aturesetdata_(PetscQuadrature *q, PetscInt *dim, PetscInt *Nc, PetscInt *npoints, F90Array1d *ptrP… in petscquadraturesetdata_() argument
40 *ierr = PetscQuadratureSetData(*q, *dim, *Nc, *npoints, points, weights); in petscquadraturesetdata_()
/petsc/src/dm/impls/da/
H A Ddageometry.c132 PetscInt n, bs, npoints; in private_DMDALocatePointsIS_2D_Regular() local
157 npoints = n / bs; in private_DMDALocatePointsIS_2D_Regular()
159 PetscCall(PetscMalloc1(npoints, &cellidx)); in private_DMDALocatePointsIS_2D_Regular()
161 for (PetscInt p = 0; p < npoints; p++) { in private_DMDALocatePointsIS_2D_Regular()
188 PetscCall(ISCreateGeneral(PETSC_COMM_SELF, npoints, cellidx, PETSC_OWN_POINTER, iscell)); in private_DMDALocatePointsIS_2D_Regular()
194 PetscInt n, bs, npoints; in private_DMDALocatePointsIS_3D_Regular() local
224 npoints = n / bs; in private_DMDALocatePointsIS_3D_Regular()
226 PetscCall(PetscMalloc1(npoints, &cellidx)); in private_DMDALocatePointsIS_3D_Regular()
228 for (PetscInt p = 0; p < npoints; p++) { in private_DMDALocatePointsIS_3D_Regular()
262 PetscCall(ISCreateGeneral(PETSC_COMM_SELF, npoints, cellidx, PETSC_OWN_POINTER, iscell)); in private_DMDALocatePointsIS_3D_Regular()
[all …]
/petsc/src/dm/impls/moab/
H A Ddmmbfield.cxx296 PetscErrorCode DMMoabGetFieldDofs(DM dm, PetscInt npoints, const moab::EntityHandle *points, PetscI… in DMMoabGetFieldDofs() argument
306 if (!dof) PetscCall(PetscMalloc1(npoints, &dof)); in DMMoabGetFieldDofs()
311 for (i = 0; i < npoints; ++i) in DMMoabGetFieldDofs()
335 PetscErrorCode DMMoabGetFieldDofsLocal(DM dm, PetscInt npoints, const moab::EntityHandle *points, P… in DMMoabGetFieldDofsLocal() argument
345 if (!dof) PetscCall(PetscMalloc1(npoints, &dof)); in DMMoabGetFieldDofsLocal()
350 for (i = 0; i < npoints; ++i) { in DMMoabGetFieldDofsLocal()
374 PetscErrorCode DMMoabGetDofs(DM dm, PetscInt npoints, const moab::EntityHandle *points, PetscInt *d… in DMMoabGetDofs() argument
384 if (!dof) PetscCall(PetscMalloc1(dmmoab->numFields * npoints, &dof)); in DMMoabGetDofs()
391 for (i = 0; i < npoints; ++i) in DMMoabGetDofs()
415 PetscErrorCode DMMoabGetDofsLocal(DM dm, PetscInt npoints, const moab::EntityHandle *points, PetscI… in DMMoabGetDofsLocal() argument
[all …]
H A Ddmmbfem.cxx557 PetscInt npoints, idim; in DMMoabFEMComputeBasis() local
569 PetscCall(PetscQuadratureGetData(quadrature, &idim, NULL, &npoints, &quadpts, &quadwts)); in DMMoabFEMComputeBasis()
571 …ure_weight_product) PetscCall(PetscArraycpy(jacobian_quadrature_weight_product, quadwts, npoints)); in DMMoabFEMComputeBasis()
575 …PetscCall(Compute_Lagrange_Basis_1D_Internal(nverts, coordinates, npoints, quadpts, phypts, jacobi… in DMMoabFEMComputeBasis()
578 …PetscCall(Compute_Lagrange_Basis_2D_Internal(nverts, coordinates, npoints, quadpts, phypts, jacobi… in DMMoabFEMComputeBasis()
581 …PetscCall(Compute_Lagrange_Basis_3D_Internal(nverts, coordinates, npoints, quadpts, phypts, jacobi… in DMMoabFEMComputeBasis()
620 const PetscInt npoints = (order == 2 ? 3 : 6); in DMMoabFEMCreateQuadratureDefault() local
621 PetscCall(PetscMalloc2(npoints * 2, &x, npoints, &w)); in DMMoabFEMCreateQuadratureDefault()
622 if (npoints == 3) { in DMMoabFEMCreateQuadratureDefault()
626 } else if (npoints == 6) { in DMMoabFEMCreateQuadratureDefault()
[all …]
/petsc/src/dm/dt/space/impls/point/
H A Dspacepoint.c63 static PetscErrorCode PetscSpaceEvaluate_Point(PetscSpace sp, PetscInt npoints, const PetscReal poi… in PetscSpaceEvaluate_Point() argument
69npoints == pt->quad->numPoints, PETSC_COMM_SELF, PETSC_ERR_SUP, "Cannot evaluate Point space on %"… in PetscSpaceEvaluate_Point()
70 PetscCall(PetscArrayzero(B, npoints * pdim)); in PetscSpaceEvaluate_Point()
71 for (p = 0; p < npoints; ++p) { in PetscSpaceEvaluate_Point()
84 for (p = 0; p < npoints; ++p) { in PetscSpaceEvaluate_Point()
85 for (i = 0; i < pdim; ++i) B[(c * npoints + p) * pdim + i] = B[p * pdim + i]; in PetscSpaceEvaluate_Point()
88 if (D) PetscCall(PetscArrayzero(D, npoints * pdim * dim)); in PetscSpaceEvaluate_Point()
89 if (H) PetscCall(PetscArrayzero(H, npoints * pdim * dim * dim)); in PetscSpaceEvaluate_Point()
/petsc/src/dm/dt/fe/impls/composite/
H A Dfecomposite.c100 static PetscErrorCode PetscFEComputeTabulation_Composite(PetscFE fem, PetscInt npoints, const Petsc… in PetscFEComputeTabulation_Composite() argument
124 PetscCall(DMGetWorkArray(dm, npoints, MPIU_INT, &subpoints)); in PetscFEComputeTabulation_Composite()
126 for (p = 0; p < npoints; ++p) { in PetscFEComputeTabulation_Composite()
145 if (K >= 0) PetscCall(DMGetWorkArray(dm, npoints * spdim, MPIU_REAL, &tmpB)); in PetscFEComputeTabulation_Composite()
146 if (K >= 1) PetscCall(DMGetWorkArray(dm, npoints * spdim * dim, MPIU_REAL, &tmpD)); in PetscFEComputeTabulation_Composite()
147 if (K >= 2) PetscCall(DMGetWorkArray(dm, npoints * spdim * dim * dim, MPIU_REAL, &tmpH)); in PetscFEComputeTabulation_Composite()
148 PetscCall(PetscSpaceEvaluate(fem->basisSpace, npoints, points, tmpB, tmpD, tmpH)); in PetscFEComputeTabulation_Composite()
150 if (K >= 0) PetscCall(PetscArrayzero(B, npoints * pdim * comp)); in PetscFEComputeTabulation_Composite()
151 if (K >= 1) PetscCall(PetscArrayzero(D, npoints * pdim * comp * dim)); in PetscFEComputeTabulation_Composite()
152 if (K >= 2) PetscCall(PetscArrayzero(H, npoints * pdim * comp * dim * dim)); in PetscFEComputeTabulation_Composite()
[all …]
/petsc/src/dm/dt/space/impls/ptrimmed/
H A Dspaceptrimmed.c134 static PetscErrorCode PetscSpaceEvaluate_Ptrimmed(PetscSpace sp, PetscInt npoints, const PetscReal … in PetscSpaceEvaluate_Ptrimmed() argument
148 PetscCall(PetscSpaceEvaluate(sp, npoints, points, B, D, H)); in PetscSpaceEvaluate_Ptrimmed()
165 PetscCall(DMGetWorkArray(dm, Nb * Nf * Njet * npoints, MPIU_REAL, &eval)); in PetscSpaceEvaluate_Ptrimmed()
166 PetscCall(PetscDTPTrimmedEvalJet(dim, npoints, points, degree, f, jet, eval)); in PetscSpaceEvaluate_Ptrimmed()
172 PetscInt b_strr = Nf * Njet * npoints; in PetscSpaceEvaluate_Ptrimmed()
173 PetscInt v_strr = Njet * npoints; in PetscSpaceEvaluate_Ptrimmed()
178 …for (PetscInt p = 0; p < npoints; p++) B[p * p_strl + b * b_strl + v * v_strl] = eval[b * b_strr +… in PetscSpaceEvaluate_Ptrimmed()
188 PetscInt b_strr = Nf * Njet * npoints; in PetscSpaceEvaluate_Ptrimmed()
189 PetscInt v_strr = Njet * npoints; in PetscSpaceEvaluate_Ptrimmed()
190 PetscInt d_strr = npoints; in PetscSpaceEvaluate_Ptrimmed()
[all …]
/petsc/src/dm/dt/space/impls/tensor/
H A Dspacetensor.c298 static PetscErrorCode PetscSpaceEvaluate_Tensor(PetscSpace sp, PetscInt npoints, const PetscReal po… in PetscSpaceEvaluate_Tensor() argument
311 PetscCall(PetscSpaceEvaluate(sp, npoints, points, B, D, H)); in PetscSpaceEvaluate_Tensor()
316 PetscCall(DMGetWorkArray(dm, npoints * Nv, MPIU_REAL, &lpoints)); in PetscSpaceEvaluate_Tensor()
317 if (B || D || H) PetscCall(DMGetWorkArray(dm, npoints * pdim * Nc, MPIU_REAL, &sB)); in PetscSpaceEvaluate_Tensor()
318 if (D || H) PetscCall(DMGetWorkArray(dm, npoints * pdim * Nc * Nv, MPIU_REAL, &sD)); in PetscSpaceEvaluate_Tensor()
319 if (H) PetscCall(DMGetWorkArray(dm, npoints * pdim * Nc * Nv * Nv, MPIU_REAL, &sH)); in PetscSpaceEvaluate_Tensor()
321 for (PetscInt i = 0; i < npoints * pdim * Nc; i++) B[i] = 1.; in PetscSpaceEvaluate_Tensor()
324 for (PetscInt i = 0; i < npoints * pdim * Nc * Nv; i++) D[i] = 1.; in PetscSpaceEvaluate_Tensor()
327 for (PetscInt i = 0; i < npoints * pdim * Nc * Nv * Nv; i++) H[i] = 1.; in PetscSpaceEvaluate_Tensor()
340 for (PetscInt p = 0; p < npoints; ++p) { in PetscSpaceEvaluate_Tensor()
[all …]
/petsc/src/ksp/ksp/tutorials/
H A Dex36.cxx257 PetscInt dof_indices[8], nc, npoints; in ComputeRHS_MOAB() local
276 PetscCall(PetscQuadratureGetData(quadratureObj, NULL, &nc, &npoints, NULL, NULL)); in ComputeRHS_MOAB()
277 PetscCall(PetscMalloc3(user->VPERE * npoints, &phi, npoints * 3, &phypts, npoints, &jxw)); in ComputeRHS_MOAB()
303 for (q = 0; q < npoints; ++q) { in ComputeRHS_MOAB()
352 PetscInt i, j, q, nconn, nglobale, nglobalv, nc, npoints, hlevel; in ComputeMatrix_MOAB() local
375 PetscCall(PetscQuadratureGetData(quadratureObj, NULL, &nc, &npoints, NULL, NULL)); in ComputeMatrix_MOAB()
376 …RE * npoints, &phi, user->VPERE * npoints, &dphi[0], user->VPERE * npoints, &dphi[1], user->VPERE … in ComputeMatrix_MOAB()
399 for (q = 0; q < npoints; ++q) { in ComputeMatrix_MOAB()
H A Dex35.cxx289 PetscInt i, q, nconn, nc, npoints; in ComputeRHS() local
305 PetscCall(PetscQuadratureGetData(quadratureObj, NULL, &nc, &npoints, NULL, NULL)); in ComputeRHS()
306 PetscCall(PetscMalloc3(user->VPERE * npoints, &phi, npoints * 3, &phypts, npoints, &jxw)); in ComputeRHS()
337 for (q = 0; q < npoints; ++q) { in ComputeRHS()
388 PetscInt i, j, q, nconn, nglobale, nglobalv, nc, npoints, hlevel; in ComputeMatrix() local
411 PetscCall(PetscQuadratureGetData(quadratureObj, NULL, &nc, &npoints, NULL, NULL)); in ComputeMatrix()
412 …alloc5(user->VPERE * npoints, &phi, user->VPERE * npoints, &dphi[0], user->VPERE * npoints, &dphi[… in ComputeMatrix()
439 for (q = 0; q < npoints; ++q) { in ComputeMatrix()
/petsc/src/dm/dt/space/impls/subspace/
H A Dspacesubspace.c92 static PetscErrorCode PetscSpaceEvaluate_Subspace(PetscSpace sp, PetscInt npoints, const PetscReal … in PetscSpaceEvaluate_Subspace() argument
107 PetscCall(DMGetWorkArray(sp->dm, npoints * origDim, MPIU_REAL, &inpoints)); in PetscSpaceEvaluate_Subspace()
108 for (i = 0; i < npoints; i++) { in PetscSpaceEvaluate_Subspace()
122 if (B) PetscCall(DMGetWorkArray(sp->dm, npoints * origNb * origNc, MPIU_REAL, &inB)); in PetscSpaceEvaluate_Subspace()
123 if (D) PetscCall(DMGetWorkArray(sp->dm, npoints * origNb * origNc * origDim, MPIU_REAL, &inD)); in PetscSpaceEvaluate_Subspace()
124 …if (H) PetscCall(DMGetWorkArray(sp->dm, npoints * origNb * origNc * origDim * origDim, MPIU_REAL, … in PetscSpaceEvaluate_Subspace()
125 PetscCall(PetscSpaceEvaluate(origsp, npoints, inpoints, inB, inD, inH)); in PetscSpaceEvaluate_Subspace()
131 for (i = 0; i < npoints * subNb * subNc * subDim; i++) D[i] = 0.0; in PetscSpaceEvaluate_Subspace()
135 for (j = 0; j < npoints; j++) { in PetscSpaceEvaluate_Subspace()
173 PetscCall(DMRestoreWorkArray(sp->dm, npoints * origNb * origNc * origDim, MPIU_REAL, &inH)); in PetscSpaceEvaluate_Subspace()
[all …]
/petsc/src/dm/dt/space/impls/ptrimmed/tests/
H A Dex1.c14 PetscInt npoints; in test() local
40 PetscCall(PetscQuadratureGetData(quad, NULL, NULL, &npoints, &points, NULL)); in test()
42 Bsize = npoints * Nb * Nf * nCopies; in test()
46 PetscCall(PetscSpaceEvaluate(sp, npoints, points, B, D, H)); in test()
/petsc/src/dm/impls/plex/tests/
H A Dex39.c218 static PetscErrorCode PerturbMesh(DM *mesh, PetscScalar *coordVals, PetscInt npoints, PetscInt dim) in PerturbMesh() argument
232 …m; ++k) maxPert[k] = 0.025 * (maxCoords[k] - minCoords[k]) / (PetscPowReal(npoints, 1. / dim) - 1); in PerturbMesh()
234 for (i = 0; i < npoints; ++i) { in PerturbMesh()
250 static PetscErrorCode SkewMesh(DM *mesh, PetscScalar *coordVals, PetscInt npoints, PetscInt dim) in SkewMesh() argument
273 for (i = 0; i < npoints; ++i) { in SkewMesh()
289 PetscInt dim, npoints; in TransformMesh() local
296 PetscCall(VecGetLocalSize(coords, &npoints)); in TransformMesh()
298 npoints = npoints / dim; in TransformMesh()
302 PetscCall(PerturbMesh(mesh, coordVals, npoints, dim)); in TransformMesh()
305 PetscCall(SkewMesh(mesh, coordVals, npoints, dim)); in TransformMesh()
[all …]

123