Skip to content
This repository was archived by the owner on Mar 20, 2023. It is now read-only.

Commit 2304e9a

Browse files
committed
Added small explanation about the mech_type enum
1 parent e962735 commit 2304e9a

File tree

4 files changed

+20
-1
lines changed

4 files changed

+20
-1
lines changed

coreneuron/nrniv/nrniv_decl.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ THE POSSIBILITY OF SUCH DAMAGE.
3737
namespace coreneuron {
3838

3939
/// Mechanism type to be used from stdindex2ptr and nrn_dblpntr2nrncore (in Neuron)
40+
/// Values of the mechanism types should be negative numbers to avoid any conflict with
41+
/// mechanism types of Memb_list(>0) or time(0) passed from Neuron
4042
enum mech_type {voltage = -1, i_membrane_ = -2};
4143

4244
extern int cvode_active_;

coreneuron/nrniv/tqueue.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ namespace coreneuron {
6060
#define STRCMP(a, b) (a - b)
6161

6262
class TQItem;
63-
#define SPBLK TQItem
63+
#define SPBLK SPC
6464
#define leftlink left_
6565
#define rightlink right_
6666
#define uplink parent_

coreneuron/nrnoc/fast_imem.cpp

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,25 @@ void nrn_calc_fast_imem(NrnThread* _nt) {
7373

7474
double* pd = _nt->nrn_fast_imem->nrn_sav_d;
7575
double* prhs = _nt->nrn_fast_imem->nrn_sav_rhs;
76+
FILE *fp_rhs, *fp_d;
77+
char rhs_filename[20], d_filename[20];
78+
sprintf(rhs_filename,"rhs.CORENEURON.%d",nrnmpi_myid);
79+
sprintf(d_filename,"d.CORENEURON.%d",nrnmpi_myid);
80+
fp_rhs = fopen(rhs_filename, "a");
81+
fp_d = fopen(d_filename, "a");
82+
fprintf(fp_rhs, "\n%.8e time\n", _nt->_t);
83+
fprintf(fp_d, "\n%.8e time\n", _nt->_t);
7684
for (i = i1; i < i3 ; ++i) {
7785
prhs[i] = (pd[i]*vec_rhs[i] + prhs[i])*vec_area[i]*0.01;
86+
fprintf(fp_rhs, "%.8e, ", prhs[i]);
7887
}
88+
fprintf(fp_rhs, "\n");
89+
for (i = i1; i < i3 ; ++i) {
90+
fprintf(fp_d, "%.8e, ", pd[i]);
91+
}
92+
fprintf(fp_d, "\n");
93+
fclose(fp_rhs);
94+
fclose(fp_d);
7995
}
8096

8197
}

coreneuron/utils/reports/nrnreport.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ class ReportEvent : public DiscreteEvent {
8888
#pragma omp critical
8989
{
9090
// each thread needs to know its own step
91+
printf("Real time: %lf\n",t);
9192
records_nrec(step, gids_to_report.size(), &gids_to_report[0], report_path);
9293
send(t + dt, nc, nt);
9394
step++;

0 commit comments

Comments
 (0)