peclet-dem 1.1.0
Performance-portable XPBD Discrete Element Method (Kokkos + ArborX)
Loading...
Searching...
No Matches
peclet::dem::mldetail Namespace Reference

Classes

struct  D3
 Double-precision copy of dem_portable's rotateVector (the same formula), for the build. More...
 

Functions

float effMass (float invMass)
 Effective mass with fixed bodies (invMass == 0) mapped to a huge-but-finite mass so the momentum-weighted restriction stays finite and the group's inverse mass underflows to ~0.
 
bool eligible (const ManifoldC &m, int idx, Kokkos::View< const int *, CpMem > mColor, Kokkos::View< const float *, CpMem > vn0, Kokkos::View< const float *[3], CpMem > vt0, Kokkos::View< const unsigned char *, CpMem > persistent, Kokkos::View< const float *[3], CpMem > posPred, F3 gHat, float qsThr, int gateMask)
 Coarse-eligibility of a manifold: active + base-coloured (non-dup) + quasi-static approach (|vn0| <= qsThr: a ballistic pair is never aggregated, so an impactor keeps its fine-level momentum-conserving physics), plus the gates selected in gateMask.
 
bool canonical (const Kokkos::View< const float *[3], CpMem > &posPred, const Kokkos::View< const int *, CpMem > &realIdx, int slot)
 A slot sits at its canonical body's position, bitwise (false for a periodic image).
 
template<class VX >
F3 memberOffset (const VX &posPred, int i, const Kokkos::View< const float *[3], CpMem > &originG, const Kokkos::View< const float *[3], CpMem > &comOffG, int gi)
 Member offset from its group's centre of mass, d_q = fl(fl(x_q - O_g) - c_g) (§2.3 step 2): recomputed wherever it is used, never stored, so the build, the restriction, the coarse rows and the prolongation all see the same float value.
 
F3 spinInertiaTimes (F4 q, F3 invIc, F3 w)
 J_q w: the member's world-frame spin inertia R diag(1 / max(invIc, 1e-30)) R^T applied to w (§2.3 step 3).
 
template<class V6 >
F3 symMul (const V6 &S, int g, F3 v)
 Symmetric 3x3 (xx, yy, zz, xy, xz, yz) times v.
 
D3 crossD (D3 a, D3 b)
 
D3 rotateD (double qx, double qy, double qz, double qw, D3 v)
 

Variables

constexpr int kGatePersistent = 1
 Optional eligibility gates beyond the quasi-static approach test (a SELECTION, not a sink – impulses stay symmetric; gating only decides which contacts join the coarse problem): kGatePersistent – contact must have existed last substep (a fresh contact is an event).
 
constexpr int kGateCone = 2
 
constexpr int kGateSlip = 4
 

Function Documentation

◆ effMass()

float peclet::dem::mldetail::effMass ( float  invMass)

Effective mass with fixed bodies (invMass == 0) mapped to a huge-but-finite mass so the momentum-weighted restriction stays finite and the group's inverse mass underflows to ~0.

Definition at line 104 of file solver_multilevel.hpp.

Referenced by peclet::dem::buildMlLevelGeometryKokkos().

◆ eligible()

bool peclet::dem::mldetail::eligible ( const ManifoldC &  m,
int  idx,
Kokkos::View< const int *, CpMem >  mColor,
Kokkos::View< const float *, CpMem >  vn0,
Kokkos::View< const float *[3], CpMem >  vt0,
Kokkos::View< const unsigned char *, CpMem >  persistent,
Kokkos::View< const float *[3], CpMem >  posPred,
F3  gHat,
float  qsThr,
int  gateMask 
)

Coarse-eligibility of a manifold: active + base-coloured (non-dup) + quasi-static approach (|vn0| <= qsThr: a ballistic pair is never aggregated, so an impactor keeps its fine-level momentum-conserving physics), plus the gates selected in gateMask.

Definition at line 124 of file solver_multilevel.hpp.

