NEURON
cvodeobj.cpp File Reference
#include <../../nrnconf.h>
#include "nrnmpi.h"
#include <cmath>
#include <cstdlib>
#include "classreg.h"
#include "code.h"
#include "nrnoc2iv.h"
#include "datapath.h"
#include "cvodeobj.h"
#include "netcvode.h"
#include "membfunc.h"
#include "nrn_ansi.h"
#include "nrncvode.h"
#include "nrndaspk.h"
#include "nrniv_mf.h"
#include "nrnpy.h"
#include "tqueue.hpp"
#include "mymath.h"
#include <nrnmutdec.h>
#include "cvodes/cvodes.h"
#include "cvodes/cvodes_impl.h"
#include "cvodes/cvdense.h"
#include "cvodes/cvdiag.h"
#include "shared/dense.h"
#include "ida/ida.h"
#include "nonvintblock.h"

Go to the source code of this file.

Macros

#define nt_dt   nrn_threads->_dt
 
#define nt_t   nrn_threads->_t
 
#define SUCCESS   CV_SUCCESS
 

Typedefs

using ExtraScatterList = std::vector< Object * >
 

Functions

void cvode_finitialize ()
 
static void static_mutex_for_at_time (bool b)
 
int linmod_extra_eqn_count ()
 
int nrn_modeltype ()
 
static double solve (void *v)
 
static double statistics (void *v)
 
static double spikestat (void *v)
 
static double queue_mode (void *v)
 
void nrn_extra_scatter_gather (int direction, int tid)
 
static double re_init (void *v)
 
static double rtol (void *v)
 
static double nrn_atol (void *v)
 
Symbolhoc_get_last_pointer_symbol ()
 
void hoc_symbol_tolerance (Symbol *, double)
 
static double abstol (void *v)
 
static double active (void *v)
 
static double stiff (void *v)
 
static double maxorder (void *v)
 
static double order (void *v)
 
static double minstep (void *v)
 
static double maxstep (void *v)
 
static double jacobian (void *v)
 
static double states (void *v)
 
static double dstates (void *v)
 
double nrn_hoc2fun (void *v)
 
double nrn_hoc2scatter_y (void *v)
 
double nrn_hoc2gather_y (void *v)
 
double nrn_hoc2fixed_step (void *v)
 
static double error_weights (void *v)
 
static double acor (void *v)
 
static double statename (void *v)
 
static double use_local_dt (void *v)
 
static double use_daspk (void *v)
 
static double dae_init_dteps (void *v)
 
static double use_mxb (void *v)
 
static double cache_efficient (void *v)
 
static double use_long_double (void *v)
 
static double condition_order (void *v)
 
static double debug_event (void *v)
 
static double n_record (void *v)
 
static double n_remove (void *v)
 
static double simgraph_remove (void *v)
 
static double state_magnitudes (void *v)
 
static double tstop_event (void *v)
 
static double current_method (void *v)
 
static double peq (void *v)
 
static double event_queue_info (void *v)
 
static double store_events (void *v)
 
static Object ** netconlist (void *v)
 
static double ncs_netcons (void *v)
 
static double use_parallel (void *v)
 
static double nrn_structure_change_count (void *v)
 
static double nrn_diam_change_count (void *v)
 
static double extra_scatter_gather (void *v)
 
static double extra_scatter_gather_remove (void *v)
 
static double use_fast_imem (void *v)
 
static double poolshrink (void *)
 
static double free_event_queues (void *)
 
static void * cons (Object *)
 
static void destruct (void *v)
 
void Cvode_reg ()
 
static int minit (CVodeMem cv_mem)
 
static int msetup (CVodeMem cv_mem, int convfail, N_Vector ypred, N_Vector fpred, booleantype *jcurPtr, N_Vector vtemp, N_Vector vtemp2, N_Vector vtemp3)
 
static int msolve (CVodeMem cv_mem, N_Vector b, N_Vector weight, N_Vector ycur, N_Vector fcur)
 
static int msolve_lvardt (CVodeMem cv_mem, N_Vector b, N_Vector weight, N_Vector ycur, N_Vector fcur)
 
static void mfree (CVodeMem cv_mem)
 
static void f_gvardt (realtype t, N_Vector y, N_Vector ydot, void *f_data)
 
