NEURON
fadvance.cpp File Reference
#include <../../nrnconf.h>
#include <nrnmpi.h>
#include <stdlib.h>
#include <errno.h>
#include "neuron.h"
#include "section.h"
#include "nrn_ansi.h"
#include "nrniv_mf.h"
#include "multisplit.h"
#include "node_order_optim/node_order_optim.h"
#include "utils/profile/profiler_interface.h"
#include "nonvintblock.h"
#include "nrncvode.h"
#include "spmatrix.h"
#include <vector>
#include "profile.h"

Go to the source code of this file.

Namespaces

 neuron
 In mechanism libraries, cannot use auto const token = nrn_ensure_model_data_are_sorted(); because the return type is incomplete (from include/neuron/model_data.hpp).
 

Macros

#define nrnoc_fadvance_c
 
#define NRNCTIME   1
 
#define NONVINT_ODE_COUNT   5
 
#define CTBEGIN   double wt = nrnmpi_wtime()
 
#define CTADD   nth->_ctime += nrnmpi_wtime() - wt
 
#define ELIMINATE_T_ROUNDOFF   0
 
#define PROFILE   0
 

Typedefs

typedef int(* NonVintBlockItem) (int method, int size, double *pd1, double *pd2, int tid)
 

Functions

double nrnmpi_wtime ()
 
double chkarg (int, double low, double high)
 
static void nrn_fixed_step_thread (neuron::model_sorted_token const &, NrnThread &)
 
static void nrn_fixed_step_group_thread (neuron::model_sorted_token const &, NrnThread &)
 
void nrn_solve (NrnThread *)
 
static void nonvint (neuron::model_sorted_token const &, NrnThread &)
 
void nrncvode_set_t (double t)
 
static void * nrn_ms_treeset_through_triang (NrnThread *)
 
static void * nrn_ms_reduce_solve (NrnThread *)
 
static void * nrn_ms_bksub (NrnThread *)
 
static void * nrn_ms_bksub_through_triang (NrnThread *)
 
void * nrn_multisplit_triang (NrnThread *)
 
void * nrn_multisplit_reduce_solve (NrnThread *)
 
void * nrn_multisplit_bksub (NrnThread *)
 
void fadvance ()
 
static void batch_out ()
 
static void batch_open ()
 
static void batch_close ()
 
static void batch_open (char *name, double tstop, double tstep, const char *comment)
 
void batch_run (void)
 
static void dt2thread (double adt)
 
static void daspk_init_step_thread (neuron::model_sorted_token const &cache_token, NrnThread &nt)
 
void nrn_daspk_init_step (double tt, double dteps, int upd)
 
void nrn_fixed_step (neuron::model_sorted_token const &cache_token)
 
void nrn_fixed_step_group (neuron::model_sorted_token const &cache_token, int n)
 
void nrn_extra_scatter_gather (int direction, int tid)
 
void nrn_fixed_step_lastpart (neuron::model_sorted_token const &cache_token, NrnThread &nt)
 
void nrn_update_voltage (neuron::model_sorted_token const &sorted_token, NrnThread &nt)
 
void nrn_calc_fast_imem (NrnThread *_nt)
 
void nrn_calc_fast_imem_fixedstep_init (NrnThread *_nt)
 
void fcurrent (void)
 
void nrn_print_matrix (NrnThread *_nt)
 
void fmatrix (void)
 
int nrn_errno_check (int i)
 
void frecord_init (void)
 
void verify_structure (void)
 
void nrn_finitialize (int setv, double v)
 
void finitialize (void)
 
void batch_save (void)
 
void nrn_ba (neuron::model_sorted_token const &cache_token, NrnThread &nt, int bat)
 
int nrn_nonvint_block_exe (int method, int size, double *pd1, double *pd2, int tid)
 
int set_nonvint_block (NonVintBlockItem func)
 