References peclet::dem::ManifoldC::bodyA, peclet::dem::ManifoldC::bodyB, peclet::dem::dot3(), kGateCone, kGatePersistent, kGateSlip, peclet::dem::ldF3(), peclet::dem::ManifoldC::num_points, peclet::dem::sub3(), peclet::dem::F3::x, peclet::dem::F3::y, and peclet::dem::F3::z.

◆ canonical()

bool peclet::dem::mldetail::canonical ( const Kokkos::View< const float *[3], CpMem > &  posPred,
const Kokkos::View< const int *, CpMem > &  realIdx,
int  slot 
)

A slot sits at its canonical body's position, bitwise (false for a periodic image).

Definition at line 158 of file solver_multilevel.hpp.

◆ memberOffset()

template<class VX >
F3 peclet::dem::mldetail::memberOffset ( const VX &  posPred,
int  i,
const Kokkos::View< const float *[3], CpMem > &  originG,
const Kokkos::View< const float *[3], CpMem > &  comOffG,
int  gi 
)

Member offset from its group's centre of mass, d_q = fl(fl(x_q - O_g) - c_g) (§2.3 step 2): recomputed wherever it is used, never stored, so the build, the restriction, the coarse rows and the prolongation all see the same float value.

Definition at line 169 of file solver_multilevel.hpp.

References peclet::dem::F3::x.

Referenced by peclet::dem::buildMlLevelGeometryKokkos(), peclet::dem::MlCoarseSweep::prolongRigid(), peclet::dem::MlCoarseSweep::restrictAngular(), and peclet::dem::MlCoarseSweep::row().

◆ spinInertiaTimes()

F3 peclet::dem::mldetail::spinInertiaTimes ( F4  q,
F3  invIc,
F3  w 
)

J_q w: the member's world-frame spin inertia R diag(1 / max(invIc, 1e-30)) R^T applied to w (§2.3 step 3).

Isotropic invIc (spheres): the diagonal directly, no rotation (the S15 guard).

Definition at line 180 of file solver_multilevel.hpp.

References peclet::dem::invRotateVector(), peclet::dem::rotateVector(), peclet::dem::scale3(), peclet::dem::F3::x, peclet::dem::F3::y, and peclet::dem::F3::z.

Referenced by peclet::dem::MlCoarseSweep::restrictAngular().

◆ symMul()

template<class V6 >
F3 peclet::dem::mldetail::symMul ( const V6 &  S,
int  g,
F3  v 
)

◆ crossD()

D3 peclet::dem::mldetail::crossD ( D3  a,
D3  b 
)

◆ rotateD()

D3 peclet::dem::mldetail::rotateD ( double  qx,
double  qy,
double  qz,
double  qw,
D3  v 
)

Variable Documentation

◆ kGatePersistent

constexpr int peclet::dem::mldetail::kGatePersistent = 1
inlineconstexpr

Optional eligibility gates beyond the quasi-static approach test (a SELECTION, not a sink – impulses stay symmetric; gating only decides which contacts join the coarse problem): kGatePersistent – contact must have existed last substep (a fresh contact is an event).

kGateCone – support-oriented only (|up| > 0.3|dx|, computeSideFlagsKokkos's cone). kGateSlip – exclude sustained shear (|vt0| > qsThr): a discharging silo's bulk is normal-quasi-static in every direction, and cancelling aggregate-relative approach there acts as fake bulk viscosity (measured: large-orifice discharge 16.7 k/s vs 24.5 reference ungated) – but it SLIPS, while a crushing bed does not.

Definition at line 117 of file solver_multilevel.hpp.

Referenced by eligible().

◆ kGateCone

constexpr int peclet::dem::mldetail::kGateCone = 2
inlineconstexpr

Definition at line 118 of file solver_multilevel.hpp.

Referenced by eligible().

◆ kGateSlip

constexpr int peclet::dem::mldetail::kGateSlip = 4
inlineconstexpr

Definition at line 119 of file solver_multilevel.hpp.

Referenced by peclet::dem::demSolveContacts(), and eligible().