diff --git a/.doctrees/environment.pickle b/.doctrees/environment.pickle index 7bc29d95b..fcff1fd01 100644 Binary files a/.doctrees/environment.pickle and b/.doctrees/environment.pickle differ diff --git a/.doctrees/nbsphinx/notebooks/nmodl-kinetic-schemes.ipynb b/.doctrees/nbsphinx/notebooks/nmodl-kinetic-schemes.ipynb index 449d1856f..a5816d15e 100644 --- a/.doctrees/nbsphinx/notebooks/nmodl-kinetic-schemes.ipynb +++ b/.doctrees/nbsphinx/notebooks/nmodl-kinetic-schemes.ipynb @@ -152,10 +152,10 @@ "execution_count": 1, "metadata": { "execution": { - "iopub.execute_input": "2024-09-13T13:21:26.468523Z", - "iopub.status.busy": "2024-09-13T13:21:26.467981Z", - "iopub.status.idle": "2024-09-13T13:21:27.296565Z", - "shell.execute_reply": "2024-09-13T13:21:27.295794Z" + "iopub.execute_input": "2024-09-17T08:23:29.281163Z", + "iopub.status.busy": "2024-09-17T08:23:29.280577Z", + "iopub.status.idle": "2024-09-17T08:23:30.102117Z", + "shell.execute_reply": "2024-09-17T08:23:30.101171Z" } }, "outputs": [], @@ -169,10 +169,10 @@ "execution_count": 2, "metadata": { "execution": { - "iopub.execute_input": "2024-09-13T13:21:27.299629Z", - "iopub.status.busy": "2024-09-13T13:21:27.299393Z", - "iopub.status.idle": "2024-09-13T13:21:27.331267Z", - "shell.execute_reply": "2024-09-13T13:21:27.330451Z" + "iopub.execute_input": "2024-09-17T08:23:30.105683Z", + "iopub.status.busy": "2024-09-17T08:23:30.105134Z", + "iopub.status.idle": "2024-09-17T08:23:30.135751Z", + "shell.execute_reply": "2024-09-17T08:23:30.135048Z" } }, "outputs": [], @@ -277,10 +277,10 @@ "execution_count": 3, "metadata": { "execution": { - "iopub.execute_input": "2024-09-13T13:21:27.334526Z", - "iopub.status.busy": "2024-09-13T13:21:27.334162Z", - "iopub.status.idle": "2024-09-13T13:21:27.339151Z", - "shell.execute_reply": "2024-09-13T13:21:27.338449Z" + "iopub.execute_input": "2024-09-17T08:23:30.138815Z", + "iopub.status.busy": "2024-09-17T08:23:30.138554Z", + "iopub.status.idle": "2024-09-17T08:23:30.143783Z", + "shell.execute_reply": "2024-09-17T08:23:30.143090Z" } }, "outputs": [ @@ -323,10 +323,10 @@ "execution_count": 4, "metadata": { "execution": { - "iopub.execute_input": "2024-09-13T13:21:27.372469Z", - "iopub.status.busy": "2024-09-13T13:21:27.372039Z", - "iopub.status.idle": "2024-09-13T13:21:27.376596Z", - "shell.execute_reply": "2024-09-13T13:21:27.375913Z" + "iopub.execute_input": "2024-09-17T08:23:30.175024Z", + "iopub.status.busy": "2024-09-17T08:23:30.174461Z", + "iopub.status.idle": "2024-09-17T08:23:30.178914Z", + "shell.execute_reply": "2024-09-17T08:23:30.178200Z" } }, "outputs": [ @@ -367,10 +367,10 @@ "execution_count": 5, "metadata": { "execution": { - "iopub.execute_input": "2024-09-13T13:21:27.379225Z", - "iopub.status.busy": "2024-09-13T13:21:27.378735Z", - "iopub.status.idle": "2024-09-13T13:21:27.382491Z", - "shell.execute_reply": "2024-09-13T13:21:27.381789Z" + "iopub.execute_input": "2024-09-17T08:23:30.181579Z", + "iopub.status.busy": "2024-09-17T08:23:30.181182Z", + "iopub.status.idle": "2024-09-17T08:23:30.185150Z", + "shell.execute_reply": "2024-09-17T08:23:30.184475Z" }, "scrolled": true }, @@ -412,10 +412,10 @@ "execution_count": 6, "metadata": { "execution": { - "iopub.execute_input": "2024-09-13T13:21:27.385236Z", - "iopub.status.busy": "2024-09-13T13:21:27.384729Z", - "iopub.status.idle": "2024-09-13T13:21:27.388733Z", - "shell.execute_reply": "2024-09-13T13:21:27.388133Z" + "iopub.execute_input": "2024-09-17T08:23:30.187395Z", + "iopub.status.busy": "2024-09-17T08:23:30.187197Z", + "iopub.status.idle": "2024-09-17T08:23:30.191191Z", + "shell.execute_reply": "2024-09-17T08:23:30.190529Z" }, "scrolled": true }, @@ -459,10 +459,10 @@ "execution_count": 7, "metadata": { "execution": { - "iopub.execute_input": "2024-09-13T13:21:27.391206Z", - "iopub.status.busy": "2024-09-13T13:21:27.390869Z", - "iopub.status.idle": "2024-09-13T13:21:27.395589Z", - "shell.execute_reply": "2024-09-13T13:21:27.394888Z" + "iopub.execute_input": "2024-09-17T08:23:30.193827Z", + "iopub.status.busy": "2024-09-17T08:23:30.193411Z", + "iopub.status.idle": "2024-09-17T08:23:30.197708Z", + "shell.execute_reply": "2024-09-17T08:23:30.197042Z" } }, "outputs": [ diff --git a/.doctrees/nbsphinx/notebooks/nmodl-python-tutorial.ipynb b/.doctrees/nbsphinx/notebooks/nmodl-python-tutorial.ipynb index 0a57422b5..891e9b77e 100644 --- a/.doctrees/nbsphinx/notebooks/nmodl-python-tutorial.ipynb +++ b/.doctrees/nbsphinx/notebooks/nmodl-python-tutorial.ipynb @@ -30,10 +30,10 @@ "execution_count": 1, "metadata": { "execution": { - "iopub.execute_input": "2024-09-13T13:21:32.616407Z", - "iopub.status.busy": "2024-09-13T13:21:32.615919Z", - "iopub.status.idle": "2024-09-13T13:21:33.449926Z", - "shell.execute_reply": "2024-09-13T13:21:33.449057Z" + "iopub.execute_input": "2024-09-17T08:23:35.612345Z", + "iopub.status.busy": "2024-09-17T08:23:35.611785Z", + "iopub.status.idle": "2024-09-17T08:23:36.423158Z", + "shell.execute_reply": "2024-09-17T08:23:36.422273Z" } }, "outputs": [], @@ -63,10 +63,10 @@ "execution_count": 2, "metadata": { "execution": { - "iopub.execute_input": "2024-09-13T13:21:33.453289Z", - "iopub.status.busy": "2024-09-13T13:21:33.452805Z", - "iopub.status.idle": "2024-09-13T13:21:33.485155Z", - "shell.execute_reply": "2024-09-13T13:21:33.484459Z" + "iopub.execute_input": "2024-09-17T08:23:36.426536Z", + "iopub.status.busy": "2024-09-17T08:23:36.426301Z", + "iopub.status.idle": "2024-09-17T08:23:36.456065Z", + "shell.execute_reply": "2024-09-17T08:23:36.455241Z" } }, "outputs": [], @@ -86,10 +86,10 @@ "execution_count": 3, "metadata": { "execution": { - "iopub.execute_input": "2024-09-13T13:21:33.488714Z", - "iopub.status.busy": "2024-09-13T13:21:33.488267Z", - "iopub.status.idle": "2024-09-13T13:21:33.492075Z", - "shell.execute_reply": "2024-09-13T13:21:33.491440Z" + "iopub.execute_input": "2024-09-17T08:23:36.459171Z", + "iopub.status.busy": "2024-09-17T08:23:36.458892Z", + "iopub.status.idle": "2024-09-17T08:23:36.462842Z", + "shell.execute_reply": "2024-09-17T08:23:36.462269Z" } }, "outputs": [], @@ -152,10 +152,10 @@ "execution_count": 4, "metadata": { "execution": { - "iopub.execute_input": "2024-09-13T13:21:33.494612Z", - "iopub.status.busy": "2024-09-13T13:21:33.494290Z", - "iopub.status.idle": "2024-09-13T13:21:33.498174Z", - "shell.execute_reply": "2024-09-13T13:21:33.497510Z" + "iopub.execute_input": "2024-09-17T08:23:36.465415Z", + "iopub.status.busy": "2024-09-17T08:23:36.465054Z", + "iopub.status.idle": "2024-09-17T08:23:36.468979Z", + "shell.execute_reply": "2024-09-17T08:23:36.468412Z" } }, "outputs": [], @@ -183,10 +183,10 @@ "execution_count": 5, "metadata": { "execution": { - "iopub.execute_input": "2024-09-13T13:21:33.500806Z", - "iopub.status.busy": "2024-09-13T13:21:33.500497Z", - "iopub.status.idle": "2024-09-13T13:21:33.504713Z", - "shell.execute_reply": "2024-09-13T13:21:33.504011Z" + "iopub.execute_input": "2024-09-17T08:23:36.471549Z", + "iopub.status.busy": "2024-09-17T08:23:36.471123Z", + "iopub.status.idle": "2024-09-17T08:23:36.475246Z", + "shell.execute_reply": "2024-09-17T08:23:36.474544Z" } }, "outputs": [ @@ -235,10 +235,10 @@ "execution_count": 6, "metadata": { "execution": { - "iopub.execute_input": "2024-09-13T13:21:33.507261Z", - "iopub.status.busy": "2024-09-13T13:21:33.506857Z", - "iopub.status.idle": "2024-09-13T13:21:33.510730Z", - "shell.execute_reply": "2024-09-13T13:21:33.510216Z" + "iopub.execute_input": "2024-09-17T08:23:36.477846Z", + "iopub.status.busy": "2024-09-17T08:23:36.477461Z", + "iopub.status.idle": "2024-09-17T08:23:36.481767Z", + "shell.execute_reply": "2024-09-17T08:23:36.481232Z" } }, "outputs": [], @@ -260,10 +260,10 @@ "execution_count": 7, "metadata": { "execution": { - "iopub.execute_input": "2024-09-13T13:21:33.513274Z", - "iopub.status.busy": "2024-09-13T13:21:33.512910Z", - "iopub.status.idle": "2024-09-13T13:21:33.516532Z", - "shell.execute_reply": "2024-09-13T13:21:33.515882Z" + "iopub.execute_input": "2024-09-17T08:23:36.484393Z", + "iopub.status.busy": "2024-09-17T08:23:36.484008Z", + "iopub.status.idle": "2024-09-17T08:23:36.488074Z", + "shell.execute_reply": "2024-09-17T08:23:36.487354Z" } }, "outputs": [ @@ -297,10 +297,10 @@ "execution_count": 8, "metadata": { "execution": { - "iopub.execute_input": "2024-09-13T13:21:33.519022Z", - "iopub.status.busy": "2024-09-13T13:21:33.518650Z", - "iopub.status.idle": "2024-09-13T13:21:33.526267Z", - "shell.execute_reply": "2024-09-13T13:21:33.525559Z" + "iopub.execute_input": "2024-09-17T08:23:36.490686Z", + "iopub.status.busy": "2024-09-17T08:23:36.490304Z", + "iopub.status.idle": "2024-09-17T08:23:36.497661Z", + "shell.execute_reply": "2024-09-17T08:23:36.496988Z" } }, "outputs": [ @@ -365,10 +365,10 @@ "execution_count": 9, "metadata": { "execution": { - "iopub.execute_input": "2024-09-13T13:21:33.528752Z", - "iopub.status.busy": "2024-09-13T13:21:33.528540Z", - "iopub.status.idle": "2024-09-13T13:21:33.532864Z", - "shell.execute_reply": "2024-09-13T13:21:33.532193Z" + "iopub.execute_input": "2024-09-17T08:23:36.500111Z", + "iopub.status.busy": "2024-09-17T08:23:36.499905Z", + "iopub.status.idle": "2024-09-17T08:23:36.504188Z", + "shell.execute_reply": "2024-09-17T08:23:36.503524Z" } }, "outputs": [ @@ -416,10 +416,10 @@ "execution_count": 10, "metadata": { "execution": { - "iopub.execute_input": "2024-09-13T13:21:33.535416Z", - "iopub.status.busy": "2024-09-13T13:21:33.535212Z", - "iopub.status.idle": "2024-09-13T13:21:33.538729Z", - "shell.execute_reply": "2024-09-13T13:21:33.538088Z" + "iopub.execute_input": "2024-09-17T08:23:36.506664Z", + "iopub.status.busy": "2024-09-17T08:23:36.506463Z", + "iopub.status.idle": "2024-09-17T08:23:36.509864Z", + "shell.execute_reply": "2024-09-17T08:23:36.509225Z" } }, "outputs": [], @@ -441,10 +441,10 @@ "execution_count": 11, "metadata": { "execution": { - "iopub.execute_input": "2024-09-13T13:21:33.541119Z", - "iopub.status.busy": "2024-09-13T13:21:33.540913Z", - "iopub.status.idle": "2024-09-13T13:21:33.544770Z", - "shell.execute_reply": "2024-09-13T13:21:33.544125Z" + "iopub.execute_input": "2024-09-17T08:23:36.512376Z", + "iopub.status.busy": "2024-09-17T08:23:36.511890Z", + "iopub.status.idle": "2024-09-17T08:23:36.515771Z", + "shell.execute_reply": "2024-09-17T08:23:36.515061Z" } }, "outputs": [ @@ -510,10 +510,10 @@ "execution_count": 12, "metadata": { "execution": { - "iopub.execute_input": "2024-09-13T13:21:33.547227Z", - "iopub.status.busy": "2024-09-13T13:21:33.547023Z", - "iopub.status.idle": "2024-09-13T13:21:33.550437Z", - "shell.execute_reply": "2024-09-13T13:21:33.549800Z" + "iopub.execute_input": "2024-09-17T08:23:36.518310Z", + "iopub.status.busy": "2024-09-17T08:23:36.517944Z", + "iopub.status.idle": "2024-09-17T08:23:36.521378Z", + "shell.execute_reply": "2024-09-17T08:23:36.520732Z" } }, "outputs": [ @@ -548,10 +548,10 @@ "execution_count": 13, "metadata": { "execution": { - "iopub.execute_input": "2024-09-13T13:21:33.553036Z", - "iopub.status.busy": "2024-09-13T13:21:33.552669Z", - "iopub.status.idle": "2024-09-13T13:21:33.556212Z", - "shell.execute_reply": "2024-09-13T13:21:33.555593Z" + "iopub.execute_input": "2024-09-17T08:23:36.523901Z", + "iopub.status.busy": "2024-09-17T08:23:36.523520Z", + "iopub.status.idle": "2024-09-17T08:23:36.527108Z", + "shell.execute_reply": "2024-09-17T08:23:36.526478Z" } }, "outputs": [ @@ -584,10 +584,10 @@ "execution_count": 14, "metadata": { "execution": { - "iopub.execute_input": "2024-09-13T13:21:33.558808Z", - "iopub.status.busy": "2024-09-13T13:21:33.558419Z", - "iopub.status.idle": "2024-09-13T13:21:33.562026Z", - "shell.execute_reply": "2024-09-13T13:21:33.561350Z" + "iopub.execute_input": "2024-09-17T08:23:36.529588Z", + "iopub.status.busy": "2024-09-17T08:23:36.529205Z", + "iopub.status.idle": "2024-09-17T08:23:36.533019Z", + "shell.execute_reply": "2024-09-17T08:23:36.532355Z" } }, "outputs": [ @@ -622,10 +622,10 @@ "execution_count": 15, "metadata": { "execution": { - "iopub.execute_input": "2024-09-13T13:21:33.564751Z", - "iopub.status.busy": "2024-09-13T13:21:33.564363Z", - "iopub.status.idle": "2024-09-13T13:21:33.568465Z", - "shell.execute_reply": "2024-09-13T13:21:33.567813Z" + "iopub.execute_input": "2024-09-17T08:23:36.535580Z", + "iopub.status.busy": "2024-09-17T08:23:36.535191Z", + "iopub.status.idle": "2024-09-17T08:23:36.539604Z", + "shell.execute_reply": "2024-09-17T08:23:36.538934Z" } }, "outputs": [ @@ -669,10 +669,10 @@ "execution_count": 16, "metadata": { "execution": { - "iopub.execute_input": "2024-09-13T13:21:33.571108Z", - "iopub.status.busy": "2024-09-13T13:21:33.570714Z", - "iopub.status.idle": "2024-09-13T13:21:33.576347Z", - "shell.execute_reply": "2024-09-13T13:21:33.575666Z" + "iopub.execute_input": "2024-09-17T08:23:36.541963Z", + "iopub.status.busy": "2024-09-17T08:23:36.541758Z", + "iopub.status.idle": "2024-09-17T08:23:36.547167Z", + "shell.execute_reply": "2024-09-17T08:23:36.546452Z" } }, "outputs": [ @@ -733,10 +733,10 @@ "execution_count": 17, "metadata": { "execution": { - "iopub.execute_input": "2024-09-13T13:21:33.578801Z", - "iopub.status.busy": "2024-09-13T13:21:33.578404Z", - "iopub.status.idle": "2024-09-13T13:21:33.581921Z", - "shell.execute_reply": "2024-09-13T13:21:33.581326Z" + "iopub.execute_input": "2024-09-17T08:23:36.549814Z", + "iopub.status.busy": "2024-09-17T08:23:36.549417Z", + "iopub.status.idle": "2024-09-17T08:23:36.553109Z", + "shell.execute_reply": "2024-09-17T08:23:36.552551Z" } }, "outputs": [], @@ -761,10 +761,10 @@ "execution_count": 18, "metadata": { "execution": { - "iopub.execute_input": "2024-09-13T13:21:33.584507Z", - "iopub.status.busy": "2024-09-13T13:21:33.584128Z", - "iopub.status.idle": "2024-09-13T13:21:33.594572Z", - "shell.execute_reply": "2024-09-13T13:21:33.593982Z" + "iopub.execute_input": "2024-09-17T08:23:36.555695Z", + "iopub.status.busy": "2024-09-17T08:23:36.555349Z", + "iopub.status.idle": "2024-09-17T08:23:36.565776Z", + "shell.execute_reply": "2024-09-17T08:23:36.565212Z" } }, "outputs": [], @@ -857,10 +857,10 @@ "execution_count": 19, "metadata": { "execution": { - "iopub.execute_input": "2024-09-13T13:21:33.597259Z", - "iopub.status.busy": "2024-09-13T13:21:33.596843Z", - "iopub.status.idle": "2024-09-13T13:21:33.600516Z", - "shell.execute_reply": "2024-09-13T13:21:33.599867Z" + "iopub.execute_input": "2024-09-17T08:23:36.568201Z", + "iopub.status.busy": "2024-09-17T08:23:36.567875Z", + "iopub.status.idle": "2024-09-17T08:23:36.571721Z", + "shell.execute_reply": "2024-09-17T08:23:36.571041Z" } }, "outputs": [ @@ -897,10 +897,10 @@ "execution_count": 20, "metadata": { "execution": { - "iopub.execute_input": "2024-09-13T13:21:33.603373Z", - "iopub.status.busy": "2024-09-13T13:21:33.602975Z", - "iopub.status.idle": "2024-09-13T13:21:33.608654Z", - "shell.execute_reply": "2024-09-13T13:21:33.607979Z" + "iopub.execute_input": "2024-09-17T08:23:36.574198Z", + "iopub.status.busy": "2024-09-17T08:23:36.573880Z", + "iopub.status.idle": "2024-09-17T08:23:36.579386Z", + "shell.execute_reply": "2024-09-17T08:23:36.578703Z" } }, "outputs": [ diff --git a/.doctrees/nbsphinx/notebooks/nmodl-sympy-conductance.ipynb b/.doctrees/nbsphinx/notebooks/nmodl-sympy-conductance.ipynb index 754327e6f..6286ef398 100644 --- a/.doctrees/nbsphinx/notebooks/nmodl-sympy-conductance.ipynb +++ b/.doctrees/nbsphinx/notebooks/nmodl-sympy-conductance.ipynb @@ -86,10 +86,10 @@ "execution_count": 1, "metadata": { "execution": { - "iopub.execute_input": "2024-09-13T13:21:36.064255Z", - "iopub.status.busy": "2024-09-13T13:21:36.064070Z", - "iopub.status.idle": "2024-09-13T13:21:36.869392Z", - "shell.execute_reply": "2024-09-13T13:21:36.868640Z" + "iopub.execute_input": "2024-09-17T08:23:39.122236Z", + "iopub.status.busy": "2024-09-17T08:23:39.122028Z", + "iopub.status.idle": "2024-09-17T08:23:39.965595Z", + "shell.execute_reply": "2024-09-17T08:23:39.964763Z" } }, "outputs": [], @@ -103,10 +103,10 @@ "execution_count": 2, "metadata": { "execution": { - "iopub.execute_input": "2024-09-13T13:21:36.872445Z", - "iopub.status.busy": "2024-09-13T13:21:36.872230Z", - "iopub.status.idle": "2024-09-13T13:21:36.902732Z", - "shell.execute_reply": "2024-09-13T13:21:36.902044Z" + "iopub.execute_input": "2024-09-17T08:23:39.968917Z", + "iopub.status.busy": "2024-09-17T08:23:39.968486Z", + "iopub.status.idle": "2024-09-17T08:23:40.000203Z", + "shell.execute_reply": "2024-09-17T08:23:39.999483Z" } }, "outputs": [], @@ -149,10 +149,10 @@ "execution_count": 3, "metadata": { "execution": { - "iopub.execute_input": "2024-09-13T13:21:36.905648Z", - "iopub.status.busy": "2024-09-13T13:21:36.905434Z", - "iopub.status.idle": "2024-09-13T13:21:37.189706Z", - "shell.execute_reply": "2024-09-13T13:21:37.188937Z" + "iopub.execute_input": "2024-09-17T08:23:40.003567Z", + "iopub.status.busy": "2024-09-17T08:23:40.003094Z", + "iopub.status.idle": "2024-09-17T08:23:40.298840Z", + "shell.execute_reply": "2024-09-17T08:23:40.298037Z" } }, "outputs": [ @@ -196,10 +196,10 @@ "execution_count": 4, "metadata": { "execution": { - "iopub.execute_input": "2024-09-13T13:21:37.192598Z", - "iopub.status.busy": "2024-09-13T13:21:37.192190Z", - "iopub.status.idle": "2024-09-13T13:21:37.327865Z", - "shell.execute_reply": "2024-09-13T13:21:37.327104Z" + "iopub.execute_input": "2024-09-17T08:23:40.301998Z", + "iopub.status.busy": "2024-09-17T08:23:40.301381Z", + "iopub.status.idle": "2024-09-17T08:23:40.435812Z", + "shell.execute_reply": "2024-09-17T08:23:40.435099Z" } }, "outputs": [ @@ -243,10 +243,10 @@ "execution_count": 5, "metadata": { "execution": { - "iopub.execute_input": "2024-09-13T13:21:37.330816Z", - "iopub.status.busy": "2024-09-13T13:21:37.330349Z", - "iopub.status.idle": "2024-09-13T13:21:37.339408Z", - "shell.execute_reply": "2024-09-13T13:21:37.338686Z" + "iopub.execute_input": "2024-09-17T08:23:40.438455Z", + "iopub.status.busy": "2024-09-17T08:23:40.438231Z", + "iopub.status.idle": "2024-09-17T08:23:40.447042Z", + "shell.execute_reply": "2024-09-17T08:23:40.446310Z" } }, "outputs": [ @@ -290,10 +290,10 @@ "execution_count": 6, "metadata": { "execution": { - "iopub.execute_input": "2024-09-13T13:21:37.342065Z", - "iopub.status.busy": "2024-09-13T13:21:37.341646Z", - "iopub.status.idle": "2024-09-13T13:21:37.361397Z", - "shell.execute_reply": "2024-09-13T13:21:37.360757Z" + "iopub.execute_input": "2024-09-17T08:23:40.449569Z", + "iopub.status.busy": "2024-09-17T08:23:40.449351Z", + "iopub.status.idle": "2024-09-17T08:23:40.469089Z", + "shell.execute_reply": "2024-09-17T08:23:40.468372Z" } }, "outputs": [ @@ -337,10 +337,10 @@ "execution_count": 7, "metadata": { "execution": { - "iopub.execute_input": "2024-09-13T13:21:37.363936Z", - "iopub.status.busy": "2024-09-13T13:21:37.363729Z", - "iopub.status.idle": "2024-09-13T13:21:37.484898Z", - "shell.execute_reply": "2024-09-13T13:21:37.484150Z" + "iopub.execute_input": "2024-09-17T08:23:40.471624Z", + "iopub.status.busy": "2024-09-17T08:23:40.471399Z", + "iopub.status.idle": "2024-09-17T08:23:40.591514Z", + "shell.execute_reply": "2024-09-17T08:23:40.590844Z" } }, "outputs": [ @@ -400,10 +400,10 @@ "execution_count": 8, "metadata": { "execution": { - "iopub.execute_input": "2024-09-13T13:21:37.487819Z", - "iopub.status.busy": "2024-09-13T13:21:37.487375Z", - "iopub.status.idle": "2024-09-13T13:21:37.584427Z", - "shell.execute_reply": "2024-09-13T13:21:37.583709Z" + "iopub.execute_input": "2024-09-17T08:23:40.594242Z", + "iopub.status.busy": "2024-09-17T08:23:40.593984Z", + "iopub.status.idle": "2024-09-17T08:23:40.689767Z", + "shell.execute_reply": "2024-09-17T08:23:40.689058Z" } }, "outputs": [ @@ -456,10 +456,10 @@ "execution_count": 9, "metadata": { "execution": { - "iopub.execute_input": "2024-09-13T13:21:37.587278Z", - "iopub.status.busy": "2024-09-13T13:21:37.586867Z", - "iopub.status.idle": "2024-09-13T13:21:37.663947Z", - "shell.execute_reply": "2024-09-13T13:21:37.663246Z" + "iopub.execute_input": "2024-09-17T08:23:40.692817Z", + "iopub.status.busy": "2024-09-17T08:23:40.692387Z", + "iopub.status.idle": "2024-09-17T08:23:40.767811Z", + "shell.execute_reply": "2024-09-17T08:23:40.767116Z" } }, "outputs": [ diff --git a/.doctrees/nbsphinx/notebooks/nmodl-sympy-solver-cnexp.ipynb b/.doctrees/nbsphinx/notebooks/nmodl-sympy-solver-cnexp.ipynb index 51b8452c2..5bbdfcc25 100644 --- a/.doctrees/nbsphinx/notebooks/nmodl-sympy-solver-cnexp.ipynb +++ b/.doctrees/nbsphinx/notebooks/nmodl-sympy-solver-cnexp.ipynb @@ -62,10 +62,10 @@ "execution_count": 1, "metadata": { "execution": { - "iopub.execute_input": "2024-09-13T13:21:39.671181Z", - "iopub.status.busy": "2024-09-13T13:21:39.671000Z", - "iopub.status.idle": "2024-09-13T13:21:40.471382Z", - "shell.execute_reply": "2024-09-13T13:21:40.470567Z" + "iopub.execute_input": "2024-09-17T08:23:42.560315Z", + "iopub.status.busy": "2024-09-17T08:23:42.559757Z", + "iopub.status.idle": "2024-09-17T08:23:43.380527Z", + "shell.execute_reply": "2024-09-17T08:23:43.379701Z" } }, "outputs": [], @@ -79,10 +79,10 @@ "execution_count": 2, "metadata": { "execution": { - "iopub.execute_input": "2024-09-13T13:21:40.474656Z", - "iopub.status.busy": "2024-09-13T13:21:40.474222Z", - "iopub.status.idle": "2024-09-13T13:21:40.505292Z", - "shell.execute_reply": "2024-09-13T13:21:40.504658Z" + "iopub.execute_input": "2024-09-17T08:23:43.383787Z", + "iopub.status.busy": "2024-09-17T08:23:43.383320Z", + "iopub.status.idle": "2024-09-17T08:23:43.415357Z", + "shell.execute_reply": "2024-09-17T08:23:43.414667Z" } }, "outputs": [], @@ -123,10 +123,10 @@ "execution_count": 3, "metadata": { "execution": { - "iopub.execute_input": "2024-09-13T13:21:40.508246Z", - "iopub.status.busy": "2024-09-13T13:21:40.507747Z", - "iopub.status.idle": "2024-09-13T13:21:40.925418Z", - "shell.execute_reply": "2024-09-13T13:21:40.924708Z" + "iopub.execute_input": "2024-09-17T08:23:43.418506Z", + "iopub.status.busy": "2024-09-17T08:23:43.418148Z", + "iopub.status.idle": "2024-09-17T08:23:43.871967Z", + "shell.execute_reply": "2024-09-17T08:23:43.871204Z" } }, "outputs": [ @@ -165,10 +165,10 @@ "execution_count": 4, "metadata": { "execution": { - "iopub.execute_input": "2024-09-13T13:21:40.928625Z", - "iopub.status.busy": "2024-09-13T13:21:40.928027Z", - "iopub.status.idle": "2024-09-13T13:21:41.054013Z", - "shell.execute_reply": "2024-09-13T13:21:41.053179Z" + "iopub.execute_input": "2024-09-17T08:23:43.874817Z", + "iopub.status.busy": "2024-09-17T08:23:43.874363Z", + "iopub.status.idle": "2024-09-17T08:23:43.987677Z", + "shell.execute_reply": "2024-09-17T08:23:43.986911Z" } }, "outputs": [ @@ -207,10 +207,10 @@ "execution_count": 5, "metadata": { "execution": { - "iopub.execute_input": "2024-09-13T13:21:41.057159Z", - "iopub.status.busy": "2024-09-13T13:21:41.056621Z", - "iopub.status.idle": "2024-09-13T13:21:41.260106Z", - "shell.execute_reply": "2024-09-13T13:21:41.259468Z" + "iopub.execute_input": "2024-09-17T08:23:43.990510Z", + "iopub.status.busy": "2024-09-17T08:23:43.989961Z", + "iopub.status.idle": "2024-09-17T08:23:44.192105Z", + "shell.execute_reply": "2024-09-17T08:23:44.191427Z" } }, "outputs": [ @@ -255,10 +255,10 @@ "execution_count": 6, "metadata": { "execution": { - "iopub.execute_input": "2024-09-13T13:21:41.262658Z", - "iopub.status.busy": "2024-09-13T13:21:41.262454Z", - "iopub.status.idle": "2024-09-13T13:21:41.421672Z", - "shell.execute_reply": "2024-09-13T13:21:41.420961Z" + "iopub.execute_input": "2024-09-17T08:23:44.194808Z", + "iopub.status.busy": "2024-09-17T08:23:44.194402Z", + "iopub.status.idle": "2024-09-17T08:23:44.378232Z", + "shell.execute_reply": "2024-09-17T08:23:44.377387Z" } }, "outputs": [ @@ -303,10 +303,10 @@ "execution_count": 7, "metadata": { "execution": { - "iopub.execute_input": "2024-09-13T13:21:41.424326Z", - "iopub.status.busy": "2024-09-13T13:21:41.424077Z", - "iopub.status.idle": "2024-09-13T13:21:43.163447Z", - "shell.execute_reply": "2024-09-13T13:21:43.162826Z" + "iopub.execute_input": "2024-09-17T08:23:44.381657Z", + "iopub.status.busy": "2024-09-17T08:23:44.381403Z", + "iopub.status.idle": "2024-09-17T08:23:46.164718Z", + "shell.execute_reply": "2024-09-17T08:23:46.164052Z" } }, "outputs": [ @@ -351,10 +351,10 @@ "execution_count": 8, "metadata": { "execution": { - "iopub.execute_input": "2024-09-13T13:21:43.165924Z", - "iopub.status.busy": "2024-09-13T13:21:43.165700Z", - "iopub.status.idle": "2024-09-13T13:21:45.366892Z", - "shell.execute_reply": "2024-09-13T13:21:45.366214Z" + "iopub.execute_input": "2024-09-17T08:23:46.167379Z", + "iopub.status.busy": "2024-09-17T08:23:46.166955Z", + "iopub.status.idle": "2024-09-17T08:23:48.403188Z", + "shell.execute_reply": "2024-09-17T08:23:48.402488Z" } }, "outputs": [ diff --git a/.doctrees/nbsphinx/notebooks/nmodl-sympy-solver-derivimplicit.ipynb b/.doctrees/nbsphinx/notebooks/nmodl-sympy-solver-derivimplicit.ipynb index 1249126e3..5aa1806cb 100644 --- a/.doctrees/nbsphinx/notebooks/nmodl-sympy-solver-derivimplicit.ipynb +++ b/.doctrees/nbsphinx/notebooks/nmodl-sympy-solver-derivimplicit.ipynb @@ -39,10 +39,10 @@ "execution_count": 1, "metadata": { "execution": { - "iopub.execute_input": "2024-09-13T13:21:47.101319Z", - "iopub.status.busy": "2024-09-13T13:21:47.100935Z", - "iopub.status.idle": "2024-09-13T13:21:47.893348Z", - "shell.execute_reply": "2024-09-13T13:21:47.892481Z" + "iopub.execute_input": "2024-09-17T08:23:50.292397Z", + "iopub.status.busy": "2024-09-17T08:23:50.291995Z", + "iopub.status.idle": "2024-09-17T08:23:51.113066Z", + "shell.execute_reply": "2024-09-17T08:23:51.112288Z" } }, "outputs": [], @@ -56,10 +56,10 @@ "execution_count": 2, "metadata": { "execution": { - "iopub.execute_input": "2024-09-13T13:21:47.896641Z", - "iopub.status.busy": "2024-09-13T13:21:47.896423Z", - "iopub.status.idle": "2024-09-13T13:21:47.926430Z", - "shell.execute_reply": "2024-09-13T13:21:47.925795Z" + "iopub.execute_input": "2024-09-17T08:23:51.116270Z", + "iopub.status.busy": "2024-09-17T08:23:51.115998Z", + "iopub.status.idle": "2024-09-17T08:23:51.147749Z", + "shell.execute_reply": "2024-09-17T08:23:51.147051Z" } }, "outputs": [], @@ -100,10 +100,10 @@ "execution_count": 3, "metadata": { "execution": { - "iopub.execute_input": "2024-09-13T13:21:47.929043Z", - "iopub.status.busy": "2024-09-13T13:21:47.928745Z", - "iopub.status.idle": "2024-09-13T13:21:48.418593Z", - "shell.execute_reply": "2024-09-13T13:21:48.417838Z" + "iopub.execute_input": "2024-09-17T08:23:51.150706Z", + "iopub.status.busy": "2024-09-17T08:23:51.150432Z", + "iopub.status.idle": "2024-09-17T08:23:51.651974Z", + "shell.execute_reply": "2024-09-17T08:23:51.651195Z" } }, "outputs": [ @@ -165,10 +165,10 @@ "execution_count": 4, "metadata": { "execution": { - "iopub.execute_input": "2024-09-13T13:21:48.421533Z", - "iopub.status.busy": "2024-09-13T13:21:48.421034Z", - "iopub.status.idle": "2024-09-13T13:21:48.710976Z", - "shell.execute_reply": "2024-09-13T13:21:48.710243Z" + "iopub.execute_input": "2024-09-17T08:23:51.654706Z", + "iopub.status.busy": "2024-09-17T08:23:51.654443Z", + "iopub.status.idle": "2024-09-17T08:23:51.947506Z", + "shell.execute_reply": "2024-09-17T08:23:51.946766Z" } }, "outputs": [ diff --git a/.doctrees/nbsphinx/notebooks/nmodl-sympy-solver-sparse.ipynb b/.doctrees/nbsphinx/notebooks/nmodl-sympy-solver-sparse.ipynb index e4c0e8d87..35ab6c97e 100644 --- a/.doctrees/nbsphinx/notebooks/nmodl-sympy-solver-sparse.ipynb +++ b/.doctrees/nbsphinx/notebooks/nmodl-sympy-solver-sparse.ipynb @@ -39,10 +39,10 @@ "execution_count": 1, "metadata": { "execution": { - "iopub.execute_input": "2024-09-13T13:21:50.049341Z", - "iopub.status.busy": "2024-09-13T13:21:50.049138Z", - "iopub.status.idle": "2024-09-13T13:21:50.836829Z", - "shell.execute_reply": "2024-09-13T13:21:50.835930Z" + "iopub.execute_input": "2024-09-17T08:23:53.457951Z", + "iopub.status.busy": "2024-09-17T08:23:53.457293Z", + "iopub.status.idle": "2024-09-17T08:23:54.271443Z", + "shell.execute_reply": "2024-09-17T08:23:54.270700Z" } }, "outputs": [], @@ -56,10 +56,10 @@ "execution_count": 2, "metadata": { "execution": { - "iopub.execute_input": "2024-09-13T13:21:50.839917Z", - "iopub.status.busy": "2024-09-13T13:21:50.839684Z", - "iopub.status.idle": "2024-09-13T13:21:50.870239Z", - "shell.execute_reply": "2024-09-13T13:21:50.869472Z" + "iopub.execute_input": "2024-09-17T08:23:54.274762Z", + "iopub.status.busy": "2024-09-17T08:23:54.274348Z", + "iopub.status.idle": "2024-09-17T08:23:54.305378Z", + "shell.execute_reply": "2024-09-17T08:23:54.304696Z" } }, "outputs": [], @@ -100,10 +100,10 @@ "execution_count": 3, "metadata": { "execution": { - "iopub.execute_input": "2024-09-13T13:21:50.873051Z", - "iopub.status.busy": "2024-09-13T13:21:50.872724Z", - "iopub.status.idle": "2024-09-13T13:21:51.361587Z", - "shell.execute_reply": "2024-09-13T13:21:51.360941Z" + "iopub.execute_input": "2024-09-17T08:23:54.308622Z", + "iopub.status.busy": "2024-09-17T08:23:54.308195Z", + "iopub.status.idle": "2024-09-17T08:23:54.806569Z", + "shell.execute_reply": "2024-09-17T08:23:54.805871Z" } }, "outputs": [ @@ -165,10 +165,10 @@ "execution_count": 4, "metadata": { "execution": { - "iopub.execute_input": "2024-09-13T13:21:51.364202Z", - "iopub.status.busy": "2024-09-13T13:21:51.363946Z", - "iopub.status.idle": "2024-09-13T13:21:51.669646Z", - "shell.execute_reply": "2024-09-13T13:21:51.669001Z" + "iopub.execute_input": "2024-09-17T08:23:54.809971Z", + "iopub.status.busy": "2024-09-17T08:23:54.809721Z", + "iopub.status.idle": "2024-09-17T08:23:55.117952Z", + "shell.execute_reply": "2024-09-17T08:23:55.117284Z" } }, "outputs": [ diff --git a/doxygen/classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html b/doxygen/classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html index 1e43c7510..9113eadfd 100644 --- a/doxygen/classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html +++ b/doxygen/classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html @@ -1863,7 +1863,7 @@

-

Definition at line 1821 of file codegen_neuron_cpp_visitor.cpp.

+

Definition at line 1819 of file codegen_neuron_cpp_visitor.cpp.

@@ -1890,7 +1890,7 @@

-

Definition at line 1826 of file codegen_neuron_cpp_visitor.cpp.

+

Definition at line 1824 of file codegen_neuron_cpp_visitor.cpp.

@@ -2124,7 +2124,7 @@

Definition at line 1581 of file codegen_neuron_cpp_visitor.cpp.

+

Definition at line 1579 of file codegen_neuron_cpp_visitor.cpp.

@@ -2184,7 +2184,7 @@

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 2143 of file codegen_neuron_cpp_visitor.cpp.

+

Definition at line 2141 of file codegen_neuron_cpp_visitor.cpp.

@@ -2215,7 +2215,7 @@

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 2127 of file codegen_neuron_cpp_visitor.cpp.

+

Definition at line 2125 of file codegen_neuron_cpp_visitor.cpp.

@@ -2253,7 +2253,7 @@

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 2096 of file codegen_neuron_cpp_visitor.cpp.

+

Definition at line 2094 of file codegen_neuron_cpp_visitor.cpp.

@@ -2285,7 +2285,7 @@

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 1971 of file codegen_neuron_cpp_visitor.cpp.

+

Definition at line 1969 of file codegen_neuron_cpp_visitor.cpp.

@@ -2441,7 +2441,7 @@

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 2118 of file codegen_neuron_cpp_visitor.cpp.

+

Definition at line 2116 of file codegen_neuron_cpp_visitor.cpp.

@@ -2489,7 +2489,7 @@

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 1491 of file codegen_neuron_cpp_visitor.cpp.

+

Definition at line 1489 of file codegen_neuron_cpp_visitor.cpp.

@@ -2518,7 +2518,7 @@

Definition at line 2041 of file codegen_neuron_cpp_visitor.cpp.

+

Definition at line 2039 of file codegen_neuron_cpp_visitor.cpp.

@@ -2547,7 +2547,7 @@

Definition at line 952 of file codegen_neuron_cpp_visitor.cpp.

+

Definition at line 950 of file codegen_neuron_cpp_visitor.cpp.

@@ -2578,7 +2578,7 @@

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 965 of file codegen_neuron_cpp_visitor.cpp.

+

Definition at line 963 of file codegen_neuron_cpp_visitor.cpp.

@@ -2609,7 +2609,7 @@

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 2023 of file codegen_neuron_cpp_visitor.cpp.

+

Definition at line 2021 of file codegen_neuron_cpp_visitor.cpp.

@@ -2704,7 +2704,7 @@

Definition at line 1469 of file codegen_neuron_cpp_visitor.cpp.

+

Definition at line 1467 of file codegen_neuron_cpp_visitor.cpp.

@@ -2733,7 +2733,7 @@

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 2166 of file codegen_neuron_cpp_visitor.cpp.

+

Definition at line 2164 of file codegen_neuron_cpp_visitor.cpp.

@@ -2762,7 +2762,7 @@

Definition at line 2033 of file codegen_neuron_cpp_visitor.cpp.

+

Definition at line 2031 of file codegen_neuron_cpp_visitor.cpp.

@@ -2791,7 +2791,7 @@

Definition at line 1333 of file codegen_neuron_cpp_visitor.cpp.

+

Definition at line 1331 of file codegen_neuron_cpp_visitor.cpp.

@@ -2820,7 +2820,7 @@

Definition at line 1398 of file codegen_neuron_cpp_visitor.cpp.

+

Definition at line 1396 of file codegen_neuron_cpp_visitor.cpp.

@@ -2897,7 +2897,7 @@

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 1295 of file codegen_neuron_cpp_visitor.cpp.

+

Definition at line 1293 of file codegen_neuron_cpp_visitor.cpp.

@@ -2929,7 +2929,7 @@

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 1082 of file codegen_neuron_cpp_visitor.cpp.

+

Definition at line 1080 of file codegen_neuron_cpp_visitor.cpp.

@@ -2958,7 +2958,7 @@

Definition at line 2058 of file codegen_neuron_cpp_visitor.cpp.

+

Definition at line 2056 of file codegen_neuron_cpp_visitor.cpp.

@@ -2996,7 +2996,7 @@

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 2209 of file codegen_neuron_cpp_visitor.cpp.

+

Definition at line 2207 of file codegen_neuron_cpp_visitor.cpp.

@@ -3034,7 +3034,7 @@

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 2196 of file codegen_neuron_cpp_visitor.cpp.

+

Definition at line 2194 of file codegen_neuron_cpp_visitor.cpp.

@@ -3063,7 +3063,7 @@

Definition at line 2247 of file codegen_neuron_cpp_visitor.cpp.

+

Definition at line 2245 of file codegen_neuron_cpp_visitor.cpp.

@@ -3128,7 +3128,7 @@

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 2171 of file codegen_neuron_cpp_visitor.cpp.

+

Definition at line 2169 of file codegen_neuron_cpp_visitor.cpp.

@@ -3158,7 +3158,7 @@

Definition at line 1288 of file codegen_neuron_cpp_visitor.cpp.

+

Definition at line 1286 of file codegen_neuron_cpp_visitor.cpp.

@@ -3215,7 +3215,7 @@

Definition at line 1384 of file codegen_neuron_cpp_visitor.cpp.

+

Definition at line 1382 of file codegen_neuron_cpp_visitor.cpp.

@@ -3246,7 +3246,7 @@

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 1634 of file codegen_neuron_cpp_visitor.cpp.

+

Definition at line 1632 of file codegen_neuron_cpp_visitor.cpp.

@@ -3277,7 +3277,7 @@

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 1601 of file codegen_neuron_cpp_visitor.cpp.

+

Definition at line 1599 of file codegen_neuron_cpp_visitor.cpp.

@@ -3309,7 +3309,7 @@

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 1977 of file codegen_neuron_cpp_visitor.cpp.

+

Definition at line 1975 of file codegen_neuron_cpp_visitor.cpp.

@@ -3348,7 +3348,7 @@

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 1866 of file codegen_neuron_cpp_visitor.cpp.

+

Definition at line 1864 of file codegen_neuron_cpp_visitor.cpp.

@@ -3386,7 +3386,7 @@

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 1938 of file codegen_neuron_cpp_visitor.cpp.

+

Definition at line 1936 of file codegen_neuron_cpp_visitor.cpp.

@@ -3418,7 +3418,7 @@

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 1904 of file codegen_neuron_cpp_visitor.cpp.

+

Definition at line 1902 of file codegen_neuron_cpp_visitor.cpp.

@@ -3457,7 +3457,7 @@

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 1848 of file codegen_neuron_cpp_visitor.cpp.

+

Definition at line 1846 of file codegen_neuron_cpp_visitor.cpp.

@@ -3488,7 +3488,7 @@

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 1615 of file codegen_neuron_cpp_visitor.cpp.

+

Definition at line 1613 of file codegen_neuron_cpp_visitor.cpp.

@@ -3524,7 +3524,7 @@

Definition at line 1514 of file codegen_neuron_cpp_visitor.cpp.

+

Definition at line 1512 of file codegen_neuron_cpp_visitor.cpp.

@@ -3553,7 +3553,7 @@

Definition at line 1547 of file codegen_neuron_cpp_visitor.cpp.

+

Definition at line 1545 of file codegen_neuron_cpp_visitor.cpp.

@@ -3585,7 +3585,7 @@

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 1771 of file codegen_neuron_cpp_visitor.cpp.

+

Definition at line 1769 of file codegen_neuron_cpp_visitor.cpp.

@@ -3738,7 +3738,7 @@

Definition at line 1254 of file codegen_neuron_cpp_visitor.cpp.

+

Definition at line 1252 of file codegen_neuron_cpp_visitor.cpp.

@@ -3760,7 +3760,7 @@

Definition at line 1437 of file codegen_neuron_cpp_visitor.cpp.

+

Definition at line 1435 of file codegen_neuron_cpp_visitor.cpp.

@@ -3791,7 +3791,7 @@

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 2106 of file codegen_neuron_cpp_visitor.cpp.

+

Definition at line 2104 of file codegen_neuron_cpp_visitor.cpp.

@@ -4062,7 +4062,7 @@

nmodl::visitor::ConstVisitor.

-

Definition at line 2293 of file codegen_neuron_cpp_visitor.cpp.

+

Definition at line 2291 of file codegen_neuron_cpp_visitor.cpp.

diff --git a/doxygen/codegen__neuron__cpp__visitor_8hpp_source.html b/doxygen/codegen__neuron__cpp__visitor_8hpp_source.html index 5eb7f4e90..f04ca6ac5 100644 --- a/doxygen/codegen__neuron__cpp__visitor_8hpp_source.html +++ b/doxygen/codegen__neuron__cpp__visitor_8hpp_source.html @@ -808,24 +808,24 @@
712 } // namespace nmodl
-
void print_nrn_destructor() override
Print nrn_destructor function definition.
-
void print_callable_preamble_from_prop()
Print the set of common variables from a Prop only.
-
void print_nrn_cur_non_conductance_kernel() override
Print the nrn_cur kernel without NMODL conductance keyword provisions.
+
void print_nrn_destructor() override
Print nrn_destructor function definition.
+
void print_callable_preamble_from_prop()
Print the set of common variables from a Prop only.
+
void print_nrn_cur_non_conductance_kernel() override
Print the nrn_cur kernel without NMODL conductance keyword provisions.
std::string py_function_signature(const std::string &function_or_procedure_name) const
Get the signature of the npy <func_or_proc_name> function.
Helper to represent information about index/int variables.
-
void print_nrn_cur() override
Print nrn_cur / current update function definition.
-
void print_macro_definitions()
Print all NEURON macros.
+
void print_nrn_cur() override
Print nrn_cur / current update function definition.
+
void print_macro_definitions()
Print all NEURON macros.
CodegenCppVisitor(std::string mod_filename, const std::string &output_dir, std::string float_type, const bool optimize_ionvar_copies, std::unique_ptr< nmodl::utils::Blame > blame)
Constructs the C++ code generator visitor.
-
void print_net_event_call(const ast::FunctionCall &node) override
Print call to net_event.
+
void print_net_event_call(const ast::FunctionCall &node) override
Print call to net_event.
void print_neuron_includes()
Print includes from NEURON.
-
void print_nrn_init(bool skip_init_check=true)
Print the nrn_init function definition.
+
void print_nrn_init(bool skip_init_check=true)
Print the nrn_init function definition.
void print_hoc_py_wrapper_function_body(const ast::Block *function_or_procedure_block, InterpreterWrapper wrapper_type)
std::string internal_method_arguments() override
Arguments for functions that are defined and used internally.
-
void print_nrn_alloc() override
Print nrn_alloc function definition.
+
void print_nrn_alloc() override
Print nrn_alloc function definition.
std::string register_mechanism_arguments() const override
Arguments for register_mech or point_register_mech function.
int position_of_int_var(const std::string &name) const override
Determine the position in the data array for a given int variable.
- +
std::string table_thread_function_name() const
Name of the threaded table checking function.
bool optimize_ion_variable_copies() const override
Check if ion variable copies should be avoided.
std::string hoc_function_name(const std::string &function_or_procedure_name) const
All functions and procedures need a hoc <func_or_proc_name> to be available to the HOC interpreter.
@@ -836,20 +836,20 @@
Implement classes for representing symbol table at block and file scope.
std::string backend_name() const override
Name of the code generation backend.
std::string process_verbatim_text(std::string const &text) override
Process a verbatim block for possible variable renaming.
- -
void print_global_param_default_values()
Print global struct with default value of RANGE PARAMETERs.
-
void print_g_unused() const override
Set g_unused (conductance) for NRN_PRCELLSTATE feature.
-
void visit_watch_statement(const ast::WatchStatement &node) override
TODO: Edit for NEURON.
-
void print_net_send_call(const ast::FunctionCall &node) override
Print call to net_send.
-
void print_net_move_call(const ast::FunctionCall &node) override
Print call to net_move.
+ +
void print_global_param_default_values()
Print global struct with default value of RANGE PARAMETERs.
+
void print_g_unused() const override
Set g_unused (conductance) for NRN_PRCELLSTATE feature.
+
void visit_watch_statement(const ast::WatchStatement &node) override
TODO: Edit for NEURON.
+
void print_net_send_call(const ast::FunctionCall &node) override
Print call to net_send.
+
void print_net_move_call(const ast::FunctionCall &node) override
Print call to net_move.
std::string thread_variable_name(const ThreadVariableInfo &var_info, bool use_instance=true) const
Determine the C++ string to print for thread variables.
-
void print_nrn_state() override
Print nrn_state / state update function definition.
-
void print_initial_block(const ast::InitialBlock *node)
Print the initial block.
-
void print_global_function_common_code(BlockType type, const std::string &function_name="") override
Print common code for global functions like nrn_init, nrn_cur and nrn_state.
+
void print_nrn_state() override
Print nrn_state / state update function definition.
+
void print_initial_block(const ast::InitialBlock *node)
Print the initial block.
+
void print_global_function_common_code(BlockType type, const std::string &function_name="") override
Print common code for global functions like nrn_init, nrn_cur and nrn_state.
std::string float_variable_name(const SymbolType &symbol, bool use_instance) const override
Determine the name of a float variable given its symbol.
-
void print_v_unused() const override
Set v_unused (voltage) for NRN_PRCELLSTATE feature.
- +
void print_v_unused() const override
Set v_unused (voltage) for NRN_PRCELLSTATE feature.
+
ParamVector functor_params() override
The parameters of the Newton solver "functor".
Visitor for printing C++ code compatible with legacy api of CoreNEURON
@@ -857,71 +857,71 @@
Represents a INITIAL block in the NMODL.
void print_point_process_function_definitions()
Print POINT_PROCESS related functions Wrap external NEURON functions related to POINT_PROCESS mechani...
Represent WATCH statement in NMODL.
-
void print_neuron_global_variable_declarations()
Print extern declarations for neuron global variables.
+
void print_neuron_global_variable_declarations()
Print extern declarations for neuron global variables.
Represents a BREAKPOINT block in NMODL.
-
void print_nrn_cur_conductance_kernel(const ast::BreakpointBlock &node) override
Print the nrn_cur kernel with NMODL conductance keyword provisions.
+
void print_nrn_cur_conductance_kernel(const ast::BreakpointBlock &node) override
Print the nrn_cur kernel with NMODL conductance keyword provisions.
std::string int_variable_name(const IndexVariableInfo &symbol, const std::string &name, bool use_instance) const override
Determine the name of an int variable given its symbol.
InterpreterWrapper
Enum to switch between HOC and Python wrappers for functions and procedures defined in mechanisms.
-
void print_global_variables_for_hoc() override
Print byte arrays that register scalar and vector variables for hoc interface.
+
void print_global_variables_for_hoc() override
Print byte arrays that register scalar and vector variables for hoc interface.
void print_standard_includes() override
Print standard C/C++ includes.
std::vector< ThreadVariableInfo > codegen_thread_variables
GLOBAL variables in THREADSAFE MOD files that are not read-only are converted to thread variables.
-
void print_mechanism_range_var_structure(bool print_initializers) override
Print the structure that wraps all range and int variables required for the NMODL.
+
void print_mechanism_range_var_structure(bool print_initializers) override
Print the structure that wraps all range and int variables required for the NMODL.
void add_variable_tqitem(std::vector< IndexVariableInfo > &variables) override
Add the variable tqitem during get_int_variables.
Helper class for printing C/C++ code.
std::string hoc_function_signature(const std::string &function_or_procedure_name) const
Get the signature of the hoc <func_or_proc_name> function.
-
void print_thread_variables_structure(bool print_initializers)
Print the data structure used to access thread variables.
-
void print_compute_functions() override
Print all compute functions for every backend.
-
void print_thread_memory_callbacks()
Print thread variable (de-)initialization functions.
-
void print_nrn_cur_kernel(const ast::BreakpointBlock &node) override
Print main body of nrn_cur function.
-
void print_mechanism_register() override
Print the mechanism registration function.
-
void print_nrn_jacob()
Print nrn_jacob function definition.
+
void print_thread_variables_structure(bool print_initializers)
Print the data structure used to access thread variables.
+
void print_compute_functions() override
Print all compute functions for every backend.
+
void print_thread_memory_callbacks()
Print thread variable (de-)initialization functions.
+
void print_nrn_cur_kernel(const ast::BreakpointBlock &node) override
Print main body of nrn_cur function.
+
void print_mechanism_register() override
Print the mechanism registration function.
+
void print_nrn_jacob()
Print nrn_jacob function definition.
Various types to store code generation specific information.
-
void print_fast_imem_calculation() override
Print fast membrane current calculation code.
-
void print_data_structures(bool print_initializers) override
Print all classes.
+
void print_fast_imem_calculation() override
Print fast membrane current calculation code.
+
void print_data_structures(bool print_initializers) override
Print all classes.
void print_sdlists_init(bool print_initializers) override
const std::string external_method_arguments() noexcept override
Arguments for external functions called from generated code.
std::string py_function_name(const std::string &function_or_procedure_name) const
In non POINT_PROCESS mechanisms all functions and procedures need a py <func_or_proc_name> to be avai...
size_t offset
The global variables ahead of this one require offset doubles to store.
-
void print_node_data_structure(bool print_initializers)
Print the structure that wraps all node variables required for the NMODL.
+
void print_node_data_structure(bool print_initializers)
Print the structure that wraps all node variables required for the NMODL.
-
void print_make_instance() const
Print make_*_instance.
+
void print_make_instance() const
Print make_*_instance.
void print_atomic_reduction_pragma() override
Print atomic update pragma for reduction statements.
void print_setdata_functions()
Print NEURON functions related to setting global variables of the mechanism.
std::string get_name(const std::shared_ptr< symtab::Symbol > &sym)
Represents ion write statement during code generation.
-
void print_mechanism_variables_macros()
Print mechanism variables' related macros.
+
void print_mechanism_variables_macros()
Print mechanism variables' related macros.
Visitor for printing C++ code compatible with legacy api of NEURON
-
void print_nrn_constructor() override
Print nrn_constructor function definition.
+
void print_nrn_constructor() override
Print nrn_constructor function definition.
void print_check_table_function_prototypes()
Print all check_* function declarations.
Implement logger based on spdlog library.
parser::NmodlParser::symbol_type SymbolType
Definition: main_nmodl.cpp:33
BlockType
Helper to represent various block types.
size_t index
There index global variables ahead of this one.
-
void print_headers_include() override
Print all includes.
+
void print_headers_include() override
Print all includes.
const ParamVector external_method_parameters(bool table=false) noexcept override
Parameters for functions in generated code that are called back from external code.
void print_function_or_procedure(const ast::Block &node, const std::string &name, const std::unordered_set< CppObjectSpecifier > &specifiers={ CppObjectSpecifier::Inline}) override
Print nmodl function or procedure (common code)
const std::shared_ptr< symtab::Symbol > symbol
-
void print_nrn_current(const ast::BreakpointBlock &node) override
Print the nrn_current kernel.
+
void print_nrn_current(const ast::BreakpointBlock &node) override
Print the nrn_current kernel.
int position_of_float_var(const std::string &name) const override
Determine the position in the data array for a given float variable.
std::string get_variable_name(const std::string &name, bool use_instance=true) const override
Determine variable name in the structure of mechanism properties.
Visitor for printing C++ code compatible with legacy api of CoreNEURON
-
void print_make_node_data() const
Print make_*_node_data.
+
void print_make_node_data() const
Print make_*_node_data.
std::string simulator_name() override
Name of the simulator the code was generated for.
void print_function_procedure_helper(const ast::Block &node) override
Common helper function to help printing function or procedure blocks.
void add_variable_point_process(std::vector< IndexVariableInfo > &variables) override
Add the variable point_process during get_int_variables.
std::string nrn_thread_arguments() const override
Arguments for "_threadargs_" macro in neuron implementation.
void print_net_receive_registration()
Print code to register the call-back for the NET_RECEIVE block.
-
void print_codegen_routines() override
Print entry point to code generation.
+
void print_codegen_routines() override
Print entry point to code generation.
void append_conc_write_statements(std::vector< ShadowUseStatement > &statements, const Ion &ion, const std::string &concentration) override
Generate Function call statement for nrn_wrote_conc.
ParamVector internal_method_parameters() override
Parameters for internally defined functions.
-
void print_net_receive()
Print net_receive call-back.
+
void print_net_receive()
Print net_receive call-back.
void print_function_prototypes() override
Print function and procedures prototype declaration.
void print_mechanism_global_var_structure(bool print_initializers) override
Print the structure that wraps all global variables used in the NMODL.
std::string namespace_name() override
Name of "our" namespace.
-
void print_global_macros()
Print NEURON global variable macros.
+
void print_global_macros()
Print NEURON global variable macros.
std::vector< std::tuple< std::string, std::string, std::string, std::string > > ParamVector
A vector of parameters represented by a 4-tuple of strings:
Concrete visitor for all AST classes.
diff --git a/doxygen/namespacenmodl_1_1codegen.html b/doxygen/namespacenmodl_1_1codegen.html index 5b3712de9..ca9de6c38 100644 --- a/doxygen/namespacenmodl_1_1codegen.html +++ b/doxygen/namespacenmodl_1_1codegen.html @@ -374,7 +374,7 @@

x[id] = _args[1];

So, the R in AST needs to be renamed with _args[1].

-

Definition at line 2232 of file codegen_neuron_cpp_visitor.cpp.

+

Definition at line 2230 of file codegen_neuron_cpp_visitor.cpp.

diff --git a/doxygen/src_2codegen_2codegen__neuron__cpp__visitor_8cpp_source.html b/doxygen/src_2codegen_2codegen__neuron__cpp__visitor_8cpp_source.html index 52f7ed6d7..97ead3f8d 100644 --- a/doxygen/src_2codegen_2codegen__neuron__cpp__visitor_8cpp_source.html +++ b/doxygen/src_2codegen_2codegen__neuron__cpp__visitor_8cpp_source.html @@ -1022,1405 +1022,1403 @@
926  }
927  }
928 
-
929 
-
930  // for (const auto& f: info.function_tables) {
-
931  if (!info.function_tables.empty()) {
-
932  throw std::runtime_error("Not implemented, global function tables.");
-
933  }
-
934 
-
935  if (info.vectorize && info.thread_data_index) {
-
936  // TODO compare CoreNEURON something extcall stuff.
-
937  // throw std::runtime_error("Not implemented, global vectorize something else.");
-
938  }
-
939 
-
940  if (info.diam_used) {
-
941  printer->fmt_line("Symbol* _morphology_sym;");
-
942  }
+
929  if (!info.function_tables.empty()) {
+
930  throw std::runtime_error("Not implemented, global function tables.");
+
931  }
+
932 
+
933  if (info.vectorize && info.thread_data_index) {
+
934  // TODO compare CoreNEURON something extcall stuff.
+
935  // throw std::runtime_error("Not implemented, global vectorize something else.");
+
936  }
+
937 
+
938  if (info.diam_used) {
+
939  printer->fmt_line("Symbol* _morphology_sym;");
+
940  }
+
941 
+
942  printer->pop_block(";");
943 
-
944  printer->pop_block(";");
-
945 
-
946  print_global_var_struct_assertions();
-
947  print_global_var_struct_decl();
-
948 
-
949  print_global_param_default_values();
-
950 }
-
951 
- -
953  printer->push_block("static std::vector<double> _parameter_defaults =");
-
954 
-
955  std::vector<std::string> defaults;
-
956  for (const auto& p: info.range_parameter_vars) {
-
957  double value = p->get_value() == nullptr ? 0.0 : *p->get_value();
-
958  defaults.push_back(fmt::format("{:g} /* {} */", value, p->get_name()));
-
959  }
-
960 
-
961  printer->add_multi_line(fmt::format("{}", fmt::join(defaults, ",\n")));
-
962  printer->pop_block(";");
-
963 }
-
964 
- -
966  auto variable_printer = [&](const std::vector<SymbolType>& variables, bool if_array) {
-
967  for (const auto& variable: variables) {
-
968  if (variable->is_array() == if_array) {
-
969  // false => do not use the instance struct, which is not
-
970  // defined in the global declaration that we are printing
-
971  auto name = get_variable_name(variable->get_name(), false);
-
972  auto ename = add_escape_quote(variable->get_name() + "_" + info.mod_suffix);
-
973  if (if_array) {
-
974  auto length = variable->get_length();
-
975  printer->fmt_line("{{{}, {}, {}}},", ename, name, length);
-
976  } else {
-
977  printer->fmt_line("{{{}, &{}}},", ename, name);
-
978  }
-
979  }
-
980  }
-
981  };
-
982 
-
983  auto globals = info.global_variables;
-
984  auto thread_vars = info.thread_variables;
-
985 
-
986  if (info.table_count > 0) {
-
987  globals.push_back(make_symbol(naming::USE_TABLE_VARIABLE));
-
988  }
-
989 
-
990  printer->add_newline(2);
-
991  printer->add_line("/** connect global (scalar) variables to hoc -- */");
-
992  printer->add_line("static DoubScal hoc_scalar_double[] = {");
-
993  printer->increase_indent();
-
994  variable_printer(globals, false);
-
995  variable_printer(thread_vars, false);
-
996  printer->add_line("{nullptr, nullptr}");
-
997  printer->decrease_indent();
-
998  printer->add_line("};");
-
999 
-
1000  printer->add_newline(2);
-
1001  printer->add_line("/** connect global (array) variables to hoc -- */");
-
1002  printer->add_line("static DoubVec hoc_vector_double[] = {");
-
1003  printer->increase_indent();
-
1004  variable_printer(globals, true);
-
1005  variable_printer(thread_vars, true);
-
1006  printer->add_line("{nullptr, nullptr, 0}");
-
1007  printer->decrease_indent();
-
1008  printer->add_line("};");
-
1009 
-
1010  printer->add_newline(2);
-
1011  printer->add_line("/* declaration of user functions */");
-
1012  for (const auto& procedure: info.procedures) {
-
1013  const auto proc_name = procedure->get_node_name();
-
1014  printer->fmt_line("{};", hoc_function_signature(proc_name));
-
1015  }
-
1016  for (const auto& function: info.functions) {
-
1017  const auto func_name = function->get_node_name();
-
1018  printer->fmt_line("{};", hoc_function_signature(func_name));
-
1019  }
-
1020  if (!info.point_process) {
-
1021  for (const auto& procedure: info.procedures) {
-
1022  const auto proc_name = procedure->get_node_name();
-
1023  printer->fmt_line("{};", py_function_signature(proc_name));
-
1024  }
-
1025  for (const auto& function: info.functions) {
-
1026  const auto func_name = function->get_node_name();
-
1027  printer->fmt_line("{};", py_function_signature(func_name));
-
1028  }
-
1029  }
-
1030 
-
1031  printer->add_newline(2);
-
1032  printer->add_line("/* connect user functions to hoc names */");
-
1033  printer->add_line("static VoidFunc hoc_intfunc[] = {");
-
1034  printer->increase_indent();
-
1035  if (info.point_process) {
-
1036  printer->add_line("{0, 0}");
-
1037  printer->decrease_indent();
-
1038  printer->add_line("};");
-
1039  printer->add_line("static Member_func _member_func[] = {");
-
1040  printer->increase_indent();
-
1041  printer->add_multi_line(R"CODE(
-
1042  {"loc", _hoc_loc_pnt},
-
1043  {"has_loc", _hoc_has_loc},
-
1044  {"get_loc", _hoc_get_loc_pnt},)CODE");
-
1045  } else {
-
1046  printer->fmt_line("{{\"setdata_{}\", _hoc_setdata}},", info.mod_suffix);
-
1047  }
-
1048 
-
1049  for (const auto& procedure: info.procedures) {
-
1050  const auto proc_name = procedure->get_node_name();
-
1051  printer->fmt_line("{{\"{}{}\", {}}},",
-
1052  proc_name,
-
1053  info.rsuffix,
-
1054  hoc_function_name(proc_name));
-
1055  }
-
1056  for (const auto& function: info.functions) {
-
1057  const auto func_name = function->get_node_name();
-
1058  printer->fmt_line("{{\"{}{}\", {}}},",
-
1059  func_name,
-
1060  info.rsuffix,
-
1061  hoc_function_name(func_name));
-
1062  }
-
1063 
-
1064  printer->add_line("{nullptr, nullptr}");
-
1065  printer->decrease_indent();
-
1066  printer->add_line("};");
-
1067  if (!info.point_process) {
-
1068  printer->push_block("static NPyDirectMechFunc npy_direct_func_proc[] =");
-
1069  for (const auto& procedure: info.procedures) {
-
1070  const auto proc_name = procedure->get_node_name();
-
1071  printer->fmt_line("{{\"{}\", {}}},", proc_name, py_function_name(proc_name));
-
1072  }
-
1073  for (const auto& function: info.functions) {
-
1074  const auto func_name = function->get_node_name();
-
1075  printer->fmt_line("{{\"{}\", {}}},", func_name, py_function_name(func_name));
-
1076  }
-
1077  printer->add_line("{nullptr, nullptr}");
-
1078  printer->pop_block(";");
-
1079  }
-
1080 }
-
1081 
- -
1083  printer->add_newline(2);
-
1084  printer->add_line("/** register channel with the simulator */");
-
1085  printer->fmt_push_block("extern \"C\" void _{}_reg()", info.mod_file);
-
1086  printer->add_line("_initlists();");
-
1087  printer->add_newline();
-
1088 
-
1089  for (const auto& ion: info.ions) {
-
1090  double valence = ion.valence.value_or(-10000.0);
-
1091  printer->fmt_line("ion_reg(\"{}\", {});", ion.name, valence);
-
1092  }
-
1093  if (!info.ions.empty()) {
-
1094  printer->add_newline();
-
1095  }
-
1096 
-
1097  for (const auto& ion: info.ions) {
-
1098  printer->fmt_line("_{0}_sym = hoc_lookup(\"{0}_ion\");", ion.name);
-
1099  }
-
1100  if (!info.ions.empty()) {
-
1101  printer->add_newline();
-
1102  }
-
1103 
-
1104  const auto compute_functions_parameters =
-
1105  breakpoint_exist()
-
1106  ? fmt::format("{}, {}, {}",
-
1107  nrn_cur_required() ? method_name(naming::NRN_CUR_METHOD) : "nullptr",
-
1108  method_name(naming::NRN_JACOB_METHOD),
-
1109  nrn_state_required() ? method_name(naming::NRN_STATE_METHOD) : "nullptr")
-
1110  : "nullptr, nullptr, nullptr";
-
1111  const auto register_mech_args = fmt::format("{}, {}, {}, {}, {}, {}",
-
1112  get_channel_info_var_name(),
-
1113  method_name(naming::NRN_ALLOC_METHOD),
-
1114  compute_functions_parameters,
-
1115  method_name(naming::NRN_INIT_METHOD),
- -
1117  1 + info.thread_data_index);
-
1118  if (info.point_process) {
-
1119  printer->fmt_line(
-
1120  "_pointtype = point_register_mech({}, _hoc_create_pnt, _hoc_destroy_pnt, "
-
1121  "_member_func);",
-
1122  register_mech_args);
-
1123 
-
1124  if (info.destructor_node) {
-
1125  printer->fmt_line("register_destructor({});",
-
1126  method_name(naming::NRN_DESTRUCTOR_METHOD));
-
1127  }
-
1128  } else {
-
1129  printer->fmt_line("register_mech({});", register_mech_args);
-
1130  }
-
1131 
-
1132 
-
1133  if (info.thread_callback_register) {
-
1134  printer->fmt_line("_extcall_thread.resize({});", info.thread_data_index + 1);
-
1135  printer->fmt_line("thread_mem_init(_extcall_thread.data());");
-
1136  printer->fmt_line("{} = 0;", get_variable_name("thread_data_in_use", false));
-
1137  }
-
1138 
-
1139 
-
1140  /// type related information
-
1141  printer->add_newline();
-
1142  printer->fmt_line("mech_type = nrn_get_mechtype({}[1]);", get_channel_info_var_name());
+
944  print_global_var_struct_assertions();
+
945  print_global_var_struct_decl();
+
946 
+
947  print_global_param_default_values();
+
948 }
+
949 
+ +
951  printer->push_block("static std::vector<double> _parameter_defaults =");
+
952 
+
953  std::vector<std::string> defaults;
+
954  for (const auto& p: info.range_parameter_vars) {
+
955  double value = p->get_value() == nullptr ? 0.0 : *p->get_value();
+
956  defaults.push_back(fmt::format("{:g} /* {} */", value, p->get_name()));
+
957  }
+
958 
+
959  printer->add_multi_line(fmt::format("{}", fmt::join(defaults, ",\n")));
+
960  printer->pop_block(";");
+
961 }
+
962 
+ +
964  auto variable_printer = [&](const std::vector<SymbolType>& variables, bool if_array) {
+
965  for (const auto& variable: variables) {
+
966  if (variable->is_array() == if_array) {
+
967  // false => do not use the instance struct, which is not
+
968  // defined in the global declaration that we are printing
+
969  auto name = get_variable_name(variable->get_name(), false);
+
970  auto ename = add_escape_quote(variable->get_name() + "_" + info.mod_suffix);
+
971  if (if_array) {
+
972  auto length = variable->get_length();
+
973  printer->fmt_line("{{{}, {}, {}}},", ename, name, length);
+
974  } else {
+
975  printer->fmt_line("{{{}, &{}}},", ename, name);
+
976  }
+
977  }
+
978  }
+
979  };
+
980 
+
981  auto globals = info.global_variables;
+
982  auto thread_vars = info.thread_variables;
+
983 
+
984  if (info.table_count > 0) {
+
985  globals.push_back(make_symbol(naming::USE_TABLE_VARIABLE));
+
986  }
+
987 
+
988  printer->add_newline(2);
+
989  printer->add_line("/** connect global (scalar) variables to hoc -- */");
+
990  printer->add_line("static DoubScal hoc_scalar_double[] = {");
+
991  printer->increase_indent();
+
992  variable_printer(globals, false);
+
993  variable_printer(thread_vars, false);
+
994  printer->add_line("{nullptr, nullptr}");
+
995  printer->decrease_indent();
+
996  printer->add_line("};");
+
997 
+
998  printer->add_newline(2);
+
999  printer->add_line("/** connect global (array) variables to hoc -- */");
+
1000  printer->add_line("static DoubVec hoc_vector_double[] = {");
+
1001  printer->increase_indent();
+
1002  variable_printer(globals, true);
+
1003  variable_printer(thread_vars, true);
+
1004  printer->add_line("{nullptr, nullptr, 0}");
+
1005  printer->decrease_indent();
+
1006  printer->add_line("};");
+
1007 
+
1008  printer->add_newline(2);
+
1009  printer->add_line("/* declaration of user functions */");
+
1010  for (const auto& procedure: info.procedures) {
+
1011  const auto proc_name = procedure->get_node_name();
+
1012  printer->fmt_line("{};", hoc_function_signature(proc_name));
+
1013  }
+
1014  for (const auto& function: info.functions) {
+
1015  const auto func_name = function->get_node_name();
+
1016  printer->fmt_line("{};", hoc_function_signature(func_name));
+
1017  }
+
1018  if (!info.point_process) {
+
1019  for (const auto& procedure: info.procedures) {
+
1020  const auto proc_name = procedure->get_node_name();
+
1021  printer->fmt_line("{};", py_function_signature(proc_name));
+
1022  }
+
1023  for (const auto& function: info.functions) {
+
1024  const auto func_name = function->get_node_name();
+
1025  printer->fmt_line("{};", py_function_signature(func_name));
+
1026  }
+
1027  }
+
1028 
+
1029  printer->add_newline(2);
+
1030  printer->add_line("/* connect user functions to hoc names */");
+
1031  printer->add_line("static VoidFunc hoc_intfunc[] = {");
+
1032  printer->increase_indent();
+
1033  if (info.point_process) {
+
1034  printer->add_line("{0, 0}");
+
1035  printer->decrease_indent();
+
1036  printer->add_line("};");
+
1037  printer->add_line("static Member_func _member_func[] = {");
+
1038  printer->increase_indent();
+
1039  printer->add_multi_line(R"CODE(
+
1040  {"loc", _hoc_loc_pnt},
+
1041  {"has_loc", _hoc_has_loc},
+
1042  {"get_loc", _hoc_get_loc_pnt},)CODE");
+
1043  } else {
+
1044  printer->fmt_line("{{\"setdata_{}\", _hoc_setdata}},", info.mod_suffix);
+
1045  }
+
1046 
+
1047  for (const auto& procedure: info.procedures) {
+
1048  const auto proc_name = procedure->get_node_name();
+
1049  printer->fmt_line("{{\"{}{}\", {}}},",
+
1050  proc_name,
+
1051  info.rsuffix,
+
1052  hoc_function_name(proc_name));
+
1053  }
+
1054  for (const auto& function: info.functions) {
+
1055  const auto func_name = function->get_node_name();
+
1056  printer->fmt_line("{{\"{}{}\", {}}},",
+
1057  func_name,
+
1058  info.rsuffix,
+
1059  hoc_function_name(func_name));
+
1060  }
+
1061 
+
1062  printer->add_line("{nullptr, nullptr}");
+
1063  printer->decrease_indent();
+
1064  printer->add_line("};");
+
1065  if (!info.point_process) {
+
1066  printer->push_block("static NPyDirectMechFunc npy_direct_func_proc[] =");
+
1067  for (const auto& procedure: info.procedures) {
+
1068  const auto proc_name = procedure->get_node_name();
+
1069  printer->fmt_line("{{\"{}\", {}}},", proc_name, py_function_name(proc_name));
+
1070  }
+
1071  for (const auto& function: info.functions) {
+
1072  const auto func_name = function->get_node_name();
+
1073  printer->fmt_line("{{\"{}\", {}}},", func_name, py_function_name(func_name));
+
1074  }
+
1075  printer->add_line("{nullptr, nullptr}");
+
1076  printer->pop_block(";");
+
1077  }
+
1078 }
+
1079 
+ +
1081  printer->add_newline(2);
+
1082  printer->add_line("/** register channel with the simulator */");
+
1083  printer->fmt_push_block("extern \"C\" void _{}_reg()", info.mod_file);
+
1084  printer->add_line("_initlists();");
+
1085  printer->add_newline();
+
1086 
+
1087  for (const auto& ion: info.ions) {
+
1088  double valence = ion.valence.value_or(-10000.0);
+
1089  printer->fmt_line("ion_reg(\"{}\", {});", ion.name, valence);
+
1090  }
+
1091  if (!info.ions.empty()) {
+
1092  printer->add_newline();
+
1093  }
+
1094 
+
1095  for (const auto& ion: info.ions) {
+
1096  printer->fmt_line("_{0}_sym = hoc_lookup(\"{0}_ion\");", ion.name);
+
1097  }
+
1098  if (!info.ions.empty()) {
+
1099  printer->add_newline();
+
1100  }
+
1101 
+
1102  const auto compute_functions_parameters =
+
1103  breakpoint_exist()
+
1104  ? fmt::format("{}, {}, {}",
+
1105  nrn_cur_required() ? method_name(naming::NRN_CUR_METHOD) : "nullptr",
+
1106  method_name(naming::NRN_JACOB_METHOD),
+
1107  nrn_state_required() ? method_name(naming::NRN_STATE_METHOD) : "nullptr")
+
1108  : "nullptr, nullptr, nullptr";
+
1109  const auto register_mech_args = fmt::format("{}, {}, {}, {}, {}, {}",
+
1110  get_channel_info_var_name(),
+
1111  method_name(naming::NRN_ALLOC_METHOD),
+
1112  compute_functions_parameters,
+
1113  method_name(naming::NRN_INIT_METHOD),
+ +
1115  1 + info.thread_data_index);
+
1116  if (info.point_process) {
+
1117  printer->fmt_line(
+
1118  "_pointtype = point_register_mech({}, _hoc_create_pnt, _hoc_destroy_pnt, "
+
1119  "_member_func);",
+
1120  register_mech_args);
+
1121 
+
1122  if (info.destructor_node) {
+
1123  printer->fmt_line("register_destructor({});",
+
1124  method_name(naming::NRN_DESTRUCTOR_METHOD));
+
1125  }
+
1126  } else {
+
1127  printer->fmt_line("register_mech({});", register_mech_args);
+
1128  }
+
1129 
+
1130 
+
1131  if (info.thread_callback_register) {
+
1132  printer->fmt_line("_extcall_thread.resize({});", info.thread_data_index + 1);
+
1133  printer->fmt_line("thread_mem_init(_extcall_thread.data());");
+
1134  printer->fmt_line("{} = 0;", get_variable_name("thread_data_in_use", false));
+
1135  }
+
1136 
+
1137 
+
1138  /// type related information
+
1139  printer->add_newline();
+
1140  printer->fmt_line("mech_type = nrn_get_mechtype({}[1]);", get_channel_info_var_name());
+
1141 
+
1142  printer->add_line("hoc_register_parm_default(mech_type, &_parameter_defaults);");
1143 
-
1144  printer->add_line("hoc_register_parm_default(mech_type, &_parameter_defaults);");
-
1145 
-
1146  // register the table-checking function
-
1147  if (info.table_count > 0) {
-
1148  printer->fmt_line("_nrn_thread_table_reg(mech_type, {});", table_thread_function_name());
-
1149  }
-
1150 
-
1151  printer->add_line("_nrn_mechanism_register_data_fields(mech_type,");
-
1152  printer->increase_indent();
-
1153 
-
1154  const auto codegen_float_variables_size = codegen_float_variables.size();
-
1155  std::vector<std::string> mech_register_args;
-
1156 
-
1157  for (int i = 0; i < codegen_float_variables_size; ++i) {
-
1158  const auto& float_var = codegen_float_variables[i];
-
1159  if (float_var->is_array()) {
-
1160  mech_register_args.push_back(
-
1161  fmt::format("_nrn_mechanism_field<double>{{\"{}\", {}}} /* {} */",
-
1162  float_var->get_name(),
-
1163  float_var->get_length(),
-
1164  i));
-
1165  } else {
-
1166  mech_register_args.push_back(fmt::format(
-
1167  "_nrn_mechanism_field<double>{{\"{}\"}} /* {} */", float_var->get_name(), i));
-
1168  }
-
1169  }
-
1170 
-
1171  const auto codegen_int_variables_size = codegen_int_variables.size();
-
1172  for (int i = 0; i < codegen_int_variables_size; ++i) {
-
1173  const auto& int_var = codegen_int_variables[i];
-
1174  const auto& name = int_var.symbol->get_name();
-
1175  if (i != info.semantics[i].index) {
-
1176  throw std::runtime_error("Broken logic.");
-
1177  }
-
1178 
-
1179  auto type = "double*";
-
1180  if (name == naming::POINT_PROCESS_VARIABLE) {
-
1181  type = "Point_process*";
-
1182  } else if (name == naming::TQITEM_VARIABLE) {
-
1183  type = "void*";
-
1184  } else if (stringutils::starts_with(name, "style_") &&
-
1185  stringutils::starts_with(info.semantics[i].name, "#") &&
-
1186  stringutils::ends_with(info.semantics[i].name, "_ion")) {
-
1187  type = "int*";
-
1188  }
-
1189 
-
1190  mech_register_args.push_back(
-
1191  fmt::format("_nrn_mechanism_field<{}>{{\"{}\", \"{}\"}} /* {} */",
-
1192  type,
-
1193  name,
-
1194  info.semantics[i].name,
-
1195  i));
-
1196  }
+
1144  // register the table-checking function
+
1145  if (info.table_count > 0) {
+
1146  printer->fmt_line("_nrn_thread_table_reg(mech_type, {});", table_thread_function_name());
+
1147  }
+
1148 
+
1149  printer->add_line("_nrn_mechanism_register_data_fields(mech_type,");
+
1150  printer->increase_indent();
+
1151 
+
1152  const auto codegen_float_variables_size = codegen_float_variables.size();
+
1153  std::vector<std::string> mech_register_args;
+
1154 
+
1155  for (int i = 0; i < codegen_float_variables_size; ++i) {
+
1156  const auto& float_var = codegen_float_variables[i];
+
1157  if (float_var->is_array()) {
+
1158  mech_register_args.push_back(
+
1159  fmt::format("_nrn_mechanism_field<double>{{\"{}\", {}}} /* {} */",
+
1160  float_var->get_name(),
+
1161  float_var->get_length(),
+
1162  i));
+
1163  } else {
+
1164  mech_register_args.push_back(fmt::format(
+
1165  "_nrn_mechanism_field<double>{{\"{}\"}} /* {} */", float_var->get_name(), i));
+
1166  }
+
1167  }
+
1168 
+
1169  const auto codegen_int_variables_size = codegen_int_variables.size();
+
1170  for (int i = 0; i < codegen_int_variables_size; ++i) {
+
1171  const auto& int_var = codegen_int_variables[i];
+
1172  const auto& name = int_var.symbol->get_name();
+
1173  if (i != info.semantics[i].index) {
+
1174  throw std::runtime_error("Broken logic.");
+
1175  }
+
1176 
+
1177  auto type = "double*";
+
1178  if (name == naming::POINT_PROCESS_VARIABLE) {
+
1179  type = "Point_process*";
+
1180  } else if (name == naming::TQITEM_VARIABLE) {
+
1181  type = "void*";
+
1182  } else if (stringutils::starts_with(name, "style_") &&
+
1183  stringutils::starts_with(info.semantics[i].name, "#") &&
+
1184  stringutils::ends_with(info.semantics[i].name, "_ion")) {
+
1185  type = "int*";
+
1186  }
+
1187 
+
1188  mech_register_args.push_back(
+
1189  fmt::format("_nrn_mechanism_field<{}>{{\"{}\", \"{}\"}} /* {} */",
+
1190  type,
+
1191  name,
+
1192  info.semantics[i].name,
+
1193  i));
+
1194  }
+
1195 
+
1196  printer->add_multi_line(fmt::format("{}", fmt::join(mech_register_args, ",\n")));
1197 
-
1198  printer->add_multi_line(fmt::format("{}", fmt::join(mech_register_args, ",\n")));
-
1199 
-
1200  printer->decrease_indent();
-
1201  printer->add_line(");");
-
1202  printer->add_newline();
-
1203 
-
1204 
-
1205  printer->fmt_line("hoc_register_prop_size(mech_type, {}, {});",
-
1206  float_variables_size(),
-
1207  int_variables_size());
-
1208 
-
1209  for (int i = 0; i < codegen_int_variables_size; ++i) {
-
1210  if (i != info.semantics[i].index) {
-
1211  throw std::runtime_error("Broken logic.");
-
1212  }
-
1213 
-
1214  printer->fmt_line("hoc_register_dparam_semantics(mech_type, {}, \"{}\");",
-
1215  i,
-
1216  info.semantics[i].name);
-
1217  }
-
1218 
-
1219  if (info.write_concentration) {
-
1220  printer->fmt_line("nrn_writes_conc(mech_type, 0);");
-
1221  }
-
1222 
-
1223  if (info.artificial_cell) {
-
1224  printer->fmt_line("add_nrn_artcell(mech_type, {});", info.tqitem_index);
-
1225  }
-
1226 
-
1227  if (info.net_event_used) {
-
1228  printer->fmt_line("add_nrn_has_net_event(mech_type);");
-
1229  }
-
1230 
-
1231  printer->add_line("hoc_register_var(hoc_scalar_double, hoc_vector_double, hoc_intfunc);");
-
1232  if (!info.point_process) {
-
1233  printer->add_line("hoc_register_npy_direct(mech_type, npy_direct_func_proc);");
-
1234  }
-
1235  if (info.net_receive_node) {
-
1236  printer->fmt_line("pnt_receive[mech_type] = nrn_net_receive_{};", info.mod_suffix);
-
1237  printer->fmt_line("pnt_receive_size[mech_type] = {};", info.num_net_receive_parameters);
-
1238  }
-
1239 
-
1240  if (info.thread_callback_register) {
-
1241  printer->add_line("_nrn_thread_reg(mech_type, 1, thread_mem_init);");
-
1242  printer->add_line("_nrn_thread_reg(mech_type, 0, thread_mem_cleanup);");
-
1243  }
-
1244 
-
1245  if (info.diam_used) {
-
1246  printer->fmt_line("{}._morphology_sym = hoc_lookup(\"morphology\");",
-
1247  global_struct_instance());
-
1248  }
-
1249 
-
1250  printer->pop_block();
-
1251 }
-
1252 
-
1253 
- -
1255  if (!info.thread_callback_register) {
-
1256  return;
-
1257  }
-
1258 
-
1259  auto static_thread_data = get_variable_name("thread_data", false);
-
1260  auto inuse = get_variable_name("thread_data_in_use", false);
-
1261  auto thread_data_index = info.thread_var_thread_id;
-
1262  printer->push_block("static void thread_mem_init(Datum* _thread) ");
-
1263  printer->push_block(fmt::format("if({})", inuse));
-
1264  printer->fmt_line("_thread[{}] = {{neuron::container::do_not_search, new double[{}]{{}}}};",
-
1265  thread_data_index,
-
1266  info.thread_var_data_size + info.top_local_thread_size);
-
1267  printer->pop_block();
-
1268  printer->push_block("else");
-
1269  printer->fmt_line("_thread[{}] = {{neuron::container::do_not_search, {}}};",
-
1270  thread_data_index,
-
1271  static_thread_data);
-
1272  printer->fmt_line("{} = 1;", inuse);
-
1273  printer->pop_block();
-
1274  printer->pop_block();
-
1275 
-
1276  printer->push_block("static void thread_mem_cleanup(Datum* _thread) ");
-
1277  printer->fmt_line("double * _thread_data_ptr = _thread[{}].get<double*>();", thread_data_index);
-
1278  printer->push_block(fmt::format("if(_thread_data_ptr == {})", static_thread_data));
-
1279  printer->fmt_line("{} = 0;", inuse);
-
1280  printer->pop_block();
-
1281  printer->push_block("else");
-
1282  printer->add_line("delete[] _thread_data_ptr;");
-
1283  printer->pop_block();
-
1284  printer->pop_block();
-
1285 }
-
1286 
-
1287 
- -
1289  for (auto const& [var, type]: info.neuron_global_variables) {
-
1290  auto const name = var->get_name();
-
1291  printer->fmt_line("extern {} {};", type, name);
-
1292  }
-
1293 }
-
1294 
- -
1296  auto const value_initialize = print_initializers ? "{}" : "";
-
1297  printer->add_newline(2);
-
1298  printer->add_line("/** all mechanism instance variables and global variables */");
-
1299  printer->fmt_push_block("struct {} ", instance_struct());
-
1300 
-
1301  for (auto const& [var, type]: info.neuron_global_variables) {
-
1302  auto const name = var->get_name();
-
1303  printer->fmt_line("{}* {}{};",
-
1304  type,
-
1305  name,
-
1306  print_initializers ? fmt::format("{{&::{}}}", name) : std::string{});
-
1307  }
-
1308  for (auto& var: codegen_float_variables) {
-
1309  const auto& name = var->get_name();
-
1310  printer->fmt_line("double* {}{};", name, value_initialize);
-
1311  }
-
1312  for (auto& var: codegen_int_variables) {
-
1313  const auto& name = var.symbol->get_name();
-
1314  if (name == naming::POINT_PROCESS_VARIABLE) {
-
1315  continue;
-
1316  } else if (var.is_index || var.is_integer) {
-
1317  // In NEURON we don't create caches for `int*`. Hence, do nothing.
-
1318  } else {
-
1319  auto qualifier = var.is_constant ? "const " : "";
-
1320  auto type = var.is_vdata ? "void*" : default_float_data_type();
-
1321  printer->fmt_line("{}{}* const* {}{};", qualifier, type, name, value_initialize);
-
1322  }
-
1323  }
-
1324 
-
1325  printer->fmt_line("{}* {}{};",
-
1326  global_struct(),
- -
1328  print_initializers ? fmt::format("{{&{}}}", global_struct_instance())
-
1329  : std::string{});
-
1330  printer->pop_block(";");
-
1331 }
-
1332 
- -
1334  printer->add_newline(2);
-
1335  printer->fmt_push_block("static {} make_instance_{}(_nrn_mechanism_cache_range& _lmc)",
-
1336  instance_struct(),
-
1337  info.mod_suffix);
-
1338  printer->fmt_push_block("return {}", instance_struct());
+
1198  printer->decrease_indent();
+
1199  printer->add_line(");");
+
1200  printer->add_newline();
+
1201 
+
1202 
+
1203  printer->fmt_line("hoc_register_prop_size(mech_type, {}, {});",
+
1204  float_variables_size(),
+
1205  int_variables_size());
+
1206 
+
1207  for (int i = 0; i < codegen_int_variables_size; ++i) {
+
1208  if (i != info.semantics[i].index) {
+
1209  throw std::runtime_error("Broken logic.");
+
1210  }
+
1211 
+
1212  printer->fmt_line("hoc_register_dparam_semantics(mech_type, {}, \"{}\");",
+
1213  i,
+
1214  info.semantics[i].name);
+
1215  }
+
1216 
+
1217  if (info.write_concentration) {
+
1218  printer->fmt_line("nrn_writes_conc(mech_type, 0);");
+
1219  }
+
1220 
+
1221  if (info.artificial_cell) {
+
1222  printer->fmt_line("add_nrn_artcell(mech_type, {});", info.tqitem_index);
+
1223  }
+
1224 
+
1225  if (info.net_event_used) {
+
1226  printer->fmt_line("add_nrn_has_net_event(mech_type);");
+
1227  }
+
1228 
+
1229  printer->add_line("hoc_register_var(hoc_scalar_double, hoc_vector_double, hoc_intfunc);");
+
1230  if (!info.point_process) {
+
1231  printer->add_line("hoc_register_npy_direct(mech_type, npy_direct_func_proc);");
+
1232  }
+
1233  if (info.net_receive_node) {
+
1234  printer->fmt_line("pnt_receive[mech_type] = nrn_net_receive_{};", info.mod_suffix);
+
1235  printer->fmt_line("pnt_receive_size[mech_type] = {};", info.num_net_receive_parameters);
+
1236  }
+
1237 
+
1238  if (info.thread_callback_register) {
+
1239  printer->add_line("_nrn_thread_reg(mech_type, 1, thread_mem_init);");
+
1240  printer->add_line("_nrn_thread_reg(mech_type, 0, thread_mem_cleanup);");
+
1241  }
+
1242 
+
1243  if (info.diam_used) {
+
1244  printer->fmt_line("{}._morphology_sym = hoc_lookup(\"morphology\");",
+
1245  global_struct_instance());
+
1246  }
+
1247 
+
1248  printer->pop_block();
+
1249 }
+
1250 
+
1251 
+ +
1253  if (!info.thread_callback_register) {
+
1254  return;
+
1255  }
+
1256 
+
1257  auto static_thread_data = get_variable_name("thread_data", false);
+
1258  auto inuse = get_variable_name("thread_data_in_use", false);
+
1259  auto thread_data_index = info.thread_var_thread_id;
+
1260  printer->push_block("static void thread_mem_init(Datum* _thread) ");
+
1261  printer->push_block(fmt::format("if({})", inuse));
+
1262  printer->fmt_line("_thread[{}] = {{neuron::container::do_not_search, new double[{}]{{}}}};",
+
1263  thread_data_index,
+
1264  info.thread_var_data_size + info.top_local_thread_size);
+
1265  printer->pop_block();
+
1266  printer->push_block("else");
+
1267  printer->fmt_line("_thread[{}] = {{neuron::container::do_not_search, {}}};",
+
1268  thread_data_index,
+
1269  static_thread_data);
+
1270  printer->fmt_line("{} = 1;", inuse);
+
1271  printer->pop_block();
+
1272  printer->pop_block();
+
1273 
+
1274  printer->push_block("static void thread_mem_cleanup(Datum* _thread) ");
+
1275  printer->fmt_line("double * _thread_data_ptr = _thread[{}].get<double*>();", thread_data_index);
+
1276  printer->push_block(fmt::format("if(_thread_data_ptr == {})", static_thread_data));
+
1277  printer->fmt_line("{} = 0;", inuse);
+
1278  printer->pop_block();
+
1279  printer->push_block("else");
+
1280  printer->add_line("delete[] _thread_data_ptr;");
+
1281  printer->pop_block();
+
1282  printer->pop_block();
+
1283 }
+
1284 
+
1285 
+ +
1287  for (auto const& [var, type]: info.neuron_global_variables) {
+
1288  auto const name = var->get_name();
+
1289  printer->fmt_line("extern {} {};", type, name);
+
1290  }
+
1291 }
+
1292 
+ +
1294  auto const value_initialize = print_initializers ? "{}" : "";
+
1295  printer->add_newline(2);
+
1296  printer->add_line("/** all mechanism instance variables and global variables */");
+
1297  printer->fmt_push_block("struct {} ", instance_struct());
+
1298 
+
1299  for (auto const& [var, type]: info.neuron_global_variables) {
+
1300  auto const name = var->get_name();
+
1301  printer->fmt_line("{}* {}{};",
+
1302  type,
+
1303  name,
+
1304  print_initializers ? fmt::format("{{&::{}}}", name) : std::string{});
+
1305  }
+
1306  for (auto& var: codegen_float_variables) {
+
1307  const auto& name = var->get_name();
+
1308  printer->fmt_line("double* {}{};", name, value_initialize);
+
1309  }
+
1310  for (auto& var: codegen_int_variables) {
+
1311  const auto& name = var.symbol->get_name();
+
1312  if (name == naming::POINT_PROCESS_VARIABLE) {
+
1313  continue;
+
1314  } else if (var.is_index || var.is_integer) {
+
1315  // In NEURON we don't create caches for `int*`. Hence, do nothing.
+
1316  } else {
+
1317  auto qualifier = var.is_constant ? "const " : "";
+
1318  auto type = var.is_vdata ? "void*" : default_float_data_type();
+
1319  printer->fmt_line("{}{}* const* {}{};", qualifier, type, name, value_initialize);
+
1320  }
+
1321  }
+
1322 
+
1323  printer->fmt_line("{}* {}{};",
+
1324  global_struct(),
+ +
1326  print_initializers ? fmt::format("{{&{}}}", global_struct_instance())
+
1327  : std::string{});
+
1328  printer->pop_block(";");
+
1329 }
+
1330 
+ +
1332  printer->add_newline(2);
+
1333  printer->fmt_push_block("static {} make_instance_{}(_nrn_mechanism_cache_range& _lmc)",
+
1334  instance_struct(),
+
1335  info.mod_suffix);
+
1336  printer->fmt_push_block("return {}", instance_struct());
+
1337 
+
1338  std::vector<std::string> make_instance_args;
1339 
-
1340  std::vector<std::string> make_instance_args;
-
1341 
-
1342 
-
1343  for (auto const& [var, type]: info.neuron_global_variables) {
-
1344  auto const name = var->get_name();
-
1345  make_instance_args.push_back(fmt::format("&::{}", name));
-
1346  }
-
1347 
-
1348 
-
1349  const auto codegen_float_variables_size = codegen_float_variables.size();
-
1350  for (int i = 0; i < codegen_float_variables_size; ++i) {
-
1351  const auto& float_var = codegen_float_variables[i];
-
1352  if (float_var->is_array()) {
-
1353  make_instance_args.push_back(
-
1354  fmt::format("_lmc.template data_array_ptr<{}, {}>()", i, float_var->get_length()));
-
1355  } else {
-
1356  make_instance_args.push_back(fmt::format("_lmc.template fpfield_ptr<{}>()", i));
-
1357  }
-
1358  }
-
1359 
-
1360  const auto codegen_int_variables_size = codegen_int_variables.size();
-
1361  for (size_t i = 0; i < codegen_int_variables_size; ++i) {
-
1362  const auto& var = codegen_int_variables[i];
-
1363  auto name = var.symbol->get_name();
-
1364  auto const variable = [&var, i]() -> std::string {
-
1365  if (var.is_index || var.is_integer) {
+
1340 
+
1341  for (auto const& [var, type]: info.neuron_global_variables) {
+
1342  auto const name = var->get_name();
+
1343  make_instance_args.push_back(fmt::format("&::{}", name));
+
1344  }
+
1345 
+
1346 
+
1347  const auto codegen_float_variables_size = codegen_float_variables.size();
+
1348  for (int i = 0; i < codegen_float_variables_size; ++i) {
+
1349  const auto& float_var = codegen_float_variables[i];
+
1350  if (float_var->is_array()) {
+
1351  make_instance_args.push_back(
+
1352  fmt::format("_lmc.template data_array_ptr<{}, {}>()", i, float_var->get_length()));
+
1353  } else {
+
1354  make_instance_args.push_back(fmt::format("_lmc.template fpfield_ptr<{}>()", i));
+
1355  }
+
1356  }
+
1357 
+
1358  const auto codegen_int_variables_size = codegen_int_variables.size();
+
1359  for (size_t i = 0; i < codegen_int_variables_size; ++i) {
+
1360  const auto& var = codegen_int_variables[i];
+
1361  auto name = var.symbol->get_name();
+
1362  auto const variable = [&var, i]() -> std::string {
+
1363  if (var.is_index || var.is_integer) {
+
1364  return "";
+
1365  } else if (var.is_vdata) {
1366  return "";
-
1367  } else if (var.is_vdata) {
-
1368  return "";
-
1369  } else {
-
1370  return fmt::format("_lmc.template dptr_field_ptr<{}>()", i);
-
1371  }
-
1372  }();
-
1373  if (variable != "") {
-
1374  make_instance_args.push_back(variable);
-
1375  }
-
1376  }
+
1367  } else {
+
1368  return fmt::format("_lmc.template dptr_field_ptr<{}>()", i);
+
1369  }
+
1370  }();
+
1371  if (variable != "") {
+
1372  make_instance_args.push_back(variable);
+
1373  }
+
1374  }
+
1375 
+
1376  printer->add_multi_line(fmt::format("{}", fmt::join(make_instance_args, ",\n")));
1377 
-
1378  printer->add_multi_line(fmt::format("{}", fmt::join(make_instance_args, ",\n")));
-
1379 
-
1380  printer->pop_block(";");
-
1381  printer->pop_block();
-
1382 }
-
1383 
- -
1385  printer->add_newline(2);
-
1386  printer->fmt_push_block("struct {} ", node_data_struct());
-
1387 
-
1388  // Pointers to node variables
-
1389  printer->add_line("int const * nodeindices;");
-
1390  printer->add_line("double const * node_voltages;");
-
1391  printer->add_line("double * node_diagonal;");
-
1392  printer->add_line("double * node_rhs;");
-
1393  printer->add_line("int nodecount;");
-
1394 
-
1395  printer->pop_block(";");
-
1396 }
-
1397 
- -
1399  printer->add_newline(2);
-
1400  printer->fmt_push_block("static {} make_node_data_{}(NrnThread& nt, Memb_list& _ml_arg)",
-
1401  node_data_struct(),
-
1402  info.mod_suffix);
-
1403 
-
1404  std::vector<std::string> make_node_data_args = {"_ml_arg.nodeindices",
-
1405  "nt.node_voltage_storage()",
-
1406  "nt.node_d_storage()",
-
1407  "nt.node_rhs_storage()",
-
1408  "_ml_arg.nodecount"};
-
1409 
-
1410  printer->fmt_push_block("return {}", node_data_struct());
-
1411  printer->add_multi_line(fmt::format("{}", fmt::join(make_node_data_args, ",\n")));
-
1412 
-
1413  printer->pop_block(";");
-
1414  printer->pop_block();
-
1415 
-
1416 
-
1417  printer->fmt_push_block("static {} make_node_data_{}(Prop * _prop)",
-
1418  node_data_struct(),
-
1419  info.mod_suffix);
-
1420  printer->add_line("static std::vector<int> node_index{0};");
-
1421  printer->add_line("Node* _node = _nrn_mechanism_access_node(_prop);");
-
1422 
-
1423  make_node_data_args = {"node_index.data()",
-
1424  "&_nrn_mechanism_access_voltage(_node)",
-
1425  "&_nrn_mechanism_access_d(_node)",
-
1426  "&_nrn_mechanism_access_rhs(_node)",
-
1427  "1"};
-
1428 
-
1429  printer->fmt_push_block("return {}", node_data_struct());
-
1430  printer->add_multi_line(fmt::format("{}", fmt::join(make_node_data_args, ",\n")));
-
1431 
-
1432  printer->pop_block(";");
-
1433  printer->pop_block();
-
1434  printer->add_newline();
-
1435 }
-
1436 
- -
1438  if (codegen_thread_variables.empty()) {
-
1439  return;
-
1440  }
-
1441 
-
1442  printer->add_newline(2);
-
1443  printer->fmt_push_block("struct {} ", thread_variables_struct());
-
1444  printer->add_line("double * thread_data;");
-
1445  printer->add_newline();
+
1378  printer->pop_block(";");
+
1379  printer->pop_block();
+
1380 }
+
1381 
+ +
1383  printer->add_newline(2);
+
1384  printer->fmt_push_block("struct {} ", node_data_struct());
+
1385 
+
1386  // Pointers to node variables
+
1387  printer->add_line("int const * nodeindices;");
+
1388  printer->add_line("double const * node_voltages;");
+
1389  printer->add_line("double * node_diagonal;");
+
1390  printer->add_line("double * node_rhs;");
+
1391  printer->add_line("int nodecount;");
+
1392 
+
1393  printer->pop_block(";");
+
1394 }
+
1395 
+ +
1397  printer->add_newline(2);
+
1398  printer->fmt_push_block("static {} make_node_data_{}(NrnThread& nt, Memb_list& _ml_arg)",
+
1399  node_data_struct(),
+
1400  info.mod_suffix);
+
1401 
+
1402  std::vector<std::string> make_node_data_args = {"_ml_arg.nodeindices",
+
1403  "nt.node_voltage_storage()",
+
1404  "nt.node_d_storage()",
+
1405  "nt.node_rhs_storage()",
+
1406  "_ml_arg.nodecount"};
+
1407 
+
1408  printer->fmt_push_block("return {}", node_data_struct());
+
1409  printer->add_multi_line(fmt::format("{}", fmt::join(make_node_data_args, ",\n")));
+
1410 
+
1411  printer->pop_block(";");
+
1412  printer->pop_block();
+
1413 
+
1414 
+
1415  printer->fmt_push_block("static {} make_node_data_{}(Prop * _prop)",
+
1416  node_data_struct(),
+
1417  info.mod_suffix);
+
1418  printer->add_line("static std::vector<int> node_index{0};");
+
1419  printer->add_line("Node* _node = _nrn_mechanism_access_node(_prop);");
+
1420 
+
1421  make_node_data_args = {"node_index.data()",
+
1422  "&_nrn_mechanism_access_voltage(_node)",
+
1423  "&_nrn_mechanism_access_d(_node)",
+
1424  "&_nrn_mechanism_access_rhs(_node)",
+
1425  "1"};
+
1426 
+
1427  printer->fmt_push_block("return {}", node_data_struct());
+
1428  printer->add_multi_line(fmt::format("{}", fmt::join(make_node_data_args, ",\n")));
+
1429 
+
1430  printer->pop_block(";");
+
1431  printer->pop_block();
+
1432  printer->add_newline();
+
1433 }
+
1434 
+ +
1436  if (codegen_thread_variables.empty()) {
+
1437  return;
+
1438  }
+
1439 
+
1440  printer->add_newline(2);
+
1441  printer->fmt_push_block("struct {} ", thread_variables_struct());
+
1442  printer->add_line("double * thread_data;");
+
1443  printer->add_newline();
+
1444 
+
1445  std::string simd_width = "1";
1446 
-
1447  std::string simd_width = "1";
-
1448 
-
1449 
-
1450  for (const auto& var_info: codegen_thread_variables) {
-
1451  printer->fmt_push_block("double * {}_ptr(size_t id)", var_info.symbol->get_name());
-
1452  printer->fmt_line("return thread_data + {} + (id % {});", var_info.offset, simd_width);
-
1453  printer->pop_block();
-
1454 
-
1455  printer->fmt_push_block("double & {}(size_t id)", var_info.symbol->get_name());
-
1456  printer->fmt_line("return thread_data[{} + (id % {})];", var_info.offset, simd_width);
-
1457  printer->pop_block();
-
1458  }
-
1459  printer->add_newline();
-
1460 
-
1461  printer->push_block(fmt::format("{}(double * const thread_data)", thread_variables_struct()));
-
1462  printer->fmt_line("this->thread_data = thread_data;");
-
1463  printer->pop_block();
-
1464 
-
1465  printer->pop_block(";");
-
1466 }
-
1467 
-
1468 
- -
1470  // read ion statements
-
1471  auto read_statements = ion_read_statements(BlockType::Initial);
-
1472  for (auto& statement: read_statements) {
-
1473  printer->add_line(statement);
-
1474  }
-
1475 
-
1476  // initial block
-
1477  if (node != nullptr) {
-
1478  const auto& block = node->get_statement_block();
-
1479  print_statement_block(*block, false, false);
-
1480  }
-
1481 
-
1482  // write ion statements
-
1483  auto write_statements = ion_write_statements(BlockType::Initial);
-
1484  for (auto& statement: write_statements) {
-
1485  auto text = process_shadow_update_statement(statement, BlockType::Initial);
-
1486  printer->add_line(text);
-
1487  }
-
1488 }
-
1489 
-
1490 
- -
1492  const std::string& function_name) {
-
1493  std::string method = function_name.empty() ? compute_method_name(type) : function_name;
-
1494  ParamVector args = {{"", "const _nrn_model_sorted_token&", "", "_sorted_token"},
-
1495  {"", "NrnThread*", "", "nt"},
-
1496  {"", "Memb_list*", "", "_ml_arg"},
-
1497  {"", "int", "", "_type"}};
-
1498  printer->fmt_push_block("void {}({})", method, get_parameter_str(args));
-
1499 
-
1500  printer->add_line("_nrn_mechanism_cache_range _lmc{_sorted_token, *nt, *_ml_arg, _type};");
-
1501  printer->fmt_line("auto inst = make_instance_{}(_lmc);", info.mod_suffix);
-
1502  printer->fmt_line("auto node_data = make_node_data_{}(*nt, *_ml_arg);", info.mod_suffix);
-
1503 
-
1504  printer->add_line("auto nodecount = _ml_arg->nodecount;");
-
1505  printer->add_line("auto* _thread = _ml_arg->_thread;");
-
1506  if (!codegen_thread_variables.empty()) {
-
1507  printer->fmt_line("auto _thread_vars = {}(_thread[{}].get<double*>());",
-
1508  thread_variables_struct(),
-
1509  info.thread_var_thread_id);
-
1510  }
-
1511 }
-
1512 
-
1513 
-
1514 void CodegenNeuronCppVisitor::print_nrn_init(bool skip_init_check) {
-
1515  printer->add_newline(2);
+
1447 
+
1448  for (const auto& var_info: codegen_thread_variables) {
+
1449  printer->fmt_push_block("double * {}_ptr(size_t id)", var_info.symbol->get_name());
+
1450  printer->fmt_line("return thread_data + {} + (id % {});", var_info.offset, simd_width);
+
1451  printer->pop_block();
+
1452 
+
1453  printer->fmt_push_block("double & {}(size_t id)", var_info.symbol->get_name());
+
1454  printer->fmt_line("return thread_data[{} + (id % {})];", var_info.offset, simd_width);
+
1455  printer->pop_block();
+
1456  }
+
1457  printer->add_newline();
+
1458 
+
1459  printer->push_block(fmt::format("{}(double * const thread_data)", thread_variables_struct()));
+
1460  printer->fmt_line("this->thread_data = thread_data;");
+
1461  printer->pop_block();
+
1462 
+
1463  printer->pop_block(";");
+
1464 }
+
1465 
+
1466 
+ +
1468  // read ion statements
+
1469  auto read_statements = ion_read_statements(BlockType::Initial);
+
1470  for (auto& statement: read_statements) {
+
1471  printer->add_line(statement);
+
1472  }
+
1473 
+
1474  // initial block
+
1475  if (node != nullptr) {
+
1476  const auto& block = node->get_statement_block();
+
1477  print_statement_block(*block, false, false);
+
1478  }
+
1479 
+
1480  // write ion statements
+
1481  auto write_statements = ion_write_statements(BlockType::Initial);
+
1482  for (auto& statement: write_statements) {
+
1483  auto text = process_shadow_update_statement(statement, BlockType::Initial);
+
1484  printer->add_line(text);
+
1485  }
+
1486 }
+
1487 
+
1488 
+ +
1490  const std::string& function_name) {
+
1491  std::string method = function_name.empty() ? compute_method_name(type) : function_name;
+
1492  ParamVector args = {{"", "const _nrn_model_sorted_token&", "", "_sorted_token"},
+
1493  {"", "NrnThread*", "", "nt"},
+
1494  {"", "Memb_list*", "", "_ml_arg"},
+
1495  {"", "int", "", "_type"}};
+
1496  printer->fmt_push_block("void {}({})", method, get_parameter_str(args));
+
1497 
+
1498  printer->add_line("_nrn_mechanism_cache_range _lmc{_sorted_token, *nt, *_ml_arg, _type};");
+
1499  printer->fmt_line("auto inst = make_instance_{}(_lmc);", info.mod_suffix);
+
1500  printer->fmt_line("auto node_data = make_node_data_{}(*nt, *_ml_arg);", info.mod_suffix);
+
1501 
+
1502  printer->add_line("auto nodecount = _ml_arg->nodecount;");
+
1503  printer->add_line("auto* _thread = _ml_arg->_thread;");
+
1504  if (!codegen_thread_variables.empty()) {
+
1505  printer->fmt_line("auto _thread_vars = {}(_thread[{}].get<double*>());",
+
1506  thread_variables_struct(),
+
1507  info.thread_var_thread_id);
+
1508  }
+
1509 }
+
1510 
+
1511 
+
1512 void CodegenNeuronCppVisitor::print_nrn_init(bool skip_init_check) {
+
1513  printer->add_newline(2);
+
1514 
+
1515  print_global_function_common_code(BlockType::Initial);
1516 
-
1517  print_global_function_common_code(BlockType::Initial);
+
1517  printer->push_block("for (int id = 0; id < nodecount; id++)");
1518 
-
1519  printer->push_block("for (int id = 0; id < nodecount; id++)");
-
1520 
-
1521  printer->add_line("auto* _ppvar = _ml_arg->pdata[id];");
-
1522  if (!info.artificial_cell) {
-
1523  printer->add_line("int node_id = node_data.nodeindices[id];");
-
1524  printer->add_line("auto v = node_data.node_voltages[node_id];");
-
1525  }
+
1519  printer->add_line("auto* _ppvar = _ml_arg->pdata[id];");
+
1520  if (!info.artificial_cell) {
+
1521  printer->add_line("int node_id = node_data.nodeindices[id];");
+
1522  printer->add_line("auto v = node_data.node_voltages[node_id];");
+
1523  }
+
1524 
+
1525  print_rename_state_vars();
1526 
-
1527  print_rename_state_vars();
-
1528 
-
1529  if (!info.changed_dt.empty()) {
-
1530  printer->fmt_line("double _save_prev_dt = {};",
-
1531  get_variable_name(naming::NTHREAD_DT_VARIABLE));
-
1532  printer->fmt_line("{} = {};",
-
1533  get_variable_name(naming::NTHREAD_DT_VARIABLE),
-
1534  info.changed_dt);
-
1535  }
+
1527  if (!info.changed_dt.empty()) {
+
1528  printer->fmt_line("double _save_prev_dt = {};",
+
1529  get_variable_name(naming::NTHREAD_DT_VARIABLE));
+
1530  printer->fmt_line("{} = {};",
+
1531  get_variable_name(naming::NTHREAD_DT_VARIABLE),
+
1532  info.changed_dt);
+
1533  }
+
1534 
+
1535  print_initial_block(info.initial_node);
1536 
-
1537  print_initial_block(info.initial_node);
-
1538 
-
1539  if (!info.changed_dt.empty()) {
-
1540  printer->fmt_line("{} = _save_prev_dt;", get_variable_name(naming::NTHREAD_DT_VARIABLE));
-
1541  }
-
1542 
-
1543  printer->pop_block();
-
1544  printer->pop_block();
-
1545 }
-
1546 
- -
1548  printer->add_newline(2);
-
1549 
-
1550  ParamVector args = {{"", "const _nrn_model_sorted_token&", "", "_sorted_token"},
-
1551  {"", "NrnThread*", "", "nt"},
-
1552  {"", "Memb_list*", "", "_ml_arg"},
-
1553  {"", "int", "", "_type"}};
-
1554 
-
1555  printer->fmt_push_block("static void {}({})",
-
1556  method_name(naming::NRN_JACOB_METHOD),
-
1557  get_parameter_str(args)); // begin function
-
1558 
-
1559 
-
1560  printer->add_multi_line(
-
1561  "_nrn_mechanism_cache_range _lmc{_sorted_token, *nt, *_ml_arg, _type};");
-
1562 
-
1563  printer->fmt_line("auto inst = make_instance_{}(_lmc);", info.mod_suffix);
-
1564  printer->fmt_line("auto node_data = make_node_data_{}(*nt, *_ml_arg);", info.mod_suffix);
-
1565  printer->fmt_line("auto nodecount = _ml_arg->nodecount;");
-
1566  printer->push_block("for (int id = 0; id < nodecount; id++)"); // begin for
-
1567 
-
1568  if (breakpoint_exist()) {
-
1569  printer->add_line("int node_id = node_data.nodeindices[id];");
-
1570  printer->fmt_line("node_data.node_diagonal[node_id] {} inst.{}[id];",
-
1571  operator_for_d(),
-
1572  info.vectorize ? naming::CONDUCTANCE_UNUSED_VARIABLE
- -
1574  }
-
1575 
-
1576  printer->pop_block(); // end for
-
1577  printer->pop_block(); // end function
-
1578 }
-
1579 
-
1580 
- -
1582  printer->add_line("Datum* _ppvar = _nrn_mechanism_access_dparam(prop);");
-
1583  printer->add_line("_nrn_mechanism_cache_instance _lmc{prop};");
-
1584  printer->add_line("const size_t id = 0;");
-
1585 
-
1586  printer->fmt_line("auto inst = make_instance_{}(_lmc);", info.mod_suffix);
-
1587  if (!info.artificial_cell) {
-
1588  printer->fmt_line("auto node_data = make_node_data_{}(prop);", info.mod_suffix);
-
1589  }
-
1590 
-
1591  if (!codegen_thread_variables.empty()) {
-
1592  printer->fmt_line("auto _thread_vars = {}({}_global.thread_data);",
-
1593  thread_variables_struct(),
-
1594  info.mod_suffix);
-
1595  }
-
1596 
-
1597  printer->add_newline();
-
1598 }
-
1599 
-
1600 
- -
1602  if (info.constructor_node) {
-
1603  printer->fmt_push_block("void {}(Prop* prop)", method_name(naming::NRN_CONSTRUCTOR_METHOD));
+
1537  if (!info.changed_dt.empty()) {
+
1538  printer->fmt_line("{} = _save_prev_dt;", get_variable_name(naming::NTHREAD_DT_VARIABLE));
+
1539  }
+
1540 
+
1541  printer->pop_block();
+
1542  printer->pop_block();
+
1543 }
+
1544 
+ +
1546  printer->add_newline(2);
+
1547 
+
1548  ParamVector args = {{"", "const _nrn_model_sorted_token&", "", "_sorted_token"},
+
1549  {"", "NrnThread*", "", "nt"},
+
1550  {"", "Memb_list*", "", "_ml_arg"},
+
1551  {"", "int", "", "_type"}};
+
1552 
+
1553  printer->fmt_push_block("static void {}({})",
+
1554  method_name(naming::NRN_JACOB_METHOD),
+
1555  get_parameter_str(args)); // begin function
+
1556 
+
1557 
+
1558  printer->add_multi_line(
+
1559  "_nrn_mechanism_cache_range _lmc{_sorted_token, *nt, *_ml_arg, _type};");
+
1560 
+
1561  printer->fmt_line("auto inst = make_instance_{}(_lmc);", info.mod_suffix);
+
1562  printer->fmt_line("auto node_data = make_node_data_{}(*nt, *_ml_arg);", info.mod_suffix);
+
1563  printer->fmt_line("auto nodecount = _ml_arg->nodecount;");
+
1564  printer->push_block("for (int id = 0; id < nodecount; id++)"); // begin for
+
1565 
+
1566  if (breakpoint_exist()) {
+
1567  printer->add_line("int node_id = node_data.nodeindices[id];");
+
1568  printer->fmt_line("node_data.node_diagonal[node_id] {} inst.{}[id];",
+
1569  operator_for_d(),
+
1570  info.vectorize ? naming::CONDUCTANCE_UNUSED_VARIABLE
+ +
1572  }
+
1573 
+
1574  printer->pop_block(); // end for
+
1575  printer->pop_block(); // end function
+
1576 }
+
1577 
+
1578 
+ +
1580  printer->add_line("Datum* _ppvar = _nrn_mechanism_access_dparam(prop);");
+
1581  printer->add_line("_nrn_mechanism_cache_instance _lmc{prop};");
+
1582  printer->add_line("const size_t id = 0;");
+
1583 
+
1584  printer->fmt_line("auto inst = make_instance_{}(_lmc);", info.mod_suffix);
+
1585  if (!info.artificial_cell) {
+
1586  printer->fmt_line("auto node_data = make_node_data_{}(prop);", info.mod_suffix);
+
1587  }
+
1588 
+
1589  if (!codegen_thread_variables.empty()) {
+
1590  printer->fmt_line("auto _thread_vars = {}({}_global.thread_data);",
+
1591  thread_variables_struct(),
+
1592  info.mod_suffix);
+
1593  }
+
1594 
+
1595  printer->add_newline();
+
1596 }
+
1597 
+
1598 
+ +
1600  if (info.constructor_node) {
+
1601  printer->fmt_push_block("void {}(Prop* prop)", method_name(naming::NRN_CONSTRUCTOR_METHOD));
+
1602 
+
1603  print_callable_preamble_from_prop();
1604 
-
1605  print_callable_preamble_from_prop();
-
1606 
-
1607  auto block = info.constructor_node->get_statement_block();
-
1608  print_statement_block(*block, false, false);
-
1609 
-
1610  printer->pop_block();
-
1611  }
-
1612 }
-
1613 
-
1614 
- -
1616  printer->fmt_push_block("void {}(Prop* prop)", method_name(naming::NRN_DESTRUCTOR_METHOD));
-
1617  print_callable_preamble_from_prop();
-
1618 
-
1619  for (const auto& rv: info.random_variables) {
-
1620  printer->fmt_line("nrnran123_deletestream((nrnran123_State*) {});",
-
1621  get_variable_name(get_name(rv), false));
-
1622  }
-
1623 
-
1624 
-
1625  if (info.destructor_node) {
-
1626  auto block = info.destructor_node->get_statement_block();
-
1627  print_statement_block(*block, false, false);
-
1628  }
-
1629 
-
1630  printer->pop_block();
-
1631 }
-
1632 
-
1633 
- -
1635  printer->add_newline(2);
-
1636 
-
1637  auto method = method_name(naming::NRN_ALLOC_METHOD);
-
1638  printer->fmt_push_block("static void {}(Prop* _prop)", method);
-
1639  printer->add_line("Datum *_ppvar = nullptr;");
-
1640 
-
1641  if (info.point_process) {
-
1642  printer->push_block("if (nrn_point_prop_)");
-
1643  printer->add_multi_line(R"CODE(
-
1644  _nrn_mechanism_access_alloc_seq(_prop) = _nrn_mechanism_access_alloc_seq(nrn_point_prop_);
-
1645  _ppvar = _nrn_mechanism_access_dparam(nrn_point_prop_);
-
1646  )CODE");
-
1647  printer->chain_block("else");
-
1648  }
-
1649  if (info.semantic_variable_count) {
-
1650  printer->fmt_line("_ppvar = nrn_prop_datum_alloc(mech_type, {}, _prop);",
-
1651  info.semantic_variable_count);
-
1652  printer->add_line("_nrn_mechanism_access_dparam(_prop) = _ppvar;");
-
1653  }
-
1654  printer->add_multi_line(R"CODE(
-
1655  _nrn_mechanism_cache_instance _lmc{_prop};
-
1656  size_t const _iml = 0;
-
1657  )CODE");
-
1658  printer->fmt_line("assert(_nrn_mechanism_get_num_vars(_prop) == {});",
-
1659  codegen_float_variables.size());
-
1660  if (float_variables_size()) {
-
1661  printer->add_line("/*initialize range parameters*/");
-
1662  for (size_t i_param = 0; i_param < info.range_parameter_vars.size(); ++i_param) {
-
1663  const auto var = info.range_parameter_vars[i_param];
-
1664  if (var->is_array()) {
-
1665  continue;
-
1666  }
-
1667  const auto& var_name = var->get_name();
-
1668  auto var_pos = position_of_float_var(var_name);
-
1669 
-
1670  printer->fmt_line("_lmc.template fpfield<{}>(_iml) = {}; /* {} */",
-
1671  var_pos,
-
1672  fmt::format("_parameter_defaults[{}]", i_param),
-
1673  var_name);
-
1674  }
-
1675  }
-
1676  if (info.point_process) {
-
1677  printer->pop_block();
-
1678  }
-
1679 
-
1680  if (info.semantic_variable_count) {
-
1681  printer->add_line("_nrn_mechanism_access_dparam(_prop) = _ppvar;");
-
1682  }
+
1605  auto block = info.constructor_node->get_statement_block();
+
1606  print_statement_block(*block, false, false);
+
1607 
+
1608  printer->pop_block();
+
1609  }
+
1610 }
+
1611 
+
1612 
+ +
1614  printer->fmt_push_block("void {}(Prop* prop)", method_name(naming::NRN_DESTRUCTOR_METHOD));
+
1615  print_callable_preamble_from_prop();
+
1616 
+
1617  for (const auto& rv: info.random_variables) {
+
1618  printer->fmt_line("nrnran123_deletestream((nrnran123_State*) {});",
+
1619  get_variable_name(get_name(rv), false));
+
1620  }
+
1621 
+
1622 
+
1623  if (info.destructor_node) {
+
1624  auto block = info.destructor_node->get_statement_block();
+
1625  print_statement_block(*block, false, false);
+
1626  }
+
1627 
+
1628  printer->pop_block();
+
1629 }
+
1630 
+
1631 
+ +
1633  printer->add_newline(2);
+
1634 
+
1635  auto method = method_name(naming::NRN_ALLOC_METHOD);
+
1636  printer->fmt_push_block("static void {}(Prop* _prop)", method);
+
1637  printer->add_line("Datum *_ppvar = nullptr;");
+
1638 
+
1639  if (info.point_process) {
+
1640  printer->push_block("if (nrn_point_prop_)");
+
1641  printer->add_multi_line(R"CODE(
+
1642  _nrn_mechanism_access_alloc_seq(_prop) = _nrn_mechanism_access_alloc_seq(nrn_point_prop_);
+
1643  _ppvar = _nrn_mechanism_access_dparam(nrn_point_prop_);
+
1644  )CODE");
+
1645  printer->chain_block("else");
+
1646  }
+
1647  if (info.semantic_variable_count) {
+
1648  printer->fmt_line("_ppvar = nrn_prop_datum_alloc(mech_type, {}, _prop);",
+
1649  info.semantic_variable_count);
+
1650  printer->add_line("_nrn_mechanism_access_dparam(_prop) = _ppvar;");
+
1651  }
+
1652  printer->add_multi_line(R"CODE(
+
1653  _nrn_mechanism_cache_instance _lmc{_prop};
+
1654  size_t const _iml = 0;
+
1655  )CODE");
+
1656  printer->fmt_line("assert(_nrn_mechanism_get_num_vars(_prop) == {});",
+
1657  codegen_float_variables.size());
+
1658  if (float_variables_size()) {
+
1659  printer->add_line("/*initialize range parameters*/");
+
1660  for (size_t i_param = 0; i_param < info.range_parameter_vars.size(); ++i_param) {
+
1661  const auto var = info.range_parameter_vars[i_param];
+
1662  if (var->is_array()) {
+
1663  continue;
+
1664  }
+
1665  const auto& var_name = var->get_name();
+
1666  auto var_pos = position_of_float_var(var_name);
+
1667 
+
1668  printer->fmt_line("_lmc.template fpfield<{}>(_iml) = {}; /* {} */",
+
1669  var_pos,
+
1670  fmt::format("_parameter_defaults[{}]", i_param),
+
1671  var_name);
+
1672  }
+
1673  }
+
1674  if (info.point_process) {
+
1675  printer->pop_block();
+
1676  }
+
1677 
+
1678  if (info.semantic_variable_count) {
+
1679  printer->add_line("_nrn_mechanism_access_dparam(_prop) = _ppvar;");
+
1680  }
+
1681 
+
1682  const auto codegen_int_variables_size = codegen_int_variables.size();
1683 
-
1684  const auto codegen_int_variables_size = codegen_int_variables.size();
-
1685 
-
1686  if (info.diam_used || info.area_used) {
-
1687  for (size_t i = 0; i < codegen_int_variables.size(); ++i) {
-
1688  auto var_info = codegen_int_variables[i];
-
1689  if (var_info.symbol->get_name() == naming::DIAM_VARIABLE) {
-
1690  printer->fmt_line("Prop * morphology_prop = need_memb({}._morphology_sym);",
-
1691  global_struct_instance());
-
1692  printer->fmt_line(
-
1693  "_ppvar[{}] = _nrn_mechanism_get_param_handle(morphology_prop, 0);", i);
-
1694  }
-
1695  if (var_info.symbol->get_name() == naming::AREA_VARIABLE) {
-
1696  printer->fmt_line("_ppvar[{}] = _nrn_mechanism_get_area_handle(nrn_alloc_node_);",
-
1697  i);
-
1698  }
-
1699  }
-
1700  }
-
1701 
-
1702  for (const auto& ion: info.ions) {
-
1703  printer->fmt_line("Symbol * {}_sym = hoc_lookup(\"{}_ion\");", ion.name, ion.name);
-
1704  printer->fmt_line("Prop * {}_prop = need_memb({}_sym);", ion.name, ion.name);
-
1705 
-
1706  if (ion.is_exterior_conc_written()) {
-
1707  printer->fmt_line("nrn_check_conc_write(_prop, {}_prop, 0);", ion.name);
-
1708  }
-
1709 
-
1710  if (ion.is_interior_conc_written()) {
-
1711  printer->fmt_line("nrn_check_conc_write(_prop, {}_prop, 1);", ion.name);
-
1712  }
-
1713 
-
1714  int conc = ion.is_conc_written() ? 3 : int(ion.is_conc_read());
-
1715  int rev = ion.is_rev_written() ? 3 : int(ion.is_rev_read());
+
1684  if (info.diam_used || info.area_used) {
+
1685  for (size_t i = 0; i < codegen_int_variables.size(); ++i) {
+
1686  auto var_info = codegen_int_variables[i];
+
1687  if (var_info.symbol->get_name() == naming::DIAM_VARIABLE) {
+
1688  printer->fmt_line("Prop * morphology_prop = need_memb({}._morphology_sym);",
+
1689  global_struct_instance());
+
1690  printer->fmt_line(
+
1691  "_ppvar[{}] = _nrn_mechanism_get_param_handle(morphology_prop, 0);", i);
+
1692  }
+
1693  if (var_info.symbol->get_name() == naming::AREA_VARIABLE) {
+
1694  printer->fmt_line("_ppvar[{}] = _nrn_mechanism_get_area_handle(nrn_alloc_node_);",
+
1695  i);
+
1696  }
+
1697  }
+
1698  }
+
1699 
+
1700  for (const auto& ion: info.ions) {
+
1701  printer->fmt_line("Symbol * {}_sym = hoc_lookup(\"{}_ion\");", ion.name, ion.name);
+
1702  printer->fmt_line("Prop * {}_prop = need_memb({}_sym);", ion.name, ion.name);
+
1703 
+
1704  if (ion.is_exterior_conc_written()) {
+
1705  printer->fmt_line("nrn_check_conc_write(_prop, {}_prop, 0);", ion.name);
+
1706  }
+
1707 
+
1708  if (ion.is_interior_conc_written()) {
+
1709  printer->fmt_line("nrn_check_conc_write(_prop, {}_prop, 1);", ion.name);
+
1710  }
+
1711 
+
1712  int conc = ion.is_conc_written() ? 3 : int(ion.is_conc_read());
+
1713  int rev = ion.is_rev_written() ? 3 : int(ion.is_rev_read());
+
1714 
+
1715  printer->fmt_line("nrn_promote({}_prop, {}, {});", ion.name, conc, rev);
1716 
-
1717  printer->fmt_line("nrn_promote({}_prop, {}, {});", ion.name, conc, rev);
-
1718 
-
1719  for (size_t i = 0; i < codegen_int_variables_size; ++i) {
-
1720  const auto& var = codegen_int_variables[i];
+
1717  for (size_t i = 0; i < codegen_int_variables_size; ++i) {
+
1718  const auto& var = codegen_int_variables[i];
+
1719 
+
1720  const std::string& var_name = var.symbol->get_name();
1721 
-
1722  const std::string& var_name = var.symbol->get_name();
-
1723 
-
1724  if (stringutils::starts_with(var_name, "ion_")) {
-
1725  std::string ion_var_name = std::string(var_name.begin() + 4, var_name.end());
-
1726  if (ion.is_ionic_variable(ion_var_name) ||
-
1727  ion.is_current_derivative(ion_var_name) || ion.is_rev_potential(ion_var_name)) {
-
1728  printer->fmt_line("_ppvar[{}] = _nrn_mechanism_get_param_handle({}_prop, {});",
-
1729  i,
-
1730  ion.name,
-
1731  ion.variable_index(ion_var_name));
-
1732  }
-
1733  } else {
-
1734  if (ion.is_style(var_name)) {
-
1735  printer->fmt_line(
-
1736  "_ppvar[{}] = {{neuron::container::do_not_search, "
-
1737  "&(_nrn_mechanism_access_dparam({}_prop)[0].literal_value<int>())}};",
-
1738  i,
-
1739  ion.name);
-
1740  }
-
1741  }
-
1742  }
-
1743  }
-
1744 
-
1745  if (!info.random_variables.empty()) {
-
1746  for (const auto& rv: info.random_variables) {
-
1747  printer->fmt_line("{} = nrnran123_newstream();",
-
1748  get_variable_name(get_name(rv), false));
-
1749  }
-
1750  printer->fmt_line("nrn_mech_inst_destruct[mech_type] = {};",
-
1751  method_name(naming::NRN_DESTRUCTOR_METHOD));
-
1752  }
-
1753 
-
1754  if (info.point_process || info.artificial_cell) {
-
1755  printer->fmt_push_block("if(!nrn_point_prop_)");
-
1756 
-
1757  if (info.constructor_node) {
-
1758  printer->fmt_line("{}(_prop);", method_name(naming::NRN_CONSTRUCTOR_METHOD));
-
1759  }
-
1760  printer->pop_block();
-
1761  }
-
1762 
-
1763  printer->pop_block();
-
1764 }
-
1765 
-
1766 
+
1722  if (stringutils::starts_with(var_name, "ion_")) {
+
1723  std::string ion_var_name = std::string(var_name.begin() + 4, var_name.end());
+
1724  if (ion.is_ionic_variable(ion_var_name) ||
+
1725  ion.is_current_derivative(ion_var_name) || ion.is_rev_potential(ion_var_name)) {
+
1726  printer->fmt_line("_ppvar[{}] = _nrn_mechanism_get_param_handle({}_prop, {});",
+
1727  i,
+
1728  ion.name,
+
1729  ion.variable_index(ion_var_name));
+
1730  }
+
1731  } else {
+
1732  if (ion.is_style(var_name)) {
+
1733  printer->fmt_line(
+
1734  "_ppvar[{}] = {{neuron::container::do_not_search, "
+
1735  "&(_nrn_mechanism_access_dparam({}_prop)[0].literal_value<int>())}};",
+
1736  i,
+
1737  ion.name);
+
1738  }
+
1739  }
+
1740  }
+
1741  }
+
1742 
+
1743  if (!info.random_variables.empty()) {
+
1744  for (const auto& rv: info.random_variables) {
+
1745  printer->fmt_line("{} = nrnran123_newstream();",
+
1746  get_variable_name(get_name(rv), false));
+
1747  }
+
1748  printer->fmt_line("nrn_mech_inst_destruct[mech_type] = {};",
+
1749  method_name(naming::NRN_DESTRUCTOR_METHOD));
+
1750  }
+
1751 
+
1752  if (info.point_process || info.artificial_cell) {
+
1753  printer->fmt_push_block("if(!nrn_point_prop_)");
+
1754 
+
1755  if (info.constructor_node) {
+
1756  printer->fmt_line("{}(_prop);", method_name(naming::NRN_CONSTRUCTOR_METHOD));
+
1757  }
+
1758  printer->pop_block();
+
1759  }
+
1760 
+
1761  printer->pop_block();
+
1762 }
+
1763 
+
1764 
+
1765 /****************************************************************************************/
+
1766 /* Print nrn_state routine */
1767 /****************************************************************************************/
-
1768 /* Print nrn_state routine */
-
1769 /****************************************************************************************/
-
1770 
- -
1772  if (!nrn_state_required()) {
-
1773  return;
-
1774  }
-
1775 
-
1776  printer->add_newline(2);
-
1777  print_global_function_common_code(BlockType::State);
-
1778 
-
1779  printer->push_block("for (int id = 0; id < nodecount; id++)");
-
1780  printer->add_line("int node_id = node_data.nodeindices[id];");
-
1781  printer->add_line("auto* _ppvar = _ml_arg->pdata[id];");
-
1782  printer->add_line("auto v = node_data.node_voltages[node_id];");
-
1783 
-
1784  /**
-
1785  * \todo Eigen solver node also emits IonCurVar variable in the functor
-
1786  * but that shouldn't update ions in derivative block
-
1787  */
-
1788  if (ion_variable_struct_required()) {
-
1789  throw std::runtime_error("Not implemented.");
-
1790  }
-
1791 
-
1792  auto read_statements = ion_read_statements(BlockType::State);
-
1793  for (auto& statement: read_statements) {
-
1794  printer->add_line(statement);
-
1795  }
-
1796 
-
1797  if (info.nrn_state_block) {
-
1798  info.nrn_state_block->visit_children(*this);
-
1799  }
-
1800 
-
1801  if (info.currents.empty() && info.breakpoint_node != nullptr) {
-
1802  auto block = info.breakpoint_node->get_statement_block();
-
1803  print_statement_block(*block, false, false);
-
1804  }
-
1805 
-
1806  const auto& write_statements = ion_write_statements(BlockType::State);
-
1807  for (auto& statement: write_statements) {
-
1808  const auto& text = process_shadow_update_statement(statement, BlockType::State);
-
1809  printer->add_line(text);
-
1810  }
-
1811 
-
1812  printer->pop_block();
-
1813  printer->pop_block();
-
1814 }
-
1815 
-
1816 
+
1768 
+ +
1770  if (!nrn_state_required()) {
+
1771  return;
+
1772  }
+
1773 
+
1774  printer->add_newline(2);
+
1775  print_global_function_common_code(BlockType::State);
+
1776 
+
1777  printer->push_block("for (int id = 0; id < nodecount; id++)");
+
1778  printer->add_line("int node_id = node_data.nodeindices[id];");
+
1779  printer->add_line("auto* _ppvar = _ml_arg->pdata[id];");
+
1780  printer->add_line("auto v = node_data.node_voltages[node_id];");
+
1781 
+
1782  /**
+
1783  * \todo Eigen solver node also emits IonCurVar variable in the functor
+
1784  * but that shouldn't update ions in derivative block
+
1785  */
+
1786  if (ion_variable_struct_required()) {
+
1787  throw std::runtime_error("Not implemented.");
+
1788  }
+
1789 
+
1790  auto read_statements = ion_read_statements(BlockType::State);
+
1791  for (auto& statement: read_statements) {
+
1792  printer->add_line(statement);
+
1793  }
+
1794 
+
1795  if (info.nrn_state_block) {
+
1796  info.nrn_state_block->visit_children(*this);
+
1797  }
+
1798 
+
1799  if (info.currents.empty() && info.breakpoint_node != nullptr) {
+
1800  auto block = info.breakpoint_node->get_statement_block();
+
1801  print_statement_block(*block, false, false);
+
1802  }
+
1803 
+
1804  const auto& write_statements = ion_write_statements(BlockType::State);
+
1805  for (auto& statement: write_statements) {
+
1806  const auto& text = process_shadow_update_statement(statement, BlockType::State);
+
1807  printer->add_line(text);
+
1808  }
+
1809 
+
1810  printer->pop_block();
+
1811  printer->pop_block();
+
1812 }
+
1813 
+
1814 
+
1815 /****************************************************************************************/
+
1816 /* Print nrn_cur related routines */
1817 /****************************************************************************************/
-
1818 /* Print nrn_cur related routines */
-
1819 /****************************************************************************************/
-
1820 
- -
1822  return get_arg_str(nrn_current_parameters());
-
1823 }
-
1824 
-
1825 
- -
1827  if (ion_variable_struct_required()) {
-
1828  throw std::runtime_error("Not implemented.");
-
1829  }
-
1830 
-
1831  ParamVector params = {{"", "_nrn_mechanism_cache_range&", "", "_lmc"},
-
1832  {"", "NrnThread*", "", "nt"},
-
1833  {"", "Datum*", "", "_ppvar"},
-
1834  {"", "Datum*", "", "_thread"}};
-
1835 
-
1836  if (info.thread_callback_register) {
-
1837  auto type_name = fmt::format("{}&", thread_variables_struct());
-
1838  params.emplace_back("", type_name, "", "_thread_vars");
-
1839  }
-
1840  params.emplace_back("", "size_t", "", "id");
-
1841  params.emplace_back("", fmt::format("{}&", instance_struct()), "", "inst");
-
1842  params.emplace_back("", fmt::format("{}&", node_data_struct()), "", "node_data");
-
1843  params.emplace_back("", "double", "", "v");
-
1844  return params;
-
1845 }
-
1846 
-
1847 
- -
1849  const auto& args = nrn_current_parameters();
-
1850  const auto& block = node.get_statement_block();
-
1851  printer->add_newline(2);
-
1852  printer->fmt_push_block("inline double nrn_current_{}({})",
-
1853  info.mod_suffix,
-
1854  get_parameter_str(args));
-
1855  printer->add_line("double current = 0.0;");
-
1856  print_statement_block(*block, false, false);
-
1857  for (auto& current: info.currents) {
-
1858  const auto& name = get_variable_name(current);
-
1859  printer->fmt_line("current += {};", name);
-
1860  }
-
1861  printer->add_line("return current;");
-
1862  printer->pop_block();
-
1863 }
-
1864 
-
1865 
- -
1867  const auto& block = node.get_statement_block();
-
1868  print_statement_block(*block, false, false);
-
1869  if (!info.currents.empty()) {
-
1870  std::string sum;
-
1871  for (const auto& current: info.currents) {
-
1872  auto var = breakpoint_current(current);
-
1873  sum += get_variable_name(var);
-
1874  if (&current != &info.currents.back()) {
-
1875  sum += "+";
-
1876  }
-
1877  }
-
1878  printer->fmt_line("double rhs = {};", sum);
-
1879  }
-
1880 
-
1881  std::string sum;
-
1882  for (const auto& conductance: info.conductances) {
-
1883  auto var = breakpoint_current(conductance.variable);
-
1884  sum += get_variable_name(var);
-
1885  if (&conductance != &info.conductances.back()) {
-
1886  sum += "+";
-
1887  }
-
1888  }
-
1889  printer->fmt_line("double g = {};", sum);
-
1890 
-
1891  for (const auto& conductance: info.conductances) {
-
1892  if (!conductance.ion.empty()) {
-
1893  const auto& lhs = std::string(naming::ION_VARNAME_PREFIX) + "di" + conductance.ion +
-
1894  "dv";
-
1895  const auto& rhs = get_variable_name(conductance.variable);
-
1896  const ShadowUseStatement statement{lhs, "+=", rhs};
-
1897  const auto& text = process_shadow_update_statement(statement, BlockType::Equation);
-
1898  printer->add_line(text);
-
1899  }
-
1900  }
-
1901 }
-
1902 
-
1903 
- -
1905  printer->fmt_line("double I1 = nrn_current_{}({}+0.001);",
-
1906  info.mod_suffix,
-
1907  nrn_current_arguments());
-
1908  for (auto& ion: info.ions) {
-
1909  for (auto& var: ion.writes) {
-
1910  if (ion.is_ionic_current(var)) {
-
1911  const auto& name = get_variable_name(var);
-
1912  printer->fmt_line("double di{} = {};", ion.name, name);
-
1913  }
-
1914  }
-
1915  }
-
1916  printer->fmt_line("double I0 = nrn_current_{}({});", info.mod_suffix, nrn_current_arguments());
-
1917  printer->add_line("double rhs = I0;");
-
1918 
-
1919  printer->add_line("double g = (I1-I0)/0.001;");
-
1920  for (auto& ion: info.ions) {
-
1921  for (auto& var: ion.writes) {
-
1922  if (ion.is_ionic_current(var)) {
-
1923  const auto& lhs = std::string(naming::ION_VARNAME_PREFIX) + "di" + ion.name + "dv";
-
1924  auto rhs = fmt::format("(di{}-{})/0.001", ion.name, get_variable_name(var));
-
1925  if (info.point_process) {
-
1926  auto area = get_variable_name(naming::NODE_AREA_VARIABLE);
-
1927  rhs += fmt::format("*1.e2/{}", area);
-
1928  }
-
1929  const ShadowUseStatement statement{lhs, "+=", rhs};
-
1930  const auto& text = process_shadow_update_statement(statement, BlockType::Equation);
-
1931  printer->add_line(text);
-
1932  }
-
1933  }
-
1934  }
-
1935 }
-
1936 
-
1937 
- -
1939  printer->add_line("int node_id = node_data.nodeindices[id];");
-
1940  printer->add_line("double v = node_data.node_voltages[node_id];");
-
1941  printer->add_line("auto* _ppvar = _ml_arg->pdata[id];");
-
1942  const auto& read_statements = ion_read_statements(BlockType::Equation);
-
1943  for (auto& statement: read_statements) {
-
1944  printer->add_line(statement);
-
1945  }
-
1946 
-
1947  if (info.conductances.empty()) {
-
1948  print_nrn_cur_non_conductance_kernel();
-
1949  } else {
-
1950  print_nrn_cur_conductance_kernel(node);
-
1951  }
-
1952 
-
1953  const auto& write_statements = ion_write_statements(BlockType::Equation);
-
1954  for (auto& statement: write_statements) {
-
1955  auto text = process_shadow_update_statement(statement, BlockType::Equation);
-
1956  printer->add_line(text);
-
1957  }
-
1958 
-
1959  if (info.point_process) {
-
1960  const auto& area = get_variable_name(naming::NODE_AREA_VARIABLE);
-
1961  printer->fmt_line("double mfactor = 1.e2/{};", area);
-
1962  printer->add_line("g = g*mfactor;");
-
1963  printer->add_line("rhs = rhs*mfactor;");
-
1964  }
-
1965 
-
1966  // print_g_unused();
-
1967 }
-
1968 
-
1969 
-
1970 /// TODO: Edit for NEURON
- -
1972  return;
-
1973 }
-
1974 
-
1975 
-
1976 /// TODO: Edit for NEURON
- -
1978  if (!nrn_cur_required()) {
-
1979  return;
-
1980  }
-
1981 
-
1982  if (info.conductances.empty()) {
-
1983  print_nrn_current(*info.breakpoint_node);
-
1984  }
-
1985 
-
1986  printer->add_newline(2);
-
1987  printer->add_line("/** update current */");
-
1988  print_global_function_common_code(BlockType::Equation);
-
1989  // print_channel_iteration_block_parallel_hint(BlockType::Equation, info.breakpoint_node);
-
1990  printer->push_block("for (int id = 0; id < nodecount; id++)");
-
1991  print_nrn_cur_kernel(*info.breakpoint_node);
-
1992  // print_nrn_cur_matrix_shadow_update();
-
1993  // if (!nrn_cur_reduction_loop_required()) {
-
1994  // print_fast_imem_calculation();
-
1995  // }
-
1996 
+
1818 
+ +
1820  return get_arg_str(nrn_current_parameters());
+
1821 }
+
1822 
+
1823 
+ +
1825  if (ion_variable_struct_required()) {
+
1826  throw std::runtime_error("Not implemented.");
+
1827  }
+
1828 
+
1829  ParamVector params = {{"", "_nrn_mechanism_cache_range&", "", "_lmc"},
+
1830  {"", "NrnThread*", "", "nt"},
+
1831  {"", "Datum*", "", "_ppvar"},
+
1832  {"", "Datum*", "", "_thread"}};
+
1833 
+
1834  if (info.thread_callback_register) {
+
1835  auto type_name = fmt::format("{}&", thread_variables_struct());
+
1836  params.emplace_back("", type_name, "", "_thread_vars");
+
1837  }
+
1838  params.emplace_back("", "size_t", "", "id");
+
1839  params.emplace_back("", fmt::format("{}&", instance_struct()), "", "inst");
+
1840  params.emplace_back("", fmt::format("{}&", node_data_struct()), "", "node_data");
+
1841  params.emplace_back("", "double", "", "v");
+
1842  return params;
+
1843 }
+
1844 
+
1845 
+ +
1847  const auto& args = nrn_current_parameters();
+
1848  const auto& block = node.get_statement_block();
+
1849  printer->add_newline(2);
+
1850  printer->fmt_push_block("inline double nrn_current_{}({})",
+
1851  info.mod_suffix,
+
1852  get_parameter_str(args));
+
1853  printer->add_line("double current = 0.0;");
+
1854  print_statement_block(*block, false, false);
+
1855  for (auto& current: info.currents) {
+
1856  const auto& name = get_variable_name(current);
+
1857  printer->fmt_line("current += {};", name);
+
1858  }
+
1859  printer->add_line("return current;");
+
1860  printer->pop_block();
+
1861 }
+
1862 
+
1863 
+ +
1865  const auto& block = node.get_statement_block();
+
1866  print_statement_block(*block, false, false);
+
1867  if (!info.currents.empty()) {
+
1868  std::string sum;
+
1869  for (const auto& current: info.currents) {
+
1870  auto var = breakpoint_current(current);
+
1871  sum += get_variable_name(var);
+
1872  if (&current != &info.currents.back()) {
+
1873  sum += "+";
+
1874  }
+
1875  }
+
1876  printer->fmt_line("double rhs = {};", sum);
+
1877  }
+
1878 
+
1879  std::string sum;
+
1880  for (const auto& conductance: info.conductances) {
+
1881  auto var = breakpoint_current(conductance.variable);
+
1882  sum += get_variable_name(var);
+
1883  if (&conductance != &info.conductances.back()) {
+
1884  sum += "+";
+
1885  }
+
1886  }
+
1887  printer->fmt_line("double g = {};", sum);
+
1888 
+
1889  for (const auto& conductance: info.conductances) {
+
1890  if (!conductance.ion.empty()) {
+
1891  const auto& lhs = std::string(naming::ION_VARNAME_PREFIX) + "di" + conductance.ion +
+
1892  "dv";
+
1893  const auto& rhs = get_variable_name(conductance.variable);
+
1894  const ShadowUseStatement statement{lhs, "+=", rhs};
+
1895  const auto& text = process_shadow_update_statement(statement, BlockType::Equation);
+
1896  printer->add_line(text);
+
1897  }
+
1898  }
+
1899 }
+
1900 
+
1901 
+ +
1903  printer->fmt_line("double I1 = nrn_current_{}({}+0.001);",
+
1904  info.mod_suffix,
+
1905  nrn_current_arguments());
+
1906  for (auto& ion: info.ions) {
+
1907  for (auto& var: ion.writes) {
+
1908  if (ion.is_ionic_current(var)) {
+
1909  const auto& name = get_variable_name(var);
+
1910  printer->fmt_line("double di{} = {};", ion.name, name);
+
1911  }
+
1912  }
+
1913  }
+
1914  printer->fmt_line("double I0 = nrn_current_{}({});", info.mod_suffix, nrn_current_arguments());
+
1915  printer->add_line("double rhs = I0;");
+
1916 
+
1917  printer->add_line("double g = (I1-I0)/0.001;");
+
1918  for (auto& ion: info.ions) {
+
1919  for (auto& var: ion.writes) {
+
1920  if (ion.is_ionic_current(var)) {
+
1921  const auto& lhs = std::string(naming::ION_VARNAME_PREFIX) + "di" + ion.name + "dv";
+
1922  auto rhs = fmt::format("(di{}-{})/0.001", ion.name, get_variable_name(var));
+
1923  if (info.point_process) {
+
1924  auto area = get_variable_name(naming::NODE_AREA_VARIABLE);
+
1925  rhs += fmt::format("*1.e2/{}", area);
+
1926  }
+
1927  const ShadowUseStatement statement{lhs, "+=", rhs};
+
1928  const auto& text = process_shadow_update_statement(statement, BlockType::Equation);
+
1929  printer->add_line(text);
+
1930  }
+
1931  }
+
1932  }
+
1933 }
+
1934 
+
1935 
+ +
1937  printer->add_line("int node_id = node_data.nodeindices[id];");
+
1938  printer->add_line("double v = node_data.node_voltages[node_id];");
+
1939  printer->add_line("auto* _ppvar = _ml_arg->pdata[id];");
+
1940  const auto& read_statements = ion_read_statements(BlockType::Equation);
+
1941  for (auto& statement: read_statements) {
+
1942  printer->add_line(statement);
+
1943  }
+
1944 
+
1945  if (info.conductances.empty()) {
+
1946  print_nrn_cur_non_conductance_kernel();
+
1947  } else {
+
1948  print_nrn_cur_conductance_kernel(node);
+
1949  }
+
1950 
+
1951  const auto& write_statements = ion_write_statements(BlockType::Equation);
+
1952  for (auto& statement: write_statements) {
+
1953  auto text = process_shadow_update_statement(statement, BlockType::Equation);
+
1954  printer->add_line(text);
+
1955  }
+
1956 
+
1957  if (info.point_process) {
+
1958  const auto& area = get_variable_name(naming::NODE_AREA_VARIABLE);
+
1959  printer->fmt_line("double mfactor = 1.e2/{};", area);
+
1960  printer->add_line("g = g*mfactor;");
+
1961  printer->add_line("rhs = rhs*mfactor;");
+
1962  }
+
1963 
+
1964  // print_g_unused();
+
1965 }
+
1966 
+
1967 
+
1968 /// TODO: Edit for NEURON
+ +
1970  return;
+
1971 }
+
1972 
+
1973 
+
1974 /// TODO: Edit for NEURON
+ +
1976  if (!nrn_cur_required()) {
+
1977  return;
+
1978  }
+
1979 
+
1980  if (info.conductances.empty()) {
+
1981  print_nrn_current(*info.breakpoint_node);
+
1982  }
+
1983 
+
1984  printer->add_newline(2);
+
1985  printer->add_line("/** update current */");
+
1986  print_global_function_common_code(BlockType::Equation);
+
1987  // print_channel_iteration_block_parallel_hint(BlockType::Equation, info.breakpoint_node);
+
1988  printer->push_block("for (int id = 0; id < nodecount; id++)");
+
1989  print_nrn_cur_kernel(*info.breakpoint_node);
+
1990  // print_nrn_cur_matrix_shadow_update();
+
1991  // if (!nrn_cur_reduction_loop_required()) {
+
1992  // print_fast_imem_calculation();
+
1993  // }
+
1994 
+
1995 
+
1996  printer->fmt_line("node_data.node_rhs[node_id] {} rhs;", operator_for_rhs());
1997 
-
1998  printer->fmt_line("node_data.node_rhs[node_id] {} rhs;", operator_for_rhs());
-
1999 
-
2000  if (breakpoint_exist()) {
-
2001  printer->fmt_line("inst.{}[id] = g;",
-
2002  info.vectorize ? naming::CONDUCTANCE_UNUSED_VARIABLE
- -
2004  }
-
2005  printer->pop_block();
-
2006 
-
2007  // if (nrn_cur_reduction_loop_required()) {
-
2008  // printer->push_block("for (int id = 0; id < nodecount; id++)");
-
2009  // print_nrn_cur_matrix_shadow_reduction();
-
2010  // printer->pop_block();
-
2011  // print_fast_imem_calculation();
-
2012  // }
-
2013 
-
2014  // print_kernel_data_present_annotation_block_end();
-
2015  printer->pop_block();
-
2016 }
-
2017 
-
2018 
+
1998  if (breakpoint_exist()) {
+
1999  printer->fmt_line("inst.{}[id] = g;",
+
2000  info.vectorize ? naming::CONDUCTANCE_UNUSED_VARIABLE
+ +
2002  }
+
2003  printer->pop_block();
+
2004 
+
2005  // if (nrn_cur_reduction_loop_required()) {
+
2006  // printer->push_block("for (int id = 0; id < nodecount; id++)");
+
2007  // print_nrn_cur_matrix_shadow_reduction();
+
2008  // printer->pop_block();
+
2009  // print_fast_imem_calculation();
+
2010  // }
+
2011 
+
2012  // print_kernel_data_present_annotation_block_end();
+
2013  printer->pop_block();
+
2014 }
+
2015 
+
2016 
+
2017 /****************************************************************************************/
+
2018 /* Main code printing entry points */
2019 /****************************************************************************************/
-
2020 /* Main code printing entry points */
-
2021 /****************************************************************************************/
-
2022 
- -
2024  print_standard_includes();
-
2025  print_neuron_includes();
-
2026 
-
2027  if (info.thread_callback_register) {
-
2028  printer->add_line("extern void _nrn_thread_reg(int, int, void(*)(Datum*));");
-
2029  }
-
2030 }
-
2031 
-
2032 
- -
2034  print_global_macros();
-
2035  print_mechanism_variables_macros();
-
2036 
-
2037  printer->add_line("extern Node* nrn_alloc_node_;");
-
2038 }
-
2039 
-
2040 
- -
2042  printer->add_newline();
-
2043  printer->add_line("/* NEURON global macro definitions */");
-
2044  if (info.vectorize) {
-
2045  printer->add_multi_line(R"CODE(
-
2046  /* VECTORIZED */
-
2047  #define NRN_VECTORIZED 1
-
2048  )CODE");
-
2049  } else {
-
2050  printer->add_multi_line(R"CODE(
-
2051  /* NOT VECTORIZED */
-
2052  #define NRN_VECTORIZED 0
-
2053  )CODE");
-
2054  }
-
2055 }
-
2056 
-
2057 
- -
2059  printer->add_newline();
-
2060  printer->add_line("static constexpr auto number_of_datum_variables = ",
-
2061  std::to_string(int_variables_size()),
-
2062  ";");
-
2063  printer->add_line("static constexpr auto number_of_floating_point_variables = ",
-
2064  std::to_string(codegen_float_variables.size()),
-
2065  ";");
-
2066  printer->add_newline();
-
2067  printer->add_multi_line(R"CODE(
-
2068  namespace {
-
2069  template <typename T>
-
2070  using _nrn_mechanism_std_vector = std::vector<T>;
-
2071  using _nrn_model_sorted_token = neuron::model_sorted_token;
-
2072  using _nrn_mechanism_cache_range = neuron::cache::MechanismRange<number_of_floating_point_variables, number_of_datum_variables>;
-
2073  using _nrn_mechanism_cache_instance = neuron::cache::MechanismInstance<number_of_floating_point_variables, number_of_datum_variables>;
-
2074  using _nrn_non_owning_id_without_container = neuron::container::non_owning_identifier_without_container;
-
2075  template <typename T>
-
2076  using _nrn_mechanism_field = neuron::mechanism::field<T>;
-
2077  template <typename... Args>
-
2078  void _nrn_mechanism_register_data_fields(Args&&... args) {
-
2079  neuron::mechanism::register_data_fields(std::forward<Args>(args)...);
-
2080  }
-
2081  } // namespace
-
2082  )CODE");
-
2083 
-
2084  if (info.point_process) {
-
2085  printer->add_line("extern Prop* nrn_point_prop_;");
-
2086  } else {
-
2087  printer->add_line("Prop* hoc_getdata_range(int type);");
-
2088  }
-
2089  // for registration of tables
-
2090  if (info.table_count > 0) {
-
2091  printer->add_line("void _nrn_thread_table_reg(int, nrn_thread_table_check_t);");
-
2092  }
-
2093 }
-
2094 
-
2095 
-
2096 void CodegenNeuronCppVisitor::print_data_structures(bool print_initializers) {
-
2097  print_mechanism_global_var_structure(print_initializers);
-
2098  print_mechanism_range_var_structure(print_initializers);
-
2099  print_node_data_structure(print_initializers);
-
2100  print_thread_variables_structure(print_initializers);
-
2101  print_make_instance();
-
2102  print_make_node_data();
-
2103 }
-
2104 
-
2105 
- -
2107  if (!info.vectorize) {
-
2108  return;
-
2109  }
-
2110  printer->add_multi_line(R"CODE(
-
2111  #if NRN_PRCELLSTATE
-
2112  inst->v_unused[id] = v;
-
2113  #endif
-
2114  )CODE");
-
2115 }
-
2116 
-
2117 
- -
2119  printer->add_multi_line(R"CODE(
-
2120  #if NRN_PRCELLSTATE
-
2121  inst->g_unused[id] = g;
-
2122  #endif
-
2123  )CODE");
-
2124 }
-
2125 
-
2126 
- -
2128  print_hoc_py_wrapper_function_definitions();
-
2129  for (const auto& procedure: info.procedures) {
-
2130  print_procedure(*procedure);
-
2131  }
-
2132  for (const auto& function: info.functions) {
-
2133  print_function(*function);
-
2134  }
-
2135  print_nrn_init();
-
2136  print_nrn_cur();
-
2137  print_nrn_state();
-
2138  print_nrn_jacob();
-
2139  print_net_receive();
-
2140 }
-
2141 
-
2142 
- -
2144  print_backend_info();
-
2145  print_headers_include();
-
2146  print_macro_definitions();
-
2147  print_neuron_global_variable_declarations();
-
2148  print_namespace_start();
-
2149  print_nmodl_constants();
-
2150  print_prcellstate_macros();
-
2151  print_mechanism_info();
-
2152  print_data_structures(true);
-
2153  print_nrn_constructor();
-
2154  print_nrn_destructor();
-
2155  print_nrn_alloc();
-
2156  print_function_prototypes();
-
2157  print_functors_definitions();
-
2158  print_global_variables_for_hoc();
-
2159  print_thread_memory_callbacks();
-
2160  print_compute_functions(); // only nrn_cur and nrn_state
-
2161  print_sdlists_init(true);
-
2162  print_mechanism_register();
-
2163  print_namespace_stop();
-
2164 }
-
2165 
- -
2167  throw std::runtime_error("Not implemented.");
-
2168 }
-
2169 
-
2170 
- -
2172  auto const& arguments = node.get_arguments();
-
2173 
-
2174  if (printing_net_init) {
-
2175  throw std::runtime_error("Not implemented. [jfiwoei]");
-
2176  }
-
2177 
-
2178  std::string weight_pointer = "nullptr";
-
2179  auto point_process = get_variable_name(naming::POINT_PROCESS_VARIABLE,
-
2180  /* use_instance */ false);
-
2181  if (!printing_net_receive) {
-
2182  point_process += ".get<Point_process*>()";
-
2183  }
-
2184  const auto& tqitem = get_variable_name("tqitem", /* use_instance */ false);
-
2185 
-
2186  printer->fmt_text("{}(/* tqitem */ &{}, {}, {}, {} + ",
-
2187  info.artificial_cell ? "artcell_net_send" : "net_send",
-
2188  tqitem,
-
2189  weight_pointer,
-
2190  point_process,
-
2191  get_variable_name("t"));
-
2192  print_vector_elements(arguments, ", ");
-
2193  printer->add_text(')');
-
2194 }
-
2195 
- -
2197  const auto& point_process = get_variable_name("point_process", /* use_instance */ false);
-
2198  const auto& tqitem = get_variable_name("tqitem", /* use_instance */ false);
-
2199 
-
2200  printer->fmt_text("{}(/* tqitem */ &{}, {}, ",
-
2201  info.artificial_cell ? "artcell_net_move" : "net_move",
-
2202  tqitem,
-
2203  point_process);
-
2204 
-
2205  print_vector_elements(node.get_arguments(), ", ");
-
2206  printer->add_text(')');
-
2207 }
-
2208 
- -
2210  const auto& point_process = get_variable_name(naming::POINT_PROCESS_VARIABLE,
-
2211  /* use_instance */ false);
-
2212  printer->fmt_text("net_event({}, t)", point_process);
-
2213 }
-
2214 
-
2215 /**
-
2216  * Rename arguments to NET_RECEIVE block with corresponding pointer variable
-
2217  *
-
2218  * \code{.mod}
-
2219  * NET_RECEIVE (weight, R){
-
2220  * x = R
-
2221  * }
-
2222  * \endcode
+
2020 
+ +
2022  print_standard_includes();
+
2023  print_neuron_includes();
+
2024 
+
2025  if (info.thread_callback_register) {
+
2026  printer->add_line("extern void _nrn_thread_reg(int, int, void(*)(Datum*));");
+
2027  }
+
2028 }
+
2029 
+
2030 
+ +
2032  print_global_macros();
+
2033  print_mechanism_variables_macros();
+
2034 
+
2035  printer->add_line("extern Node* nrn_alloc_node_;");
+
2036 }
+
2037 
+
2038 
+ +
2040  printer->add_newline();
+
2041  printer->add_line("/* NEURON global macro definitions */");
+
2042  if (info.vectorize) {
+
2043  printer->add_multi_line(R"CODE(
+
2044  /* VECTORIZED */
+
2045  #define NRN_VECTORIZED 1
+
2046  )CODE");
+
2047  } else {
+
2048  printer->add_multi_line(R"CODE(
+
2049  /* NOT VECTORIZED */
+
2050  #define NRN_VECTORIZED 0
+
2051  )CODE");
+
2052  }
+
2053 }
+
2054 
+
2055 
+ +
2057  printer->add_newline();
+
2058  printer->add_line("static constexpr auto number_of_datum_variables = ",
+
2059  std::to_string(int_variables_size()),
+
2060  ";");
+
2061  printer->add_line("static constexpr auto number_of_floating_point_variables = ",
+
2062  std::to_string(codegen_float_variables.size()),
+
2063  ";");
+
2064  printer->add_newline();
+
2065  printer->add_multi_line(R"CODE(
+
2066  namespace {
+
2067  template <typename T>
+
2068  using _nrn_mechanism_std_vector = std::vector<T>;
+
2069  using _nrn_model_sorted_token = neuron::model_sorted_token;
+
2070  using _nrn_mechanism_cache_range = neuron::cache::MechanismRange<number_of_floating_point_variables, number_of_datum_variables>;
+
2071  using _nrn_mechanism_cache_instance = neuron::cache::MechanismInstance<number_of_floating_point_variables, number_of_datum_variables>;
+
2072  using _nrn_non_owning_id_without_container = neuron::container::non_owning_identifier_without_container;
+
2073  template <typename T>
+
2074  using _nrn_mechanism_field = neuron::mechanism::field<T>;
+
2075  template <typename... Args>
+
2076  void _nrn_mechanism_register_data_fields(Args&&... args) {
+
2077  neuron::mechanism::register_data_fields(std::forward<Args>(args)...);
+
2078  }
+
2079  } // namespace
+
2080  )CODE");
+
2081 
+
2082  if (info.point_process) {
+
2083  printer->add_line("extern Prop* nrn_point_prop_;");
+
2084  } else {
+
2085  printer->add_line("Prop* hoc_getdata_range(int type);");
+
2086  }
+
2087  // for registration of tables
+
2088  if (info.table_count > 0) {
+
2089  printer->add_line("void _nrn_thread_table_reg(int, nrn_thread_table_check_t);");
+
2090  }
+
2091 }
+
2092 
+
2093 
+
2094 void CodegenNeuronCppVisitor::print_data_structures(bool print_initializers) {
+
2095  print_mechanism_global_var_structure(print_initializers);
+
2096  print_mechanism_range_var_structure(print_initializers);
+
2097  print_node_data_structure(print_initializers);
+
2098  print_thread_variables_structure(print_initializers);
+
2099  print_make_instance();
+
2100  print_make_node_data();
+
2101 }
+
2102 
+
2103 
+ +
2105  if (!info.vectorize) {
+
2106  return;
+
2107  }
+
2108  printer->add_multi_line(R"CODE(
+
2109  #if NRN_PRCELLSTATE
+
2110  inst->v_unused[id] = v;
+
2111  #endif
+
2112  )CODE");
+
2113 }
+
2114 
+
2115 
+ +
2117  printer->add_multi_line(R"CODE(
+
2118  #if NRN_PRCELLSTATE
+
2119  inst->g_unused[id] = g;
+
2120  #endif
+
2121  )CODE");
+
2122 }
+
2123 
+
2124 
+ +
2126  print_hoc_py_wrapper_function_definitions();
+
2127  for (const auto& procedure: info.procedures) {
+
2128  print_procedure(*procedure);
+
2129  }
+
2130  for (const auto& function: info.functions) {
+
2131  print_function(*function);
+
2132  }
+
2133  print_nrn_init();
+
2134  print_nrn_cur();
+
2135  print_nrn_state();
+
2136  print_nrn_jacob();
+
2137  print_net_receive();
+
2138 }
+
2139 
+
2140 
+ +
2142  print_backend_info();
+
2143  print_headers_include();
+
2144  print_macro_definitions();
+
2145  print_neuron_global_variable_declarations();
+
2146  print_namespace_start();
+
2147  print_nmodl_constants();
+
2148  print_prcellstate_macros();
+
2149  print_mechanism_info();
+
2150  print_data_structures(true);
+
2151  print_nrn_constructor();
+
2152  print_nrn_destructor();
+
2153  print_nrn_alloc();
+
2154  print_function_prototypes();
+
2155  print_functors_definitions();
+
2156  print_global_variables_for_hoc();
+
2157  print_thread_memory_callbacks();
+
2158  print_compute_functions(); // only nrn_cur and nrn_state
+
2159  print_sdlists_init(true);
+
2160  print_mechanism_register();
+
2161  print_namespace_stop();
+
2162 }
+
2163 
+ +
2165  throw std::runtime_error("Not implemented.");
+
2166 }
+
2167 
+
2168 
+ +
2170  auto const& arguments = node.get_arguments();
+
2171 
+
2172  if (printing_net_init) {
+
2173  throw std::runtime_error("Not implemented. [jfiwoei]");
+
2174  }
+
2175 
+
2176  std::string weight_pointer = "nullptr";
+
2177  auto point_process = get_variable_name(naming::POINT_PROCESS_VARIABLE,
+
2178  /* use_instance */ false);
+
2179  if (!printing_net_receive) {
+
2180  point_process += ".get<Point_process*>()";
+
2181  }
+
2182  const auto& tqitem = get_variable_name("tqitem", /* use_instance */ false);
+
2183 
+
2184  printer->fmt_text("{}(/* tqitem */ &{}, {}, {}, {} + ",
+
2185  info.artificial_cell ? "artcell_net_send" : "net_send",
+
2186  tqitem,
+
2187  weight_pointer,
+
2188  point_process,
+
2189  get_variable_name("t"));
+
2190  print_vector_elements(arguments, ", ");
+
2191  printer->add_text(')');
+
2192 }
+
2193 
+ +
2195  const auto& point_process = get_variable_name("point_process", /* use_instance */ false);
+
2196  const auto& tqitem = get_variable_name("tqitem", /* use_instance */ false);
+
2197 
+
2198  printer->fmt_text("{}(/* tqitem */ &{}, {}, ",
+
2199  info.artificial_cell ? "artcell_net_move" : "net_move",
+
2200  tqitem,
+
2201  point_process);
+
2202 
+
2203  print_vector_elements(node.get_arguments(), ", ");
+
2204  printer->add_text(')');
+
2205 }
+
2206 
+ +
2208  const auto& point_process = get_variable_name(naming::POINT_PROCESS_VARIABLE,
+
2209  /* use_instance */ false);
+
2210  printer->fmt_text("net_event({}, t)", point_process);
+
2211 }
+
2212 
+
2213 /**
+
2214  * Rename arguments to NET_RECEIVE block with corresponding pointer variable
+
2215  *
+
2216  * \code{.mod}
+
2217  * NET_RECEIVE (weight, R){
+
2218  * x = R
+
2219  * }
+
2220  * \endcode
+
2221  *
+
2222  * then generated code should be:
2223  *
-
2224  * then generated code should be:
-
2225  *
-
2226  * \code{.cpp}
-
2227  * x[id] = _args[1];
-
2228  * \endcode
-
2229  *
-
2230  * So, the `R` in AST needs to be renamed with `_args[1]`.
-
2231  */
-
2232 static void rename_net_receive_arguments(const ast::NetReceiveBlock& net_receive_node,
-
2233  const ast::Node& node) {
-
2234  const auto& parameters = net_receive_node.get_parameters();
-
2235 
-
2236  auto n_parameters = parameters.size();
-
2237  for (size_t i = 0; i < n_parameters; ++i) {
-
2238  const auto& name = parameters[i]->get_node_name();
-
2239  auto var_used = VarUsageVisitor().variable_used(node, name);
-
2240  if (var_used) {
-
2241  RenameVisitor vr(name, fmt::format("_args[{}]", i));
-
2242  node.get_statement_block()->visit_children(vr);
-
2243  }
-
2244  }
-
2245 }
-
2246 
- -
2248  printing_net_receive = true;
-
2249  auto node = info.net_receive_node;
-
2250  if (!node) {
-
2251  return;
-
2252  }
-
2253 
-
2254  ParamVector args = {{"", "Point_process*", "", "_pnt"},
-
2255  {"", "double*", "", "_args"},
-
2256  {"", "double", "", "flag"}};
-
2257 
-
2258  printer->fmt_push_block("static void nrn_net_receive_{}({})",
-
2259  info.mod_suffix,
-
2260  get_parameter_str(args));
+
2224  * \code{.cpp}
+
2225  * x[id] = _args[1];
+
2226  * \endcode
+
2227  *
+
2228  * So, the `R` in AST needs to be renamed with `_args[1]`.
+
2229  */
+
2230 static void rename_net_receive_arguments(const ast::NetReceiveBlock& net_receive_node,
+
2231  const ast::Node& node) {
+
2232  const auto& parameters = net_receive_node.get_parameters();
+
2233 
+
2234  auto n_parameters = parameters.size();
+
2235  for (size_t i = 0; i < n_parameters; ++i) {
+
2236  const auto& name = parameters[i]->get_node_name();
+
2237  auto var_used = VarUsageVisitor().variable_used(node, name);
+
2238  if (var_used) {
+
2239  RenameVisitor vr(name, fmt::format("_args[{}]", i));
+
2240  node.get_statement_block()->visit_children(vr);
+
2241  }
+
2242  }
+
2243 }
+
2244 
+ +
2246  printing_net_receive = true;
+
2247  auto node = info.net_receive_node;
+
2248  if (!node) {
+
2249  return;
+
2250  }
+
2251 
+
2252  ParamVector args = {{"", "Point_process*", "", "_pnt"},
+
2253  {"", "double*", "", "_args"},
+
2254  {"", "double", "", "flag"}};
+
2255 
+
2256  printer->fmt_push_block("static void nrn_net_receive_{}({})",
+
2257  info.mod_suffix,
+
2258  get_parameter_str(args));
+
2259 
+
2260  rename_net_receive_arguments(*node, *node);
2261 
-
2262  rename_net_receive_arguments(*node, *node);
-
2263 
-
2264  printer->add_line("_nrn_mechanism_cache_instance _lmc{_pnt->prop};");
-
2265  printer->add_line("auto * nt = static_cast<NrnThread*>(_pnt->_vnt);");
-
2266  printer->add_line("auto * _ppvar = _nrn_mechanism_access_dparam(_pnt->prop);");
-
2267 
-
2268  printer->fmt_line("auto inst = make_instance_{}(_lmc);", info.mod_suffix);
-
2269  if (!info.artificial_cell) {
-
2270  printer->fmt_line("auto node_data = make_node_data_{}(_pnt->prop);", info.mod_suffix);
-
2271  }
-
2272  printer->fmt_line("// nocmodl has a nullptr dereference for thread variables.");
-
2273  printer->fmt_line("// NMODL will fail to compile at a later point, because of");
-
2274  printer->fmt_line("// missing '_thread_vars'.");
-
2275  printer->fmt_line("Datum * _thread = nullptr;");
-
2276 
-
2277  printer->add_line("size_t id = 0;");
-
2278  printer->add_line("double t = nt->_t;");
+
2262  printer->add_line("_nrn_mechanism_cache_instance _lmc{_pnt->prop};");
+
2263  printer->add_line("auto * nt = static_cast<NrnThread*>(_pnt->_vnt);");
+
2264  printer->add_line("auto * _ppvar = _nrn_mechanism_access_dparam(_pnt->prop);");
+
2265 
+
2266  printer->fmt_line("auto inst = make_instance_{}(_lmc);", info.mod_suffix);
+
2267  if (!info.artificial_cell) {
+
2268  printer->fmt_line("auto node_data = make_node_data_{}(_pnt->prop);", info.mod_suffix);
+
2269  }
+
2270  printer->fmt_line("// nocmodl has a nullptr dereference for thread variables.");
+
2271  printer->fmt_line("// NMODL will fail to compile at a later point, because of");
+
2272  printer->fmt_line("// missing '_thread_vars'.");
+
2273  printer->fmt_line("Datum * _thread = nullptr;");
+
2274 
+
2275  printer->add_line("size_t id = 0;");
+
2276  printer->add_line("double t = nt->_t;");
+
2277 
+
2278  print_statement_block(*node->get_statement_block(), false, false);
2279 
-
2280  print_statement_block(*node->get_statement_block(), false, false);
-
2281 
-
2282  printer->add_newline();
-
2283  printer->pop_block();
-
2284  printing_net_receive = false;
-
2285 }
-
2286 
-
2287 
+
2280  printer->add_newline();
+
2281  printer->pop_block();
+
2282  printing_net_receive = false;
+
2283 }
+
2284 
+
2285 
+
2286 /****************************************************************************************/
+
2287 /* Overloaded visitor routines */
2288 /****************************************************************************************/
-
2289 /* Overloaded visitor routines */
-
2290 /****************************************************************************************/
-
2291 
-
2292 /// TODO: Edit for NEURON
- -
2294  return;
-
2295 }
-
2296 
-
2297 
-
2298 } // namespace codegen
-
2299 } // namespace nmodl
+
2289 
+
2290 /// TODO: Edit for NEURON
+ +
2292  return;
+
2293 }
+
2294 
+
2295 
+
2296 } // namespace codegen
+
2297 } // namespace nmodl
static constexpr char RANDOM_SEMANTIC[]
semantic type for RANDOM variable
static bool starts_with(const std::string &haystack, const std::string &needle)
Check if haystack starts with needle.
-
void print_nrn_destructor() override
Print nrn_destructor function definition.
-
void print_callable_preamble_from_prop()
Print the set of common variables from a Prop only.
+
void print_nrn_destructor() override
Print nrn_destructor function definition.
+
void print_callable_preamble_from_prop()
Print the set of common variables from a Prop only.
Base class for all AST node.
Definition: node.hpp:40
bool is_index
if this is pure index (e.g.
-
void print_nrn_cur_non_conductance_kernel() override
Print the nrn_cur kernel without NMODL conductance keyword provisions.
+
void print_nrn_cur_non_conductance_kernel() override
Print the nrn_cur kernel without NMODL conductance keyword provisions.
std::string py_function_signature(const std::string &function_or_procedure_name) const
Get the signature of the npy <func_or_proc_name> function.
Helper to represent information about index/int variables.
-
void print_nrn_cur() override
Print nrn_cur / current update function definition.
-
void print_macro_definitions()
Print all NEURON macros.
-
void print_net_event_call(const ast::FunctionCall &node) override
Print call to net_event.
+
void print_nrn_cur() override
Print nrn_cur / current update function definition.
+
void print_macro_definitions()
Print all NEURON macros.
+
void print_net_event_call(const ast::FunctionCall &node) override
Print call to net_event.
static constexpr char POINT_PROCESS_VARIABLE[]
inbuilt neuron variable for point process
void print_neuron_includes()
Print includes from NEURON.
static constexpr char NRN_JACOB_METHOD[]
nrn_jacob method in generated code
-
void print_nrn_init(bool skip_init_check=true)
Print the nrn_init function definition.
+
void print_nrn_init(bool skip_init_check=true)
Print the nrn_init function definition.
void print_hoc_py_wrapper_function_body(const ast::Block *function_or_procedure_block, InterpreterWrapper wrapper_type)
std::string internal_method_arguments() override
Arguments for functions that are defined and used internally.
std::shared_ptr< symtab::Symbol > SymbolType
-
void print_nrn_alloc() override
Print nrn_alloc function definition.
+
void print_nrn_alloc() override
Print nrn_alloc function definition.
std::string register_mechanism_arguments() const override
Arguments for register_mech or point_register_mech function.
int position_of_int_var(const std::string &name) const override
Determine the position in the data array for a given int variable.
const ArgumentVector & get_parameters() const noexcept override
Getter for member variable NetReceiveBlock::parameters.
- +
std::string table_thread_function_name() const
Name of the threaded table checking function.
bool optimize_ion_variable_copies() const override
Check if ion variable copies should be avoided.
std::string hoc_function_name(const std::string &function_or_procedure_name) const
All functions and procedures need a hoc <func_or_proc_name> to be available to the HOC interpreter.
@@ -2433,31 +2431,31 @@
Visitor for printing C++ code compatible with legacy api of NEURON
std::string backend_name() const override
Name of the code generation backend.
std::string process_verbatim_text(std::string const &text) override
Process a verbatim block for possible variable renaming.
- -
void print_global_param_default_values()
Print global struct with default value of RANGE PARAMETERs.
+ +
void print_global_param_default_values()
Print global struct with default value of RANGE PARAMETERs.
std::string name
name of the ion
static constexpr char NTHREAD_DT_VARIABLE[]
dt variable in neuron thread structure
-
void print_g_unused() const override
Set g_unused (conductance) for NRN_PRCELLSTATE feature.
-
void visit_watch_statement(const ast::WatchStatement &node) override
TODO: Edit for NEURON.
-
void print_net_send_call(const ast::FunctionCall &node) override
Print call to net_send.
+
void print_g_unused() const override
Set g_unused (conductance) for NRN_PRCELLSTATE feature.
+
void visit_watch_statement(const ast::WatchStatement &node) override
TODO: Edit for NEURON.
+
void print_net_send_call(const ast::FunctionCall &node) override
Print call to net_send.
Check if variable is used in given block.
Implement string manipulation functions.
-
void print_net_move_call(const ast::FunctionCall &node) override
Print call to net_move.
+
void print_net_move_call(const ast::FunctionCall &node) override
Print call to net_move.
std::string thread_variable_name(const ThreadVariableInfo &var_info, bool use_instance=true) const
Determine the C++ string to print for thread variables.
static constexpr char NODE_AREA_VARIABLE[]
inbuilt neuron variable for area of the compartment
-
void print_nrn_state() override
Print nrn_state / state update function definition.
+
void print_nrn_state() override
Print nrn_state / state update function definition.
virtual bool is_function_block() const noexcept
Check if the ast node is an instance of ast::FunctionBlock.
Definition: ast.cpp:142
static constexpr char NRN_ALLOC_METHOD[]
nrn_alloc method in generated code
-
void print_initial_block(const ast::InitialBlock *node)
Print the initial block.
+
void print_initial_block(const ast::InitialBlock *node)
Print the initial block.
bool is_integer
if this is an integer (e.g.
-
void print_global_function_common_code(BlockType type, const std::string &function_name="") override
Print common code for global functions like nrn_init, nrn_cur and nrn_state.
+
void print_global_function_common_code(BlockType type, const std::string &function_name="") override
Print common code for global functions like nrn_init, nrn_cur and nrn_state.
std::string float_variable_name(const SymbolType &symbol, bool use_instance) const override
Determine the name of a float variable given its symbol.
std::string extra_conc_pointer_name() const
std::shared_ptr< StatementBlock > get_statement_block() const noexcept override
Getter for member variable BreakpointBlock::statement_block.
std::string rev_potential_pointer_name() const
-
void print_v_unused() const override
Set v_unused (voltage) for NRN_PRCELLSTATE feature.
- +
void print_v_unused() const override
Set v_unused (voltage) for NRN_PRCELLSTATE feature.
+
static constexpr char CONDUCTANCE_VARIABLE[]
range variable for conductance
ParamVector functor_params() override
The parameters of the Newton solver "functor".
Visitor for printing C++ code compatible with legacy api of CoreNEURON
@@ -2470,62 +2468,62 @@
@ Equation
breakpoint block
static constexpr char USE_TABLE_VARIABLE[]
global variable to indicate if table is used
Represent WATCH statement in NMODL.
-
void print_neuron_global_variable_declarations()
Print extern declarations for neuron global variables.
+
void print_neuron_global_variable_declarations()
Print extern declarations for neuron global variables.
Represents a BREAKPOINT block in NMODL.
-
void print_nrn_cur_conductance_kernel(const ast::BreakpointBlock &node) override
Print the nrn_cur kernel with NMODL conductance keyword provisions.
+
void print_nrn_cur_conductance_kernel(const ast::BreakpointBlock &node) override
Print the nrn_cur kernel with NMODL conductance keyword provisions.
std::string int_variable_name(const IndexVariableInfo &symbol, const std::string &name, bool use_instance) const override
Determine the name of an int variable given its symbol.
InterpreterWrapper
Enum to switch between HOC and Python wrappers for functions and procedures defined in mechanisms.
-
void print_global_variables_for_hoc() override
Print byte arrays that register scalar and vector variables for hoc interface.
+
void print_global_variables_for_hoc() override
Print byte arrays that register scalar and vector variables for hoc interface.
void print_standard_includes() override
Print standard C/C++ includes.
-
void print_mechanism_range_var_structure(bool print_initializers) override
Print the structure that wraps all range and int variables required for the NMODL.
+
void print_mechanism_range_var_structure(bool print_initializers) override
Print the structure that wraps all range and int variables required for the NMODL.
void add_variable_tqitem(std::vector< IndexVariableInfo > &variables) override
Add the variable tqitem during get_int_variables.
std::string hoc_function_signature(const std::string &function_or_procedure_name) const
Get the signature of the hoc <func_or_proc_name> function.
-
void print_thread_variables_structure(bool print_initializers)
Print the data structure used to access thread variables.
+
void print_thread_variables_structure(bool print_initializers)
Print the data structure used to access thread variables.
std::string to_string(const T &obj)
-
void print_compute_functions() override
Print all compute functions for every backend.
+
void print_compute_functions() override
Print all compute functions for every backend.
static constexpr char NRN_INIT_METHOD[]
nrn_init method in generated code
const ExpressionVector & get_arguments() const noexcept
Getter for member variable FunctionCall::arguments.
-
void print_thread_memory_callbacks()
Print thread variable (de-)initialization functions.
+
void print_thread_memory_callbacks()
Print thread variable (de-)initialization functions.
static void rename_net_receive_arguments(const ast::NetReceiveBlock &net_receive_node, const ast::Node &node)
Rename arguments to NET_RECEIVE block with corresponding pointer variable.
-
void print_nrn_cur_kernel(const ast::BreakpointBlock &node) override
Print main body of nrn_cur function.
+
void print_nrn_cur_kernel(const ast::BreakpointBlock &node) override
Print main body of nrn_cur function.
Blindly rename given variable to new name
static constexpr char NRN_CUR_METHOD[]
nrn_cur method in generated code
-
void print_mechanism_register() override
Print the mechanism registration function.
+
void print_mechanism_register() override
Print the mechanism registration function.
Implement utility functions for codegen visitors.
static constexpr char TQITEM_VARIABLE[]
inbuilt neuron variable for tqitem process
-
void print_nrn_jacob()
Print nrn_jacob function definition.
+
void print_nrn_jacob()
Print nrn_jacob function definition.
-
void print_fast_imem_calculation() override
Print fast membrane current calculation code.
-
void print_data_structures(bool print_initializers) override
Print all classes.
+
void print_fast_imem_calculation() override
Print fast membrane current calculation code.
+
void print_data_structures(bool print_initializers) override
Print all classes.
void print_sdlists_init(bool print_initializers) override
const std::string external_method_arguments() noexcept override
Arguments for external functions called from generated code.
std::string py_function_name(const std::string &function_or_procedure_name) const
In non POINT_PROCESS mechanisms all functions and procedures need a py <func_or_proc_name> to be avai...
size_t offset
The global variables ahead of this one require offset doubles to store.
-
void print_node_data_structure(bool print_initializers)
Print the structure that wraps all node variables required for the NMODL.
+
void print_node_data_structure(bool print_initializers)
Print the structure that wraps all node variables required for the NMODL.
static constexpr char INST_GLOBAL_MEMBER[]
instance struct member pointing to the global variable structure
-
void print_make_instance() const
Print make_*_instance.
+
void print_make_instance() const
Print make_*_instance.
void print_atomic_reduction_pragma() override
Print atomic update pragma for reduction statements.
NmodlType
NMODL variable properties.
void print_setdata_functions()
Print NEURON functions related to setting global variables of the mechanism.
std::string get_name(const std::shared_ptr< symtab::Symbol > &sym)
Represents ion write statement during code generation.
-
void print_mechanism_variables_macros()
Print mechanism variables' related macros.
-
void print_nrn_constructor() override
Print nrn_constructor function definition.
+
void print_mechanism_variables_macros()
Print mechanism variables' related macros.
+
void print_nrn_constructor() override
Print nrn_constructor function definition.
void print_check_table_function_prototypes()
Print all check_* function declarations.
BlockType
Helper to represent various block types.
-
void print_headers_include() override
Print all includes.
+
void print_headers_include() override
Print all includes.
const ParamVector external_method_parameters(bool table=false) noexcept override
Parameters for functions in generated code that are called back from external code.
void print_function_or_procedure(const ast::Block &node, const std::string &name, const std::unordered_set< CppObjectSpecifier > &specifiers={ CppObjectSpecifier::Inline}) override
Print nmodl function or procedure (common code)
static constexpr char NRN_STATE_METHOD[]
nrn_state method in generated code
const std::shared_ptr< symtab::Symbol > symbol
Version information and units file path.
-
void print_nrn_current(const ast::BreakpointBlock &node) override
Print the nrn_current kernel.
+
void print_nrn_current(const ast::BreakpointBlock &node) override
Print the nrn_current kernel.
int position_of_float_var(const std::string &name) const override
Determine the position in the data array for a given float variable.
std::string get_variable_name(const std::string &name, bool use_instance=true) const override
Determine variable name in the structure of mechanism properties.
static constexpr char AREA_VARIABLE[]
similar to node_area but user can explicitly declare it as area
-
void print_make_node_data() const
Print make_*_node_data.
+
void print_make_node_data() const
Print make_*_node_data.
virtual std::shared_ptr< StatementBlock > get_statement_block() const
Return associated statement block for the AST node.
Definition: ast.cpp:32
std::string simulator_name() override
Name of the simulator the code was generated for.
void print_function_procedure_helper(const ast::Block &node) override
Common helper function to help printing function or procedure blocks.
@@ -2542,7 +2540,7 @@
static constexpr char NRN_DESTRUCTOR_METHOD[]
nrn_destructor method in generated code
static constexpr char CONDUCTANCE_UNUSED_VARIABLE[]
range variable when conductance is not used (for vectorized model)
-
void print_codegen_routines() override
Print entry point to code generation.
+
void print_codegen_routines() override
Print entry point to code generation.
void append_conc_write_statements(std::vector< ShadowUseStatement > &statements, const Ion &ion, const std::string &concentration) override
Generate Function call statement for nrn_wrote_conc.
static constexpr char NRN_POINTERINDEX[]
hoc_nrnpointerindex name
@@ -2550,11 +2548,11 @@
int get_index_from_name(const std::vector< T > &variables, const std::string &name)
virtual std::string get_node_name() const
Return name of of the node.
Definition: ast.cpp:28
Auto generated AST classes declaration.
-
void print_net_receive()
Print net_receive call-back.
+
void print_net_receive()
Print net_receive call-back.
void print_function_prototypes() override
Print function and procedures prototype declaration.
void print_mechanism_global_var_structure(bool print_initializers) override
Print the structure that wraps all global variables used in the NMODL.
std::string namespace_name() override
Name of "our" namespace.
-
void print_global_macros()
Print NEURON global variable macros.
+
void print_global_macros()
Print NEURON global variable macros.
std::string intra_conc_pointer_name() const
std::vector< std::tuple< std::string, std::string, std::string, std::string > > ParamVector
A vector of parameters represented by a 4-tuple of strings:
static constexpr char ION_VARNAME_PREFIX[]
prefix for ion variable
diff --git a/notebooks/nmodl-kinetic-schemes.ipynb b/notebooks/nmodl-kinetic-schemes.ipynb index 449d1856f..a5816d15e 100644 --- a/notebooks/nmodl-kinetic-schemes.ipynb +++ b/notebooks/nmodl-kinetic-schemes.ipynb @@ -152,10 +152,10 @@ "execution_count": 1, "metadata": { "execution": { - "iopub.execute_input": "2024-09-13T13:21:26.468523Z", - "iopub.status.busy": "2024-09-13T13:21:26.467981Z", - "iopub.status.idle": "2024-09-13T13:21:27.296565Z", - "shell.execute_reply": "2024-09-13T13:21:27.295794Z" + "iopub.execute_input": "2024-09-17T08:23:29.281163Z", + "iopub.status.busy": "2024-09-17T08:23:29.280577Z", + "iopub.status.idle": "2024-09-17T08:23:30.102117Z", + "shell.execute_reply": "2024-09-17T08:23:30.101171Z" } }, "outputs": [], @@ -169,10 +169,10 @@ "execution_count": 2, "metadata": { "execution": { - "iopub.execute_input": "2024-09-13T13:21:27.299629Z", - "iopub.status.busy": "2024-09-13T13:21:27.299393Z", - "iopub.status.idle": "2024-09-13T13:21:27.331267Z", - "shell.execute_reply": "2024-09-13T13:21:27.330451Z" + "iopub.execute_input": "2024-09-17T08:23:30.105683Z", + "iopub.status.busy": "2024-09-17T08:23:30.105134Z", + "iopub.status.idle": "2024-09-17T08:23:30.135751Z", + "shell.execute_reply": "2024-09-17T08:23:30.135048Z" } }, "outputs": [], @@ -277,10 +277,10 @@ "execution_count": 3, "metadata": { "execution": { - "iopub.execute_input": "2024-09-13T13:21:27.334526Z", - "iopub.status.busy": "2024-09-13T13:21:27.334162Z", - "iopub.status.idle": "2024-09-13T13:21:27.339151Z", - "shell.execute_reply": "2024-09-13T13:21:27.338449Z" + "iopub.execute_input": "2024-09-17T08:23:30.138815Z", + "iopub.status.busy": "2024-09-17T08:23:30.138554Z", + "iopub.status.idle": "2024-09-17T08:23:30.143783Z", + "shell.execute_reply": "2024-09-17T08:23:30.143090Z" } }, "outputs": [ @@ -323,10 +323,10 @@ "execution_count": 4, "metadata": { "execution": { - "iopub.execute_input": "2024-09-13T13:21:27.372469Z", - "iopub.status.busy": "2024-09-13T13:21:27.372039Z", - "iopub.status.idle": "2024-09-13T13:21:27.376596Z", - "shell.execute_reply": "2024-09-13T13:21:27.375913Z" + "iopub.execute_input": "2024-09-17T08:23:30.175024Z", + "iopub.status.busy": "2024-09-17T08:23:30.174461Z", + "iopub.status.idle": "2024-09-17T08:23:30.178914Z", + "shell.execute_reply": "2024-09-17T08:23:30.178200Z" } }, "outputs": [ @@ -367,10 +367,10 @@ "execution_count": 5, "metadata": { "execution": { - "iopub.execute_input": "2024-09-13T13:21:27.379225Z", - "iopub.status.busy": "2024-09-13T13:21:27.378735Z", - "iopub.status.idle": "2024-09-13T13:21:27.382491Z", - "shell.execute_reply": "2024-09-13T13:21:27.381789Z" + "iopub.execute_input": "2024-09-17T08:23:30.181579Z", + "iopub.status.busy": "2024-09-17T08:23:30.181182Z", + "iopub.status.idle": "2024-09-17T08:23:30.185150Z", + "shell.execute_reply": "2024-09-17T08:23:30.184475Z" }, "scrolled": true }, @@ -412,10 +412,10 @@ "execution_count": 6, "metadata": { "execution": { - "iopub.execute_input": "2024-09-13T13:21:27.385236Z", - "iopub.status.busy": "2024-09-13T13:21:27.384729Z", - "iopub.status.idle": "2024-09-13T13:21:27.388733Z", - "shell.execute_reply": "2024-09-13T13:21:27.388133Z" + "iopub.execute_input": "2024-09-17T08:23:30.187395Z", + "iopub.status.busy": "2024-09-17T08:23:30.187197Z", + "iopub.status.idle": "2024-09-17T08:23:30.191191Z", + "shell.execute_reply": "2024-09-17T08:23:30.190529Z" }, "scrolled": true }, @@ -459,10 +459,10 @@ "execution_count": 7, "metadata": { "execution": { - "iopub.execute_input": "2024-09-13T13:21:27.391206Z", - "iopub.status.busy": "2024-09-13T13:21:27.390869Z", - "iopub.status.idle": "2024-09-13T13:21:27.395589Z", - "shell.execute_reply": "2024-09-13T13:21:27.394888Z" + "iopub.execute_input": "2024-09-17T08:23:30.193827Z", + "iopub.status.busy": "2024-09-17T08:23:30.193411Z", + "iopub.status.idle": "2024-09-17T08:23:30.197708Z", + "shell.execute_reply": "2024-09-17T08:23:30.197042Z" } }, "outputs": [ diff --git a/notebooks/nmodl-python-tutorial.ipynb b/notebooks/nmodl-python-tutorial.ipynb index 0a57422b5..891e9b77e 100644 --- a/notebooks/nmodl-python-tutorial.ipynb +++ b/notebooks/nmodl-python-tutorial.ipynb @@ -30,10 +30,10 @@ "execution_count": 1, "metadata": { "execution": { - "iopub.execute_input": "2024-09-13T13:21:32.616407Z", - "iopub.status.busy": "2024-09-13T13:21:32.615919Z", - "iopub.status.idle": "2024-09-13T13:21:33.449926Z", - "shell.execute_reply": "2024-09-13T13:21:33.449057Z" + "iopub.execute_input": "2024-09-17T08:23:35.612345Z", + "iopub.status.busy": "2024-09-17T08:23:35.611785Z", + "iopub.status.idle": "2024-09-17T08:23:36.423158Z", + "shell.execute_reply": "2024-09-17T08:23:36.422273Z" } }, "outputs": [], @@ -63,10 +63,10 @@ "execution_count": 2, "metadata": { "execution": { - "iopub.execute_input": "2024-09-13T13:21:33.453289Z", - "iopub.status.busy": "2024-09-13T13:21:33.452805Z", - "iopub.status.idle": "2024-09-13T13:21:33.485155Z", - "shell.execute_reply": "2024-09-13T13:21:33.484459Z" + "iopub.execute_input": "2024-09-17T08:23:36.426536Z", + "iopub.status.busy": "2024-09-17T08:23:36.426301Z", + "iopub.status.idle": "2024-09-17T08:23:36.456065Z", + "shell.execute_reply": "2024-09-17T08:23:36.455241Z" } }, "outputs": [], @@ -86,10 +86,10 @@ "execution_count": 3, "metadata": { "execution": { - "iopub.execute_input": "2024-09-13T13:21:33.488714Z", - "iopub.status.busy": "2024-09-13T13:21:33.488267Z", - "iopub.status.idle": "2024-09-13T13:21:33.492075Z", - "shell.execute_reply": "2024-09-13T13:21:33.491440Z" + "iopub.execute_input": "2024-09-17T08:23:36.459171Z", + "iopub.status.busy": "2024-09-17T08:23:36.458892Z", + "iopub.status.idle": "2024-09-17T08:23:36.462842Z", + "shell.execute_reply": "2024-09-17T08:23:36.462269Z" } }, "outputs": [], @@ -152,10 +152,10 @@ "execution_count": 4, "metadata": { "execution": { - "iopub.execute_input": "2024-09-13T13:21:33.494612Z", - "iopub.status.busy": "2024-09-13T13:21:33.494290Z", - "iopub.status.idle": "2024-09-13T13:21:33.498174Z", - "shell.execute_reply": "2024-09-13T13:21:33.497510Z" + "iopub.execute_input": "2024-09-17T08:23:36.465415Z", + "iopub.status.busy": "2024-09-17T08:23:36.465054Z", + "iopub.status.idle": "2024-09-17T08:23:36.468979Z", + "shell.execute_reply": "2024-09-17T08:23:36.468412Z" } }, "outputs": [], @@ -183,10 +183,10 @@ "execution_count": 5, "metadata": { "execution": { - "iopub.execute_input": "2024-09-13T13:21:33.500806Z", - "iopub.status.busy": "2024-09-13T13:21:33.500497Z", - "iopub.status.idle": "2024-09-13T13:21:33.504713Z", - "shell.execute_reply": "2024-09-13T13:21:33.504011Z" + "iopub.execute_input": "2024-09-17T08:23:36.471549Z", + "iopub.status.busy": "2024-09-17T08:23:36.471123Z", + "iopub.status.idle": "2024-09-17T08:23:36.475246Z", + "shell.execute_reply": "2024-09-17T08:23:36.474544Z" } }, "outputs": [ @@ -235,10 +235,10 @@ "execution_count": 6, "metadata": { "execution": { - "iopub.execute_input": "2024-09-13T13:21:33.507261Z", - "iopub.status.busy": "2024-09-13T13:21:33.506857Z", - "iopub.status.idle": "2024-09-13T13:21:33.510730Z", - "shell.execute_reply": "2024-09-13T13:21:33.510216Z" + "iopub.execute_input": "2024-09-17T08:23:36.477846Z", + "iopub.status.busy": "2024-09-17T08:23:36.477461Z", + "iopub.status.idle": "2024-09-17T08:23:36.481767Z", + "shell.execute_reply": "2024-09-17T08:23:36.481232Z" } }, "outputs": [], @@ -260,10 +260,10 @@ "execution_count": 7, "metadata": { "execution": { - "iopub.execute_input": "2024-09-13T13:21:33.513274Z", - "iopub.status.busy": "2024-09-13T13:21:33.512910Z", - "iopub.status.idle": "2024-09-13T13:21:33.516532Z", - "shell.execute_reply": "2024-09-13T13:21:33.515882Z" + "iopub.execute_input": "2024-09-17T08:23:36.484393Z", + "iopub.status.busy": "2024-09-17T08:23:36.484008Z", + "iopub.status.idle": "2024-09-17T08:23:36.488074Z", + "shell.execute_reply": "2024-09-17T08:23:36.487354Z" } }, "outputs": [ @@ -297,10 +297,10 @@ "execution_count": 8, "metadata": { "execution": { - "iopub.execute_input": "2024-09-13T13:21:33.519022Z", - "iopub.status.busy": "2024-09-13T13:21:33.518650Z", - "iopub.status.idle": "2024-09-13T13:21:33.526267Z", - "shell.execute_reply": "2024-09-13T13:21:33.525559Z" + "iopub.execute_input": "2024-09-17T08:23:36.490686Z", + "iopub.status.busy": "2024-09-17T08:23:36.490304Z", + "iopub.status.idle": "2024-09-17T08:23:36.497661Z", + "shell.execute_reply": "2024-09-17T08:23:36.496988Z" } }, "outputs": [ @@ -365,10 +365,10 @@ "execution_count": 9, "metadata": { "execution": { - "iopub.execute_input": "2024-09-13T13:21:33.528752Z", - "iopub.status.busy": "2024-09-13T13:21:33.528540Z", - "iopub.status.idle": "2024-09-13T13:21:33.532864Z", - "shell.execute_reply": "2024-09-13T13:21:33.532193Z" + "iopub.execute_input": "2024-09-17T08:23:36.500111Z", + "iopub.status.busy": "2024-09-17T08:23:36.499905Z", + "iopub.status.idle": "2024-09-17T08:23:36.504188Z", + "shell.execute_reply": "2024-09-17T08:23:36.503524Z" } }, "outputs": [ @@ -416,10 +416,10 @@ "execution_count": 10, "metadata": { "execution": { - "iopub.execute_input": "2024-09-13T13:21:33.535416Z", - "iopub.status.busy": "2024-09-13T13:21:33.535212Z", - "iopub.status.idle": "2024-09-13T13:21:33.538729Z", - "shell.execute_reply": "2024-09-13T13:21:33.538088Z" + "iopub.execute_input": "2024-09-17T08:23:36.506664Z", + "iopub.status.busy": "2024-09-17T08:23:36.506463Z", + "iopub.status.idle": "2024-09-17T08:23:36.509864Z", + "shell.execute_reply": "2024-09-17T08:23:36.509225Z" } }, "outputs": [], @@ -441,10 +441,10 @@ "execution_count": 11, "metadata": { "execution": { - "iopub.execute_input": "2024-09-13T13:21:33.541119Z", - "iopub.status.busy": "2024-09-13T13:21:33.540913Z", - "iopub.status.idle": "2024-09-13T13:21:33.544770Z", - "shell.execute_reply": "2024-09-13T13:21:33.544125Z" + "iopub.execute_input": "2024-09-17T08:23:36.512376Z", + "iopub.status.busy": "2024-09-17T08:23:36.511890Z", + "iopub.status.idle": "2024-09-17T08:23:36.515771Z", + "shell.execute_reply": "2024-09-17T08:23:36.515061Z" } }, "outputs": [ @@ -510,10 +510,10 @@ "execution_count": 12, "metadata": { "execution": { - "iopub.execute_input": "2024-09-13T13:21:33.547227Z", - "iopub.status.busy": "2024-09-13T13:21:33.547023Z", - "iopub.status.idle": "2024-09-13T13:21:33.550437Z", - "shell.execute_reply": "2024-09-13T13:21:33.549800Z" + "iopub.execute_input": "2024-09-17T08:23:36.518310Z", + "iopub.status.busy": "2024-09-17T08:23:36.517944Z", + "iopub.status.idle": "2024-09-17T08:23:36.521378Z", + "shell.execute_reply": "2024-09-17T08:23:36.520732Z" } }, "outputs": [ @@ -548,10 +548,10 @@ "execution_count": 13, "metadata": { "execution": { - "iopub.execute_input": "2024-09-13T13:21:33.553036Z", - "iopub.status.busy": "2024-09-13T13:21:33.552669Z", - "iopub.status.idle": "2024-09-13T13:21:33.556212Z", - "shell.execute_reply": "2024-09-13T13:21:33.555593Z" + "iopub.execute_input": "2024-09-17T08:23:36.523901Z", + "iopub.status.busy": "2024-09-17T08:23:36.523520Z", + "iopub.status.idle": "2024-09-17T08:23:36.527108Z", + "shell.execute_reply": "2024-09-17T08:23:36.526478Z" } }, "outputs": [ @@ -584,10 +584,10 @@ "execution_count": 14, "metadata": { "execution": { - "iopub.execute_input": "2024-09-13T13:21:33.558808Z", - "iopub.status.busy": "2024-09-13T13:21:33.558419Z", - "iopub.status.idle": "2024-09-13T13:21:33.562026Z", - "shell.execute_reply": "2024-09-13T13:21:33.561350Z" + "iopub.execute_input": "2024-09-17T08:23:36.529588Z", + "iopub.status.busy": "2024-09-17T08:23:36.529205Z", + "iopub.status.idle": "2024-09-17T08:23:36.533019Z", + "shell.execute_reply": "2024-09-17T08:23:36.532355Z" } }, "outputs": [ @@ -622,10 +622,10 @@ "execution_count": 15, "metadata": { "execution": { - "iopub.execute_input": "2024-09-13T13:21:33.564751Z", - "iopub.status.busy": "2024-09-13T13:21:33.564363Z", - "iopub.status.idle": "2024-09-13T13:21:33.568465Z", - "shell.execute_reply": "2024-09-13T13:21:33.567813Z" + "iopub.execute_input": "2024-09-17T08:23:36.535580Z", + "iopub.status.busy": "2024-09-17T08:23:36.535191Z", + "iopub.status.idle": "2024-09-17T08:23:36.539604Z", + "shell.execute_reply": "2024-09-17T08:23:36.538934Z" } }, "outputs": [ @@ -669,10 +669,10 @@ "execution_count": 16, "metadata": { "execution": { - "iopub.execute_input": "2024-09-13T13:21:33.571108Z", - "iopub.status.busy": "2024-09-13T13:21:33.570714Z", - "iopub.status.idle": "2024-09-13T13:21:33.576347Z", - "shell.execute_reply": "2024-09-13T13:21:33.575666Z" + "iopub.execute_input": "2024-09-17T08:23:36.541963Z", + "iopub.status.busy": "2024-09-17T08:23:36.541758Z", + "iopub.status.idle": "2024-09-17T08:23:36.547167Z", + "shell.execute_reply": "2024-09-17T08:23:36.546452Z" } }, "outputs": [ @@ -733,10 +733,10 @@ "execution_count": 17, "metadata": { "execution": { - "iopub.execute_input": "2024-09-13T13:21:33.578801Z", - "iopub.status.busy": "2024-09-13T13:21:33.578404Z", - "iopub.status.idle": "2024-09-13T13:21:33.581921Z", - "shell.execute_reply": "2024-09-13T13:21:33.581326Z" + "iopub.execute_input": "2024-09-17T08:23:36.549814Z", + "iopub.status.busy": "2024-09-17T08:23:36.549417Z", + "iopub.status.idle": "2024-09-17T08:23:36.553109Z", + "shell.execute_reply": "2024-09-17T08:23:36.552551Z" } }, "outputs": [], @@ -761,10 +761,10 @@ "execution_count": 18, "metadata": { "execution": { - "iopub.execute_input": "2024-09-13T13:21:33.584507Z", - "iopub.status.busy": "2024-09-13T13:21:33.584128Z", - "iopub.status.idle": "2024-09-13T13:21:33.594572Z", - "shell.execute_reply": "2024-09-13T13:21:33.593982Z" + "iopub.execute_input": "2024-09-17T08:23:36.555695Z", + "iopub.status.busy": "2024-09-17T08:23:36.555349Z", + "iopub.status.idle": "2024-09-17T08:23:36.565776Z", + "shell.execute_reply": "2024-09-17T08:23:36.565212Z" } }, "outputs": [], @@ -857,10 +857,10 @@ "execution_count": 19, "metadata": { "execution": { - "iopub.execute_input": "2024-09-13T13:21:33.597259Z", - "iopub.status.busy": "2024-09-13T13:21:33.596843Z", - "iopub.status.idle": "2024-09-13T13:21:33.600516Z", - "shell.execute_reply": "2024-09-13T13:21:33.599867Z" + "iopub.execute_input": "2024-09-17T08:23:36.568201Z", + "iopub.status.busy": "2024-09-17T08:23:36.567875Z", + "iopub.status.idle": "2024-09-17T08:23:36.571721Z", + "shell.execute_reply": "2024-09-17T08:23:36.571041Z" } }, "outputs": [ @@ -897,10 +897,10 @@ "execution_count": 20, "metadata": { "execution": { - "iopub.execute_input": "2024-09-13T13:21:33.603373Z", - "iopub.status.busy": "2024-09-13T13:21:33.602975Z", - "iopub.status.idle": "2024-09-13T13:21:33.608654Z", - "shell.execute_reply": "2024-09-13T13:21:33.607979Z" + "iopub.execute_input": "2024-09-17T08:23:36.574198Z", + "iopub.status.busy": "2024-09-17T08:23:36.573880Z", + "iopub.status.idle": "2024-09-17T08:23:36.579386Z", + "shell.execute_reply": "2024-09-17T08:23:36.578703Z" } }, "outputs": [ diff --git a/notebooks/nmodl-sympy-conductance.ipynb b/notebooks/nmodl-sympy-conductance.ipynb index 754327e6f..6286ef398 100644 --- a/notebooks/nmodl-sympy-conductance.ipynb +++ b/notebooks/nmodl-sympy-conductance.ipynb @@ -86,10 +86,10 @@ "execution_count": 1, "metadata": { "execution": { - "iopub.execute_input": "2024-09-13T13:21:36.064255Z", - "iopub.status.busy": "2024-09-13T13:21:36.064070Z", - "iopub.status.idle": "2024-09-13T13:21:36.869392Z", - "shell.execute_reply": "2024-09-13T13:21:36.868640Z" + "iopub.execute_input": "2024-09-17T08:23:39.122236Z", + "iopub.status.busy": "2024-09-17T08:23:39.122028Z", + "iopub.status.idle": "2024-09-17T08:23:39.965595Z", + "shell.execute_reply": "2024-09-17T08:23:39.964763Z" } }, "outputs": [], @@ -103,10 +103,10 @@ "execution_count": 2, "metadata": { "execution": { - "iopub.execute_input": "2024-09-13T13:21:36.872445Z", - "iopub.status.busy": "2024-09-13T13:21:36.872230Z", - "iopub.status.idle": "2024-09-13T13:21:36.902732Z", - "shell.execute_reply": "2024-09-13T13:21:36.902044Z" + "iopub.execute_input": "2024-09-17T08:23:39.968917Z", + "iopub.status.busy": "2024-09-17T08:23:39.968486Z", + "iopub.status.idle": "2024-09-17T08:23:40.000203Z", + "shell.execute_reply": "2024-09-17T08:23:39.999483Z" } }, "outputs": [], @@ -149,10 +149,10 @@ "execution_count": 3, "metadata": { "execution": { - "iopub.execute_input": "2024-09-13T13:21:36.905648Z", - "iopub.status.busy": "2024-09-13T13:21:36.905434Z", - "iopub.status.idle": "2024-09-13T13:21:37.189706Z", - "shell.execute_reply": "2024-09-13T13:21:37.188937Z" + "iopub.execute_input": "2024-09-17T08:23:40.003567Z", + "iopub.status.busy": "2024-09-17T08:23:40.003094Z", + "iopub.status.idle": "2024-09-17T08:23:40.298840Z", + "shell.execute_reply": "2024-09-17T08:23:40.298037Z" } }, "outputs": [ @@ -196,10 +196,10 @@ "execution_count": 4, "metadata": { "execution": { - "iopub.execute_input": "2024-09-13T13:21:37.192598Z", - "iopub.status.busy": "2024-09-13T13:21:37.192190Z", - "iopub.status.idle": "2024-09-13T13:21:37.327865Z", - "shell.execute_reply": "2024-09-13T13:21:37.327104Z" + "iopub.execute_input": "2024-09-17T08:23:40.301998Z", + "iopub.status.busy": "2024-09-17T08:23:40.301381Z", + "iopub.status.idle": "2024-09-17T08:23:40.435812Z", + "shell.execute_reply": "2024-09-17T08:23:40.435099Z" } }, "outputs": [ @@ -243,10 +243,10 @@ "execution_count": 5, "metadata": { "execution": { - "iopub.execute_input": "2024-09-13T13:21:37.330816Z", - "iopub.status.busy": "2024-09-13T13:21:37.330349Z", - "iopub.status.idle": "2024-09-13T13:21:37.339408Z", - "shell.execute_reply": "2024-09-13T13:21:37.338686Z" + "iopub.execute_input": "2024-09-17T08:23:40.438455Z", + "iopub.status.busy": "2024-09-17T08:23:40.438231Z", + "iopub.status.idle": "2024-09-17T08:23:40.447042Z", + "shell.execute_reply": "2024-09-17T08:23:40.446310Z" } }, "outputs": [ @@ -290,10 +290,10 @@ "execution_count": 6, "metadata": { "execution": { - "iopub.execute_input": "2024-09-13T13:21:37.342065Z", - "iopub.status.busy": "2024-09-13T13:21:37.341646Z", - "iopub.status.idle": "2024-09-13T13:21:37.361397Z", - "shell.execute_reply": "2024-09-13T13:21:37.360757Z" + "iopub.execute_input": "2024-09-17T08:23:40.449569Z", + "iopub.status.busy": "2024-09-17T08:23:40.449351Z", + "iopub.status.idle": "2024-09-17T08:23:40.469089Z", + "shell.execute_reply": "2024-09-17T08:23:40.468372Z" } }, "outputs": [ @@ -337,10 +337,10 @@ "execution_count": 7, "metadata": { "execution": { - "iopub.execute_input": "2024-09-13T13:21:37.363936Z", - "iopub.status.busy": "2024-09-13T13:21:37.363729Z", - "iopub.status.idle": "2024-09-13T13:21:37.484898Z", - "shell.execute_reply": "2024-09-13T13:21:37.484150Z" + "iopub.execute_input": "2024-09-17T08:23:40.471624Z", + "iopub.status.busy": "2024-09-17T08:23:40.471399Z", + "iopub.status.idle": "2024-09-17T08:23:40.591514Z", + "shell.execute_reply": "2024-09-17T08:23:40.590844Z" } }, "outputs": [ @@ -400,10 +400,10 @@ "execution_count": 8, "metadata": { "execution": { - "iopub.execute_input": "2024-09-13T13:21:37.487819Z", - "iopub.status.busy": "2024-09-13T13:21:37.487375Z", - "iopub.status.idle": "2024-09-13T13:21:37.584427Z", - "shell.execute_reply": "2024-09-13T13:21:37.583709Z" + "iopub.execute_input": "2024-09-17T08:23:40.594242Z", + "iopub.status.busy": "2024-09-17T08:23:40.593984Z", + "iopub.status.idle": "2024-09-17T08:23:40.689767Z", + "shell.execute_reply": "2024-09-17T08:23:40.689058Z" } }, "outputs": [ @@ -456,10 +456,10 @@ "execution_count": 9, "metadata": { "execution": { - "iopub.execute_input": "2024-09-13T13:21:37.587278Z", - "iopub.status.busy": "2024-09-13T13:21:37.586867Z", - "iopub.status.idle": "2024-09-13T13:21:37.663947Z", - "shell.execute_reply": "2024-09-13T13:21:37.663246Z" + "iopub.execute_input": "2024-09-17T08:23:40.692817Z", + "iopub.status.busy": "2024-09-17T08:23:40.692387Z", + "iopub.status.idle": "2024-09-17T08:23:40.767811Z", + "shell.execute_reply": "2024-09-17T08:23:40.767116Z" } }, "outputs": [ diff --git a/notebooks/nmodl-sympy-solver-cnexp.ipynb b/notebooks/nmodl-sympy-solver-cnexp.ipynb index 51b8452c2..5bbdfcc25 100644 --- a/notebooks/nmodl-sympy-solver-cnexp.ipynb +++ b/notebooks/nmodl-sympy-solver-cnexp.ipynb @@ -62,10 +62,10 @@ "execution_count": 1, "metadata": { "execution": { - "iopub.execute_input": "2024-09-13T13:21:39.671181Z", - "iopub.status.busy": "2024-09-13T13:21:39.671000Z", - "iopub.status.idle": "2024-09-13T13:21:40.471382Z", - "shell.execute_reply": "2024-09-13T13:21:40.470567Z" + "iopub.execute_input": "2024-09-17T08:23:42.560315Z", + "iopub.status.busy": "2024-09-17T08:23:42.559757Z", + "iopub.status.idle": "2024-09-17T08:23:43.380527Z", + "shell.execute_reply": "2024-09-17T08:23:43.379701Z" } }, "outputs": [], @@ -79,10 +79,10 @@ "execution_count": 2, "metadata": { "execution": { - "iopub.execute_input": "2024-09-13T13:21:40.474656Z", - "iopub.status.busy": "2024-09-13T13:21:40.474222Z", - "iopub.status.idle": "2024-09-13T13:21:40.505292Z", - "shell.execute_reply": "2024-09-13T13:21:40.504658Z" + "iopub.execute_input": "2024-09-17T08:23:43.383787Z", + "iopub.status.busy": "2024-09-17T08:23:43.383320Z", + "iopub.status.idle": "2024-09-17T08:23:43.415357Z", + "shell.execute_reply": "2024-09-17T08:23:43.414667Z" } }, "outputs": [], @@ -123,10 +123,10 @@ "execution_count": 3, "metadata": { "execution": { - "iopub.execute_input": "2024-09-13T13:21:40.508246Z", - "iopub.status.busy": "2024-09-13T13:21:40.507747Z", - "iopub.status.idle": "2024-09-13T13:21:40.925418Z", - "shell.execute_reply": "2024-09-13T13:21:40.924708Z" + "iopub.execute_input": "2024-09-17T08:23:43.418506Z", + "iopub.status.busy": "2024-09-17T08:23:43.418148Z", + "iopub.status.idle": "2024-09-17T08:23:43.871967Z", + "shell.execute_reply": "2024-09-17T08:23:43.871204Z" } }, "outputs": [ @@ -165,10 +165,10 @@ "execution_count": 4, "metadata": { "execution": { - "iopub.execute_input": "2024-09-13T13:21:40.928625Z", - "iopub.status.busy": "2024-09-13T13:21:40.928027Z", - "iopub.status.idle": "2024-09-13T13:21:41.054013Z", - "shell.execute_reply": "2024-09-13T13:21:41.053179Z" + "iopub.execute_input": "2024-09-17T08:23:43.874817Z", + "iopub.status.busy": "2024-09-17T08:23:43.874363Z", + "iopub.status.idle": "2024-09-17T08:23:43.987677Z", + "shell.execute_reply": "2024-09-17T08:23:43.986911Z" } }, "outputs": [ @@ -207,10 +207,10 @@ "execution_count": 5, "metadata": { "execution": { - "iopub.execute_input": "2024-09-13T13:21:41.057159Z", - "iopub.status.busy": "2024-09-13T13:21:41.056621Z", - "iopub.status.idle": "2024-09-13T13:21:41.260106Z", - "shell.execute_reply": "2024-09-13T13:21:41.259468Z" + "iopub.execute_input": "2024-09-17T08:23:43.990510Z", + "iopub.status.busy": "2024-09-17T08:23:43.989961Z", + "iopub.status.idle": "2024-09-17T08:23:44.192105Z", + "shell.execute_reply": "2024-09-17T08:23:44.191427Z" } }, "outputs": [ @@ -255,10 +255,10 @@ "execution_count": 6, "metadata": { "execution": { - "iopub.execute_input": "2024-09-13T13:21:41.262658Z", - "iopub.status.busy": "2024-09-13T13:21:41.262454Z", - "iopub.status.idle": "2024-09-13T13:21:41.421672Z", - "shell.execute_reply": "2024-09-13T13:21:41.420961Z" + "iopub.execute_input": "2024-09-17T08:23:44.194808Z", + "iopub.status.busy": "2024-09-17T08:23:44.194402Z", + "iopub.status.idle": "2024-09-17T08:23:44.378232Z", + "shell.execute_reply": "2024-09-17T08:23:44.377387Z" } }, "outputs": [ @@ -303,10 +303,10 @@ "execution_count": 7, "metadata": { "execution": { - "iopub.execute_input": "2024-09-13T13:21:41.424326Z", - "iopub.status.busy": "2024-09-13T13:21:41.424077Z", - "iopub.status.idle": "2024-09-13T13:21:43.163447Z", - "shell.execute_reply": "2024-09-13T13:21:43.162826Z" + "iopub.execute_input": "2024-09-17T08:23:44.381657Z", + "iopub.status.busy": "2024-09-17T08:23:44.381403Z", + "iopub.status.idle": "2024-09-17T08:23:46.164718Z", + "shell.execute_reply": "2024-09-17T08:23:46.164052Z" } }, "outputs": [ @@ -351,10 +351,10 @@ "execution_count": 8, "metadata": { "execution": { - "iopub.execute_input": "2024-09-13T13:21:43.165924Z", - "iopub.status.busy": "2024-09-13T13:21:43.165700Z", - "iopub.status.idle": "2024-09-13T13:21:45.366892Z", - "shell.execute_reply": "2024-09-13T13:21:45.366214Z" + "iopub.execute_input": "2024-09-17T08:23:46.167379Z", + "iopub.status.busy": "2024-09-17T08:23:46.166955Z", + "iopub.status.idle": "2024-09-17T08:23:48.403188Z", + "shell.execute_reply": "2024-09-17T08:23:48.402488Z" } }, "outputs": [ diff --git a/notebooks/nmodl-sympy-solver-derivimplicit.ipynb b/notebooks/nmodl-sympy-solver-derivimplicit.ipynb index 1249126e3..5aa1806cb 100644 --- a/notebooks/nmodl-sympy-solver-derivimplicit.ipynb +++ b/notebooks/nmodl-sympy-solver-derivimplicit.ipynb @@ -39,10 +39,10 @@ "execution_count": 1, "metadata": { "execution": { - "iopub.execute_input": "2024-09-13T13:21:47.101319Z", - "iopub.status.busy": "2024-09-13T13:21:47.100935Z", - "iopub.status.idle": "2024-09-13T13:21:47.893348Z", - "shell.execute_reply": "2024-09-13T13:21:47.892481Z" + "iopub.execute_input": "2024-09-17T08:23:50.292397Z", + "iopub.status.busy": "2024-09-17T08:23:50.291995Z", + "iopub.status.idle": "2024-09-17T08:23:51.113066Z", + "shell.execute_reply": "2024-09-17T08:23:51.112288Z" } }, "outputs": [], @@ -56,10 +56,10 @@ "execution_count": 2, "metadata": { "execution": { - "iopub.execute_input": "2024-09-13T13:21:47.896641Z", - "iopub.status.busy": "2024-09-13T13:21:47.896423Z", - "iopub.status.idle": "2024-09-13T13:21:47.926430Z", - "shell.execute_reply": "2024-09-13T13:21:47.925795Z" + "iopub.execute_input": "2024-09-17T08:23:51.116270Z", + "iopub.status.busy": "2024-09-17T08:23:51.115998Z", + "iopub.status.idle": "2024-09-17T08:23:51.147749Z", + "shell.execute_reply": "2024-09-17T08:23:51.147051Z" } }, "outputs": [], @@ -100,10 +100,10 @@ "execution_count": 3, "metadata": { "execution": { - "iopub.execute_input": "2024-09-13T13:21:47.929043Z", - "iopub.status.busy": "2024-09-13T13:21:47.928745Z", - "iopub.status.idle": "2024-09-13T13:21:48.418593Z", - "shell.execute_reply": "2024-09-13T13:21:48.417838Z" + "iopub.execute_input": "2024-09-17T08:23:51.150706Z", + "iopub.status.busy": "2024-09-17T08:23:51.150432Z", + "iopub.status.idle": "2024-09-17T08:23:51.651974Z", + "shell.execute_reply": "2024-09-17T08:23:51.651195Z" } }, "outputs": [ @@ -165,10 +165,10 @@ "execution_count": 4, "metadata": { "execution": { - "iopub.execute_input": "2024-09-13T13:21:48.421533Z", - "iopub.status.busy": "2024-09-13T13:21:48.421034Z", - "iopub.status.idle": "2024-09-13T13:21:48.710976Z", - "shell.execute_reply": "2024-09-13T13:21:48.710243Z" + "iopub.execute_input": "2024-09-17T08:23:51.654706Z", + "iopub.status.busy": "2024-09-17T08:23:51.654443Z", + "iopub.status.idle": "2024-09-17T08:23:51.947506Z", + "shell.execute_reply": "2024-09-17T08:23:51.946766Z" } }, "outputs": [ diff --git a/notebooks/nmodl-sympy-solver-sparse.ipynb b/notebooks/nmodl-sympy-solver-sparse.ipynb index e4c0e8d87..35ab6c97e 100644 --- a/notebooks/nmodl-sympy-solver-sparse.ipynb +++ b/notebooks/nmodl-sympy-solver-sparse.ipynb @@ -39,10 +39,10 @@ "execution_count": 1, "metadata": { "execution": { - "iopub.execute_input": "2024-09-13T13:21:50.049341Z", - "iopub.status.busy": "2024-09-13T13:21:50.049138Z", - "iopub.status.idle": "2024-09-13T13:21:50.836829Z", - "shell.execute_reply": "2024-09-13T13:21:50.835930Z" + "iopub.execute_input": "2024-09-17T08:23:53.457951Z", + "iopub.status.busy": "2024-09-17T08:23:53.457293Z", + "iopub.status.idle": "2024-09-17T08:23:54.271443Z", + "shell.execute_reply": "2024-09-17T08:23:54.270700Z" } }, "outputs": [], @@ -56,10 +56,10 @@ "execution_count": 2, "metadata": { "execution": { - "iopub.execute_input": "2024-09-13T13:21:50.839917Z", - "iopub.status.busy": "2024-09-13T13:21:50.839684Z", - "iopub.status.idle": "2024-09-13T13:21:50.870239Z", - "shell.execute_reply": "2024-09-13T13:21:50.869472Z" + "iopub.execute_input": "2024-09-17T08:23:54.274762Z", + "iopub.status.busy": "2024-09-17T08:23:54.274348Z", + "iopub.status.idle": "2024-09-17T08:23:54.305378Z", + "shell.execute_reply": "2024-09-17T08:23:54.304696Z" } }, "outputs": [], @@ -100,10 +100,10 @@ "execution_count": 3, "metadata": { "execution": { - "iopub.execute_input": "2024-09-13T13:21:50.873051Z", - "iopub.status.busy": "2024-09-13T13:21:50.872724Z", - "iopub.status.idle": "2024-09-13T13:21:51.361587Z", - "shell.execute_reply": "2024-09-13T13:21:51.360941Z" + "iopub.execute_input": "2024-09-17T08:23:54.308622Z", + "iopub.status.busy": "2024-09-17T08:23:54.308195Z", + "iopub.status.idle": "2024-09-17T08:23:54.806569Z", + "shell.execute_reply": "2024-09-17T08:23:54.805871Z" } }, "outputs": [ @@ -165,10 +165,10 @@ "execution_count": 4, "metadata": { "execution": { - "iopub.execute_input": "2024-09-13T13:21:51.364202Z", - "iopub.status.busy": "2024-09-13T13:21:51.363946Z", - "iopub.status.idle": "2024-09-13T13:21:51.669646Z", - "shell.execute_reply": "2024-09-13T13:21:51.669001Z" + "iopub.execute_input": "2024-09-17T08:23:54.809971Z", + "iopub.status.busy": "2024-09-17T08:23:54.809721Z", + "iopub.status.idle": "2024-09-17T08:23:55.117952Z", + "shell.execute_reply": "2024-09-17T08:23:55.117284Z" } }, "outputs": [