Auryn simulator  v0.8.1-206-gb56e451
Plastic Spiking Neural Network Simulator
Functions
sim_current_inject.cpp File Reference
#include "auryn.h"
Include dependency graph for sim_current_inject.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(1);
48  CurrentInjector * curin = new CurrentInjector(neurons);
49 
50  tmpstr = outputfile;
51  tmpstr += ".mem0";
52  VoltageMonitor * vmon0 = new VoltageMonitor( neurons, 0, tmpstr.c_str() );
53 
54  logger->msg("Running ...",PROGRESS);
55  sys->run(1);
56  curin->set_all_currents(1.01);
57  sys->run(1);
58 
59  if (errcode) auryn_abort(errcode);
60 
61  logger->msg("Freeing ...",PROGRESS,true);
62  auryn_free();
63  return errcode;
64 }
void auryn_free()
Cleanly shuts down Auryn simulation environment.
Definition: auryn_global.cpp:107
Stimulator class to add values in each timestep to arbitrary neuronal states.
Definition: CurrentInjector.h:49
void set_all_currents(AurynFloat current)
Sets current strength for all neurons.
Definition: CurrentInjector.cpp:66
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
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: