GithubHelp home page GithubHelp logo

jmhogan / phy410 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from rappoccio/phy410

0.0 1.0 0.0 3.05 MB

Software for UB's PHY410 class

Python 39.70% C++ 54.33% Makefile 1.59% Gnuplot 0.03% Jupyter Notebook 4.08% Shell 0.04% TeX 0.25%

phy410's Introduction

PHY410

Software for UB's PHY410 class

This software package is to demonstrate the example code in the UB Computational Physics class, PHY 410, developed by Prof. Richard Gonsalves (and updated by Prof. Salvatore Rappoccio). This also includes software from the following sources :

The examples are typically provided in both python and C++ with a few exceptions. These have been tested with :

  • Mac OS 10.8 : python 2.7.2 and GCC 4.7.3_0. Mac OS 10.10: python 2.7.9 and clang-700.1.81 (g++ points to this now)
  • Windows 7 + cygwin : python 2.7.5 and GCC 4.8.1
  • Ubuntu 12.04 LTS : python 2.7.3 and GCC 4.6.3

Additional installation instructions :

  • Mac OS >= 10.8 :

    Install XCode from the App Store, enable command line tools (xcode-select --install)

  • Windows 7 + cygwin

    During installation, change the "Interpreters" and "Devel" installations from "Default" to "Install".

  • Ubuntu 12.04 :

    Install g++ and make on the command line via: sudo apt-get install build-essential

The examples include several instances where matplotlib is used. There are also hooks to use gnuplot. Both are often commented out. To get started with these, try these links :

scipy and matplotlib :

Mac OS X: Download :

http://fonnesbeck.github.io/ScipySuperpack/

Windows and cygwin :

Via wget :

wget http://peak.telecommunity.com/dist/ez_setup.py

python ez_setup.py

easy_install -U scipy

Ubuntu :

  • With apt-get:

sudo apt-get install python-numpy python-scipy python-matplotlib ipython ipython-notebook python-pandas python-sympy python-nose

Make sure it installse version 0.13.0. If it doesn't, use the tarball :

  • With tarball :

wget https://pypi.python.org/packages/source/s/scipy/scipy-0.13.0.tar.gz

tar -zxvf scipy-0.13.0.tar.gz

cd scipy-0.13.0

sudo python setuppy.py install

gnuplot :

All :

http://gnuplot.sourceforge.net

To Compile and Run

Compile the library

cd PHY410
source setup.csh (or setup.sh for bash)
cd cpt
make

Compile and run the executables

cd $CPT_PATH/LectureXXX
make
./program_name 

Example:

cd $CPT_PATH/Lecture14
make
./wheatstone

"Advanced" topics

If you want to make new executable file called "filename.cpp", edit the Makefile:

  • add your new exe name "filename" to the "all" target list
  • make a "rule" for your "filename" executable
  • add your new exe name "filename" to the "clean" string Example:
filename: filename.cpp
	$(CC) $^  $(LIBS) -o filename

If you broke something, to revert your git repository:

git checkout -- . 

If you want to compile EVERYTHING at once, go to PHY410 directory, do NOT cd to any Lecture, and type "make"

cd PHY410
source setup.csh (or setup.sh for bash)
make

phy410's People

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.