Skip to content

Commit 6a7de61

Browse files
author
Dilawar Singh
committed
2 parents 27f62f5 + 749f1b8 commit 6a7de61

File tree

28 files changed

+594
-391
lines changed

28 files changed

+594
-391
lines changed

.github/main.workflow

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
workflow "build pymoose" {
2+
resolves = "build"
3+
on = "push"
4+
}
5+
6+
action "build" {
7+
uses = "./"
8+
args = "install"
9+
env = {
10+
CMAKE_GIT_REPO = "https://github.com/dilawar/moose-core",
11+
CMAKE_INSTALL_DEPS_SCRIPT = ".travis/travis_prepare_linux.sh",
12+
CMAKE_FLAGS = "-DCMAKE_INSTALL_PREFIX:PATH=/tmp/foo",
13+
CMAKE_BUILD_THREADS = "4"
14+
}
15+
}

.github/workflows/build.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: C/C++ CI
2+
3+
on: [push]
4+
5+
jobs:
6+
build:
7+
8+
runs-on: ubuntu-latest
9+
10+
steps:
11+
- uses: actions/checkout@v2
12+
- name: Install dependencies
13+
run: |
14+
sudo apt update
15+
sudo apt install libgsl-dev g++ cmake python3-dev python3-numpy
16+
- name: configure
17+
run: mkdir -p build && cd build && cmake ..
18+
- name: make
19+
run: cd build && make
20+
- name: ctest --output-on-failure
21+
run: cd build && make check

CMakeLists.txt

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
2-
project(pymoose)
1+
cmake_minimum_required(VERSION 3.1 FATAL_ERROR)
2+
project(MOOSE)
33

44
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake_modules")
55
include(CheckCXXCompiler.cmake)
@@ -333,8 +333,19 @@ endif( WITH_BOOST )
333333

334334

335335
######################### BUILD PYMOOSE ########################################
336+
337+
# We find python executable here. Though mainly used inside pymoose.
338+
# FIXME: When cmake 3.12 is widely available use the following:
339+
# find_package(Python3 COMPONENTS Interpreter Numpy)
340+
# set(PYTHON_EXECUTABLE ${Python3_EXECUTABLE})
341+
# See the cmake doc.
342+
# Till then, stay with the old macro.
343+
set(Python_ADDITIONAL_VERSIONS 2.7)
344+
find_package(PythonInterp 3.4)
345+
336346
# This target is built by pymoose/CMakeLists.txt file.
337-
add_subdirectory( pymoose )
347+
add_subdirectory(pymoose)
348+
338349

339350
# always override debian default installation directory. It will be installed in
340351
# site-packages instead of dist-packages.

cmake_modules/FindNumPy.cmake

Lines changed: 0 additions & 94 deletions
This file was deleted.

diffusion/ConcChanInfo.h

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -14,22 +14,26 @@
1414
*/
1515
class ConcChanInfo
1616
{
17-
public:
18-
ConcChanInfo();
19-
ConcChanInfo( unsigned int my, unsigned int other,
20-
unsigned int chan, double perm, bool isSwapped )
21-
: myPool( my ), otherPool( other ), chanPool( chan ),
22-
swapped( isSwapped ),
23-
permeability( perm )
24-
{;}
17+
public:
18+
ConcChanInfo();
19+
ConcChanInfo( unsigned int my, unsigned int other,
20+
unsigned int chan, double perm, bool isSwapped, bool _isLocal )
21+
: myPool( my ), otherPool( other ), chanPool( chan ),
22+
swapped( isSwapped ),
23+
isLocal( _isLocal ),
24+
permeability( perm )
25+
{;}
2526

26-
unsigned int myPool;
27-
unsigned int otherPool;
28-
unsigned int chanPool;
29-
bool swapped; // Flag records whether myPool/otherPool are
30-
// swapped wrt inPool/outPool. System expects
31-
// that inPool should be in same compt as chanPool.
32-
double permeability;
27+
unsigned int myPool; /// This is not Id, it is internal PoolIndex
28+
/// Obtained using convertIdToPoolIndex.
29+
unsigned int otherPool; /// Internal PoolIndex
30+
unsigned int chanPool; /// Internal PoolIndex
31+
bool swapped; // Flag records whether myPool/otherPool are
32+
// swapped wrt inPool/outPool. System expects
33+
// that inPool should be in same compt as chanPool.
34+
bool isLocal; // Flag, records odd cases where the channel is
35+
// entirely local to one compartment.
36+
double permeability;
3337
};
3438

3539
#endif // _CONC_CHAN_INFO_H

0 commit comments

Comments
 (0)