static void f_lvardt (realtype t, N_Vector y, N_Vector ydot, void *f_data)
 
static void msolve_thread (neuron::model_sorted_token const &, NrnThread &)
 
static void * msolve_thread_part1 (NrnThread *)
 
static void * msolve_thread_part2 (NrnThread *)
 
static void * msolve_thread_part3 (NrnThread *)
 
static void f_thread (neuron::model_sorted_token const &, NrnThread &)
 
static void f_thread_transfer_part1 (neuron::model_sorted_token const &, NrnThread &)
 
static void f_thread_transfer_part2 (neuron::model_sorted_token const &, NrnThread &)
 
static void * f_thread_ms_part1 (NrnThread *)
 
static void * f_thread_ms_part2 (NrnThread *)
 
static void * f_thread_ms_part3 (NrnThread *)
 
static void * f_thread_ms_part4 (NrnThread *)
 
static void * f_thread_ms_part34 (NrnThread *)
 
static void * maxstate_thread (NrnThread *nt)
 
static Sectioncv_rootsec (const Cvode *cv)
 

Variables

void(* nrn_multisplit_setup_ )()
 
double dt
 
double t
 
int secondorder
 
int nrn_use_selfqueue_
 
void(* nrnthread_v_transfer_ )(NrnThread *)
 
void(* nrnmpi_v_transfer_ )()
 
NetCvodenet_cvode_instance
 
short * nrn_is_artificial_
 
bool nrn_use_fifo_queue_
 
bool nrn_use_bin_queue_
 
static ExtraScatterListextra_scatterlist [2]
 
static Member_func members []
 
static Member_ret_obj_func omembers [] = {{"netconlist", netconlist}, {nullptr, nullptr}}
 
static CVRhsFn pf_
 
static bool maxstate_b
 
static Cvodemaxstate_cv
 
static N_Vector msolve_b_
 
static N_Vector msolve_ycur_
 
static Cvodemsolve_cv_
 
static realtype f_t_
 
static N_Vector f_y_
 
static N_Vector f_ydot_
 
static Cvodef_cv_
 

Macro Definition Documentation

◆ nt_dt

#define nt_dt   nrn_threads->_dt

Definition at line 58 of file cvodeobj.cpp.

◆ nt_t

#define nt_t   nrn_threads->_t

Definition at line 59 of file cvodeobj.cpp.

◆ SUCCESS

#define SUCCESS   CV_SUCCESS

Definition at line 83 of file cvodeobj.cpp.

Typedef Documentation

◆ ExtraScatterList

using ExtraScatterList = std::vector<Object*>

Definition at line 503 of file cvodeobj.cpp.

Function Documentation

◆ abstol()

static double abstol ( void *  v)
static

Definition at line 165 of file cvodeobj.cpp.

◆ acor()

static double acor ( void *  v)
static

Definition at line 277 of file cvodeobj.cpp.

◆ active()

static double active ( void *  v)
static

Definition at line 192 of file cvodeobj.cpp.

◆ cache_efficient()

static double cache_efficient ( void *  v)
static

Definition at line 338 of file cvodeobj.cpp.

◆ condition_order()

static double condition_order ( void *  v)
static

Definition at line 356 of file cvodeobj.cpp.

◆ cons()

static void* cons ( Object )
static

Definition at line 631 of file cvodeobj.cpp.

◆ current_method()

static double current_method ( void *  v)
static

Definition at line 432 of file cvodeobj.cpp.

◆ cv_rootsec()

static Section* cv_rootsec ( const Cvode cv)
static

Definition at line 1052 of file cvodeobj.cpp.

◆ cvode_finitialize()

void cvode_finitialize ( )

◆ Cvode_reg()

void Cvode_reg ( )

Definition at line 653 of file cvodeobj.cpp.

◆ dae_init_dteps()

static double dae_init_dteps ( void *  v)
static

Definition at line 316 of file cvodeobj.cpp.

◆ debug_event()

static double debug_event ( void *  v)
static

Definition at line 366 of file cvodeobj.cpp.

◆ destruct()

static void destruct ( void *  v)
static

Definition at line 646 of file cvodeobj.cpp.

◆ dstates()

static double dstates ( void *  v)
static

Definition at line 260 of file cvodeobj.cpp.

