Skip to content
Snippets Groups Projects
Commit 1680bac6 authored by Dilawar Singh's avatar Dilawar Singh
Browse files

Squashed 'moose-core/' changes from 6a6bcc1..bd86fb5

bd86fb5 Update INSTALL.md
3602353 Update README.md
f96dbda Merge pull request #155 from dilawar/master
50d720b Merge branch 'master' into master
b408e36 Instead of simple sin/cos use fmod and divide method. Sin/cosine functions gets value of 1 or many points near the maxima when simulation time is large (T for sin/cos). This changes fixes that.

git-subtree-dir: moose-core
git-subtree-split: bd86fb53a865dce7d482e21f959513e5621b1062
parent d0a6060b
No related branches found
No related tags found
No related merge requests found
......@@ -2,14 +2,13 @@
Use our repositories hosted at [Open Build Service](http://build.opensuse.org).
We have packages for Debian, Ubuntu, CentOS, Fedora, OpenSUSE/SUSE, RHEL,
Scientific Linux. Visit the following page and follow the instructions there.
Scientific Linux. Visit the following page for instructions.
https://software.opensuse.org/download.html?project=home:moose&package=moose
# Building MOOSE from source
If you really want to build `MOOSE` from source, you can either use `cmake` (recommended)
or GNU `make` based flow.
To build `MOOSE` from source, you can either use `cmake` (recommended) or GNU `make` based flow.
Download the latest source code of moose from github or sourceforge.
......@@ -21,21 +20,9 @@ For moose-core:
- gsl-1.16 or higher.
- libhdf5-dev (optional)
- libsbml-dev (5.9.0, optional)
- python-dev
- python-numpy
__Note on libsbml__
Make sure that `libsml` is installed with `zlib` and `lxml` support. Following instructions
are known to work.
- wget http://sourceforge.net/projects/sbml/files/libsbml/5.9.0/stable/libSBML-5.9.0-core-src.tar.gz
- tar -xzvf libSBML-5.9.0-core-src.tar.gz
- cd libsbml-5.9.0
- ./configure --prefix=/usr --with-zlib --with-bzip2 --with-libxml
- make
- sudo make install
On Ubuntu-12.04 or higher, these can be installed with:
sudo apt-get install python-dev python-numpy libhdf5-dev cmake libgsl0-dev g++
......@@ -81,17 +68,17 @@ calling make:
export LDFLAGS= -L/opt/libsbml/lib
## Release build:
### Release build:
cd moose
make BUILD=release
## Debug build:
### Debug build:
cd moose
make BUILD=debug
## Python 3K
### Python 3K
By default, MOOSE is built for Python 2. In case you want to build MOOSE for
Python 3K, you need to pass the additional flag:
......
[![Build Status - master](https://travis-ci.org/BhallaLab/moose-core.svg?branch=master)](https://travis-ci.org/BhallaLab/moose-core)
This is the core computational engine of [MOOSE simulator](https://github.com/BhallaLab/moose). This repository contains
C++ codebase and its python interface. For more details about MOOSE simulation, see https://github.com/BhallaLab/moose/blob/master/README.md
C++ codebase and python interface. For more details about MOOSE simulator, see https://github.com/BhallaLab/moose/blob/master/README.md
This repository is sufficient for using MOOSE as python module. If you want to build `moose-python` using this repository, follow instructions given here at https://github.com/BhallaLab/moose-core/blob/master/INSTALL.md .
This repository is sufficient for using MOOSE as a python module. If you just want to build moose python module, follow instructions given here at https://github.com/BhallaLab/moose-core/blob/master/INSTALL.md .
......@@ -733,23 +733,17 @@ void Clock::handleStep( const Eref& e, unsigned long numSteps )
++k;
}
// Don't write too much. When 10% of simulation is over, write to
// the file. We need 10 points. We just use a sine function
// which cross 0 ten time in this time interval.
// NOTE: Dont use == 0.0 since we may never get a sample for
// which sine is 0.0. Hoever, getting 1.0 or -1.0 is very likely
// since sin function is relatively flat when its value is near
// 1.0/-1.0.
// NOTE: Use cosine instead of sin to sample 0%, 10% etc.
// When 10% of simulation is over, notify user when notify_ is set to
// true.
if( notify_ )
{
if( cos(20 * M_PI * currentTime_ / runTime_) == 1.0)
if( fmod(100 * currentTime_ / runTime_ , 10.0) == 0.0 )
{
time( &rawtime );
timeinfo = localtime( &rawtime );
strftime(now, 80, "%c", timeinfo);
cout << "@ " << now << ": " << 100 * currentTime_ / runTime_
<< "% of total " << runTime_ << " is over." << endl;
<< "% of total " << runTime_ << " seconds is over." << endl;
}
}
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment