File: statemonitor.py_

package info (click to toggle)
brian 2.9.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 6,872 kB
  • sloc: python: 51,820; cpp: 2,033; makefile: 108; sh: 72
file content (25 lines) | stat: -rw-r--r-- 555 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
{# USES_VARIABLES { t, _clock_t, _indices } #}
{% extends 'common_group.py_' %}

{% block maincode %}
# Resize dynamic arrays
_new_len = len({{_dynamic_t}}) + 1

_owner.resize(_new_len)

# Store values
{{_dynamic_t}}[-1] = {{_clock_t}}

# scalar code
_vectorisation_idx = 1
{{scalar_code|autoindent}}

# vector code
_vectorisation_idx = {{_indices}}
_idx = {{_indices}}
{{vector_code|autoindent}}

{% for varname, var in _recorded_variables.items() %}
{{get_array_name(var, access_data=False)}}[-1, :] = _to_record_{{varname}}
{% endfor %}
{% endblock %}