NEURON
eion.cpp File Reference
#include <../../nrnconf.h>
#include <cstdlib>
#include "cabcode.h"
#include "section.h"
#include "neuron.h"
#include "neuron/cache/mechanism_range.hpp"
#include "membfunc.h"
#include "parse.hpp"
#include "membdef.h"
#include "nrniv_mf.h"
#include "nrnunits.h"
#include <array>
#include <string>
#include <map>
#include <set>

Go to the source code of this file.

Macros

#define global_conci(type)   ion_global_map[type][0]
 
#define global_conco(type)   ion_global_map[type][1]
 
#define global_charge(type)   ion_global_map[type][2]
 
#define VAL_SENTINAL   -10000.
 
#define ktf   (1000. * _gasconstant_codata2018 * (celsius + 273.15) / _faraday_codata2018)
 
#define charge   global_charge(type)
 
#define conci0   global_conci(type)
 
#define conco0   global_conco(type)
 

Functions

static void ion_alloc (Prop *)
 
static void ion_cur (neuron::model_sorted_token const &, NrnThread *, Memb_list *, int)
 
static void ion_init (neuron::model_sorted_token const &, NrnThread *, Memb_list *, int)
 
int nrn_is_ion (int type)
 
double nrn_ion_charge (Symbol *sym)
 
void ion_register (void)
 
void ion_charge (void)
 
void reg_parm_default (int mechtype, const std::string &name)
 
void ion_reg (const char *name, double valence)
 
void nrn_verify_ion_charge_defined ()
 
double nrn_nernst (double ci, double co, double z)
 
void nrn_wrote_conc (Symbol *sym, double &erev, double ci, double co, int it)
 
void nernst (void)
 
static double efun (double x)
 
double nrn_ghk (double v, double ci, double co, double z)
 
void ghk (void)
 
double nrn_nernst_coef (int type)
 
static void add_mechtype2ionconctype (int mechtype, int iontype, int i)
 
static bool mech_uses_ionconctype (int mechtype, int iontype, int i)
 
void nrn_check_conc_write (Prop *pmech, Prop *pion, int i)
 
void ion_style (void)
 
int nrn_vartype (const Symbol *sym)
 
void nrn_promote (Prop *p, int conc, int rev)
 
void second_order_cur (NrnThread *nt)
 

Variables

static constexpr auto nparm = 5
 
static constexpr auto ndparam = 1
 
static const char * mechanism []
 
static DoubScal scdoub []
 
static int na_ion
 
static int k_ion
 
static int ca_ion
 
static int ion_global_map_size
 
static double ** ion_global_map
 
static std::vector< double > naparmdflt {DEF_ena, DEF_nai, DEF_nao}
 
static std::vector< double > kparmdflt {DEF_ek, DEF_ki, DEF_ko}
 
static std::vector< double > caparmdflt {DEF_eca, DEF_cai, DEF_cao}
 
static std::vector< double > ionparmdflt {DEF_eion, DEF_ioni, DEF_iono}
 
static constexpr auto iontype_index_dparam = 0
 
static constexpr auto erev_index = 0
 
static constexpr auto conci_index = 1
 
static constexpr auto conco_index = 2
 
static constexpr auto cur_index = 3
 
static constexpr auto dcurdv_index = 4
 
static std::map< int, std::set< int > > mechtype2ionconctype
 

Macro Definition Documentation

◆ charge

#define charge   global_charge(type)

Definition at line 384 of file eion.cpp.

◆ conci0

#define conci0   global_conci(type)

Definition at line 385 of file eion.cpp.

◆ conco0

#define conco0   global_conco(type)

Definition at line 386 of file eion.cpp.

◆ global_charge

#define global_charge (   type)    ion_global_map[type][2]

Definition at line 58 of file eion.cpp.

◆ global_conci

#define global_conci (   type)    ion_global_map[type][0]

Definition at line 56 of file eion.cpp.

◆ global_conco

#define global_conco (   type)    ion_global_map[type][1]

Definition at line 57 of file eion.cpp.

◆ ktf

#define ktf   (1000. * _gasconstant_codata2018 * (celsius + 273.15) / _faraday_codata2018)

Definition at line 278 of file eion.cpp.

◆ VAL_SENTINAL

#define VAL_SENTINAL   -10000.

Function Documentation

◆ add_mechtype2ionconctype()

static void add_mechtype2ionconctype ( int  mechtype,
int  iontype,
int  i 
)
static

Definition at line 409 of file eion.cpp.

◆ efun()

static double efun ( double  x)
static

Definition at line 341 of file eion.cpp.

◆ ghk()

void ghk ( void  )

Definition at line 357 of file eion.cpp.

◆ ion_alloc()

static void ion_alloc ( Prop p)
static

Definition at line 614 of file eion.cpp.

◆ ion_charge()

void ion_charge ( void  )

Definition at line 140 of file eion.cpp.

◆ ion_cur()

static void ion_cur ( neuron::model_sorted_token const &  sorted_token,
NrnThread nt,
Memb_list ml,
int  type 
)
static

Definition at line 567 of file eion.cpp.

◆ ion_init()

static void ion_init ( neuron::model_sorted_token const &  sorted_token,
NrnThread nt,
Memb_list ml,
int  type 
)
static

