NEURON
rxd_intracellular.cpp File Reference
#include <../../nrnconf.h>
#include <stdio.h>
#include <assert.h>
#include <string.h>
#include "grids.h"
#include "rxd.h"
#include "nrnwrap_Python.h"
#include <cmath>

Go to the source code of this file.

Functions

NRN_EXPORT void set_hybrid_data (int64_t *num_1d_indices_per_grid, int64_t *num_3d_indices_per_grid, int64_t *hybrid_indices1d, int64_t *hybrid_indices3d, int64_t *num_3d_indices_per_1d_seg, int64_t *hybrid_grid_ids, double *rates, double *volumes1d, double *volumes3d, double *dxs)
 
static int solve_dd_tridiag (int N, const double *l_diag, const double *diag, const double *u_diag, double *b, double *c)
 
void ics_find_deltas (long start, long stop, long node_start, double *delta, long *line_defs, long *ordered_nodes, double *states, double dc, double *alphas)
 
void ics_find_deltas (long start, long stop, long node_start, double *delta, long *line_defs, long *ordered_nodes, double *states, double *dc, double *alphas)
 
static void * do_ics_deltas (void *dataptr)
 
void run_threaded_deltas (ICS_Grid_node *g, ICSAdiDirection *ics_adi_dir)
 
void ics_dg_adi_x_inhom (ICS_Grid_node *g, int line_start, int line_stop, int node_start, double, double *states, double *RHS, double *scratchpad, double *u_diag, double *diag, double *l_diag)
 
void ics_dg_adi_y_inhom (ICS_Grid_node *g, int line_start, int line_stop, int node_start, double, double *states, double *RHS, double *scratchpad, double *u_diag, double *diag, double *l_diag)
 
void ics_dg_adi_z_inhom (ICS_Grid_node *g, int line_start, int line_stop, int node_start, double, double *states, double *RHS, double *scratchpad, double *u_diag, double *diag, double *l_diag)
 
void ics_dg_adi_x (ICS_Grid_node *g, int line_start, int line_stop, int node_start, double, double *states, double *RHS, double *scratchpad, double *u_diag, double *diag, double *l_diag)
 
void ics_dg_adi_y (ICS_Grid_node *g, int line_start, int line_stop, int node_start, double, double *states, double *RHS, double *scratchpad, double *u_diag, double *diag, double *l_diag)
 
void ics_dg_adi_z (ICS_Grid_node *g, int line_start, int line_stop, int node_start, double, double *states, double *RHS, double *scratchpad, double *u_diag, double *diag, double *l_diag)
 
void * do_ics_dg_adi (void *dataptr)
 
static double flux (const double alphai, const double alphaj, const double statei, const double statej)
 
static void variable_step_delta (long start, long stop, long node_start, double *ydot, long *line_defs, long *ordered_nodes, double const *const states, double r, double *alphas)
 
static void variable_step_delta (long start, long stop, long node_start, double *ydot, long *line_defs, long *ordered_nodes, double const *const states, double r, double *dcs, double *alphas)
 
void _ics_rhs_variable_step_helper (ICS_Grid_node *g, double const *const states, double *ydot)
 
static void variable_step_x (ICS_Grid_node *g, int line_start, int line_stop, int node_start, double *states, double *CVodeRHS, double *RHS, double *scratchpad, double *alphas, double *dcs, double dt)
 
static void variable_step_y (ICS_Grid_node *g, int line_start, int line_stop, int node_start, double *states, double *RHS, double *scratchpad, double *alphas, double *dcs, double dt)
 
static void variable_step_z (ICS_Grid_node *g, int line_start, int line_stop, int node_start, double *states, double *RHS, double *scratchpad, double *alphas, double *dcs, double dt)
 
static void variable_step_x (ICS_Grid_node *g, int line_start, int line_stop, int node_start, double *states, double *CVodeRHS, double *RHS, double *scratchpad, double *alphas, double dt)
 
static void variable_step_y (ICS_Grid_node *g, int line_start, int line_stop, int node_start, double *states, double *RHS, double *scratchpad, double *alphas, double dt)
 
static void variable_step_z (ICS_Grid_node *g, int line_start, int line_stop, int node_start, double *states, double *RHS, double *scratchpad, double *alphas, double dt)
 
void ics_ode_solve_helper (ICS_Grid_node *g, double dt, double *CVodeRHS)
 
