Home
last modified time | relevance | path

Searched refs:Np (Results 1 – 25 of 80) sorted by relevance

1234

/petsc/src/dm/impls/swarm/tests/
H A Dex4.c135 PetscInt dim, d, Np, p; in RHSFunction() local
140 PetscCall(VecGetLocalSize(U, &Np)); in RHSFunction()
143 Np /= 2 * dim; in RHSFunction()
144 for (p = 0; p < Np; ++p) { in RHSFunction()
163 PetscInt dim, d, Np, p, rStart; in RHSJacobian() local
168 PetscCall(VecGetLocalSize(U, &Np)); in RHSJacobian()
170 Np /= 2 * dim; in RHSJacobian()
171 for (p = 0; p < Np; ++p) { in RHSJacobian()
186 PetscInt Np, p; in RHSFunctionX() local
189 PetscCall(VecGetLocalSize(Xres, &Np)); in RHSFunctionX()
[all …]
H A Dex5.c99 PetscInt dim, d, Np, p; in RHSFunction() local
106 PetscCall(VecGetLocalSize(U, &Np)); in RHSFunction()
109 Np /= 2 * dim; in RHSFunction()
110 for (p = 0; p < Np; ++p) { in RHSFunction()
135 PetscInt dim, d, Np, p, rStart; in RHSJacobian() local
140 PetscCall(VecGetLocalSize(U, &Np)); in RHSJacobian()
144 Np /= 2 * dim; in RHSJacobian()
145 for (p = 0; p < Np; ++p) { in RHSJacobian()
168 PetscInt Np, p, dim, d; in RHSFunctionX() local
173 PetscCall(VecGetLocalSize(Xres, &Np)); in RHSFunctionX()
[all …]
H A Dex12.c8 PetscInt Np; // Number of particles along each dimension member
15 options->Np = -1; in ProcessOptions()
18 PetscCall(PetscOptionsGetInt(NULL, NULL, "-np", &options->Np, NULL)); in ProcessOptions()
64 PetscCall(DMSwarmSetLocalSizes(*swarm, user->Np / size, 0)); in CreateSwarm()
77 ndir[0] = user->Np; in InitializeParticles()
78 ndir[1] = user->Np; in InitializeParticles()
79 ndir[2] = user->Np; in InitializeParticles()
H A Dex6.c235 PetscInt dim, d, Np, p, q; in ComputeFieldAtParticles_Coulomb() local
242 PetscCall(DMSwarmGetLocalSize(sw, &Np)); in ComputeFieldAtParticles_Coulomb()
245 for (p = 0; p < Np; ++p) { in ComputeFieldAtParticles_Coulomb()
249 for (q = 0; q < Np; ++q) { in ComputeFieldAtParticles_Coulomb()
271 PetscInt dim, d, cStart, cEnd, c, Np; in ComputeFieldAtParticles_Primal() local
278 PetscCall(DMSwarmGetLocalSize(sw, &Np)); in ComputeFieldAtParticles_Primal()
381 PetscInt dim, d, cStart, cEnd, c, Np, pot_field = 1; in ComputeFieldAtParticles_Mixed() local
388 PetscCall(DMSwarmGetLocalSize(sw, &Np)); in ComputeFieldAtParticles_Mixed()
491 PetscInt dim, Np; in ComputeFieldAtParticles() local
498 PetscCall(DMSwarmGetLocalSize(sw, &Np)); in ComputeFieldAtParticles()
[all …]
H A Dex7.c65 PetscInt Np, timestep = 0, bs, N, M, nzl; in gridToParticles() local
145 PetscCall(DMSwarmGetLocalSize(sw, &Np)); in gridToParticles()
149 for (int p = 0; p < Np; p++) { in gridToParticles()
161 PetscErrorCode particlesToGrid(const DM dm, DM sw, const PetscInt Np, const PetscInt a_tid, const P… in particlesToGrid() argument
171 PetscCall(DMSwarmSetLocalSizes(sw, Np, zero)); in particlesToGrid()
174 for (p = 0; p < Np; p++) { in particlesToGrid()
221 PetscInt Np[2] = {10, 10}, Np2[2], field = 0, target = 0, Np_t[MAX_NUM_THRDS]; in go() local
247 PetscCall(PetscOptionsGetIntArray(NULL, NULL, "-np", Np, &i, NULL)); in go()
271 hp[i] = (hi[i] - lo[i]) / Np[i]; in go()
280 Np2[0] = Np[0]; in go()
[all …]
H A Dex3.c36 PetscInt dim, cStart, cEnd, c, Np = user->particlesPerCell, p; in CreateParticles() local
51 PetscCall(DMSwarmSetLocalSizes(*sw, (cEnd - cStart) * Np, 0)); in CreateParticles()
55 for (p = 0; p < Np; ++p) { in CreateParticles()
56 const PetscInt n = c * Np + p; in CreateParticles()
H A Dex1.c55 PetscInt *swarm_cellid, Np, dim, Nfc; in CreateSwarm() local
80 PetscCall(DMSwarmGetLocalSize(*sw, &Np)); in CreateSwarm()
81 for (PetscInt p = 0; p < Np; ++p) { in CreateSwarm()
172 PetscInt adjacentdim = 0, Np; in CheckPointInsertion_Boundary() local
180 PetscCall(DMSwarmGetLocalSize(sw, &Np)); in CheckPointInsertion_Boundary()
182 …for (PetscInt d = 0; d < dim; ++d) coords[(Np - 1) * dim + d] = 0.5 * (lbox_high[d] - lbox_low[d]); in CheckPointInsertion_Boundary()
183 coords[(Np - 1) * dim + adjacentdim] = lbox_high[adjacentdim]; in CheckPointInsertion_Boundary()
/petsc/src/dm/dt/fe/interface/
H A Dfegeom.c164 const PetscInt Np = geom->numPoints; in PetscFEGeomGetPoint() local
174 pgeom->J = &geom->J[c * Np * dE * dE]; in PetscFEGeomGetPoint()
175 pgeom->invJ = &geom->invJ[c * Np * dE * dE]; in PetscFEGeomGetPoint()
176 pgeom->detJ = &geom->detJ[c * Np]; in PetscFEGeomGetPoint()
177 pgeom->n = PetscSafePointerPlusOffset(geom->n, c * Np * dE); in PetscFEGeomGetPoint()
179 …if (pcoords) CoordinatesRefToReal(dE, dim, pgeom->xi, &geom->v[c * Np * dE], pgeom->J, pcoords, pg… in PetscFEGeomGetPoint()
181 pgeom->v = &geom->v[(c * Np + p) * dE]; in PetscFEGeomGetPoint()
182 pgeom->J = &geom->J[(c * Np + p) * dE * dE]; in PetscFEGeomGetPoint()
183 pgeom->invJ = &geom->invJ[(c * Np + p) * dE * dE]; in PetscFEGeomGetPoint()
184 pgeom->detJ = &geom->detJ[c * Np + p]; in PetscFEGeomGetPoint()
[all …]
/petsc/src/ts/tests/
H A Dex35.c8 PetscInt Np; /* total number of particles */ member
18 options->Np = 100; in ProcessOptions()
20 …PetscCall(PetscOptionsInt("-Np", "Number of particles", "ex35.c", options->Np, &options->Np, NULL)… in ProcessOptions()
51 PetscInt p, dim, Np; in main() local
68 Np = user.Np; in main()
71 PetscCall(PetscMalloc2(Np * dim, &x, Np * dim, &v)); in main()
93 for (p = 0; p < Np; ++p) { in main()
108 PetscCall(VecSetSizes(randVec, PETSC_DECIDE, Np * dim)); in main()
111 PetscCall(ISCreateStride(comm, Np * dim / 2, 0, 2, &isvx)); in main()
112 PetscCall(ISCreateStride(comm, Np * dim / 2, 1, 2, &isvy)); in main()
[all …]
H A Dex28.c65 PetscInt dim, d, cStart, cEnd, c, Np, p; in SetInitialCoordinates() local
73 Np = user->particlesPerCell; in SetInitialCoordinates()
85 if (Np == 1) { in SetInitialCoordinates()
97 for (p = 0; p < Np; ++p) { in SetInitialCoordinates()
98 const PetscInt n = c * Np + p; in SetInitialCoordinates()
126 PetscInt dim, d, cStart, cEnd, c, Np, p, n; in SetInitialConditions() local
131 Np = user->particlesPerCell; in SetInitialConditions()
135 …rt) * Np, PETSC_COMM_SELF, PETSC_ERR_ARG_SIZ, "TS solution local size %" PetscInt_FMT " != %" Pets… in SetInitialConditions()
139 for (p = 0; p < Np; ++p) { in SetInitialConditions()
140 const PetscInt n = c * Np + p; in SetInitialConditions()
[all …]
H A Dex27.c68 PetscInt dim, d, cStart, cEnd, c, Np, p; in SetInitialCoordinates() local
79 Np = user->N; in SetInitialCoordinates()
92 if (Np == 1) { in SetInitialCoordinates()
98 for (p = 0; p < Np; ++p) { in SetInitialCoordinates()
99 const PetscInt n = c * Np + p; in SetInitialCoordinates()
115 for (p = 0; p < Np; ++p) { in SetInitialCoordinates()
140 PetscInt dim, d, cStart, cEnd, c, Np, p, n; in SetInitialConditions() local
145 Np = user->N; in SetInitialConditions()
152 for (p = 0; p < Np; ++p) { in SetInitialConditions()
153 const PetscInt n = c * Np + p; in SetInitialConditions()
[all …]
/petsc/src/dm/dt/tests/
H A Dex9.c35 PetscInt Np, Nk, i, j, l, d, npoints; in testDerivativesLegendre() local
53 PetscCall(PetscDTBinomialInt(dim + deg, dim, &Np)); in testDerivativesLegendre()
59 PetscCall(PetscMalloc1(npoints * Np, &proj)); in testDerivativesLegendre()
61 for (i = 0; i < Np; i++) in testDerivativesLegendre()
68 PetscCall(PetscMalloc2(Np, &lgndre_coeffs, Np, &pkd_coeffs)); in testDerivativesLegendre()
69 for (i = 0; i < Np; i++) PetscCall(PetscRandomGetValueReal(rand, &lgndre_coeffs[i])); in testDerivativesLegendre()
76 PetscCall(PetscArrayzero(pkd_coeffs, Np)); in testDerivativesLegendre()
89 for (j = 0; j < Np; j++) { in testDerivativesLegendre()
97 for (j = 0; j < Np; j++) pkd_coeffs[j] += proj[j * npoints + i] * val; in testDerivativesLegendre()
112 PetscCall(PetscMalloc3(Nk * Np, &pkd_jet_basis, Nk, &lgndre_jet, Nk, &pkd_jet)); in testDerivativesLegendre()
[all …]
/petsc/src/dm/impls/da/tests/
H A Dex1.c11 PetscInt Np, bs, Nfc; in DMSwarmPrint() local
17 PetscCall(DMSwarmGetLocalSize(sw, &Np)); in DMSwarmPrint()
25 for (PetscInt p = 0; p < Np; ++p) { in DMSwarmPrint()
41 PetscInt Nx = 4, Ny = 4, Np = 8, bs; in main() local
64 PetscCall(DMSwarmSetLocalSizes(sw, Np, 2)); in main()
68 for (PetscInt p = 0; p < Np; ++p) { in main()
69 const PetscReal th = (p + 0.5) * 2. * PETSC_PI / Np; in main()
/petsc/src/dm/impls/swarm/tutorials/
H A Dex1.c15 PetscInt Np = 10, field = 0, zero = 0, bs, cStart; in main() local
33 PetscCall(PetscOptionsGetInt(NULL, NULL, "-np", &Np, NULL)); in main()
57 PetscCall(DMSwarmSetLocalSizes(sw, Np, zero)); in main()
61 for (PetscInt p = 0; p < Np; ++p) { in main()
62 coords[p * 2 + 0] = -PetscCosReal((PetscReal)(p + 1) / (PetscReal)(Np + 1) * PETSC_PI); in main()
63 coords[p * 2 + 1] = PetscSinReal((PetscReal)(p + 1) / (PetscReal)(Np + 1) * PETSC_PI); in main()
82 …for (PetscInt p = 0; p < Np; ++p) energy_1 += wq[p] * (PetscSqr(coords[p * 2 + 0]) + PetscSqr(coor… in main()
H A Dex1f90.F9017 PetscInt :: Np = 100, p, field = 0, zero = 0, bs
46 PetscCallA(DMSwarmSetLocalSizes(sw, Np, zero, ierr))
50 do p = 1, Np
51 coords(p*2 - 1) = -cos(dble(p)/dble(Np + 1)*PETSC_PI)
52 coords(p*2 - 0) = sin(dble(p)/dble(Np + 1)*PETSC_PI)
/petsc/src/dm/dt/fe/impls/basic/
H A Dfebasic.c173 …PetscInt dim, dE, Np, numConstants, Nf, NfAux = 0, totDim, totDimAux = 0, cOffset = 0, c… in PetscFEIntegrate_Basic() local
201Np == TAux[0]->Np, PETSC_COMM_SELF, PETSC_ERR_ARG_WRONG, "Number of tabulation points %" PetscInt_… in PetscFEIntegrate_Basic()
205 Np = cgeom->numPoints; in PetscFEIntegrate_Basic()
217 fegeom.J = &cgeom->J[e * Np * dE * dE]; in PetscFEIntegrate_Basic()
218 fegeom.invJ = &cgeom->invJ[e * Np * dE * dE]; in PetscFEIntegrate_Basic()
219 fegeom.detJ = &cgeom->detJ[e * Np]; in PetscFEIntegrate_Basic()
226 …CoordinatesRefToReal(dE, dim, fegeom.xi, &cgeom->v[e * Np * dE], fegeom.J, &quadPoints[q * dim], x… in PetscFEIntegrate_Basic()
228 fegeom.v = &cgeom->v[(e * Np + q) * dE]; in PetscFEIntegrate_Basic()
229 fegeom.J = &cgeom->J[(e * Np + q) * dE * dE]; in PetscFEIntegrate_Basic()
230 fegeom.invJ = &cgeom->invJ[(e * Np + q) * dE * dE]; in PetscFEIntegrate_Basic()
[all …]
/petsc/src/snes/tests/
H A Dex2.c76 static PetscErrorCode CreatePoints_Centroid(DM dm, PetscInt *Np, PetscReal **pcoords, PetscBool *po… in CreatePoints_Centroid() argument
88 PetscCall(DMPlexGetHeightStratum(dm, 0, NULL, Np)); in CreatePoints_Centroid()
89 PetscCall(PetscCalloc1(*Np * spaceDim, pcoords)); in CreatePoints_Centroid()
90 for (p = 0; p < *Np; ++p) { in CreatePoints_Centroid()
112 static PetscErrorCode CreatePoints_Grid(DM dm, PetscInt *Np, PetscReal **pcoords, PetscBool *points… in CreatePoints_Grid() argument
137 *Np = info.xm * info.ym * info.zm; in CreatePoints_Grid()
138 PetscCall(PetscCalloc1(*Np * spaceDim, pcoords)); in CreatePoints_Grid()
164 static PetscErrorCode CreatePoints_GridReplicated(DM dm, PetscInt *Np, PetscReal **pcoords, PetscBo… in CreatePoints_GridReplicated() argument
179 *Np = N * (dim > 1 ? N : 1) * (dim > 2 ? N : 1); in CreatePoints_GridReplicated()
180 PetscCall(PetscCalloc1(*Np * spaceDim, pcoords)); in CreatePoints_GridReplicated()
[all …]
/petsc/src/ts/tutorials/hamiltonian/
H A Dex3.c183 PetscInt Np; in CheckNonNegativeWeights() local
188 PetscCall(DMSwarmGetLocalSize(sw, &Np)); in CheckNonNegativeWeights()
189 …for (PetscInt p = 0; p < Np; ++p) PetscCheck(w[p] >= 0.0, PETSC_COMM_SELF, PETSC_ERR_ARG_WRONG, "P… in CheckNonNegativeWeights()
230 PetscInt *species, dim, Np, gNp; in MonitorEField() local
238 PetscCall(DMSwarmGetLocalSize(sw, &Np)); in MonitorEField()
246 for (PetscInt p = 0; p < Np; ++p) { in MonitorEField()
309 PetscInt Np, dim; in MonitorParticles() local
321 PetscCall(DMSwarmGetLocalSize(sw, &Np)); in MonitorParticles()
337 PetscCall(VecCreateMPIWithArray(comm, dim, Np * dim, PETSC_DECIDE, x, &vx)); in MonitorParticles()
338 PetscCall(VecCreateMPIWithArray(comm, dim, Np * dim, PETSC_DECIDE, v, &vv)); in MonitorParticles()
[all …]
H A Dex2.c420 PetscInt Np; in CheckNonNegativeWeights() local
425 PetscCall(DMSwarmGetLocalSize(sw, &Np)); in CheckNonNegativeWeights()
426 …for (PetscInt p = 0; p < Np; ++p) PetscCheck(w[p] >= 0.0, PETSC_COMM_SELF, PETSC_ERR_ARG_WRONG, "P… in CheckNonNegativeWeights()
466 PetscInt dim, Np; in computeVelocityFEMMoments()
471 PetscCall(DMSwarmGetLocalSize(sw, &Np)); in computeVelocityFEMMoments()
473 for (PetscInt p = 0; p < Np; ++p) { in computeVelocityFEMMoments()
520 PetscInt *species, dim, Np, gNp; in MonitorEField() local
528 PetscCall(DMSwarmGetLocalSize(sw, &Np)); in MonitorEField()
536 for (PetscInt p = 0; p < Np; ++p) { in MonitorEField()
597 PetscInt dim, Np; in MonitorInitialConditions() local
[all …]
H A Dex4.c582 PetscInt Np; in CheckNonNegativeWeights() local
587 PetscCall(DMSwarmGetLocalSize(sw, &Np)); in CheckNonNegativeWeights()
588 …for (PetscInt p = 0; p < Np; ++p) PetscCheck(w[p] >= 0.0, PETSC_COMM_SELF, PETSC_ERR_ARG_WRONG, "P… in CheckNonNegativeWeights()
754 PetscInt *species, dim, Np, gNp; in MonitorEField() local
764 PetscCall(DMSwarmGetLocalSize(sw, &Np)); in MonitorEField()
772 for (PetscInt p = 0; p < Np; ++p) { in MonitorEField()
1113 PetscInt dim, Np; in MonitorInitialConditions() local
1120 PetscCall(DMSwarmGetLocalSize(sw, &Np)); in MonitorInitialConditions()
1135 for (PetscInt p = 0; p < Np; ++p) { in MonitorInitialConditions()
1775 PetscInt dim, xcStart, xcEnd, vcStart, vcEnd, Ns, Np, Npc, debug; in InitializeParticles_Centroid() local
[all …]
/petsc/src/dm/label/impls/ephemeral/
H A Ddmlabeleph.c19 PetscInt Np = 0, Nop, op, v; in DMLabelEphemeralComputeStratumSize_Private() local
39 for (PetscInt n = 0; n < Nct; ++n) Np += rsize[n]; in DMLabelEphemeralComputeStratumSize_Private()
43 label->stratumSizes[v] = Np; in DMLabelEphemeralComputeStratumSize_Private()
55 PetscInt Np, p, Nop, op; in DMLabelGetStratumIS_Ephemeral() local
62 PetscCall(DMLabelGetStratumSize_Private(label, v, &Np)); in DMLabelGetStratumIS_Ephemeral()
63 PetscCall(PetscMalloc1(Np, &points)); in DMLabelGetStratumIS_Ephemeral()
83 …heck(p == Np, PETSC_COMM_SELF, PETSC_ERR_ARG_INCOMP, "Number of stratum points %" PetscInt_FMT " !… in DMLabelGetStratumIS_Ephemeral()
86 PetscCall(ISCreateGeneral(PETSC_COMM_SELF, Np, points, PETSC_OWN_POINTER, stratum)); in DMLabelGetStratumIS_Ephemeral()
/petsc/src/dm/impls/plex/transform/impls/extrude/
H A Dplextrextrude.c101 PetscInt Nv, Np; in DMPlexTransformExtrudeComputeExtrusionDim() local
109 PetscCall(ISGetLocalSize(pointIS, &Np)); in DMPlexTransformExtrudeComputeExtrusionDim()
111 for (PetscInt p = 0; p < Np; ++p) { in DMPlexTransformExtrudeComputeExtrusionDim()
148 const PetscInt Np = ex->periodic ? Nl : Nl + 1; in DMPlexTransformExtrudeSetUp_Point() local
158 ex->size[ct][0] = Np; in DMPlexTransformExtrudeSetUp_Point()
167 ex->cone[ct][6 * i + 5] = (i + 1) % Np; in DMPlexTransformExtrudeSetUp_Point()
180 const PetscInt Np = ex->periodic ? Nl : Nl + 1; in DMPlexTransformExtrudeSetUp_Segment() local
185 Nc = 8 * Np + 14 * Nl; in DMPlexTransformExtrudeSetUp_Segment()
186 No = 2 * Np + 4 * Nl; in DMPlexTransformExtrudeSetUp_Segment()
190 ex->size[ct][0] = Np; in DMPlexTransformExtrudeSetUp_Segment()
[all …]
/petsc/src/dm/dt/fe/tests/
H A Dex2.c177 PetscInt dim, Nb, b, Nc, c, Np, p; in TestEvaluation() local
182 Np = 6; in TestEvaluation()
183 PetscCall(PetscMalloc1(Np * dim, &points)); in TestEvaluation()
207 PetscCall(DMGetWorkArray(dm, Np * Nb * Nc, MPIU_REAL, &B)); in TestEvaluation()
208 PetscCall(DMGetWorkArray(dm, Np * Nb * Nc * dim, MPIU_REAL, &D)); in TestEvaluation()
209 PetscCall(DMGetWorkArray(dm, Np * Nb * Nc * dim * dim, MPIU_REAL, &H)); in TestEvaluation()
210 PetscCall(PetscSpaceEvaluate(sp, Np, points, B, NULL, NULL /*D, H*/)); in TestEvaluation()
211 for (p = 0; p < Np; ++p) { in TestEvaluation()
226 PetscCall(DMRestoreWorkArray(dm, Np * Nb, MPIU_REAL, &B)); in TestEvaluation()
227 PetscCall(DMRestoreWorkArray(dm, Np * Nb * dim, MPIU_REAL, &D)); in TestEvaluation()
[all …]
/petsc/src/ts/tutorials/hamiltonian/output/
H A Dex2_uniform_primal_1d_real_pfak.out1 Global Np = 100
18 Global Np = 100
37 Global Np = 100
/petsc/src/dm/dt/interface/ftn-custom/
H A Dzdtdsf90.c19 PetscInt Np; member
41 size = tab[*i - 1]->Nr * tab[*i - 1]->Np * tab[*i - 1]->Nb * tab[*i - 1]->Nc; in petscdsgettabulationsetpointers_()

1234