◆ error_weights()

static double error_weights ( void *  v)
static

Definition at line 271 of file cvodeobj.cpp.

◆ event_queue_info()

static double event_queue_info ( void *  v)
static

Definition at line 454 of file cvodeobj.cpp.

◆ extra_scatter_gather()

static double extra_scatter_gather ( void *  v)
static

Definition at line 518 of file cvodeobj.cpp.

◆ extra_scatter_gather_remove()

static double extra_scatter_gather_remove ( void *  v)
static

Definition at line 532 of file cvodeobj.cpp.

◆ f_gvardt()

static void f_gvardt ( realtype  t,
N_Vector  y,
N_Vector  ydot,
void *  f_data 
)
static

Definition at line 1575 of file cvodeobj.cpp.

◆ f_lvardt()

static void f_lvardt ( realtype  t,
N_Vector  y,
N_Vector  ydot,
void *  f_data 
)
static

Definition at line 1612 of file cvodeobj.cpp.

◆ f_thread()

static void f_thread ( neuron::model_sorted_token const &  sorted_token,
NrnThread ntr 
)
static

Definition at line 1623 of file cvodeobj.cpp.

◆ f_thread_ms_part1()

static void * f_thread_ms_part1 ( NrnThread nt)
static

Definition at line 1648 of file cvodeobj.cpp.

◆ f_thread_ms_part2()

static void * f_thread_ms_part2 ( NrnThread nt)
static

Definition at line 1655 of file cvodeobj.cpp.

◆ f_thread_ms_part3()

static void * f_thread_ms_part3 ( NrnThread nt)
static

Definition at line 1660 of file cvodeobj.cpp.

◆ f_thread_ms_part34()

static void * f_thread_ms_part34 ( NrnThread nt)
static

Definition at line 1671 of file cvodeobj.cpp.

◆ f_thread_ms_part4()

static void * f_thread_ms_part4 ( NrnThread nt)
static

Definition at line 1665 of file cvodeobj.cpp.

◆ f_thread_transfer_part1()

static void f_thread_transfer_part1 ( neuron::model_sorted_token const &  sorted_token,
NrnThread ntr 
)
static

Definition at line 1632 of file cvodeobj.cpp.

◆ f_thread_transfer_part2()

static void f_thread_transfer_part2 ( neuron::model_sorted_token const &  sorted_token,
NrnThread ntr 
)
static

Definition at line 1640 of file cvodeobj.cpp.

◆ free_event_queues()

static double free_event_queues ( void *  )
static

Definition at line 572 of file cvodeobj.cpp.

◆ hoc_get_last_pointer_symbol()

Symbol* hoc_get_last_pointer_symbol ( )

Definition at line 1789 of file code.cpp.

◆ hoc_symbol_tolerance()

void hoc_symbol_tolerance ( Symbol sym,
double  tol 
)

Definition at line 111 of file code2.cpp.

◆ jacobian()

static double jacobian ( void *  v)
static

Definition at line 245 of file cvodeobj.cpp.

◆ linmod_extra_eqn_count()

int linmod_extra_eqn_count ( )

◆ maxorder()

static double maxorder ( void *  v)
static

Definition at line 210 of file cvodeobj.cpp.

◆ maxstate_thread()

static void* maxstate_thread ( NrnThread nt)
static

Definition at line 916 of file cvodeobj.cpp.

◆ maxstep()

static double maxstep ( void *  v)
static

Definition at line 237 of file cvodeobj.cpp.

◆ mfree()

static void mfree ( CVodeMem  cv_mem)
static

Definition at line 1567 of file cvodeobj.cpp.

◆ minit()

static int minit ( CVodeMem  cv_mem)
static

Definition at line 1469 of file cvodeobj.cpp.

◆ minstep()

static double minstep ( void *  v)
static

Definition at line 229 of file cvodeobj.cpp.

◆ msetup()

static int msetup ( CVodeMem  cv_mem,
int  convfail,
N_Vector  ypred,
N_Vector  fpred,
booleantype *  jcurPtr,
N_Vector  vtemp,
N_Vector  vtemp2,
N_Vector  vtemp3 
)
static

Definition at line 1474 of file cvodeobj.cpp.

◆ msolve()

static int msolve ( CVodeMem  cv_mem,
N_Vector  b,
N_Vector  weight,
N_Vector  ycur,
N_Vector  fcur 
)
static

Definition at line 1492 of file cvodeobj.cpp.

◆ msolve_lvardt()

static int msolve_lvardt ( CVodeMem  cv_mem,
N_Vector  b,
N_Vector  weight,
N_Vector  ycur,
N_Vector  fcur 
)
static

Definition at line 1520 of file cvodeobj.cpp.

◆ msolve_thread()

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

Definition at line 1537 of file cvodeobj.cpp.

◆ msolve_thread_part1()

static void * msolve_thread_part1 ( NrnThread nt)
static

Definition at line 1547 of file cvodeobj.cpp.

◆ msolve_thread_part2()

static void * msolve_thread_part2 ( NrnThread nt)
static

Definition at line 1554 of file cvodeobj.cpp.

◆ msolve_thread_part3()

static void * msolve_thread_part3 ( NrnThread nt)
static

Definition at line 1559 of file cvodeobj.cpp.

◆ n_record()

static double n_record ( void *  v)
static

Definition at line 376 of file cvodeobj.cpp.

◆ n_remove()

static double n_remove ( void *  v)
static

Definition at line 382 of file cvodeobj.cpp.

◆ ncs_netcons()

static double ncs_netcons ( void *  v)
static

Definition at line 471 of file cvodeobj.cpp.

◆ netconlist()

static Object** netconlist ( void *  v)
static

Definition at line 466 of file cvodeobj.cpp.

◆ nrn_atol()

static double nrn_atol ( void *  v)
static

Definition at line 154 of file cvodeobj.cpp.

◆ nrn_diam_change_count()

static double nrn_diam_change_count ( void *  v)
static

Definition at line 498 of file cvodeobj.cpp.

◆ nrn_extra_scatter_gather()

void nrn_extra_scatter_gather ( int  direction,
int  tid 
)

Definition at line 506 of file cvodeobj.cpp.

◆ nrn_hoc2fixed_step()

double nrn_hoc2fixed_step ( void *  v)

Definition at line 4229 of file netcvode.cpp.

◆ nrn_hoc2fun()

double nrn_hoc2fun ( void *  v)

Definition at line 4234 of file netcvode.cpp.

◆ nrn_hoc2gather_y()

double nrn_hoc2gather_y ( void *  v)

Definition at line 4269 of file netcvode.cpp.

◆ nrn_hoc2scatter_y()

double nrn_hoc2scatter_y ( void *  v)

Definition at line 4253 of file netcvode.cpp.

◆ nrn_modeltype()

int nrn_modeltype ( )

Definition at line 1785 of file treeset.cpp.

◆ nrn_structure_change_count()

static double nrn_structure_change_count ( void *  v)
static

Definition at line 493 of file cvodeobj.cpp.

◆ order()

static double order ( void *  v)
static

Definition at line 218 of file cvodeobj.cpp.

◆ peq()

static double peq ( void *  v)
static

Definition at line 448 of file cvodeobj.cpp.

◆ poolshrink()

static double poolshrink ( void *  )
static

Definition at line 562 of file cvodeobj.cpp.

◆ queue_mode()

static double queue_mode ( void *  v)
static

Definition at line 117 of file cvodeobj.cpp.

◆ re_init()

static double re_init ( void *  v)
static

Definition at line 138 of file cvodeobj.cpp.

◆ rtol()

static double rtol ( void *  v)
static

Definition at line 147 of file cvodeobj.cpp.

◆ simgraph_remove()

static double simgraph_remove ( void *  v)
static

Definition at line 388 of file cvodeobj.cpp.

◆ solve()

static double solve ( void *  v)
static

Definition at line 87 of file cvodeobj.cpp.

◆ spikestat()

static double spikestat ( void *  v)
static

Definition at line 112 of file cvodeobj.cpp.

◆ state_magnitudes()

static double state_magnitudes ( void *  v)
static

Definition at line 394 of file cvodeobj.cpp.

◆ statename()

static double statename ( void *  v)
static

Definition at line 283 of file cvodeobj.cpp.

◆ states()

static double states ( void *  v)
static

Definition at line 254 of file cvodeobj.cpp.

◆ static_mutex_for_at_time()

