Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
condynet
PyPSD
Commits
d0d77b7d
Commit
d0d77b7d
authored
Mar 29, 2017
by
Paul Schultz
Browse files
cluster problem
parent
dd167826
Changes
1
Hide whitespace changes
Inline
Side-by-side
PSD/complex_current_and_nodes.py
View file @
d0d77b7d
from
__future__
import
absolute_import
,
division
,
print_function
,
unicode_literals
import
numpy
as
np
from
numba
import
njit
,
float64
,
complex128
,
void
,
int32
from
numba
import
njit
,
float64
,
complex128
,
void
,
int32
,
__version__
# from assimulo.solvers import CVODE
# from assimulo.problem import Explicit_Problem
import
scipy.sparse
as
sps
import
os
# numba version on the cluster does not support caching
cache_flag
=
__version__
!=
'0.19.1'
# The dynamics should be structured according to what is calculated on the network links.
class
NodeType
(
object
):
...
...
@@ -162,7 +165,7 @@ from numba import njit, float64, complex128, void, int32
"""
def_network_rhs_string
=
"""
@njit(float64[:](float64[:], float64), cache=
True
)
@njit(float64[:](float64[:], float64), cache=
{cache_flag}
)
def network_rhs_numba(y, t):
dydt = np.empty({total_length} + {length})
...
...
@@ -180,7 +183,8 @@ def network_rhs_numba(y, t):
"""
.
format
(
total_length
=
total_length
,
length
=
length
,
l_indptr
=
l_indptr
l_indptr
=
l_indptr
,
cache_flag
=
cache_flag
)
def_network_rhs_string
+=
""
.
join
([
node
.
node_dynamics_string
(
j
)
for
j
,
node
in
enumerate
(
node_list
)])
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment