Coder Social home page Coder Social logo

rodnio / low-rank-monte-carlo Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 197 KB

Code of low-rank Monte Carlo methods, which provide the solution of (generalized) Smoluchowski equations and Boltzmann equations.

License: GNU General Public License v3.0

Shell 0.19% Makefile 0.58% Fortran 97.14% C++ 2.08%
direct-simulation-monte-carlo monte-carlo-simulation smoluchowski

low-rank-monte-carlo's Introduction

Low-rank Monte Carlo methods

Hello! This repository contains a Fortran code of the low-rank Monte Carlo methods for (generalized) Smoluchowski equations from [1] A.I. Osinsky. Low-rank Monte Carlo for Smoluchowski-class equations // Journal of Computational Physics 506(1), 112942 (2024).

and for Boltzmann equations from [2] A.S. Bodrova, A.I. Osinsky. Anomalous diffusion in polydisperse granular gases: Monte Carlo simulations // arXiv 2403.13772 (Submitted on 20 Mar 2024).

Module ModMonte.mod contains all the corresponding subroutines. Other modules are from "projective volume low rank" repository (this repository is essentially a fork) and will be used, when ODE solvers for (generalized) Smoluchowski equations are added here.

The use of all of the simulation methods is illustrated in incfiles/ExampleM.f90.

To compile and run it, use either

make gnu_run

(Requires gfortran, BLAS and LAPACK)

or

make run

(Requires ifort and mkl)

Structure:

The code is organized to enable compilation of multiple programs with a single makefile. This is achieved through 'src/incfiles' directory, where one can write functions and then include and call them in 'Main.f90'. Makefile pays attention only to files with '.f90' extension, so remember to name them appropriately. Module and object files are saved in 'obj_gnu' and 'obj_intel' folders (created during compilation), enabling to have gfortran and ifort versions compiled and saved simultaneously.

Large sizes:

Code uses 'allocatable' arrays, which are usually put in stack. Therefore, for large amounts of data, you may require to use 'ulimit -s unlimited' to allow unlimited stack size.

Debug:

debugrun.sh script uses gfortran with debug options to recompile and run everything. Remember to run 'make clean' after debug before running 'make gnu'.

low-rank-monte-carlo's People

Contributors

rodnio avatar

Stargazers

Bulat Valiahmetov 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.