Skip to content

Instantly share code, notes, and snippets.

View entropylost's full-sized avatar

Entropy Lost entropylost

View GitHub Profile
/// Note about the annotations:
/// [BK17] is https://animation.rwth-aachen.de/media/papers/2017-TVCG-ViscousDFSPH.pdf.
/// The "boundary paper" or "consistent boundaries" is https://animation.rwth-aachen.de/media/papers/84/2023-VMV-SPH_ConsistentBoundaryHandling.pdf
/// The original version of this file is from https://github.com/InteractiveComputerGraphics/SPlisHSPlasH/blob/4c063bed4dbb376e79f59b17391bb2b66e1207b7/SPlisHSPlasH/DFSPH/TimeStepDFSPH.cpp
/// Most of my notes start after a `// !!!:` which may be helpful for searching.
/// I also remove the _i in many places; if I refer to ρ, it usually means ρ_i, for example, if it doesn't have a different subscript.
#include "TimeStepDFSPH.h"
#include "SPlisHSPlasH/TimeManager.h"
#include "SPlisHSPlasH/SPHKernels.h"
@entropylost
entropylost / configmdadm.sh
Last active March 30, 2022 18:07
Raid0 for Ubuntu (Zorin OS), NVME ssds
#!/bin/sh
PREREQ='mdadm mdrun'
prereqs() {
echo "$PREREQ"
}
case $1 in
prereqs)
prereqs
exit 0
@entropylost
entropylost / lockstep.js
Created November 17, 2020 22:20
Short thing for deterministic lockstep.
const playerId = 123; // Unique ID.
let tick = 0;
let minTick = 0;
const state = [/* INITIAL STATE*/];
const inputs = [[]];
(function run() {
tick++;
// currentInputs is an array of all inputs. Each input is of an "input" type.
// Inputs is an array of inputs, ordered by tick, with each input containing a .playerId which is the