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
 

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)
 
 declarePtrList (ExtraScatterList, Object) implementPtrList(ExtraScatterList
 
static double extra_scatter_gather (void *v)
 
static double extra_scatter_gather_remove (void *v)
 
static double use_fast_imem (void *v)
 
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 voidmsetup_thread (NrnThread *)
 
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 Object ExtraScatterList * extra_scatterlist [2]
 
static Member_func members []
 
static Member_ret_obj_func omembers []
 
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 59 of file cvodeobj.cpp.

◆ nt_t

#define nt_t   nrn_threads->_t

Definition at line 60 of file cvodeobj.cpp.

◆ SUCCESS

#define SUCCESS   CV_SUCCESS

Definition at line 95 of file cvodeobj.cpp.

Function Documentation

◆ abstol()

static double abstol ( void v)
static

Definition at line 185 of file cvodeobj.cpp.

◆ acor()

static double acor ( void v)
static

Definition at line 297 of file cvodeobj.cpp.

◆ active()

static double active ( void v)
static

Definition at line 211 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 380 of file cvodeobj.cpp.

◆ cons()

static void* cons ( Object )
static

Definition at line 646 of file cvodeobj.cpp.

◆ current_method()

static double current_method ( void v)
static

Definition at line 458 of file cvodeobj.cpp.

◆ cvode_fadvance()

void cvode_fadvance ( )

◆ cvode_finitialize()

void cvode_finitialize ( )

◆ Cvode_reg()

void Cvode_reg ( )

Definition at line 668 of file cvodeobj.cpp.

◆ dae_init_dteps()

static double dae_init_dteps ( void v)
static

Definition at line 336 of file cvodeobj.cpp.

◆ debug_event()

static double debug_event ( void v)
static

Definition at line 390 of file cvodeobj.cpp.

◆ declarePtrList()

declarePtrList ( ExtraScatterList  ,
Object   
)

◆ destruct()

static void destruct ( void v)
static

Definition at line 661 of file cvodeobj.cpp.

◆ dstates()

static double dstates ( void v)
static

Definition at line 280 of file cvodeobj.cpp.

◆ error_weights()

static double error_weights ( void v)
static

Definition at line 291 of file cvodeobj.cpp.

◆ event_queue_info()

static double event_queue_info ( void v)
static

Definition at line 480 of file cvodeobj.cpp.

◆ extra_scatter_gather()

static double extra_scatter_gather ( void v)
static

Definition at line 549 of file cvodeobj.cpp.

◆ extra_scatter_gather_remove()

static double extra_scatter_gather_remove ( void v)
static

Definition at line 563 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 1498 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 1533 of file cvodeobj.cpp.

◆ f_thread()

static void * f_thread ( NrnThread nt)
static

Definition at line 1542 of file cvodeobj.cpp.

◆ f_thread_ms_part1()

static void * f_thread_ms_part1 ( NrnThread nt)
static

Definition at line 1565 of file cvodeobj.cpp.

◆ f_thread_ms_part2()

static void * f_thread_ms_part2 ( NrnThread nt)
static

Definition at line 1572 of file cvodeobj.cpp.

◆ f_thread_ms_part3()

static void * f_thread_ms_part3 ( NrnThread nt)
static

Definition at line 1578 of file cvodeobj.cpp.

◆ f_thread_ms_part34()

static void * f_thread_ms_part34 ( NrnThread nt)
static

Definition at line 1590 of file cvodeobj.cpp.

◆ f_thread_ms_part4()

static void * f_thread_ms_part4 ( NrnThread nt)
static

Definition at line 1584 of file cvodeobj.cpp.

◆ f_thread_transfer_part1()

static void * f_thread_transfer_part1 ( NrnThread nt)
static

Definition at line 1551 of file cvodeobj.cpp.

◆ f_thread_transfer_part2()

static void * f_thread_transfer_part2 ( NrnThread nt)
static

Definition at line 1558 of file cvodeobj.cpp.

◆ hoc_get_last_pointer_symbol()

Symbol* hoc_get_last_pointer_symbol ( )

Definition at line 1761 of file code.cpp.

◆ hoc_symbol_tolerance()

void hoc_symbol_tolerance ( Symbol ,
double   
)

Definition at line 109 of file code2.cpp.

◆ jacobian()

static double jacobian ( void v)
static

Definition at line 265 of file cvodeobj.cpp.

◆ linmod_extra_eqn_count()

int linmod_extra_eqn_count ( )

◆ maxorder()

static double maxorder ( void v)
static

Definition at line 230 of file cvodeobj.cpp.

◆ maxstate_thread()

static void* maxstate_thread ( NrnThread nt)
static

Definition at line 931 of file cvodeobj.cpp.

◆ maxstep()

static double maxstep ( void v)
static

Definition at line 257 of file cvodeobj.cpp.

◆ mfree()

static void mfree ( CVodeMem  cv_mem)
static

Definition at line 1490 of file cvodeobj.cpp.

◆ minit()

static int minit ( CVodeMem  cv_mem)
static

Definition at line 1410 of file cvodeobj.cpp.

◆ minstep()

static double minstep ( void v)
static

Definition at line 249 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 1415 of file cvodeobj.cpp.

◆ msetup_thread()

static void* msetup_thread ( NrnThread )
static

◆ msolve()

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

Definition at line 1428 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 1449 of file cvodeobj.cpp.

◆ msolve_thread()

static void * msolve_thread ( NrnThread nt)
static

Definition at line 1460 of file cvodeobj.cpp.

◆ msolve_thread_part1()

static void * msolve_thread_part1 ( NrnThread nt)
static

Definition at line 1469 of file cvodeobj.cpp.

◆ msolve_thread_part2()

static void * msolve_thread_part2 ( NrnThread nt)
static

Definition at line 1476 of file cvodeobj.cpp.

◆ msolve_thread_part3()

static void * msolve_thread_part3 ( NrnThread nt)
static

Definition at line 1482 of file cvodeobj.cpp.

◆ n_record()

static double n_record ( void v)
static

Definition at line 400 of file cvodeobj.cpp.

◆ n_remove()

static double n_remove ( void v)
static

Definition at line 406 of file cvodeobj.cpp.

◆ ncs_netcons()

static double ncs_netcons ( void v)
static

Definition at line 497 of file cvodeobj.cpp.

◆ netconlist()

static Object** netconlist ( void v)
static

Definition at line 492 of file cvodeobj.cpp.

◆ nrn_atol()

static double nrn_atol ( void v)
static

Definition at line 174 of file cvodeobj.cpp.

◆ nrn_cachevec()

void nrn_cachevec ( int  )

Definition at line 2108 of file treeset.cpp.

◆ nrn_diam_change_count()

static double nrn_diam_change_count ( void v)
static

Definition at line 524 of file cvodeobj.cpp.

◆ nrn_extra_scatter_gather()

void nrn_extra_scatter_gather ( int  direction,
int  tid 
)

Definition at line 536 of file cvodeobj.cpp.

◆ nrn_hoc2fixed_step()

double nrn_hoc2fixed_step ( void v)

Definition at line 4230 of file netcvode.cpp.

◆ nrn_hoc2fun()

double nrn_hoc2fun ( void v)

Definition at line 4235 of file netcvode.cpp.

◆ nrn_hoc2gather_y()

double nrn_hoc2gather_y ( void v)

Definition at line 4258 of file netcvode.cpp.

◆ nrn_hoc2scatter_y()

double nrn_hoc2scatter_y ( void v)

Definition at line 4248 of file netcvode.cpp.

◆ nrn_modeltype()

int nrn_modeltype ( )

Definition at line 1934 of file treeset.cpp.

◆ nrn_structure_change_count()

static double nrn_structure_change_count ( void v)
static

Definition at line 519 of file cvodeobj.cpp.

◆ ob2pntproc()

Point_process* ob2pntproc ( Object )

Definition at line 88 of file hocmech.cpp.

◆ order()

static double order ( void v)
static

Definition at line 238 of file cvodeobj.cpp.

◆ peq()

static double peq ( void v)
static

Definition at line 474 of file cvodeobj.cpp.

◆ queue_mode()

static double queue_mode ( void v)
static

Definition at line 129 of file cvodeobj.cpp.

◆ re_init()

static double re_init ( void v)
static

Definition at line 158 of file cvodeobj.cpp.

◆ rtol()

static double rtol ( void v)
static

Definition at line 167 of file cvodeobj.cpp.

◆ simgraph_remove()

static double simgraph_remove ( void v)
static

Definition at line 412 of file cvodeobj.cpp.

◆ solve()

static double solve ( void v)
static

Definition at line 99 of file cvodeobj.cpp.

◆ spikestat()

static double spikestat ( void v)
static

Definition at line 124 of file cvodeobj.cpp.

◆ state_magnitudes()

static double state_magnitudes ( void v)
static

Definition at line 418 of file cvodeobj.cpp.

◆ statename()

static double statename ( void v)
static

Definition at line 303 of file cvodeobj.cpp.

◆ states()

static double states ( void v)
static

Definition at line 274 of file cvodeobj.cpp.

◆ static_mutex_for_at_time()

static void static_mutex_for_at_time ( bool  b)
static

Definition at line 35 of file cvodeobj.cpp.

◆ statistics()

static double statistics ( void v)
static

Definition at line 115 of file cvodeobj.cpp.

◆ stiff()

static double stiff ( void v)
static

Definition at line 222 of file cvodeobj.cpp.

◆ store_events()

static double store_events ( void v)
static

Definition at line 486 of file cvodeobj.cpp.

◆ tstop_event()

static double tstop_event ( void v)
static

Definition at line 423 of file cvodeobj.cpp.

◆ use_daspk()

static double use_daspk ( void v)
static

Definition at line 324 of file cvodeobj.cpp.

◆ use_fast_imem()

static double use_fast_imem ( void v)
static

Definition at line 579 of file cvodeobj.cpp.

◆ use_local_dt()

static double use_local_dt ( void v)
static

Definition at line 314 of file cvodeobj.cpp.

◆ use_long_double()

static double use_long_double ( void v)
static

Definition at line 369 of file cvodeobj.cpp.

◆ use_mxb()

static double use_mxb ( void v)
static

Definition at line 346 of file cvodeobj.cpp.

◆ use_parallel()

static double use_parallel ( void v)
static

Definition at line 506 of file cvodeobj.cpp.

Variable Documentation

◆ cvode_active_

int cvode_active_

Definition at line 158 of file fadvance.cpp.

◆ diam_change_cnt

int diam_change_cnt

Definition at line 76 of file cvodeobj.cpp.

◆ diam_changed

int diam_changed

Definition at line 23 of file cabcode.cpp.

◆ dt

double dt

Definition at line 123 of file init.cpp.

◆ extra_scatterlist

Object ExtraScatterList* extra_scatterlist[2]
static

Definition at line 534 of file cvodeobj.cpp.

◆ f_cv_

Cvode* f_cv_
static

Definition at line 1497 of file cvodeobj.cpp.

◆ f_t_

realtype f_t_
static

Definition at line 1494 of file cvodeobj.cpp.

◆ f_y_

N_Vector f_y_
static

Definition at line 1495 of file cvodeobj.cpp.

◆ f_ydot_

N_Vector f_ydot_
static

Definition at line 1496 of file cvodeobj.cpp.

◆ hoc_return_type_code

int hoc_return_type_code

Definition at line 41 of file code.cpp.

◆ maxstate_b

bool maxstate_b
static

Definition at line 929 of file cvodeobj.cpp.

◆ maxstate_cv

Cvode* maxstate_cv
static

Definition at line 930 of file cvodeobj.cpp.

◆ members

Member_func members[]
static

Definition at line 589 of file cvodeobj.cpp.

◆ msolve_b_

N_Vector msolve_b_
static

Definition at line 1425 of file cvodeobj.cpp.

◆ msolve_cv_

Cvode* msolve_cv_
static

Definition at line 1427 of file cvodeobj.cpp.

◆ msolve_ycur_

N_Vector msolve_ycur_
static

Definition at line 1426 of file cvodeobj.cpp.

◆ net_cvode_instance

NetCvode* net_cvode_instance

Definition at line 27 of file cvodestb.cpp.

◆ nrn_is_artificial_

short * nrn_is_artificial_

Definition at line 18 of file cell_group.cpp.

◆ nrn_multisplit_setup_

void(* nrn_multisplit_setup_) ()

Definition at line 46 of file treeset.cpp.

◆ nrn_use_bin_queue_

bool nrn_use_bin_queue_

Definition at line 251 of file netcvode.cpp.

◆ nrn_use_fifo_queue_

bool nrn_use_fifo_queue_

Definition at line 248 of file netcvode.cpp.

◆ nrn_use_selfqueue_

int nrn_use_selfqueue_

Definition at line 92 of file netcvode.cpp.

◆ nrnmpi_v_transfer_

void(* nrnmpi_v_transfer_) ()

Definition at line 147 of file fadvance.cpp.

◆ nrnpy_hoccommand_exec

int(* nrnpy_hoccommand_exec) (Object *)

Definition at line 17 of file objcmd.cpp.

◆ nrnpy_pysame

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

Definition at line 529 of file cvodeobj.cpp.

◆ nrnthread_v_transfer_

void(* nrnthread_v_transfer_) (NrnThread *)

Definition at line 148 of file fadvance.cpp.

◆ omembers

Member_ret_obj_func omembers[]
static
Initial value:
= {
"netconlist", netconlist,
0, 0
}
static Object ** netconlist(void *v)
Definition: cvodeobj.cpp:492

Definition at line 641 of file cvodeobj.cpp.

◆ pf_

CVRhsFn pf_
static

Definition at line 687 of file cvodeobj.cpp.

◆ secondorder

int secondorder

Definition at line 120 of file init.cpp.

◆ structure_change_cnt

int structure_change_cnt

Definition at line 75 of file cvodeobj.cpp.

◆ t

double t

Definition at line 123 of file init.cpp.

◆ use_cachevec

int use_cachevec

Definition at line 61 of file treeset.cpp.