Coder Social home page Coder Social logo

nitromannitol / arbitrarydim_sandpiles Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 1.78 MB

CPU and GPU code for computing arbitrary dimensional sandpiles following the algorithm in "Dynamic Dimensional Reduction in the Abelian Sandpile" https://arxiv.org/abs/2009.05968

Julia 100.00%

arbitrarydim_sandpiles's Introduction

Instructions

  1. install Julia 1.5.0+

    https://julialang.org/downloads/

  2. start Julia and run

    (for CPU code with no dependencies)
    
    >include("PATHTOFILE/sandpile_cpu_multidim_init.jl")
    
    
    (for GPU code install CUDA.jl and run)
    
    >include("PATHTOFILE/sandpile_gpu_multidim_init.jl")
    
  3. compute arbitrary dimensional sandpiles on the hypercube by running, for example

    >d = 6
    >M= 3
    >init_condition = 2*d
    >@time v, index, num_iters = getOdometer_cpu(init_condition,M,d)
    >s = getLaplacian_cpu(v,index,M,d)
    

- see run_gpu.jl  and run_cpu.jl for some sample code

- to write the outputs to a file run

	> using DelimitedFiles
	> writedlm("file_name", s) 

- for 3D viz in Julia we recommend installing Makie.jl 
and following the recipe in sample 2 in run_*.jl

- for writing 2D sandpiles to PNG files we recommend
installing FileIO,Colors, IndirectArrays and then following 
the recipe in sample 3 in run_*.jl 

arbitrarydim_sandpiles's People

Contributors

nitromannitol avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.