Auryn simulator  v0.8.1-206-gb56e451
Plastic Spiking Neural Network Simulator
Functions
sim_current_stim.cpp File Reference
#include "auryn.h"
Include dependency graph for sim_current_stim.cpp:

Functions

int main (int ac, char *av[])
 

Function Documentation

◆ main()

int main ( int  ac,
char *  av[] 
)
36 {
37 
38  int errcode = 0;
39  char strbuf [255];
40  string outputfile = "out_current_stim";
41  string tmpstr;
42 
43  // BEGIN Global definitions
44  auryn_init( ac, av, ".", outputfile );
45  // END Global definitions
46 
47  IFGroup * neurons = new IFGroup(2);
48  AurynWeight weight = 1e-2; // weight in mV if the target of the stimulator is "mem"
49  AurynFloat rate = 100.0; //
50  PoissonStimulator * stim = new PoissonStimulator(neurons, rate, weight);
51 
52 
53  tmpstr = outputfile;
54  tmpstr += ".mem0";
55  VoltageMonitor * vmon0 = new VoltageMonitor( neurons, 0, tmpstr.c_str() );
56 
57  tmpstr = outputfile;
58  tmpstr += ".mem1";
59  VoltageMonitor * vmon1 = new VoltageMonitor( neurons, 1, tmpstr.c_str() );
60 
61 
62  logger->msg("Running ...",PROGRESS);
63  sys->run(1);
64 
65  if (errcode)
66  auryn_abort(errcode);
67  logger->msg("Freeing ...",PROGRESS,true);
68  auryn_free();
69  return errcode;
70 }
void auryn_free()
Cleanly shuts down Auryn simulation environment.
Definition: auryn_global.cpp:107
Stimulator class to inject timeseries of currents NeuronGroups.
Definition: PoissonStimulator.h:47
AurynFloat AurynWeight
Unit of synaptic weights.
Definition: auryn_definitions.h:159
Logger * logger
Global pointer to instance of Logger which needs to be initialized in every simulation main program...
Definition: auryn_global.cpp:36
void auryn_abort(int errcode)
Terminates Auryn simulation abnormally.
Definition: auryn_global.cpp:113
System * sys
Global pointer to instance of System which needs to be initialized in every simulation main program...
Definition: auryn_global.cpp:37
float AurynFloat
Low precision floating point datatype.
Definition: auryn_definitions.h:157
Records the membrane potential from one unit from the source neuron group to a file.
Definition: VoltageMonitor.h:48
void auryn_init(int ac, char *av[], string dir, string simulation_name, string logfile_prefix, LogMessageType filelog_level, LogMessageType consolelog_level)
Initalizes MPI and the Auryn simulation environment.
Definition: auryn_global.cpp:84
void msg(std::string text, LogMessageType type=NOTIFICATION, bool global=false, int line=-1, std::string srcfile="")
Definition: Logger.cpp:74
Definition: Logger.h:41
Implements the standard integrate and file model used in Auryn.
Definition: IFGroup.h:47
Here is the call graph for this function: