NEURON
cvodeobj.cpp File Reference
#include <../../nrnconf.h>
#include <InterViews/resource.h>
#include "nrnmpi.h"
#include <math.h>
#include <stdlib.h>
#include "classreg.h"
#include "nrnoc2iv.h"
#include "datapath.h"
#include "cvodeobj.h"
#include "netcvode.h"
#include "membfunc.h"
#include "nrndaspk.h"
#include "tqueue.h"
#include "mymath.h"
#include "htlist.h"
#include <OS/list.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_fadvance ()
 
void cvode_finitialize ()
 
static void static_mutex_for_at_time (bool b)
 
int linmod_extra_eqn_count ()
 
int nrn_modeltype ()
 
void nrn_cachevec (int)
 
Point_processob2pntproc (Object *)
 
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 voidcons (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 voidmsolve_thread (NrnThread *)
 
static voidmsolve_thread_part1 (NrnThread *)
 
static voidmsolve_thread_part2 (NrnThread *)
 
static voidmsolve_thread_part3 (NrnThread *)
 
static voidf_thread (NrnThread *)
 
static voidf_thread_transfer_part1 (NrnThread *)
 
static voidf_thread_transfer_part2 (NrnThread *)
 
static voidf_thread_ms_part1 (NrnThread *)
 
static voidf_thread_ms_part2 (NrnThread *)
 
static voidf_thread_ms_part3 (NrnThread *)
 
static voidf_thread_ms_part4 (NrnThread *)
 
static voidf_thread_ms_part34 (NrnThread *)
 
static voidmaxstate_thread (NrnThread *nt)
 

Variables

void(* nrn_multisplit_setup_ )()
 
int hoc_return_type_code
 
double dt
 
double t
 
int diam_changed
 
int secondorder
 
int nrn_use_selfqueue_
 
int use_cachevec
 
void(* nrnthread_v_transfer_ )(NrnThread *)
 
void(* nrnmpi_v_transfer_ )()
 
int cvode_active_
 
NetCvodenet_cvode_instance
 
short * nrn_is_artificial_
 
int structure_change_cnt
 
int diam_change_cnt
 
bool nrn_use_fifo_queue_
 
bool nrn_use_bin_queue_
 
int(* nrnpy_pysame )(Object *, Object *)
 
int(* nrnpy_hoccommand_exec )(Object *)
 
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 60 of file cvodeobj.cpp.

◆ nt_t

#define nt_t   nrn_threads->_t

Definition at line 61 of file cvodeobj.cpp.

◆ SUCCESS

#define SUCCESS   CV_SUCCESS

Definition at line 94 of file cvodeobj.cpp.

Typedef Documentation

◆ ExtraScatterList

using ExtraScatterList = std::vector<Object*>

Definition at line 529 of file cvodeobj.cpp.

Function Documentation

◆ abstol()

static double abstol ( void v)
static

Definition at line 184 of file cvodeobj.cpp.

◆ acor()

static double acor ( void v)
static

Definition at line 298 of file cvodeobj.cpp.

◆ active()

static double active ( void v)
static

Definition at line 212 of file cvodeobj.cpp.

◆ cache_efficient()

static double cache_efficient ( void v)
static

Definition at line 359 of file cvodeobj.cpp.

◆ condition_order()

static double condition_order ( void v)
static

Definition at line 379 of file cvodeobj.cpp.

◆ cons()

static void* cons ( Object )
static

Definition at line 651 of file cvodeobj.cpp.

◆ current_method()

static double current_method ( void v)
static

Definition at line 455 of file cvodeobj.cpp.

◆ cvode_fadvance()

void cvode_fadvance ( )

◆ cvode_finitialize()

void cvode_finitialize ( )

◆ Cvode_reg()

void Cvode_reg ( )

Definition at line 673 of file cvodeobj.cpp.

◆ dae_init_dteps()

static double dae_init_dteps ( void v)
static

Definition at line 337 of file cvodeobj.cpp.

◆ debug_event()

static double debug_event ( void v)
static

Definition at line 389 of file cvodeobj.cpp.

◆ destruct()

static void destruct ( void v)
static

Definition at line 666 of file cvodeobj.cpp.

◆ dstates()

static double dstates ( void v)
static

Definition at line 281 of file cvodeobj.cpp.

◆ error_weights()

static double error_weights ( void v)
static

Definition at line 292 of file cvodeobj.cpp.

◆ event_queue_info()

static double event_queue_info ( void v)
static

Definition at line 477 of file cvodeobj.cpp.

◆ extra_scatter_gather()

static double extra_scatter_gather ( void v)
static

Definition at line 544 of file cvodeobj.cpp.

◆ extra_scatter_gather_remove()

static double extra_scatter_gather_remove ( void v)
static

Definition at line 558 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 1592 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 1627 of file cvodeobj.cpp.

◆ f_thread()

static void * f_thread ( NrnThread nt)
static

Definition at line 1635 of file cvodeobj.cpp.

◆ f_thread_ms_part1()

static void * f_thread_ms_part1 ( NrnThread nt)
static

Definition at line 1657 of file cvodeobj.cpp.

◆ f_thread_ms_part2()

static void * f_thread_ms_part2 ( NrnThread nt)
static

Definition at line 1664 of file cvodeobj.cpp.

◆ f_thread_ms_part3()

static void * f_thread_ms_part3 ( NrnThread nt)
static

Definition at line 1669 of file cvodeobj.cpp.

◆ f_thread_ms_part34()

static void * f_thread_ms_part34 ( NrnThread nt)
static

Definition at line 1680 of file cvodeobj.cpp.

◆ f_thread_ms_part4()

static void * f_thread_ms_part4 ( NrnThread nt)
static

Definition at line 1674 of file cvodeobj.cpp.

◆ f_thread_transfer_part1()

static void * f_thread_transfer_part1 ( NrnThread nt)
static

Definition at line 1643 of file cvodeobj.cpp.

◆ f_thread_transfer_part2()

static void * f_thread_transfer_part2 ( NrnThread nt)
static

Definition at line 1650 of file cvodeobj.cpp.

◆ hoc_get_last_pointer_symbol()

Symbol* hoc_get_last_pointer_symbol ( )

Definition at line 1780 of file code.cpp.

◆ hoc_symbol_tolerance()

void hoc_symbol_tolerance ( Symbol sym,
double  tol 
)

Definition at line 109 of file code2.cpp.

◆ jacobian()

static double jacobian ( void v)
static

Definition at line 266 of file cvodeobj.cpp.

◆ linmod_extra_eqn_count()

int linmod_extra_eqn_count ( )

◆ maxorder()

static double maxorder ( void v)
static

Definition at line 231 of file cvodeobj.cpp.

◆ maxstate_thread()

static void* maxstate_thread ( NrnThread nt)
static

Definition at line 944 of file cvodeobj.cpp.

◆ maxstep()

static double maxstep ( void v)
static

Definition at line 258 of file cvodeobj.cpp.

◆ mfree()

static void mfree ( CVodeMem  cv_mem)
static

Definition at line 1584 of file cvodeobj.cpp.

◆ minit()

static int minit ( CVodeMem  cv_mem)
static

Definition at line 1495 of file cvodeobj.cpp.

◆ minstep()

static double minstep ( void v)
static

Definition at line 250 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 1500 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 1517 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 1542 of file cvodeobj.cpp.

◆ msolve_thread()

static void * msolve_thread ( NrnThread nt)
static

Definition at line 1556 of file cvodeobj.cpp.

◆ msolve_thread_part1()

static void * msolve_thread_part1 ( NrnThread nt)
static

Definition at line 1564 of file cvodeobj.cpp.

◆ msolve_thread_part2()

static void * msolve_thread_part2 ( NrnThread nt)
static

Definition at line 1571 of file cvodeobj.cpp.

◆ msolve_thread_part3()

static void * msolve_thread_part3 ( NrnThread nt)
static

Definition at line 1576 of file cvodeobj.cpp.

◆ n_record()

static double n_record ( void v)
static

Definition at line 399 of file cvodeobj.cpp.

◆ n_remove()

static double n_remove ( void v)
static

Definition at line 405 of file cvodeobj.cpp.

◆ ncs_netcons()

static double ncs_netcons ( void v)
static

Definition at line 494 of file cvodeobj.cpp.

◆ netconlist()

static Object** netconlist ( void v)
static

Definition at line 489 of file cvodeobj.cpp.

◆ nrn_atol()

static double nrn_atol ( void v)
static

Definition at line 173 of file cvodeobj.cpp.

◆ nrn_cachevec()

void nrn_cachevec ( int  b)

Definition at line 2127 of file treeset.cpp.

◆ nrn_diam_change_count()

static double nrn_diam_change_count ( void v)
static

Definition at line 521 of file cvodeobj.cpp.

◆ nrn_extra_scatter_gather()

void nrn_extra_scatter_gather ( int  direction,
int  tid 
)

Definition at line 532 of file cvodeobj.cpp.

◆ nrn_hoc2fixed_step()

double nrn_hoc2fixed_step ( void v)

Definition at line 4364 of file netcvode.cpp.

◆ nrn_hoc2fun()

double nrn_hoc2fun ( void v)

Definition at line 4369 of file netcvode.cpp.

◆ nrn_hoc2gather_y()

double nrn_hoc2gather_y ( void v)

Definition at line 4404 of file netcvode.cpp.

◆ nrn_hoc2scatter_y()

double nrn_hoc2scatter_y ( void v)

Definition at line 4388 of file netcvode.cpp.

◆ nrn_modeltype()

int nrn_modeltype ( )

Definition at line 1949 of file treeset.cpp.

◆ nrn_structure_change_count()

static double nrn_structure_change_count ( void v)
static

Definition at line 516 of file cvodeobj.cpp.

◆ ob2pntproc()

Point_process* ob2pntproc ( Object ob)

Definition at line 88 of file hocmech.cpp.

◆ order()

static double order ( void v)
static

Definition at line 239 of file cvodeobj.cpp.

◆ peq()

static double peq ( void v)
static

Definition at line 471 of file cvodeobj.cpp.

◆ poolshrink()

static double poolshrink ( void )
static

Definition at line 588 of file cvodeobj.cpp.

◆ queue_mode()

static double queue_mode ( void v)
static

Definition at line 128 of file cvodeobj.cpp.

◆ re_init()

static double re_init ( void v)
static

Definition at line 157 of file cvodeobj.cpp.

◆ rtol()

static double rtol ( void v)
static

Definition at line 166 of file cvodeobj.cpp.

◆ simgraph_remove()

static double simgraph_remove ( void v)
static

Definition at line 411 of file cvodeobj.cpp.

◆ solve()

static double solve ( void v)
static

Definition at line 98 of file cvodeobj.cpp.

◆ spikestat()

static double spikestat ( void v)
static

Definition at line 123 of file cvodeobj.cpp.

◆ state_magnitudes()

static double state_magnitudes ( void v)
static

Definition at line 417 of file cvodeobj.cpp.

◆ statename()

static double statename ( void v)
static

Definition at line 304 of file cvodeobj.cpp.

◆ states()

static double states ( void v)
static

Definition at line 275 of file cvodeobj.cpp.

◆ static_mutex_for_at_time()

static void static_mutex_for_at_time ( bool  b)
static

Definition at line 36 of file cvodeobj.cpp.

◆ statistics()

static double statistics ( void v)
static

Definition at line 114 of file cvodeobj.cpp.

◆ stiff()

static double stiff ( void v)
static

Definition at line 223 of file cvodeobj.cpp.

◆ store_events()

static double store_events ( void v)
static

Definition at line 483 of file cvodeobj.cpp.

◆ tstop_event()

static double tstop_event ( void v)
static

Definition at line 422 of file cvodeobj.cpp.

◆ use_daspk()

static double use_daspk ( void v)
static

Definition at line 325 of file cvodeobj.cpp.

◆ use_fast_imem()

static double use_fast_imem ( void v)
static

Definition at line 578 of file cvodeobj.cpp.

◆ use_local_dt()

static double use_local_dt ( void v)
static

Definition at line 315 of file cvodeobj.cpp.

◆ use_long_double()

static double use_long_double ( void v)
static

Definition at line 368 of file cvodeobj.cpp.

◆ use_mxb()

static double use_mxb ( void v)
static

Definition at line 347 of file cvodeobj.cpp.

◆ use_parallel()

static double use_parallel ( void v)
static

Definition at line 503 of file cvodeobj.cpp.

Variable Documentation

◆ cvode_active_

int cvode_active_
extern

Definition at line 163 of file fadvance.cpp.

◆ diam_change_cnt

int diam_change_cnt

Definition at line 77 of file cvodeobj.cpp.

◆ diam_changed

int diam_changed
extern

Definition at line 23 of file cabcode.cpp.

◆ dt

double dt
extern

Definition at line 76 of file netcvode.cpp.

◆ extra_scatterlist

ExtraScatterList* extra_scatterlist[2]
static

Definition at line 530 of file cvodeobj.cpp.

◆ f_cv_

Cvode* f_cv_
static

Definition at line 1591 of file cvodeobj.cpp.

◆ f_t_

realtype f_t_
static

Definition at line 1588 of file cvodeobj.cpp.

◆ f_y_

N_Vector f_y_
static

Definition at line 1589 of file cvodeobj.cpp.

◆ f_ydot_

N_Vector f_ydot_
static

Definition at line 1590 of file cvodeobj.cpp.

◆ hoc_return_type_code

int hoc_return_type_code
extern

Definition at line 42 of file code.cpp.

◆ maxstate_b

bool maxstate_b
static

Definition at line 942 of file cvodeobj.cpp.

◆ maxstate_cv

Cvode* maxstate_cv
static

Definition at line 943 of file cvodeobj.cpp.

◆ members

Member_func members[]
static

Definition at line 598 of file cvodeobj.cpp.

◆ msolve_b_

N_Vector msolve_b_
static

Definition at line 1514 of file cvodeobj.cpp.

◆ msolve_cv_

Cvode* msolve_cv_
static

Definition at line 1516 of file cvodeobj.cpp.

◆ msolve_ycur_

N_Vector msolve_ycur_
static

Definition at line 1515 of file cvodeobj.cpp.

◆ net_cvode_instance

NetCvode* net_cvode_instance
extern

Definition at line 27 of file cvodestb.cpp.

◆ nrn_is_artificial_

short * nrn_is_artificial_
extern

Definition at line 18 of file cell_group.cpp.

◆ nrn_multisplit_setup_

void(* nrn_multisplit_setup_) () ( )
extern

Definition at line 46 of file treeset.cpp.

◆ nrn_use_bin_queue_

bool nrn_use_bin_queue_
extern

Definition at line 273 of file netcvode.cpp.

◆ nrn_use_fifo_queue_

bool nrn_use_fifo_queue_
extern

Definition at line 270 of file netcvode.cpp.

◆ nrn_use_selfqueue_

int nrn_use_selfqueue_
extern

Definition at line 93 of file netcvode.cpp.

◆ nrnmpi_v_transfer_

void(* nrnmpi_v_transfer_) () ( )
extern

Definition at line 152 of file fadvance.cpp.

◆ nrnpy_hoccommand_exec

int(* nrnpy_hoccommand_exec) (Object *) ( Object )
extern

Definition at line 17 of file objcmd.cpp.

◆ nrnpy_pysame

int(* nrnpy_pysame) (Object *, Object *) ( Object ,
Object  
)

Definition at line 526 of file cvodeobj.cpp.

◆ nrnthread_v_transfer_

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

Definition at line 153 of file fadvance.cpp.

◆ omembers

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

Definition at line 649 of file cvodeobj.cpp.

◆ pf_

CVRhsFn pf_
static

Definition at line 699 of file cvodeobj.cpp.

◆ secondorder

int secondorder
extern

Definition at line 96 of file init.cpp.

◆ structure_change_cnt

int structure_change_cnt

Definition at line 76 of file cvodeobj.cpp.

◆ t

double t

Definition at line 59 of file cvodeobj.cpp.

◆ use_cachevec

int use_cachevec
extern

Definition at line 63 of file treeset.cpp.