Definition at line 589 of file eion.cpp.

◆ ion_reg()

void ion_reg ( const char *  name,
double  valence 
)

Definition at line 162 of file eion.cpp.

◆ ion_register()

void ion_register ( void  )

Definition at line 64 of file eion.cpp.

◆ ion_style()

void ion_style ( void  )

Definition at line 466 of file eion.cpp.

◆ mech_uses_ionconctype()

static bool mech_uses_ionconctype ( int  mechtype,
int  iontype,
int  i 
)
static

Definition at line 414 of file eion.cpp.

◆ nernst()

void nernst ( void  )

Definition at line 299 of file eion.cpp.

◆ nrn_check_conc_write()

void nrn_check_conc_write ( Prop pmech,
Prop pion,
int  i 
)

Definition at line 422 of file eion.cpp.

◆ nrn_ghk()

double nrn_ghk ( double  v,
double  ci,
double  co,
double  z 
)

Definition at line 349 of file eion.cpp.

◆ nrn_ion_charge()

double nrn_ion_charge ( Symbol sym)

Definition at line 60 of file eion.cpp.

◆ nrn_is_ion()

int nrn_is_ion ( int  type)

Definition at line 50 of file eion.cpp.

◆ nrn_nernst()

double nrn_nernst ( double  ci,
double  co,
double  z 
)

Definition at line 279 of file eion.cpp.

◆ nrn_nernst_coef()

double nrn_nernst_coef ( int  type)

Definition at line 388 of file eion.cpp.

◆ nrn_promote()

void nrn_promote ( Prop p,
int  conc,
int  rev 
)

Definition at line 527 of file eion.cpp.

◆ nrn_vartype()

int nrn_vartype ( const Symbol sym)

Definition at line 503 of file eion.cpp.

◆ nrn_verify_ion_charge_defined()

void nrn_verify_ion_charge_defined ( )

Definition at line 263 of file eion.cpp.

◆ nrn_wrote_conc()

void nrn_wrote_conc ( Symbol sym,
double &  erev,
double  ci,
double  co,
int  it 
)

Definition at line 293 of file eion.cpp.

◆ reg_parm_default()

void reg_parm_default ( int  mechtype,
const std::string &  name 
)

Definition at line 154 of file eion.cpp.

◆ second_order_cur()

void second_order_cur ( NrnThread nt)

Definition at line 640 of file eion.cpp.

Variable Documentation

◆ ca_ion

int ca_ion
static

Definition at line 48 of file eion.cpp.

◆ caparmdflt

std::vector<double> caparmdflt {DEF_eca, DEF_cai, DEF_cao}
static

Definition at line 151 of file eion.cpp.

◆ conci_index

constexpr auto conci_index = 1
staticconstexpr

Definition at line 364 of file eion.cpp.

◆ conco_index

constexpr auto conco_index = 2
staticconstexpr

Definition at line 365 of file eion.cpp.

◆ cur_index

constexpr auto cur_index = 3
staticconstexpr

Definition at line 366 of file eion.cpp.

◆ dcurdv_index

constexpr auto dcurdv_index = 4
staticconstexpr

Definition at line 367 of file eion.cpp.

◆ erev_index

constexpr auto erev_index = 0
staticconstexpr

Definition at line 363 of file eion.cpp.

◆ ion_global_map

double** ion_global_map
static

Definition at line 55 of file eion.cpp.

◆ ion_global_map_size

int ion_global_map_size
static

Definition at line 54 of file eion.cpp.

◆ ionparmdflt

std::vector<double> ionparmdflt {DEF_eion, DEF_ioni, DEF_iono}
static

Definition at line 152 of file eion.cpp.

◆ iontype_index_dparam

constexpr auto iontype_index_dparam = 0
staticconstexpr

Definition at line 362 of file eion.cpp.

◆ k_ion

int k_ion
static

Definition at line 48 of file eion.cpp.

◆ kparmdflt

std::vector<double> kparmdflt {DEF_ek, DEF_ki, DEF_ko}
static

Definition at line 150 of file eion.cpp.

◆ mechanism

const char* mechanism[]
static
Initial value:
= {
"0",
"na_ion",
"ena",
"nao",
"nai",
0,
"ina",
"dina_dv_",
0,
0}

Definition at line 26 of file eion.cpp.

◆ mechtype2ionconctype

std::map<int, std::set<int> > mechtype2ionconctype
static

Definition at line 407 of file eion.cpp.

◆ na_ion

int na_ion
static

Definition at line 48 of file eion.cpp.

◆ naparmdflt

std::vector<double> naparmdflt {DEF_ena, DEF_nai, DEF_nao}
static

Definition at line 149 of file eion.cpp.

◆ ndparam

constexpr auto ndparam = 1
staticconstexpr

Definition at line 25 of file eion.cpp.

◆ nparm

constexpr auto nparm = 5
staticconstexpr

Definition at line 24 of file eion.cpp.

◆ scdoub

DoubScal scdoub[]
static
Initial value:
= {
{"ci0_na_ion", 0},
{"co0_na_ion", 0},
{0, 0}}

Definition at line 37 of file eion.cpp.