void _ics_hybrid_helper (ICS_Grid_node *g)
 
void _ics_variable_hybrid_helper (ICS_Grid_node *g, const double *cvode_states_3d, double *const ydot_3d, const double *cvode_states_1d, double *const ydot_1d)
 

Variables

int NUM_THREADS
 
TaskQueueAllTasks
 
double * states
 

Function Documentation

◆ _ics_hybrid_helper()

void _ics_hybrid_helper ( ICS_Grid_node g)

Definition at line 1628 of file rxd_intracellular.cpp.

◆ _ics_rhs_variable_step_helper()

void _ics_rhs_variable_step_helper ( ICS_Grid_node g,
double const *const  states,
double *  ydot 
)

Definition at line 922 of file rxd_intracellular.cpp.

◆ _ics_variable_hybrid_helper()

void _ics_variable_hybrid_helper ( ICS_Grid_node g,
const double *  cvode_states_3d,
double *const  ydot_3d,
const double *  cvode_states_1d,
double *const  ydot_1d 
)

Definition at line 1682 of file rxd_intracellular.cpp.

◆ do_ics_deltas()

static void* do_ics_deltas ( void *  dataptr)
static

Definition at line 237 of file rxd_intracellular.cpp.

◆ do_ics_dg_adi()

void* do_ics_dg_adi ( void *  dataptr)

Definition at line 741 of file rxd_intracellular.cpp.

◆ flux()

static double flux ( const double  alphai,
const double  alphaj,
const double  statei,
const double  statej 
)
inlinestatic

Definition at line 798 of file rxd_intracellular.cpp.

◆ ics_dg_adi_x()

void ics_dg_adi_x ( ICS_Grid_node g,
int  line_start,
int  line_stop,
int  node_start,
double  ,
double *  states,
double *  RHS,
double *  scratchpad,
double *  u_diag,
double *  diag,
double *  l_diag 
)

Definition at line 524 of file rxd_intracellular.cpp.

◆ ics_dg_adi_x_inhom()

void ics_dg_adi_x_inhom ( ICS_Grid_node g,
int  line_start,
int  line_stop,
int  node_start,
double  ,
double *  states,
double *  RHS,
double *  scratchpad,
double *  u_diag,
double *  diag,
double *  l_diag 
)

Definition at line 297 of file rxd_intracellular.cpp.

◆ ics_dg_adi_y()

void ics_dg_adi_y ( ICS_Grid_node g,
int  line_start,
int  line_stop,
int  node_start,
double  ,
double *  states,
double *  RHS,
double *  scratchpad,
double *  u_diag,
double *  diag,
double *  l_diag 
)

Definition at line 602 of file rxd_intracellular.cpp.

◆ ics_dg_adi_y_inhom()

void ics_dg_adi_y_inhom ( ICS_Grid_node g,
int  line_start,
int  line_stop,
int  node_start,
double  ,
double *  states,
double *  RHS,
double *  scratchpad,
double *  u_diag,
double *  diag,
double *  l_diag 
)

Definition at line 378 of file rxd_intracellular.cpp.

◆ ics_dg_adi_z()

void ics_dg_adi_z ( ICS_Grid_node g,
int  line_start,
int  line_stop,
int  node_start,
double  ,
double *  states,
double *  RHS,
double *  scratchpad,
double *  u_diag,
double *  diag,
double *  l_diag 
)

Definition at line 672 of file rxd_intracellular.cpp.

◆ ics_dg_adi_z_inhom()

void ics_dg_adi_z_inhom ( ICS_Grid_node g,
int  line_start,
int  line_stop,
int  node_start,
double  ,
double *  states,
double *  RHS,
double *  scratchpad,
double *  u_diag,
double *  diag,
double *  l_diag 
)

Definition at line 451 of file rxd_intracellular.cpp.

◆ ics_find_deltas() [1/2]

void ics_find_deltas ( long  start,
long  stop,
long  node_start,
double *  delta,
long *  line_defs,
long *  ordered_nodes,
double *  states,
double *  dc,
double *  alphas 
)

Definition at line 179 of file rxd_intracellular.cpp.

◆ ics_find_deltas() [2/2]

void ics_find_deltas ( long  start,
long  stop,
long  node_start,
double *  delta,
long *  line_defs,
long *  ordered_nodes,
double *  states,
double  dc,
double *  alphas 
)

