Coder Social home page Coder Social logo

ifm's Introduction

Monte Carlo simulation of Ising ferromagnets

ifm is a simple and efficient implementation of the Wolff cluster algorithm (Wolff, 1989) for Monte Carlo simulation of Ising ferromagnets. It is optimized for very large lattices and can handle billions of spins.

Basic usage

Simulation parameters are defined as macro constants to allow for effective compiler optimization. Use the script setup.sh to prepare a build for a given set of parameters. Binaries with different sets of parameters should be built in separate directories.

For example, to build a simulation of a 2-d model on a 64x64 square lattice with periodic boundary conditions:

mkdir -p build/d2-L64
cd build/d2-L64
BC=BC_PERIODIC LT_D=2 LT_LMAX=64 ../../setup.sh
make

The ifm binary takes a single optional argument, which is used to seed the random number generator. Temperatures are read from standard input. Typical usage looks like

./ifm 123 < temps.txt > d2-L64-123.dat

Parameters

The following environment variables are used by setup.sh:

Basic parameters

Parameter Type Description
BC {BC_PERIODIC,BC_FREE} boundary conditions
LT_D integer dimension of lattice
LT_LMAX integer linear size of lattice
LOG_TIME_THERM integer log time to thermalize
LOG_TIME_MEAS integer log time to measure

Advanced parameters (usually don't need adjustment)

Parameter Type Description
RNG [see rng.h.in for values] type of random number generator to use
UPDATES_PER_STEP integer number of cluster updates per unit time
MAX_STACK_SIZE integer size of the stack used for cluster updates

ifm's People

Contributors

mcwitt avatar

Stargazers

 avatar

Watchers

 avatar James Cloos avatar  avatar

Forkers

tkeiber

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.