Skip to content

Instantly share code, notes, and snippets.

@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
@dineshadepu
dineshadepu / makefile
Created November 3, 2024 09:46
Run tests in Cabana if ctests are not working
# Define the build directory containing binaries
BUILD_DIR := /home/dineshadepu/life/softwares/Cabana_package_template/build
# for mac os
BUILD_DIR := /Users/dineshadepu/life/softwares/Cabana_package_template/build
# Find all binaries in BUILD_DIR with "test" in the name (Ubuntu compatible)
TEST_BINARIES := $(shell find $(BUILD_DIR) -type f -executable -name "*test*")
# for mac os
# TEST_BINARIES := $(shell find $(BUILD_DIR) -type f -perm +111 -name "*test*")
@dineshadepu
dineshadepu / ubuntu_setup.md
Last active October 9, 2024 07:18
Ubuntu setup

Make mouse fast

Search "Mouse and Touchpad" and change the speed.

Bring dock down and make icons small

Go to "Appearance" and change the dock properties

Make the cross button to left