Definition at line 120 of file rxd_intracellular.cpp.

◆ ics_ode_solve_helper()

void ics_ode_solve_helper ( ICS_Grid_node g,
double  dt,
double *  CVodeRHS 
)

Definition at line 1471 of file rxd_intracellular.cpp.

◆ run_threaded_deltas()

void run_threaded_deltas ( ICS_Grid_node g,
ICSAdiDirection ics_adi_dir 
)

Definition at line 275 of file rxd_intracellular.cpp.

◆ set_hybrid_data()

NRN_EXPORT void set_hybrid_data ( int64_t *  num_1d_indices_per_grid,
int64_t *  num_3d_indices_per_grid,
int64_t *  hybrid_indices1d,
int64_t *  hybrid_indices3d,
int64_t *  num_3d_indices_per_1d_seg,
int64_t *  hybrid_grid_ids,
double *  rates,
double *  volumes1d,
double *  volumes3d,
double *  dxs 
)

Definition at line 21 of file rxd_intracellular.cpp.

◆ solve_dd_tridiag()

static int solve_dd_tridiag ( int  N,
const double *  l_diag,
const double *  diag,
const double *  u_diag,
double *  b,
double *  c 
)
static

Definition at line 94 of file rxd_intracellular.cpp.

◆ variable_step_delta() [1/2]

static void variable_step_delta ( long  start,
long  stop,
long  node_start,
double *  ydot,
long *  line_defs,
long *  ordered_nodes,
double const *const  states,
double  r,
double *  alphas 
)
static

Definition at line 805 of file rxd_intracellular.cpp.

◆ variable_step_delta() [2/2]

static void variable_step_delta ( long  start,
long  stop,
long  node_start,
double *  ydot,
long *  line_defs,
long *  ordered_nodes,
double const *const  states,
double  r,
double *  dcs,
double *  alphas 
)
static

Definition at line 860 of file rxd_intracellular.cpp.

◆ variable_step_x() [1/2]

static void variable_step_x ( ICS_Grid_node g,
int  line_start,
int  line_stop,
int  node_start,
double *  states,
double *  CVodeRHS,
double *  RHS,
double *  scratchpad,
double *  alphas,
double *  dcs,
double  dt 
)
static

Definition at line 1022 of file rxd_intracellular.cpp.

◆ variable_step_x() [2/2]

static void variable_step_x ( ICS_Grid_node g,
int  line_start,
int  line_stop,
int  node_start,
double *  states,
double *  CVodeRHS,
double *  RHS,
double *  scratchpad,
double *  alphas,
double  dt 
)
static

Definition at line 1249 of file rxd_intracellular.cpp.

◆ variable_step_y() [1/2]

static void variable_step_y ( ICS_Grid_node g,
int  line_start,
int  line_stop,
int  node_start,
double *  states,
double *  RHS,
double *  scratchpad,
double *  alphas,
double *  dcs,
double  dt 
)
static

Definition at line 1101 of file rxd_intracellular.cpp.

◆ variable_step_y() [2/2]

static void variable_step_y ( ICS_Grid_node g,
int  line_start,
int  line_stop,
int  node_start,
double *  states,
double *  RHS,
double *  scratchpad,
double *  alphas,
double  dt 
)
static

Definition at line 1326 of file rxd_intracellular.cpp.

◆ variable_step_z() [1/2]

static void variable_step_z ( ICS_Grid_node g,
int  line_start,
int  line_stop,
int  node_start,
double *  states,
double *  RHS,
double *  scratchpad,
double *  alphas,
double *  dcs,
double  dt 
)
static

Definition at line 1175 of file rxd_intracellular.cpp.

◆ variable_step_z() [2/2]

static void variable_step_z ( ICS_Grid_node g,
int  line_start,
int  line_stop,
int  node_start,
double *  states,
double *  RHS,
double *  scratchpad,
double *  alphas,
double  dt 
)
static

Definition at line 1399 of file rxd_intracellular.cpp.

Variable Documentation

◆ AllTasks

TaskQueue* AllTasks
extern

Definition at line 41 of file rxd.cpp.

◆ NUM_THREADS

int NUM_THREADS
extern

Definition at line 34 of file rxd.cpp.

◆ states

double* states
extern

Definition at line 75 of file rxd.cpp.