Next: The Table Properties. Up: Tabulated Calculations Previous: Tabulated Calculations Contents

####
The `calc_mode` field.

Genesis makes extensive use of precomputed tables to model conductance that depend on the membrane potential. The `tabchannel` element is an example. The tables are a simple discretization along the V-axis of the function they model, so they 'export' a set of tuples, , . Since the membrane potential is a computed variable, there is no guarantee that it will be equal to one of the 's at any point in simulation time. The tabulated elements in Genesis know about two basic modes of calculating a value for a given value :

1. Truncation: for a given value , , the value is returned. Since the value is directly stored in the table, no additional calculations have to be performed.
2. Linear interpolation: for a given value , , the value is returned. The value is the result of a linear interpolation between two tuples stored in the table.

The distinction between these two modes of operation is made by the `calc_mode` field. If this field is set to , linear interpolation is used, if the field is set to 0, truncation is used.

For most tabulated elements of genesis the `calc_mode` field is found in the `interpol struct`s that reside in the element fields. However `hsolve` has its own `calcmode` field - note the small difference in name - which is applied to all tabulated calculations. The granularity provided by the Genesis elements is much higher than provided by `hsolve`. That is why you always have to set the field manually.

NOTE: Never forget to set the `calcmode` field and to check if it is equal to the calculation mode of all tabulated elements. If you don't, your results will be almost right, but not exactly.

Next: The Table Properties. Up: Tabulated Calculations Previous: Tabulated Calculations Contents