static void static_mutex_for_at_time ( bool  b)
static

Definition at line 34 of file cvodeobj.cpp.

◆ statistics()

static double statistics ( void *  v)
static

Definition at line 103 of file cvodeobj.cpp.

◆ stiff()

static double stiff ( void *  v)
static

Definition at line 202 of file cvodeobj.cpp.

◆ store_events()

static double store_events ( void *  v)
static

Definition at line 460 of file cvodeobj.cpp.

◆ tstop_event()

static double tstop_event ( void *  v)
static

Definition at line 399 of file cvodeobj.cpp.

◆ use_daspk()

static double use_daspk ( void *  v)
static

Definition at line 304 of file cvodeobj.cpp.

◆ use_fast_imem()

static double use_fast_imem ( void *  v)
static

Definition at line 552 of file cvodeobj.cpp.

◆ use_local_dt()

static double use_local_dt ( void *  v)
static

Definition at line 294 of file cvodeobj.cpp.

◆ use_long_double()

static double use_long_double ( void *  v)
static

Definition at line 345 of file cvodeobj.cpp.

◆ use_mxb()

static double use_mxb ( void *  v)
static

Definition at line 326 of file cvodeobj.cpp.

◆ use_parallel()

static double use_parallel ( void *  v)
static

Definition at line 480 of file cvodeobj.cpp.

Variable Documentation

◆ dt

double dt
extern

Definition at line 70 of file netcvode.cpp.

◆ extra_scatterlist

ExtraScatterList* extra_scatterlist[2]
static

Definition at line 504 of file cvodeobj.cpp.

◆ f_cv_

Cvode* f_cv_
static

Definition at line 1574 of file cvodeobj.cpp.

◆ f_t_

realtype f_t_
static

Definition at line 1571 of file cvodeobj.cpp.

◆ f_y_

N_Vector f_y_
static

Definition at line 1572 of file cvodeobj.cpp.

◆ f_ydot_

N_Vector f_ydot_
static

Definition at line 1573 of file cvodeobj.cpp.

◆ maxstate_b

bool maxstate_b
static

Definition at line 914 of file cvodeobj.cpp.

◆ maxstate_cv

Cvode* maxstate_cv
static

Definition at line 915 of file cvodeobj.cpp.

◆ members

Member_func members[]
static

Definition at line 577 of file cvodeobj.cpp.

◆ msolve_b_

N_Vector msolve_b_
static

Definition at line 1489 of file cvodeobj.cpp.

◆ msolve_cv_

Cvode* msolve_cv_
static

Definition at line 1491 of file cvodeobj.cpp.

◆ msolve_ycur_

N_Vector msolve_ycur_
static

Definition at line 1490 of file cvodeobj.cpp.

◆ net_cvode_instance

NetCvode* net_cvode_instance
extern

Definition at line 26 of file cvodestb.cpp.

◆ nrn_is_artificial_

short * nrn_is_artificial_
extern

Definition at line 19 of file cell_group.cpp.

◆ nrn_multisplit_setup_

void(* nrn_multisplit_setup_) () ( )
extern

Definition at line 50 of file treeset.cpp.

◆ nrn_use_bin_queue_

bool nrn_use_bin_queue_
extern

Definition at line 225 of file netcvode.cpp.

◆ nrn_use_fifo_queue_

bool nrn_use_fifo_queue_
extern

Definition at line 223 of file netcvode.cpp.

◆ nrn_use_selfqueue_

int nrn_use_selfqueue_
extern

Definition at line 77 of file netcvode.cpp.

◆ nrnmpi_v_transfer_

void(* nrnmpi_v_transfer_) () ( )
extern

Definition at line 138 of file fadvance.cpp.

◆ nrnthread_v_transfer_

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

Definition at line 139 of file fadvance.cpp.

◆ omembers

Member_ret_obj_func omembers[] = {{"netconlist", netconlist}, {nullptr, nullptr}}
static

Definition at line 629 of file cvodeobj.cpp.

◆ pf_

CVRhsFn pf_
static

Definition at line 679 of file cvodeobj.cpp.

◆ secondorder

int secondorder
extern

Definition at line 107 of file init.cpp.

◆ t

double t

Definition at line 57 of file cvodeobj.cpp.