Skip to content

Instantly share code, notes, and snippets.

@dineshadepu
dineshadepu / test_serial_parallel_reduce.cpp
Created July 24, 2023 13:25
test cabana serial parallel reduce
/****************************************************************************
* Copyright (c) 2018-2022 by the Cabana authors *
* All rights reserved. *
* *
* This file is part of the Cabana library. Cabana is distributed under a *
* BSD 3-clause license. For the licensing terms see the LICENSE file in *
* the top-level directory. *
* *
* SPDX-License-Identifier: BSD-3-Clause *
****************************************************************************/
@dineshadepu
dineshadepu / visualize_files_cabana_xmf_paraview.py
Created July 25, 2023 12:15
Visualize xmf files generated by Cabana
# trace generated using paraview version 5.11.1
#import paraview
#paraview.compatibility.major = 5
#paraview.compatibility.minor = 11
#### import the simple module from the paraview
from paraview.simple import *
import os, sys
#### disable automatic camera reset on 'Show'
@dineshadepu
dineshadepu / cabana_gpu_installation.md
Last active October 18, 2023 11:22
cabana gpu installation instructions

Kokkos installation

add the following to the bashrc file

  1. Add the following line to the bashrc

export KOKKOS_INSTALL_DIR=/home/dinesh/post_doc/softwares/kokkos/build/install

  1. Execute the following in the terminal

The current documentation is given after installation

For Linux 64, Open MPI is built with CUDA awareness but this support is disabled by default.                                                                              
To enable it, please set the environment variable OMPI_MCA_opal_cuda_support=true before                                                                                  
launching your MPI processes. Equivalently, you can set the MCA parameter in the command line:                                                                            
mpiexec --mca opal_cuda_support 1 ...                                                
                                                                                     
In addition, the UCX support is also built but disabled by default.                  
To enable it, first install UCX (conda install -c conda-forge ucx). Then, set the environment                                                                             
@dineshadepu
dineshadepu / arborx_installation.md
Created October 30, 2023 15:57
ArborX installation
@dineshadepu
dineshadepu / fast_nnps_pysph.txt
Created December 14, 2023 16:40
Fast nnps different resolution SPH
https://gitlab.com/pypr/adaptive_sph/-/blob/master/code/fpc_auto.py#L795
https://gitlab.com/pypr/adaptive_sph/-/blob/master/code/fpc_auto.py#L435
@dineshadepu
dineshadepu / convert.md
Created December 21, 2023 13:31
Video formats conversion commands

ffmpeg -i 3d_dam_break.webm -vf "crop=trunc(iw/2)*2:trunc(ih/2)*2" 3d_dam_break.mp4

ffmpeg -i fifty_bodies_500_density_sph_representation.webm -vf "crop=trunc(iw/2)*2:trunc(ih/2)*2" fifty_bodies_500_density_sph_representation.gif
@dineshadepu
dineshadepu / bodies_settling_in_tank_under_gravity_Cabana.cpp
Created April 24, 2024 17:52
Rigid bodies settling under gravity in a tank simulated with Cabana
/****************************************************************************
* Copyright (c) 2018-2022 by the Cabana authors *
* All rights reserved. *
* *
* This file is part of the Cabana library. Cabana is distributed under a *
* BSD 3-clause license. For the licensing terms see the LICENSE file in *
* the top-level directory. *
* *
* SPDX-License-Identifier: BSD-3-Clause *
****************************************************************************/