← Back
Home › Systems › Simulation and scientific computing

sph-solver

smoothed particle hydrodynamics

DualSPHysics

Open the sph-solver pagesph-solver Batch checkpoint restartdistributed: Large batch jobs (end-of-day, settlement, payroll runs) that checkpoint and restart idempotentlyHalo exchangedistributed: Each rank stores its block plus a border copy of its neighbours' edge cells, refreshed by small messages every step; communication scales with block surface, not volume.›Space filling curvesgeometry: Z-order/Morton (geohash) and Hilbert curves mapping multi-dimensional points to sortable keysMarching cubesgraphics: Extract triangle meshes from scalar fields (marching cubes, dual contouring)Gpu memory coalescing bankinghardware-os: Coalesced global loads, shared memory bank conflicts, L2 and HBM bandwidth on GPUsCUDA and GPU languageslanguages: Programming GPUs: thousands of lockstep threads, bound by memory bandwidth; libraries first, Triton for fused kernels, CUDA C++ for peak speed.›Floating-point errornumerics: How IEEE 754 rounding error accumulates and how to contain it: compensated (Kahan/Neumaier) and pairwise summation, error-free transformations with FMA, ULP comparisons.›Verlet / leapfrognumerics: Half-kick, drift, half-kick: a second-order, time-reversible, symplectic integrator with one force evaluation per step whose energy error stays bounded for millions of steps.›Complementarity contact solverphysics: Contact as LCP or convex optimization (PGS, Newton) with friction cones; soft contactsNeighbor listsphysics: Cell lists plus Verlet buffer lists for O(n) short-range pair interactionsPeriodic boundary conditionsphysics: Minimum image convention and wrapping for simulations in periodic boxesRigid-body dynamicsphysics: Advance one 3D rigid body per step from force and torque: semi-implicit Euler for position, an inertia tensor in the body frame, and quaternion orientation updated by the exponential map.›Smoothed particle hydrodynamicsphysics: SPH kernels for density, pressure and viscosity on particles; neighbor searchSpatial hashingphysics: Uniform grid stored in a hash table: bucket objects by cell, test only neighbouring cells; O(n) neighbour search for many similar-sized objects such as particles.›Parallel prefix sumsearch-sort: Work-efficient scan (Blelloch, decoupled look-back) on CPU SIMD and GPUs; stream compactionRadix sortsearch-sort: Non-comparison sort that distributes keys by 8-bit digits; several times faster than comparison sorts on large arrays of integers, floats or fixed-size keys.›Chunked array storagestorage: Cut an N-dimensional array into a regular grid of independently compressed blocks, so a slice read touches only the overlapping blocks and writers to different blocks run in parallel.›Idempotency keysfinance: Client-chosen unique key per logical operation, stored with a request fingerprint and the final response, so retries replay the first result instead of acting twice.›Write-ahead logstorage: Append each change to a checksummed sequential log and fsync it before touching data pages; the basis of crash durability in nearly every database.›Cron schedulingsystems: Cron expression parsing and next-fire-time computation, with catch-up and time-zone rulesEager rendezvous protocoldistributed: MPI point-to-point: eager sends for small messages, rendezvous handshake for large onesRdmanetworking: RDMA verbs over InfiniBand/RoCE: queue pairs, memory registration, one-sided opsZero-copy I/Onetworking: Move bytes between files, sockets and NICs by passing page references instead of copying through user space: sendfile, splice, MSG_ZEROCOPY, kTLS.›Finite differencesnumerics: Replace derivatives with weighted differences of grid values; simple stencils plus a stability condition (CFL) turn PDEs like heat, advection and waves into array loops.›Sparse matrices (CSR)numerics: Compressed sparse row stores only nonzeros as row pointers, column indices and values; SpMV streams them once, so it is memory-bandwidth bound.›Contact manifold generationphysics: Build persistent contact point sets from collision normals by clipping, with feature IDs for warm startsQuaternion rotationsgeometry: Unit quaternions as 3D rotations: 4 floats, cheap composition, no gimbal lock, plus the conversions, interpolation choices and numerical care needed in practice.›Semi-implicit Eulernumerics: Update velocity from forces first, then position with the new velocity: explicit Euler cost, but symplectic and stable; the default game-physics integrator.›Fast hash functionsdata-structures: Non-cryptographic hashes built from 64×64→128-bit multiplies and xor-shifts; pick by key size, trust level and whether the hash is persisted.›+ 4 moreLeasesdistributed: A lock that expires on its own: bounded-time ownership that survives crashes and partitions, given bounded clock drift and fencing tokens on writes.›Cryptographic hashes (SHA-2,BLAKE3)security: Collision-resistant fingerprints of data; SHA-256 for interoperability, BLAKE3 for speed, HMAC/HKDF for keyed uses.›Exponential backoff with jittersystems: Retry after delays that grow geometrically and are randomized, so failed clients spread out instead of hammering a recovering service in synchronized waves.›CRC32C checksumshardware-os: The Castagnoli CRC-32 with dedicated instructions on x86 (SSE4.2) and ARMv8. It is the standard fast integrity check for storage blocks, logs and network frames.›fsync, O_DSYNC and O_DIRECThardware-os: What fsync, fdatasync, O_DSYNC, O_DIRECT and F_FULLFSYNC really guarantee on Linux and macOS, and the exact call sequences for crash-safe files.›Explicit Eulernumerics: Step an ODE forward by its current slope, y += h·f(t, y); first-order, one evaluation per step, the baseline every other integrator is measured against.›Thomas tridiagonal solvernumerics: O(n) tridiagonal linear solve used in implicit finite-difference and spline schemesPolygon clippinggeometry: Polygon intersection/union/difference (Weiler-Atherton, Martinez) for spatial predicatesGJK and EPAphysics: GJK decides whether (and how far apart) two convex shapes are from their support functions alone; EPA expands its simplex into penetration depth and normal.›Separating axis theoremphysics: Convex shapes are disjoint iff some axis separates their projections; testing face normals and edge crosses gives overlap, depth and contact normal.›Fixed timestep loopgraphics: Fixed simulation dt with accumulator, render interpolation, spiral-of-death guard+ 2 moreFencing tokensdistributed: A number that grows with every lock grant and is checked by the protected resource, so a paused ex-holder's late write is rejected.›PRNGs (PCG, xoshiro)numerics: Small, fast, statistically strong non-cryptographic generators: PCG32 and xoshiro256**, with seeding, parallel streams and unbiased ranges.›SIMD programminghardware-os: Process 4-16 lanes per instruction with AVX2, AVX-512 or NEON via Rust std::arch, with runtime dispatch and a portable fallback.›d-ary heapdata-structures: Array heap with d children per node (d = 4 typical): half the binary heap's depth, siblings in one cache line, faster priority queues.›Exact geometric predicatesgeometry: Robust orient and incircle tests with adaptive-precision floats (Shewchuk) or exact arithmeticPoint in polygongeometry: Ray-casting/winding tests and indexed polygon lookup for reverse geocoding

Similar systems

Share the most building blocks with this one.