int unset_nonvint_block (NonVintBlockItem func)
 
int nrn_nonvint_block_helper (int method, int size, double *pd1, double *pd2, int tid)
 
neuron::opaque_model_sorted_token nrn_ensure_model_data_are_sorted_opaque ()
 

Variables

double * nrn_mech_wtime_
 
double t
 
double dt
 
void(* nrn_multisplit_setup_ )()
 
void(* nrn_allthread_handle )()
 
int state_discon_allowed_
 
double hoc_epsilon
 
void(* nrnmpi_v_transfer_ )()
 
void(* nrnthread_v_transfer_ )(NrnThread *nt)
 
void(* nrnthread_vi_compute_ )(NrnThread *nt)
 
int cvode_active_
 
int stoprun
 
bool nrn_use_fast_imem
 
static FILE * batch_file
 
static int batch_size
 
static int batch_n
 
static double ** batch_var
 
static int _upd
 
static int step_group_n
 
static int step_group_begin
 
static int step_group_end
 
static std::vector< NonVintBlockItemnonvint_block_list
 

Macro Definition Documentation

◆ CTADD

#define CTADD   nth->_ctime += nrnmpi_wtime() - wt

Definition at line 78 of file fadvance.cpp.

◆ CTBEGIN

#define CTBEGIN   double wt = nrnmpi_wtime()

Definition at line 77 of file fadvance.cpp.

◆ ELIMINATE_T_ROUNDOFF

#define ELIMINATE_T_ROUNDOFF   0

Definition at line 84 of file fadvance.cpp.

◆ NONVINT_ODE_COUNT

#define NONVINT_ODE_COUNT   5

Definition at line 74 of file fadvance.cpp.

◆ NRNCTIME

#define NRNCTIME   1

Definition at line 73 of file fadvance.cpp.

◆ nrnoc_fadvance_c

#define nrnoc_fadvance_c

Definition at line 12 of file fadvance.cpp.

◆ PROFILE

#define PROFILE   0

Definition at line 149 of file fadvance.cpp.

Typedef Documentation

◆ NonVintBlockItem

typedef int(* NonVintBlockItem) (int method, int size, double *pd1, double *pd2, int tid)

Definition at line 1000 of file fadvance.cpp.

Function Documentation

◆ batch_close()

static void batch_close ( )

Definition at line 955 of file fadvance.cpp.

◆ batch_open() [1/2]

static void batch_open ( )

◆ batch_open() [2/2]

static void batch_open ( char *  name,
double  tstop,
double  tstep,
const char *  comment 
)
static

Definition at line 191 of file fadvance.cpp.

◆ batch_out()

static void batch_out ( )
static

Definition at line 962 of file fadvance.cpp.

◆ batch_run()

void batch_run ( void  )

Definition at line 233 of file fadvance.cpp.

◆ batch_save()

void batch_save ( void  )

Definition at line 972 of file fadvance.cpp.

◆ chkarg()

double chkarg ( int  arg,
double  low,
double  high 
)

Definition at line 626 of file code2.cpp.

◆ daspk_init_step_thread()

static void daspk_init_step_thread ( neuron::model_sorted_token const &  cache_token,
NrnThread nt 
)
static

Definition at line 299 of file fadvance.cpp.

◆ dt2thread()

static void dt2thread ( double  adt)
static

Definition at line 282 of file fadvance.cpp.

◆ fadvance()

void fadvance ( )

Definition at line 152 of file fadvance.cpp.

◆ fcurrent()

void fcurrent ( void  )

Definition at line 644 of file fadvance.cpp.

◆ finitialize()

void finitialize ( void  )

Definition at line 940 of file fadvance.cpp.

◆ fmatrix()

void fmatrix ( void  )

Definition at line 707 of file fadvance.cpp.

◆ frecord_init()

void frecord_init ( void  )

Definition at line 780 of file fadvance.cpp.

◆ nonvint()

