Home
last modified time | relevance | path

Searched refs:mom (Results 1 – 11 of 11) sorted by relevance

/petsc/src/dm/impls/swarm/tests/
H A Dex11.c224 PetscReal mom[3] = {0.0, 0.0, 0.0}; in computeParticleMoments() local
245 mom[0] += PetscRealPart(w[idx * Nc + c]); in computeParticleMoments()
246 mom[1] += PetscRealPart(w[idx * Nc + c]) * x[0]; in computeParticleMoments()
247 … for (PetscInt d = 0; d < dim; ++d) mom[2] += PetscRealPart(w[idx * Nc + c]) * PetscSqr(x[d]); in computeParticleMoments()
255 …PetscCallMPI(MPIU_Allreduce(mom, moments, 3, MPIU_REAL, MPI_SUM, PetscObjectComm((PetscObject)sw))… in computeParticleMoments()
284 PetscScalar mom; in computeFieldMoments() local
289 mom = 0.; in computeFieldMoments()
290 PetscCall(DMPlexComputeIntegralFEM(dm, u, &mom, user)); in computeFieldMoments()
291 moments[0] = PetscRealPart(mom); in computeFieldMoments()
293 mom = 0.; in computeFieldMoments()
[all …]
H A Dex2.c327 PetscReal mom[3] = {0.0, 0.0, 0.0}; in computeParticleMoments() local
346 mom[0] += PetscRealPart(w[idx]); in computeParticleMoments()
347 mom[1] += PetscRealPart(w[idx]) * c[0]; in computeParticleMoments()
348 for (d = 0; d < dim; ++d) mom[2] += PetscRealPart(w[idx]) * c[d] * c[d]; in computeParticleMoments()
355 …PetscCallMPI(MPIU_Allreduce(mom, moments, 3, MPIU_REAL, MPI_SUM, PetscObjectComm((PetscObject)sw))… in computeParticleMoments()
380 PetscScalar mom; in computeFEMMoments() local
385 PetscCall(DMPlexComputeIntegralFEM(dm, u, &mom, user)); in computeFEMMoments()
386 moments[0] = PetscRealPart(mom); in computeFEMMoments()
388 PetscCall(DMPlexComputeIntegralFEM(dm, u, &mom, user)); in computeFEMMoments()
389 moments[1] = PetscRealPart(mom); in computeFEMMoments()
[all …]
/petsc/share/petsc/datafiles/meshes/
H A Dtestcase3D.cas1189 (soot-mom/opt-oxid-rates? #f)
1190 (soot-mom/sgs-rates-option 0)
1191 (soot-mom/nucl-feedback? #f)
1192 (soot-mom/src-linearization-apfac 0.5)
1193 (soot-mom/integration-method 1)
1194 (soot-mom/src-linearization-const 0.5)
1195 (soot-mom/src-linearization? #t)
1196 (soot-mom/clip-vars? #f)
1197 (soot-mom/init-agg-values (0. 0. 0. 0. 0. 0. 0. 0. 0. 0.))
1198 (soot-mom/agg-exp-urf (1. 1. 1. 1. 1. 1.))
[all …]
/petsc/src/ksp/ksp/utils/dm/
H A Ddmproject.c1205 PetscReal mom[4]; in DMSwarmRemap_PFAK_Internal() local
1224 PetscCall(DMPlexComputeMoments(rdm, u_f, mom)); in DMSwarmRemap_PFAK_Internal()
1234 mom[1 + cdim] = PetscRealPart(rmom); in DMSwarmRemap_PFAK_Internal()
1238 PetscCall(PetscPrintf(PETSC_COMM_SELF, "Mom 0: %g\n", (double)mom[0])); in DMSwarmRemap_PFAK_Internal()
1239 PetscCall(PetscPrintf(PETSC_COMM_SELF, "Mom x: %g\n", (double)mom[1 + 0])); in DMSwarmRemap_PFAK_Internal()
1240 PetscCall(PetscPrintf(PETSC_COMM_SELF, "Mom v: %g\n", (double)mom[1 + 1])); in DMSwarmRemap_PFAK_Internal()
1241 PetscCall(PetscPrintf(PETSC_COMM_SELF, "Mom 2: %g\n", (double)mom[1 + cdim])); in DMSwarmRemap_PFAK_Internal()
1297 PetscReal mom[4], rmom[4]; in DMSwarmRemapMonitor_Internal() local
1302 PetscCall(DMSwarmComputeMoments(sw, "velocity", "w_q", mom)); in DMSwarmRemapMonitor_Internal()
1305 PetscCall(PetscPrintf(PETSC_COMM_SELF, "Mom 0: %g --> %g\n", (double)mom[0], (double)rmom[0])); in DMSwarmRemapMonitor_Internal()
[all …]
/petsc/src/dm/impls/swarm/
H A Dswarm.c2642 PetscReal *mom; in DMSwarmComputeMoments() local
2659 PetscCall(DMGetWorkArray(sw, bsc + 2, MPIU_REAL, &mom)); in DMSwarmComputeMoments()
2660 PetscCall(PetscArrayzero(mom, bsc + 2)); in DMSwarmComputeMoments()
2665 mom[0] += wp; in DMSwarmComputeMoments()
2667 mom[d + 1] += wp * c[d]; in DMSwarmComputeMoments()
2668 mom[d + bsc + 1] += wp * PetscSqr(c[d]); in DMSwarmComputeMoments()
2673 …PetscCallMPI(MPIU_Allreduce(mom, moments, bsc + 2, MPIU_REAL, MPI_SUM, PetscObjectComm((PetscObjec… in DMSwarmComputeMoments()
2674 PetscCall(DMRestoreWorkArray(sw, bsc + 2, MPIU_REAL, &mom)); in DMSwarmComputeMoments()
/petsc/src/binding/petsc4py/src/petsc4py/PETSc/
H A DDMSwarm.pyx1060 cdef PetscReal *mom = NULL
1067 cdef object moments = oarray_r(empty_r(asInt(cbs) + 2), NULL, &mom)
1068 CHKERR(DMSwarmComputeMoments(self.dm, ccoord, cweight, mom))
/petsc/src/ts/tutorials/hamiltonian/
H A Dex3.c1590 PetscReal *pos, *mom; in MigrateParticles() local
1598 PetscCall(VecGetArray(momentum, &mom)); in MigrateParticles()
1625 v[p * dim + d] = mom[p * dim + d]; in MigrateParticles()
1632 PetscCall(VecRestoreArray(momentum, &mom)); in MigrateParticles()
H A Dex2.c2321 PetscReal *pos, *mom; in MigrateParticles() local
2329 PetscCall(VecGetArray(momentum, &mom)); in MigrateParticles()
2356 v[p * dim + d] = mom[p * dim + d]; in MigrateParticles()
2363 PetscCall(VecRestoreArray(momentum, &mom)); in MigrateParticles()
H A Dex4.c2926 PetscReal *pos, *mom; in MigrateParticles() local
2934 PetscCall(VecGetArray(momentum, &mom)); in MigrateParticles()
2962 v[p * dim + d] = mom[p * dim + d]; in MigrateParticles()
2969 PetscCall(VecRestoreArray(momentum, &mom)); in MigrateParticles()
/petsc/src/dm/dt/dualspace/impls/lagrange/
H A Ddspacelagrange.c963 PetscBool cont, tensor, trimmed, boundary, mom; in PetscDualSpaceDuplicate_Lagrange() local
984 PetscCall(PetscDualSpaceLagrangeGetUseMoments(sp, &mom)); in PetscDualSpaceDuplicate_Lagrange()
985 PetscCall(PetscDualSpaceLagrangeSetUseMoments(spNew, mom)); in PetscDualSpaceDuplicate_Lagrange()
/petsc/src/dm/impls/plex/
H A Dplexfem.c7189 PetscScalar mom, constants[1]; in DMPlexComputeMoments() local
7204 PetscCall(DMPlexComputeIntegralFEM(dm, u, &mom, ctx)); in DMPlexComputeMoments()
7205 moments[0] = PetscRealPart(mom); in DMPlexComputeMoments()
7210 PetscCall(DMPlexComputeIntegralFEM(dm, u, &mom, ctx)); in DMPlexComputeMoments()
7211 moments[c + 1] = PetscRealPart(mom); in DMPlexComputeMoments()
7214 PetscCall(DMPlexComputeIntegralFEM(dm, u, &mom, ctx)); in DMPlexComputeMoments()
7215 moments[cdim + 1] = PetscRealPart(mom); in DMPlexComputeMoments()