PageSourceSearch

https://dune-copasi.netlify.app/assets/js/762b874c.4b4361a2.js

js dune-copasi.netlify.app collected 2026-10-03 10:41:29 UTC 5,745 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkdune_copasi_docusaurus=self.webpackChunkdune_copasi_docusaurus||[]).push([[3548],{8982:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>a,contentTitle:()=>r,default:()=>h,frontMatter:()=>d,metadata:()=>o,toc:()=>c});var i=t(4848),s=t(8453);const d={id:"math_expr",title:"Mathematical Expressions",sidebar_label:"Math Expressions"},r=void 0,o={id:"math_expr",title:"Mathematical Expressions",description:"Mathematical expressions are permitted on different sections of the",source:"@site/versioned_docs/version-v1.0.0/math_expr.md",sourceDirName:".",slug:"/math_expr",permalink:"/docs/v1.0.0/math_expr",draft:!1,unlisted:!1,editUrl:"https://gitlab.dune-project.org/copasi/dune-copasi/-/edit/master/doc/docusaurus/versioned_docs/version-v1.0.0/math_expr.md",tags:[],version:"v1.0.0",lastUpdatedBy:"Santiago Ospina De Los Rios",lastUpdatedAt:1713784883e3,frontMatter:{id:"math_expr",title:"Mathematical Expressions",sidebar_label:"Math Expressions"},sidebar:"docs",previous:{title:"Input Data",permalink:"/docs/v1.0.0/input_data"},next:{title:"Output",permalink:"/docs/v1.0.0/output"}},a={},c=[{value:"Variables",id:"variables",level:2},{value:"Context-Independent",id:"context-independent",level:3},{value:"Context-Dependent",id:"context-dependent",level:3},{value:"Functions",id:"functions",level:2},{value:"Context-Dependent",id:"context-dependent-1",level:3}];function l(e){const n={a:"a",code:"code",h2:"h2",h3:"h3",p:"p",pre:"pre",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,s.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(n.p,{children:["Mathematical expressions are permitted on different sections of the\n",(0,i.jsx)(n.a,{href:"/docs/v1.0.0/param_tree",children:"Parameter Tree"}),". Such expressions may contain typical math\noperations such as ",(0,i.jsx)(n.code,{children:"+"}),", ",(0,i.jsx)(n.code,{children:"-"}),", ",(0,i.jsx)(n.code,{children:"*"}),", ",(0,i.jsx)(n.code,{children:"^"}),", ",(0,i.jsx)(n.code,{children:"sin"}),", ",(0,i.jsx)(n.code,{children:"tan"}),", etc. The complete list of\npossibilities is found ",(0,i.jsx)(n.a,{href:"https://beltoforion.de/en/muparser/features.php",children:"here"}),".\nThat is, the ",(0,i.jsx)(n.code,{children:"muParser"})," built in operators."]}),"\n",(0,i.jsx)(n.p,{children:"Furthermore, we provide extra variables/functions that may be included on the\nmath expressions."}),"\n",(0,i.jsx)(n.h2,{id:"variables",children:"Variables"}),"\n",(0,i.jsx)(n.h3,{id:"context-independent",children:"Context-Independent"}),"\n",(0,i.jsx)(n.p,{children:"The following list of variables are unconditionally available when defining\nexpressions:"}),"\n",(0,i.jsxs)(n.table,{children:[(0,i.jsx)(n.thead,{children:(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.th,{children:"Variable"}),(0,i.jsx)(n.th,{children:"Description"})]})}),(0,i.jsxs)(n.tbody,{children:[(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"t"})}),(0,i.jsx)(n.td,{children:"Time"})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"x"})}),(0,i.jsx)(n.td,{children:"First dimension in the cartesian coordinate system"})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"y"})}),(0,i.jsx)(n.td,{children:"Second dimension in the cartesian coordinate system"})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"z"})}),(0,i.jsx)(n.td,{children:"Third dimension in the cartesian coordinate system (only in 3D)"})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"dim"})}),(0,i.jsx)(n.td,{children:"Dimension of the euclidean space"})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"pi"})}),(0,i.jsx)(n.td,{children:"Approximation to the number \u03c0"})]})]})]}),"\n",(0,i.jsx)(n.h3,{id:"context-dependent",children:"Context-Dependent"}),"\n",(0,i.jsxs)(n.p,{children:["Additionally, there are other variables that are conditionally available to\ndefine the expression. These variables depend on the context of its definition.\nAn example of it is the reaction expressions within a compartment. If the\nsection ",(0,i.jsx)(n.code,{children:"[model.nucleus.reaction]"})," defines expressions ",(0,i.jsx)(n.code,{children:"u"}),", ",(0,i.jsx)(n.code,{children:"v"}),", and ",(0,i.jsx)(n.code,{children:"w"}),",\nthen, they all will be available to each other. E.g."]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-ini",children:"[model.nucleus.reaction]\nu = u*v*w\nv = u*v*w\nw = u*v*w\n"})}),"\n",(0,i.jsx)(n.h2,{id:"functions",children:"Functions"}),"\n",(0,i.jsx)(n.h3,{id:"context-dependent-1",children:"Context-Dependent"}),"\n",(0,i.jsx)(n.p,{children:"There are also functions that may be conditionally available depending on the\ncontext. In such case, the function will have a custom name and fixed number of\narguments and will be available for use on the mathematical expression."}),"\n",(0,i.jsxs)(n.p,{children:["Currently we only provide these for defining TIFF input images as 2D functions\nfor initial conditions (See ",(0,i.jsx)(n.a,{href:"/docs/v1.0.0/input_data",children:"Input Data"})," section)."]})]})}function h(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(l,{...e})}):l(e)}},8453:(e,n,t)=>{t.d(n,{R:()=>r,x:()=>o});var i=t(6540);const s={},d=i.createContext(s);function r(e){const n=i.useContext(d);return i.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function o(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:r(e.components),i.createElement(d.Provider,{value:n},e.children)}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.