package affectors; import main.Node; import main.Globals; /** This is one half of a pair of Affectors that moves things between neighboring faces of a cell. This is a rough approximation to diffusion around the membrane of a cell. This Affector models the influx to one face from its neighboring faces. Whenever you add this to a Node, you should also add the LMxferEAff as well, which does the influx part. Note that the transfer rate should be the same in both the LMxferEAff and LMxferIAff. Also remember that for membrane-bound Nodes, the program keeps track of a separate concentration on each face of a cell, so the formula below is for the concentration on one face.

Formula
dNODEX/dt = LMxfer_NODEX * ( NODEX(left) + NODEX(right) )

Parameters
Target [NODEX] The Node that is being diffused.
Transfer rate [LMxfer_NODEX] The rate at which the Node moves from one face to its neighbors.

Usage
&NODEX

&LMxferEAff NODEX LMxfer_NODEX &LMxferIAff NODEX LMxfer_NODEX
&endNODEX */public class LMxferIAff extends Affector { int l=0, r=0; /** Influx rate... make sure it's identical to the efflux rate. */ int xferRateParam; static final String desc = "Lateral membrane transfer; version I for influx"; static final String [] nodeDescriptions = {"Target"}; static final String [] paramDescriptions = {"Rate of transfer"}; static final int [] whichSides = {-1}; public LMxferIAff() {} protected void setLabelsAndTypes() { setDescriptions(this.desc, nodeDescriptions, paramDescriptions); setSided(true, whichSides); this.Type[GUI_CAPABLE] = 1; this.Type[CERTIFICATION] = Affector.RETURNS_DERIV; this.Type[MATHTYPE] = Affector.KK; this.Type[TERMTYPE] = Affector.CONVERSION; } public void setParameterNumbers(int [] param_nums) { xferRateParam = param_nums[0]; } public void setSide(int s) { super.setSide(s); l = side - 1; if(l < 0) l = Globals.cellNumSides - 1; r = side + 1; if(r >= Globals.cellNumSides) r = 0; } public float getValue(Node which_node) { return Globals.characteristicTime * params[xferRateParam] * (Nodes[0].getIntegrationValue(l) + Nodes[0].getIntegrationValue(r)); } }