static void nonvint ( neuron::model_sorted_token const &  sorted_token,
NrnThread nt 
)
static

Definition at line 737 of file fadvance.cpp.

◆ nrn_ba()

void nrn_ba ( neuron::model_sorted_token const &  cache_token,
NrnThread nt,
int  bat 
)

Definition at line 989 of file fadvance.cpp.

◆ nrn_calc_fast_imem()

void nrn_calc_fast_imem ( NrnThread _nt)

Definition at line 610 of file fadvance.cpp.

◆ nrn_calc_fast_imem_fixedstep_init()

void nrn_calc_fast_imem_fixedstep_init ( NrnThread _nt)

Definition at line 624 of file fadvance.cpp.

◆ nrn_daspk_init_step()

void nrn_daspk_init_step ( double  tt,
double  dteps,
int  upd 
)

Definition at line 307 of file fadvance.cpp.

◆ nrn_ensure_model_data_are_sorted_opaque()

neuron::opaque_model_sorted_token nrn_ensure_model_data_are_sorted_opaque ( )

Definition at line 1069 of file fadvance.cpp.

◆ nrn_errno_check()

int nrn_errno_check ( int  i)

Definition at line 767 of file fadvance.cpp.

◆ nrn_extra_scatter_gather()

void nrn_extra_scatter_gather ( int  direction,
int  tid 
)

Definition at line 506 of file cvodeobj.cpp.

◆ nrn_finitialize()

void nrn_finitialize ( int  setv,
double  v 
)

Definition at line 805 of file fadvance.cpp.

◆ nrn_fixed_step()

void nrn_fixed_step ( neuron::model_sorted_token const &  cache_token)

Definition at line 324 of file fadvance.cpp.

◆ nrn_fixed_step_group()

void nrn_fixed_step_group ( neuron::model_sorted_token const &  cache_token,
int  n 
)

Definition at line 379 of file fadvance.cpp.

◆ nrn_fixed_step_group_thread()

static void nrn_fixed_step_group_thread ( neuron::model_sorted_token const &  cache_token,
NrnThread nt 
)
static

Definition at line 436 of file fadvance.cpp.

◆ nrn_fixed_step_lastpart()

void nrn_fixed_step_lastpart ( neuron::model_sorted_token const &  cache_token,
NrnThread nt 
)

Definition at line 502 of file fadvance.cpp.

◆ nrn_fixed_step_thread()

static void nrn_fixed_step_thread ( neuron::model_sorted_token const &  cache_token,
NrnThread nt 
)
static

Definition at line 457 of file fadvance.cpp.

◆ nrn_ms_bksub()

void * nrn_ms_bksub ( NrnThread nth)
static

Definition at line 545 of file fadvance.cpp.

◆ nrn_ms_bksub_through_triang()

void * nrn_ms_bksub_through_triang ( NrnThread nth)
static

Definition at line 558 of file fadvance.cpp.

◆ nrn_ms_reduce_solve()

void * nrn_ms_reduce_solve ( NrnThread nth)
static

Definition at line 541 of file fadvance.cpp.

◆ nrn_ms_treeset_through_triang()

void * nrn_ms_treeset_through_triang ( NrnThread nth)
static

Definition at line 525 of file fadvance.cpp.

◆ nrn_multisplit_bksub()

void* nrn_multisplit_bksub ( NrnThread nt)

Definition at line 1920 of file multisplit.cpp.

◆ nrn_multisplit_reduce_solve()

void* nrn_multisplit_reduce_solve ( NrnThread nt)

Definition at line 1914 of file multisplit.cpp.

◆ nrn_multisplit_triang()

void* nrn_multisplit_triang ( NrnThread nt)

Definition at line 1910 of file multisplit.cpp.

◆ nrn_nonvint_block_exe()

int nrn_nonvint_block_exe ( int  method,
int  size,
double *  pd1,
double *  pd2,
int  tid 
)

