Giter VIP home page Giter VIP logo

jspec2's Introduction

Jlab Simulation Package for Electron Cooling

About JSPEC 2

JSPEC is an open source C++ package for numerical simulations on the electron cooling process, including the intrabeam scattering (IBS) effect, developed at Jefferson Lab (JLab).

This is the second version of JSPEC. The repository of the first version can be found here.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

How to compile

Compile using code blocks IDE

JSPEC is developed using the code blocks IDE. If you are using the same IDE, just open the project file "jspec.cbp" in the cbp folder, select a C++ compiler and build it. Make sure your compiler supports C++11 standard and the option std=c++11 is on.

Compile using the makefile

A makefile is provided (tested in Ubuntu 18.04). In the project folder, run the following commands:

make

The executable file called "jspec" will be generated.

Compile with OPENMP

Most models in JSPEC has been parallelized for shared-memory system with OPENMP. If you use code blocks IDE to compile JSPEC with OPENMP, add -fopenmp to "other compiler options" and "other link options" . If you use the makefile, run the following commands:

make OMPFLAGS=-fopenmp

How to run

To run JSPEC, you can put your input file in the same folder with the JSPEC executable file and run the following commands in the folder:

jspec.exe inputfilename

You also need another file in MAD X tfs format, which defines the ion ring optics. You can put it in the same folder too. About how to write your input file, please refer to the JSPEC User Manual.

Besides running the program in the command line as aforementioned, a windows batch file "jspec-dragfile.bat" is also provided. Putting this bat file together with the executable jspec file "jspec.exe", the math parser dynamic library file "muparser.dll", the tfs format lattice file and the input script file in the same folder, one can drag the input script file onto the batch file to run the computation/simulation.

If you are running the parallel version of JSPEC, in your script file you can set the number of thread in "section_run" using the command:

set_n_thread your_thread_number

If you do not set the thread number, OPENMP will use all the available threads.

Acknowledgement

Authors of BETACOOL, we learned a lot from BETACOOL.

Authors of muParser, which is used in building the text-based UI.

Dr. David Bruwihler, Dr. Paul Moeller and Dr. Stephen Coleman at Radiasoft, who developed an online version of JSPEC with GUI on their cloud server, Sirepo.

My colleagues at Jefferson Lab.

Contact the authors

Dr. He Zhang at Jefferson Lab by hezhang.AT.jlab.org.

jspec2's People

Contributors

zhanghe9704 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.