File: ksim.g

package info (click to toggle)
genesis 2.1-1.1
  • links: PTS
  • area: main
  • in suites: potato
  • size: 14,288 kB
  • ctags: 10,667
  • sloc: ansic: 111,959; makefile: 2,240; yacc: 1,797; lex: 976; csh: 54; sh: 13
file content (38 lines) | stat: -rw-r--r-- 1,161 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
//genesis
/**********************************************************************
** This program is part of kinetikit and is
**           copyright (C) 1995-1997 Upinder S. Bhalla.
** It is made available under the terms of the GNU General Public License. 
** See the file COPYRIGHT for the full notice.
**********************************************************************/
//ksim : this file has functions for building up the
// basic infrastructure of the kkit simulations.

function kbegin
	initdump -ignoreorphans 1
	// The table object needs to have its dump fields specified
	// explicitly
	simobjdump table input output alloced step_mode stepsize

	if (!{exists /kinetics})
		create neutral /kinetics
	end
	if (!{exists /kclip})
		create neutral /kclip
		disable /kclip
	end
	floatformat %0.5g
end

// This function resets the simulation parameters
function kparms
		setclock {FASTCLOCK} {FASTDT}
		setclock {SIMCLOCK} {SIMDT}
		setclock {CONTROLCLOCK} {CONTROLDT}
		setclock {PLOTCLOCK} {PLOTDT}
		// setclock {TABLECLOCK} {TABLEDT}
		if (DO_X)
			setfield /control/runtime value {MAXTIME}
			setfield /graphs/#[TYPE=xgraph] xmax {MAXTIME}
		end
end