Definition at line 1004 of file fadvance.cpp.

◆ nrn_nonvint_block_helper()

int nrn_nonvint_block_helper ( int  method,
int  size,
double *  pd1,
double *  pd2,
int  tid 
)

Definition at line 1051 of file fadvance.cpp.

◆ nrn_print_matrix()

void nrn_print_matrix ( NrnThread _nt)

Definition at line 664 of file fadvance.cpp.

◆ nrn_solve()

void nrn_solve ( NrnThread _nt)

Definition at line 333 of file solve.cpp.

◆ nrn_update_voltage()

void nrn_update_voltage ( neuron::model_sorted_token const &  sorted_token,
NrnThread nt 
)

Definition at line 572 of file fadvance.cpp.

◆ nrncvode_set_t()

void nrncvode_set_t ( double  t)

Definition at line 137 of file cvodestb.cpp.

◆ nrnmpi_wtime()

double nrnmpi_wtime ( )

Definition at line 175 of file nrnmpi.cpp.

◆ set_nonvint_block()

int set_nonvint_block ( NonVintBlockItem  func)

Definition at line 1025 of file fadvance.cpp.

◆ unset_nonvint_block()

int unset_nonvint_block ( NonVintBlockItem  func)

Definition at line 1035 of file fadvance.cpp.

◆ verify_structure()

void verify_structure ( void  )

Definition at line 792 of file fadvance.cpp.

Variable Documentation

◆ _upd

int _upd
static

Definition at line 298 of file fadvance.cpp.

◆ batch_file

FILE* batch_file
static

Definition at line 186 of file fadvance.cpp.

◆ batch_n

int batch_n
static

Definition at line 188 of file fadvance.cpp.

◆ batch_size

int batch_size
static

Definition at line 187 of file fadvance.cpp.

◆ batch_var

double** batch_var
static

Definition at line 189 of file fadvance.cpp.

◆ cvode_active_

int cvode_active_

Definition at line 144 of file fadvance.cpp.

◆ dt

double dt

Definition at line 52 of file fadvance.cpp.

◆ hoc_epsilon

double hoc_epsilon
extern

Definition at line 221 of file hoc_init.cpp.

◆ nonvint_block_list

std::vector<NonVintBlockItem> nonvint_block_list
static

Definition at line 1002 of file fadvance.cpp.

◆ nrn_allthread_handle

void(* nrn_allthread_handle) () ( )

Definition at line 68 of file fadvance.cpp.

◆ nrn_mech_wtime_

double* nrn_mech_wtime_
extern

Definition at line 38 of file treeset.cpp.

◆ nrn_multisplit_setup_

void(* nrn_multisplit_setup_) () ( )
extern

Definition at line 50 of file treeset.cpp.

◆ nrn_use_fast_imem

bool nrn_use_fast_imem

Definition at line 147 of file fadvance.cpp.

◆ nrnmpi_v_transfer_

void(* nrnmpi_v_transfer_) () ( )

Definition at line 138 of file fadvance.cpp.

◆ nrnthread_v_transfer_

void(* nrnthread_v_transfer_) (NrnThread *nt) ( NrnThread nt)

Definition at line 139 of file fadvance.cpp.

◆ nrnthread_vi_compute_

void(* nrnthread_vi_compute_) (NrnThread *nt) ( NrnThread nt)

Definition at line 141 of file fadvance.cpp.

◆ state_discon_allowed_

int state_discon_allowed_
extern

Definition at line 108 of file init.cpp.

◆ step_group_begin

int step_group_begin
static

Definition at line 376 of file fadvance.cpp.

◆ step_group_end

int step_group_end
static

Definition at line 377 of file fadvance.cpp.

◆ step_group_n

int step_group_n
static

Definition at line 375 of file fadvance.cpp.

◆ t

double t
extern

Definition at line 57 of file cvodeobj.cpp.