Skip to content

Instantly share code, notes, and snippets.

@dineshadepu
dineshadepu / swelling_linkedin_video.py
Created March 29, 2026 20:27
Swelling video of Hu DEM cases
# state file generated using paraview version 5.13.0
import glob
import re
import paraview
paraview.compatibility.major = 5
paraview.compatibility.minor = 13
#### import the simple module from the paraview
from paraview.simple import *
@dineshadepu
dineshadepu / render_vtk_acodyn_jaali_prestige.sh
Created March 25, 2026 18:52
Rendering vtk files of AcoDyn and Jaali x Prestige particles
#!/usr/bin/env bash
set -euo pipefail
# ── ParaView (Linux custom install) ──────────────────────────
PARAVIEW_DIR="/home/dineshadepu/life/softwares/paraview"
export LD_LIBRARY_PATH="${PARAVIEW_DIR}/lib${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}"
PVPYTHON="${PARAVIEW_DIR}/bin/pvpython"
# ── Paths ────────────────────────────────────────────────────
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
@dineshadepu
dineshadepu / test_rayon_par_chunk_max_contacts.rs
Created March 12, 2026 19:54
Parallel iteration using Rayon
use rayon::prelude::*;
pub struct Particles {
/// Total number of particles in the simulation.
pub n: usize,
pub x: Vec<f64>,
pub u: Vec<f64>,
pub f: Vec<f64>,
/// Mass of particles.

Installing and Running MFEM using Spack

This guide documents how to install and run the MFEM examples using Spack.

Tested on MacOS (Apple Silicon) with MPI.


1. Install Spack

@dineshadepu
dineshadepu / .bashrc
Created March 5, 2026 17:06
DWI199a bashrc file
# User specific environment
if ! [[ "$PATH" =~ "$HOME/.local/bin:$HOME/bin:" ]]; then
PATH="$HOME/.local/bin:$HOME/bin:$PATH"
fi
export PATH
# Uncomment the following line if you don't like systemctl's auto-paging feature:
# export SYSTEMD_PAGER=
@dineshadepu
dineshadepu / lid_driven_cavity_neighbours_arborx.cpp
Created August 28, 2025 11:33
ArborX two particle sets neighbours
/*
*****************************************************
*****************************************************
*****************************************************
*** O O O O O O O O O O O O O O O O O O O O O O O ***
*** O O O O O O O O O O O O O O O O O O O O O O O ***
*** O O O O O O O O O O O O O O O O O O O O O O O ***
*** O O O O O O O O O O O O O O O O O O O O O O O ***
*** O O O O O O O O O O O O O O O O O O O O O O O ***
@dineshadepu
dineshadepu / pysph_install.md
Created May 14, 2025 09:18
PySPH installation

PySPH installation

conda create -n pysph_new -c conda-forge python=3.12
conda activate pysph_new
pip install --upgrade pip setuptools wheel

pip install https://github.com/pypr/compyle/zipball/master
pip install https://github.com/pypr/cyarray/zipball/master
pip install h5py
@dineshadepu
dineshadepu / Machine_learning_guide.md
Created April 30, 2025 04:34
Machine learning till neural networks path

To effectively learn Neural Networks, it’s best to build your understanding step-by-step, starting from foundational concepts in math and programming, and progressing through machine learning. Here's a clear learning path:


🔹 1. Prerequisites

Mathematics:

  • Linear Algebra – Vectors, matrices, matrix multiplication
  • Calculus – Derivatives, gradients (for backpropagation)
  • Probability & Statistics – Basics of distributions, expectation, Bayes’ theorem
@dineshadepu
dineshadepu / vertex_cfd_fem.md
Created April 4, 2025 10:59
Vertex-CFD FEM solver

Trilinos installation

mkdir trilinos
cd trilinos/
git clone -c feature.manyFiles=true --depth=2 https://github.com/spack/spack.git

Then source the spack

source spack/share/spack/setup-env.sh
@dineshadepu
dineshadepu / pysph_install.md
Created November 6, 2024 13:27
PySPH working installation instructions

Install pysph

pip install 'cython<3'
pip install 'numpy==1.23'
pip install h5py
pip install https://github.com/pypr/pysph/zipball/master