1 #include <../../nrnconf.h>
43 hoc_execerror(
"Optional first arg is not a POINT_PROCESS", 0);
55 int j = (int)
chkarg(iarg + 1, 0., yvec->
size() - 1);
64 dh = hoc_hgetarg<double>(iarg + 1);
70 if (
ifarg(iarg + 2)) {
76 ddt =
chkarg(iarg + 2, 1e-9, 1e10);
78 if (
ifarg(iarg + 3)) {
97 }
else if (ddt > 0.) {
99 }
else if (
static_cast<double const*
>(dh) == &
t) {
108 "Second argument of Vector.play in continuous mode must be a time vector", 0);
116 if (!tvec && ddt == -1.) {
117 chkarg(iarg + 2, 1e-9, 1e10);
213 std::ostringstream oss;
214 oss <<
"VecPlayStep::deliver: invalid " <<
pd_;
215 throw std::runtime_error(
std::move(oss).str());
218 if (current_index_ < y_->size()) {
220 if (current_index_ < t_->size()) {
328 if (discon_index_ < discon_indices_->size()) {
336 if (ubound_index_ < t_->size() - 1) {
364 }
else if (tt <= t_->elem(0)) {
378 return (x0 + x1) / 2.;
380 return interp((tt - t0) / (t1 - t0), x0, x1);
399 printf(
"VecPlayContinuous ");
virtual void send(double deliverytime, NetCvode *, NrnThread *)
PlayRecord * playrec_uses(void *)
static void Detach(Object *, Observer *)
static void Attach(Object *, Observer *)
neuron::container::data_handle< double > pd_
void continuous(double tt)
VecPlayContinuous(neuron::container::data_handle< double > pd, IvocVect *y, IvocVect *t, IvocVect *discon, Object *ppobj=nullptr)
virtual ~VecPlayContinuous()
IvocVect * discon_indices_
double interp(double th, double x0, double x1)
virtual void install(Cvode *)
virtual PlayRecordSave * savestate_save()
virtual void disconnect(Observable *)
double interpolate(double tt)
virtual void deliver(double t, NetCvode *)
void init(IvocVect *y, IvocVect *t, IvocVect *tdiscon)
virtual ~VecPlayContinuousSave()
VecPlayContinuousSave(PlayRecord *)
virtual void savestate_write(FILE *)
virtual void savestate_restore()
virtual void savestate_read(FILE *)
virtual void install(Cvode *)
virtual void disconnect(Observable *)
virtual PlayRecordSave * savestate_save()
VecPlayStep(neuron::container::data_handle< double >, IvocVect *y, IvocVect *t, double dt, Object *ppobj=nullptr)
void init(IvocVect *y, IvocVect *t, double dt)
virtual void deliver(double t, NetCvode *)
virtual void savestate_write(FILE *)
VecPlayStepSave(PlayRecord *)
virtual ~VecPlayStepSave()
virtual void savestate_read(FILE *)
virtual void savestate_restore()
short * nrn_is_artificial_
double chkarg(int, double low, double high)
int hoc_is_object_arg(int narg)
int hoc_is_str_arg(int narg)
int hoc_is_double_arg(int narg)
IvocVect * vector_arg(int i)
char * hoc_object_name(Object *ob)
Point_process * ob2pntproc(Object *ob)
Object ** hoc_objgetarg(int)
#define con(arg1, arg2, arg3)
void move(Item *q1, Item *q2, Item *q3)
void hoc_execerror(const char *s1, const char *s2)
#define nrn_assert(x)
assert()-like macro, independent of NDEBUG status
void nrn_vecsim_add(void *v, bool record)
void nrn_vecsim_remove(void *v)
NetCvode * net_cvode_instance
static void pr(N_Vector x)
static void pnode(Prop *)
Represent main neuron object computed by single thread.
int Printf(const char *fmt, Args... args)