Skip to content

claudio-bonati/NumericalMethods

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

159 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

*************************************************************
******     SOME C CODES TO BE USED AS EXAMPLES IN      ****** 
******         "METODI NUMERICI PER LA FISICA"         ******
*****         "COMPUTATIONAL PHYSICS LABORATORY"       ******
*************************************************************

Into_To_C: some basic code to get acquainted with C

ModuleA: Introduction to Markov Chain Monte-Carlo and 
         applications in statistical mechanics

ModuleB: Application of Monte-Carlo methods to the study of 
         the path-integral in quantum mechanics

ModuleC: Path-integral simulations for quantum field theories

-------------------------

TO COMPILE: from inside one of the modules use 

make

and executables will be generated in the build directory. Default 
compiler is gcc, if you want to use a different compiler 
(e.g. clang), please use 

make CC="your compiler"

Default compilation options are 

CFLAGS=-O3 -Wall -Wextra -Werror -pedantic -Wconversion -std=c99

if you want to change them you can modify the Makefile in the build 
directory or use

make CFLAGS="what you want"

Option "-std=c99" is required for the "restrict" keyword to be used 
with pointers, which is neglected if the c99 standard is not used.

Even if you remove all the warnings, please be sure to keep a 
nontrivial optimization level (like -O2 or -O3) since otherwise 
the codes will be much slower!

-------------------------

About

Some C codes for the course "Computational Physics Laboratory"

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors