From aa0b950e1c64ae854d0df427d2e363fcb642068c Mon Sep 17 00:00:00 2001 From: "Robert A. McDougal" Date: Sat, 13 May 2023 21:51:47 -0400 Subject: [PATCH 01/65] initial partial API --- cmake/NeuronFileLists.cmake | 1 + src/ivoc/ocjump.cpp | 23 +++ src/ivoc/ocjump.h | 2 + src/nrniv/nrnapi.cpp | 284 ++++++++++++++++++++++++++++++++++++ src/nrniv/nrnapi.h | 79 ++++++++++ 5 files changed, 389 insertions(+) create mode 100644 src/nrniv/nrnapi.cpp create mode 100644 src/nrniv/nrnapi.h diff --git a/cmake/NeuronFileLists.cmake b/cmake/NeuronFileLists.cmake index 3e81988551..a38e5125f5 100644 --- a/cmake/NeuronFileLists.cmake +++ b/cmake/NeuronFileLists.cmake @@ -226,6 +226,7 @@ set(NRNIV_FILE_LIST ndatclas.cpp netpar.cpp nonlinz.cpp + nrnapi.cpp nrncore_write.cpp nrncore_write/callbacks/nrncore_callbacks.cpp nrncore_write/data/cell_group.cpp diff --git a/src/ivoc/ocjump.cpp b/src/ivoc/ocjump.cpp index 91712f5ec8..b30bb8aeec 100644 --- a/src/ivoc/ocjump.cpp +++ b/src/ivoc/ocjump.cpp @@ -131,6 +131,29 @@ bool OcJump::execute(const char* stmt, Object* ob) { } } +void OcJump::execute_throw_on_exception(Object* obj, Symbol* sym, int narg) { + saved_state before{}; + try_catch_depth_increment tell_children_we_will_catch{}; + try { + hoc_call_ob_proc(obj, sym, narg); + } catch (...) { + before.restore(); + throw; + } +} + +void OcJump::execute_throw_on_exception(Symbol* sym, int narg) { + saved_state before{}; + try_catch_depth_increment tell_children_we_will_catch{}; + try { + hoc_call_func(sym, narg); + } catch (...) { + before.restore(); + throw; + } +} + + void* OcJump::fpycall(void* (*f)(void*, void*), void* a, void* b) { saved_state before{}; try_catch_depth_increment tell_children_we_will_catch{}; diff --git a/src/ivoc/ocjump.h b/src/ivoc/ocjump.h index 781ee844ec..b6c1aafb1e 100644 --- a/src/ivoc/ocjump.h +++ b/src/ivoc/ocjump.h @@ -40,4 +40,6 @@ struct OcJump { static bool execute(Inst* p); static bool execute(const char*, Object* ob = NULL); static void* fpycall(void* (*) (void*, void*), void*, void*); + static void execute_throw_on_exception(Symbol* sym, int narg); + static void execute_throw_on_exception(Object* obj, Symbol* sym, int narg); }; diff --git a/src/nrniv/nrnapi.cpp b/src/nrniv/nrnapi.cpp new file mode 100644 index 0000000000..9726c123a4 --- /dev/null +++ b/src/nrniv/nrnapi.cpp @@ -0,0 +1,284 @@ +#include "../../nrnconf.h" +#include "nrnmpiuse.h" +#include "nrnmpi.h" +#include "nrnapi.h" +#include "ocjump.h" +#include "ocfunc.h" + +#include "parse.hpp" + +/**************************************** + * Connections to the rest of NEURON +****************************************/ +extern int nrn_nobanner_; +extern int diam_changed; +extern int nrn_try_catch_nest_depth; +void nrnpy_set_pr_etal(int (*cbpr_stdoe)(int, char*), int (*cbpass)()); +int ivocmain_session(int, const char**, const char**, int start_session); +void simpleconnectsection(); +extern Object* hoc_newobj1(Symbol*, int); + +/**************************************** + * Initialization +****************************************/ + +int nrn_init(int argc, const char** argv) { + nrn_nobanner_ = 1; + int exit_status = ivocmain_session(argc, argv, nullptr, 0); + #if NRNMPI_DYNAMICLOAD + nrnmpi_stubs(); + #endif + return exit_status; +} + +void nrn_redirect_stdout(int (*myprint)(int, char*)) { + // the first argument of myprint is an integer indicating the output stream + // if the int is 1, then stdout, else stderr + // the char* is the message to display + nrnpy_set_pr_etal(myprint, nullptr); +} + + +/**************************************** + * Sections +****************************************/ + +Section* nrn_new_section(char const * const name) { + // TODO: check for memory leaks; should we free the symbol, pitm, etc? + Symbol* symbol = new Symbol; + auto pitm = new hoc_Item*; + char* name_ptr = new char[strlen(name)]; + strcpy(name_ptr, name); + symbol->name = name_ptr; + symbol->type = 1; + symbol->u.oboff = 0; + symbol->arayinfo = 0; + hoc_install_object_data_index(symbol); + new_sections(nullptr, symbol, pitm, 1); + return (*pitm)->element.sec; +} + +void nrn_connect_sections(Section* child_sec, double child_x, Section* parent_sec, double parent_x) { + nrn_pushsec(child_sec); + hoc_pushx(child_x); + nrn_pushsec(parent_sec); + hoc_pushx(parent_x); + simpleconnectsection(); +} + +void nrn_set_section_length(Section* sec, double length) { + // TODO: call can_change_morph(sec) to check pt3dconst_; how should we handle that? + sec->prop->dparam[2] = length; + // dparam[7].val is for Ra + // nrn_length_change updates 3D points if needed + nrn_length_change(sec, length); + diam_changed = 1; + sec->recalc_area_ = 1; +} + +char const * nrn_secname(Section* sec) { + return secname(sec); +} + +void nrn_push_section(Section* sec) { + nrn_pushsec(sec); +} + +void nrn_pop_section(void) { + nrn_sec_pop(); +} + +void nrn_insert_mechanism(Section* sec, Symbol* mechanism) { + // TODO: throw exception if mechanism is not an insertable mechanism? + mech_insert1(sec, mechanism->subtype); +} + + +/**************************************** + * Functions, objects, and the stack +****************************************/ + +Symbol* nrn_get_symbol(char const * const name) { + return hoc_lookup(name); +} + +int nrn_get_symbol_type(Symbol* sym) { + // TODO: these types are in parse.hpp and are not the same between versions, so we really should wrap + return sym->type; +} + +double* nrn_get_symbol_ptr(Symbol* sym) { + return sym->u.pval; +} + +void nrn_push_double(double val) { + hoc_pushx(val); +} + +double nrn_pop_double(void) { + return hoc_xpop(); +} + +void nrn_push_double_ptr(double* addr) { + hoc_pushpx(addr); +} + +double* nrn_pop_double_ptr(void) { + return hoc_pxpop(); +} + +void nrn_push_str(char** str) { + hoc_pushstr(str); +} + +char** nrn_pop_str(void) { + return hoc_strpop(); +} + +void nrn_push_int(int i) { + hoc_pushi(i); +} + +int nrn_pop_int(void) { + return hoc_ipop(); +} + +Object* nrn_pop_object(void) { + // NOTE: the returned object should be unref'd when no longer needed + Object** obptr = hoc_objpop(); + Object* new_ob_ptr = *obptr; + new_ob_ptr->refcount++; + hoc_tobj_unref(obptr); + return new_ob_ptr; +} + +int nrn_stack_type(void) { + switch (hoc_stack_type()) { + case STRING: + return STACK_IS_STR; + case VAR: + return STACK_IS_VAR; + case NUMBER: + return STACK_IS_NUM; + case OBJECTVAR: + return STACK_IS_OBJVAR; + case OBJECTTMP: + return STACK_IS_OBJTMP; + case USERINT: + return STACK_IS_USERINT; + case SYMBOL: + return STACK_IS_SYM; + case STKOBJ_UNREF: + return STACK_IS_OBJUNREF; + } + return STACK_UNKNOWN; +} + +char const * const nrn_stack_type_name(int id) { + switch (id) { + case STACK_IS_STR: + return "STRING"; + case STACK_IS_VAR: + return "VAR"; + case STACK_IS_NUM: + return "NUMBER"; + case STACK_IS_OBJVAR: + return "OBJECTVAR"; + case STACK_IS_OBJTMP: + return "OBJECTTMP"; + case STACK_IS_USERINT: + return "USERINT"; + case STACK_IS_SYM: + return "SYMBOL"; + case STACK_IS_OBJUNREF: + return "STKOBJ_UNREF"; + } + return "UNKNOWN"; +} + +Object* nrn_new_object(Symbol* sym, int narg) { + return hoc_newobj1(sym, narg); +} + +Symbol* nrn_get_method_symbol(Object* obj, char const * const name) { + return hoc_table_lookup(name, obj->ctemplate->symtable); +} + +void nrn_call_method(Object* obj, Symbol* method_sym, int narg) { + OcJump::execute_throw_on_exception(obj, method_sym, narg); +} + +void nrn_call_function(Symbol* sym, int narg) { + OcJump::execute_throw_on_exception(sym, narg); +} + +void nrn_unref_object(Object* obj) { + hoc_obj_unref(obj); +} + + +/**************************************** + * Miscellaneous +****************************************/ +int nrn_call_hoc(char const * const command) { + return hoc_oc(command); +} + +SectionListIterator::SectionListIterator(hoc_Item* my_sectionlist) { + initial = my_sectionlist; + current = my_sectionlist->next; +} + +Section* SectionListIterator::next(void) { + // NOTE: if no next element, returns nullptr + while(true) { + Section* sec = current->element.sec; + + if (sec->prop) { + current = current->next; + return sec; + } + hoc_l_delete(current); + section_unref(sec); + current = current->next; + if (current == initial) { + return nullptr; + } + } +} + +int SectionListIterator::done(void) { + if (initial == current) { + return 1; + } + return 0; +} + + +// copy semantics isn't great, but only two data items +// and is cleaner to use in a for loop than having to free memory at the end +SectionListIterator* nrn_new_sectionlist_iterator(hoc_Item* my_sectionlist) { + return new SectionListIterator(my_sectionlist); +} + +void nrn_free_sectionlist_iterator(SectionListIterator* sl) { + delete sl; +} + +Section* nrn_sectionlist_iterator_next(SectionListIterator* sl) { + return sl->next(); +} + +int nrn_sectionlist_iterator_done(SectionListIterator* sl) { + return sl->done(); +} + +int nrn_vector_capacity(Object* vec) { + // TODO: throw exception if vec is not a Vector + return vector_capacity((IvocVect*) vec->u.this_pointer); +} + +double* nrn_vector_data_ptr(Object* vec) { + // TODO: throw exception if vec is not a Vector + return vector_vec((IvocVect*) vec->u.this_pointer); +} diff --git a/src/nrniv/nrnapi.h b/src/nrniv/nrnapi.h new file mode 100644 index 0000000000..bb30bd076b --- /dev/null +++ b/src/nrniv/nrnapi.h @@ -0,0 +1,79 @@ +#pragma once + +#include "section.h" + +// we define these here to allow the API to be independent of internal details +#define STACK_IS_STR 1 +#define STACK_IS_VAR 2 +#define STACK_IS_NUM 3 +#define STACK_IS_OBJVAR 4 +#define STACK_IS_OBJTMP 5 +#define STACK_IS_USERINT 6 +#define STACK_IS_SYM 7 +#define STACK_IS_OBJUNREF 8 +#define STACK_UNKNOWN -1 + +class SectionListIterator { + public: + SectionListIterator(hoc_Item*); + Section* next(void); + int done(void); + private: + hoc_Item* initial; + hoc_Item* current; +}; + + +extern "C" { +/**************************************** + * Initialization +****************************************/ +int nrn_init(int argc, const char** argv); +void nrn_redirect_stdout(int (*myprint)(int, char*)); + +/**************************************** + * Sections +****************************************/ +Section* nrn_new_section(char const * const name); +void nrn_connect_sections(Section* child_sec, double child_x, Section* parent_sec, double parent_x); +void nrn_set_section_length(Section* sec, double length); +char const * nrn_secname(Section* sec); +void nrn_push_section(Section* sec); +void nrn_pop_section(void); +void nrn_insert_mechanism(Section* sec, Symbol* mechanism); + +/**************************************** + * Functions, objects, and the stack +****************************************/ +Symbol* nrn_get_symbol(char const * const name); +int nrn_get_symbol_type(Symbol* sym); +double* nrn_get_symbol_ptr(Symbol* sym); +void nrn_push_double(double val); +double nrn_pop_double(void); +void nrn_push_double_ptr(double* addr); +double* nrn_pop_double_ptr(void); +void nrn_push_str(char** str); +char** nrn_pop_str(void); +void nrn_push_int(int i); +int nrn_pop_int(void); +Object* nrn_pop_object(void); +int nrn_stack_type(void); +char const * const nrn_stack_type_name(int id); +Object* nrn_new_object(Symbol* sym, int narg); +Symbol* nrn_get_method_symbol(Object* obj, char const * const name); +void nrn_call_method(Object* obj, Symbol* method_sym, int narg); +void nrn_call_function(Symbol* sym, int narg); +void nrn_unref_object(Object* obj); + +/**************************************** + * Miscellaneous +****************************************/ +int nrn_call_hoc(char const * const command); +SectionListIterator* nrn_new_sectionlist_iterator(hoc_Item* my_sectionlist); +void nrn_free_sectionlist_iterator(SectionListIterator* sl); +Section* nrn_sectionlist_iterator_next(SectionListIterator sl); +int nrn_sectionlist_iterator_done(SectionListIterator sl); +int nrn_vector_capacity(Object* vec); +double* nrn_vector_data_ptr(Object* vec); + +} From 05c9126b5b5c49d77f87f424f7461b9d069ba92b Mon Sep 17 00:00:00 2001 From: "Robert A. McDougal" Date: Sat, 13 May 2023 22:03:28 -0400 Subject: [PATCH 02/65] clang-format changes --- src/nrniv/nrnapi.cpp | 385 ++++++++++++++++++++----------------------- src/nrniv/nrnapi.h | 82 ++++----- 2 files changed, 216 insertions(+), 251 deletions(-) diff --git a/src/nrniv/nrnapi.cpp b/src/nrniv/nrnapi.cpp index 9726c123a4..ec405287ed 100644 --- a/src/nrniv/nrnapi.cpp +++ b/src/nrniv/nrnapi.cpp @@ -1,284 +1,249 @@ +#include "nrnapi.h" #include "../../nrnconf.h" -#include "nrnmpiuse.h" #include "nrnmpi.h" -#include "nrnapi.h" -#include "ocjump.h" +#include "nrnmpiuse.h" #include "ocfunc.h" +#include "ocjump.h" #include "parse.hpp" /**************************************** * Connections to the rest of NEURON -****************************************/ + ****************************************/ extern int nrn_nobanner_; extern int diam_changed; extern int nrn_try_catch_nest_depth; -void nrnpy_set_pr_etal(int (*cbpr_stdoe)(int, char*), int (*cbpass)()); -int ivocmain_session(int, const char**, const char**, int start_session); +void nrnpy_set_pr_etal(int (*cbpr_stdoe)(int, char *), int (*cbpass)()); +int ivocmain_session(int, const char **, const char **, int start_session); void simpleconnectsection(); -extern Object* hoc_newobj1(Symbol*, int); +extern Object *hoc_newobj1(Symbol *, int); /**************************************** * Initialization -****************************************/ - -int nrn_init(int argc, const char** argv) { - nrn_nobanner_ = 1; - int exit_status = ivocmain_session(argc, argv, nullptr, 0); - #if NRNMPI_DYNAMICLOAD - nrnmpi_stubs(); - #endif - return exit_status; -} + ****************************************/ -void nrn_redirect_stdout(int (*myprint)(int, char*)) { - // the first argument of myprint is an integer indicating the output stream - // if the int is 1, then stdout, else stderr - // the char* is the message to display - nrnpy_set_pr_etal(myprint, nullptr); +int nrn_init(int argc, const char **argv) { + nrn_nobanner_ = 1; + int exit_status = ivocmain_session(argc, argv, nullptr, 0); +#if NRNMPI_DYNAMICLOAD + nrnmpi_stubs(); +#endif + return exit_status; } +void nrn_redirect_stdout(int (*myprint)(int, char *)) { + // the first argument of myprint is an integer indicating the output stream + // if the int is 1, then stdout, else stderr + // the char* is the message to display + nrnpy_set_pr_etal(myprint, nullptr); +} /**************************************** * Sections -****************************************/ - -Section* nrn_new_section(char const * const name) { - // TODO: check for memory leaks; should we free the symbol, pitm, etc? - Symbol* symbol = new Symbol; - auto pitm = new hoc_Item*; - char* name_ptr = new char[strlen(name)]; - strcpy(name_ptr, name); - symbol->name = name_ptr; - symbol->type = 1; - symbol->u.oboff = 0; - symbol->arayinfo = 0; - hoc_install_object_data_index(symbol); - new_sections(nullptr, symbol, pitm, 1); - return (*pitm)->element.sec; -} + ****************************************/ -void nrn_connect_sections(Section* child_sec, double child_x, Section* parent_sec, double parent_x) { - nrn_pushsec(child_sec); - hoc_pushx(child_x); - nrn_pushsec(parent_sec); - hoc_pushx(parent_x); - simpleconnectsection(); +Section *nrn_new_section(char const *const name) { + // TODO: check for memory leaks; should we free the symbol, pitm, etc? + Symbol *symbol = new Symbol; + auto pitm = new hoc_Item *; + char *name_ptr = new char[strlen(name)]; + strcpy(name_ptr, name); + symbol->name = name_ptr; + symbol->type = 1; + symbol->u.oboff = 0; + symbol->arayinfo = 0; + hoc_install_object_data_index(symbol); + new_sections(nullptr, symbol, pitm, 1); + return (*pitm)->element.sec; } -void nrn_set_section_length(Section* sec, double length) { - // TODO: call can_change_morph(sec) to check pt3dconst_; how should we handle that? - sec->prop->dparam[2] = length; - // dparam[7].val is for Ra - // nrn_length_change updates 3D points if needed - nrn_length_change(sec, length); - diam_changed = 1; - sec->recalc_area_ = 1; +void nrn_connect_sections(Section *child_sec, double child_x, + Section *parent_sec, double parent_x) { + nrn_pushsec(child_sec); + hoc_pushx(child_x); + nrn_pushsec(parent_sec); + hoc_pushx(parent_x); + simpleconnectsection(); } -char const * nrn_secname(Section* sec) { - return secname(sec); +void nrn_set_section_length(Section *sec, double length) { + // TODO: call can_change_morph(sec) to check pt3dconst_; how should we handle + // that? + sec->prop->dparam[2] = length; + // dparam[7].val is for Ra + // nrn_length_change updates 3D points if needed + nrn_length_change(sec, length); + diam_changed = 1; + sec->recalc_area_ = 1; } -void nrn_push_section(Section* sec) { - nrn_pushsec(sec); -} +char const *nrn_secname(Section *sec) { return secname(sec); } -void nrn_pop_section(void) { - nrn_sec_pop(); -} +void nrn_push_section(Section *sec) { nrn_pushsec(sec); } -void nrn_insert_mechanism(Section* sec, Symbol* mechanism) { - // TODO: throw exception if mechanism is not an insertable mechanism? - mech_insert1(sec, mechanism->subtype); -} +void nrn_pop_section(void) { nrn_sec_pop(); } +void nrn_insert_mechanism(Section *sec, Symbol *mechanism) { + // TODO: throw exception if mechanism is not an insertable mechanism? + mech_insert1(sec, mechanism->subtype); +} /**************************************** * Functions, objects, and the stack -****************************************/ + ****************************************/ -Symbol* nrn_get_symbol(char const * const name) { - return hoc_lookup(name); -} +Symbol *nrn_get_symbol(char const *const name) { return hoc_lookup(name); } -int nrn_get_symbol_type(Symbol* sym) { - // TODO: these types are in parse.hpp and are not the same between versions, so we really should wrap - return sym->type; +int nrn_get_symbol_type(Symbol *sym) { + // TODO: these types are in parse.hpp and are not the same between versions, + // so we really should wrap + return sym->type; } -double* nrn_get_symbol_ptr(Symbol* sym) { - return sym->u.pval; -} +double *nrn_get_symbol_ptr(Symbol *sym) { return sym->u.pval; } -void nrn_push_double(double val) { - hoc_pushx(val); -} +void nrn_push_double(double val) { hoc_pushx(val); } -double nrn_pop_double(void) { - return hoc_xpop(); -} +double nrn_pop_double(void) { return hoc_xpop(); } -void nrn_push_double_ptr(double* addr) { - hoc_pushpx(addr); -} +void nrn_push_double_ptr(double *addr) { hoc_pushpx(addr); } -double* nrn_pop_double_ptr(void) { - return hoc_pxpop(); -} +double *nrn_pop_double_ptr(void) { return hoc_pxpop(); } -void nrn_push_str(char** str) { - hoc_pushstr(str); -} +void nrn_push_str(char **str) { hoc_pushstr(str); } -char** nrn_pop_str(void) { - return hoc_strpop(); -} +char **nrn_pop_str(void) { return hoc_strpop(); } -void nrn_push_int(int i) { - hoc_pushi(i); -} +void nrn_push_int(int i) { hoc_pushi(i); } -int nrn_pop_int(void) { - return hoc_ipop(); -} +int nrn_pop_int(void) { return hoc_ipop(); } -Object* nrn_pop_object(void) { - // NOTE: the returned object should be unref'd when no longer needed - Object** obptr = hoc_objpop(); - Object* new_ob_ptr = *obptr; - new_ob_ptr->refcount++; - hoc_tobj_unref(obptr); - return new_ob_ptr; +Object *nrn_pop_object(void) { + // NOTE: the returned object should be unref'd when no longer needed + Object **obptr = hoc_objpop(); + Object *new_ob_ptr = *obptr; + new_ob_ptr->refcount++; + hoc_tobj_unref(obptr); + return new_ob_ptr; } int nrn_stack_type(void) { - switch (hoc_stack_type()) { - case STRING: - return STACK_IS_STR; - case VAR: - return STACK_IS_VAR; - case NUMBER: - return STACK_IS_NUM; - case OBJECTVAR: - return STACK_IS_OBJVAR; - case OBJECTTMP: - return STACK_IS_OBJTMP; - case USERINT: - return STACK_IS_USERINT; - case SYMBOL: - return STACK_IS_SYM; - case STKOBJ_UNREF: - return STACK_IS_OBJUNREF; - } - return STACK_UNKNOWN; -} - -char const * const nrn_stack_type_name(int id) { - switch (id) { - case STACK_IS_STR: - return "STRING"; - case STACK_IS_VAR: - return "VAR"; - case STACK_IS_NUM: - return "NUMBER"; - case STACK_IS_OBJVAR: - return "OBJECTVAR"; - case STACK_IS_OBJTMP: - return "OBJECTTMP"; - case STACK_IS_USERINT: - return "USERINT"; - case STACK_IS_SYM: - return "SYMBOL"; - case STACK_IS_OBJUNREF: - return "STKOBJ_UNREF"; - } - return "UNKNOWN"; -} - -Object* nrn_new_object(Symbol* sym, int narg) { - return hoc_newobj1(sym, narg); -} - -Symbol* nrn_get_method_symbol(Object* obj, char const * const name) { - return hoc_table_lookup(name, obj->ctemplate->symtable); -} - -void nrn_call_method(Object* obj, Symbol* method_sym, int narg) { - OcJump::execute_throw_on_exception(obj, method_sym, narg); -} - -void nrn_call_function(Symbol* sym, int narg) { - OcJump::execute_throw_on_exception(sym, narg); -} - -void nrn_unref_object(Object* obj) { - hoc_obj_unref(obj); -} - + switch (hoc_stack_type()) { + case STRING: + return STACK_IS_STR; + case VAR: + return STACK_IS_VAR; + case NUMBER: + return STACK_IS_NUM; + case OBJECTVAR: + return STACK_IS_OBJVAR; + case OBJECTTMP: + return STACK_IS_OBJTMP; + case USERINT: + return STACK_IS_USERINT; + case SYMBOL: + return STACK_IS_SYM; + case STKOBJ_UNREF: + return STACK_IS_OBJUNREF; + } + return STACK_UNKNOWN; +} + +char const *const nrn_stack_type_name(int id) { + switch (id) { + case STACK_IS_STR: + return "STRING"; + case STACK_IS_VAR: + return "VAR"; + case STACK_IS_NUM: + return "NUMBER"; + case STACK_IS_OBJVAR: + return "OBJECTVAR"; + case STACK_IS_OBJTMP: + return "OBJECTTMP"; + case STACK_IS_USERINT: + return "USERINT"; + case STACK_IS_SYM: + return "SYMBOL"; + case STACK_IS_OBJUNREF: + return "STKOBJ_UNREF"; + } + return "UNKNOWN"; +} + +Object *nrn_new_object(Symbol *sym, int narg) { return hoc_newobj1(sym, narg); } + +Symbol *nrn_get_method_symbol(Object *obj, char const *const name) { + return hoc_table_lookup(name, obj->ctemplate->symtable); +} + +void nrn_call_method(Object *obj, Symbol *method_sym, int narg) { + OcJump::execute_throw_on_exception(obj, method_sym, narg); +} + +void nrn_call_function(Symbol *sym, int narg) { + OcJump::execute_throw_on_exception(sym, narg); +} + +void nrn_unref_object(Object *obj) { hoc_obj_unref(obj); } /**************************************** * Miscellaneous -****************************************/ -int nrn_call_hoc(char const * const command) { - return hoc_oc(command); -} + ****************************************/ +int nrn_call_hoc(char const *const command) { return hoc_oc(command); } -SectionListIterator::SectionListIterator(hoc_Item* my_sectionlist) { - initial = my_sectionlist; - current = my_sectionlist->next; +SectionListIterator::SectionListIterator(hoc_Item *my_sectionlist) { + initial = my_sectionlist; + current = my_sectionlist->next; } -Section* SectionListIterator::next(void) { - // NOTE: if no next element, returns nullptr - while(true) { - Section* sec = current->element.sec; - - if (sec->prop) { - current = current->next; - return sec; - } - hoc_l_delete(current); - section_unref(sec); - current = current->next; - if (current == initial) { - return nullptr; - } +Section *SectionListIterator::next(void) { + // NOTE: if no next element, returns nullptr + while (true) { + Section *sec = current->element.sec; + + if (sec->prop) { + current = current->next; + return sec; + } + hoc_l_delete(current); + section_unref(sec); + current = current->next; + if (current == initial) { + return nullptr; } + } } int SectionListIterator::done(void) { - if (initial == current) { - return 1; - } - return 0; + if (initial == current) { + return 1; + } + return 0; } - // copy semantics isn't great, but only two data items // and is cleaner to use in a for loop than having to free memory at the end -SectionListIterator* nrn_new_sectionlist_iterator(hoc_Item* my_sectionlist) { - return new SectionListIterator(my_sectionlist); +SectionListIterator *nrn_new_sectionlist_iterator(hoc_Item *my_sectionlist) { + return new SectionListIterator(my_sectionlist); } -void nrn_free_sectionlist_iterator(SectionListIterator* sl) { - delete sl; -} +void nrn_free_sectionlist_iterator(SectionListIterator *sl) { delete sl; } -Section* nrn_sectionlist_iterator_next(SectionListIterator* sl) { - return sl->next(); +Section *nrn_sectionlist_iterator_next(SectionListIterator *sl) { + return sl->next(); } -int nrn_sectionlist_iterator_done(SectionListIterator* sl) { - return sl->done(); +int nrn_sectionlist_iterator_done(SectionListIterator *sl) { + return sl->done(); } -int nrn_vector_capacity(Object* vec) { - // TODO: throw exception if vec is not a Vector - return vector_capacity((IvocVect*) vec->u.this_pointer); +int nrn_vector_capacity(Object *vec) { + // TODO: throw exception if vec is not a Vector + return vector_capacity((IvocVect *)vec->u.this_pointer); } -double* nrn_vector_data_ptr(Object* vec) { - // TODO: throw exception if vec is not a Vector - return vector_vec((IvocVect*) vec->u.this_pointer); +double *nrn_vector_data_ptr(Object *vec) { + // TODO: throw exception if vec is not a Vector + return vector_vec((IvocVect *)vec->u.this_pointer); } diff --git a/src/nrniv/nrnapi.h b/src/nrniv/nrnapi.h index bb30bd076b..ef1972ad28 100644 --- a/src/nrniv/nrnapi.h +++ b/src/nrniv/nrnapi.h @@ -14,66 +14,66 @@ #define STACK_UNKNOWN -1 class SectionListIterator { - public: - SectionListIterator(hoc_Item*); - Section* next(void); - int done(void); - private: - hoc_Item* initial; - hoc_Item* current; -}; +public: + SectionListIterator(hoc_Item *); + Section *next(void); + int done(void); +private: + hoc_Item *initial; + hoc_Item *current; +}; extern "C" { /**************************************** * Initialization -****************************************/ -int nrn_init(int argc, const char** argv); -void nrn_redirect_stdout(int (*myprint)(int, char*)); + ****************************************/ +int nrn_init(int argc, const char **argv); +void nrn_redirect_stdout(int (*myprint)(int, char *)); /**************************************** * Sections -****************************************/ -Section* nrn_new_section(char const * const name); -void nrn_connect_sections(Section* child_sec, double child_x, Section* parent_sec, double parent_x); -void nrn_set_section_length(Section* sec, double length); -char const * nrn_secname(Section* sec); -void nrn_push_section(Section* sec); + ****************************************/ +Section *nrn_new_section(char const *const name); +void nrn_connect_sections(Section *child_sec, double child_x, + Section *parent_sec, double parent_x); +void nrn_set_section_length(Section *sec, double length); +char const *nrn_secname(Section *sec); +void nrn_push_section(Section *sec); void nrn_pop_section(void); -void nrn_insert_mechanism(Section* sec, Symbol* mechanism); +void nrn_insert_mechanism(Section *sec, Symbol *mechanism); /**************************************** * Functions, objects, and the stack -****************************************/ -Symbol* nrn_get_symbol(char const * const name); -int nrn_get_symbol_type(Symbol* sym); -double* nrn_get_symbol_ptr(Symbol* sym); + ****************************************/ +Symbol *nrn_get_symbol(char const *const name); +int nrn_get_symbol_type(Symbol *sym); +double *nrn_get_symbol_ptr(Symbol *sym); void nrn_push_double(double val); double nrn_pop_double(void); -void nrn_push_double_ptr(double* addr); -double* nrn_pop_double_ptr(void); -void nrn_push_str(char** str); -char** nrn_pop_str(void); +void nrn_push_double_ptr(double *addr); +double *nrn_pop_double_ptr(void); +void nrn_push_str(char **str); +char **nrn_pop_str(void); void nrn_push_int(int i); int nrn_pop_int(void); -Object* nrn_pop_object(void); +Object *nrn_pop_object(void); int nrn_stack_type(void); -char const * const nrn_stack_type_name(int id); -Object* nrn_new_object(Symbol* sym, int narg); -Symbol* nrn_get_method_symbol(Object* obj, char const * const name); -void nrn_call_method(Object* obj, Symbol* method_sym, int narg); -void nrn_call_function(Symbol* sym, int narg); -void nrn_unref_object(Object* obj); +char const *const nrn_stack_type_name(int id); +Object *nrn_new_object(Symbol *sym, int narg); +Symbol *nrn_get_method_symbol(Object *obj, char const *const name); +void nrn_call_method(Object *obj, Symbol *method_sym, int narg); +void nrn_call_function(Symbol *sym, int narg); +void nrn_unref_object(Object *obj); /**************************************** * Miscellaneous -****************************************/ -int nrn_call_hoc(char const * const command); -SectionListIterator* nrn_new_sectionlist_iterator(hoc_Item* my_sectionlist); -void nrn_free_sectionlist_iterator(SectionListIterator* sl); -Section* nrn_sectionlist_iterator_next(SectionListIterator sl); + ****************************************/ +int nrn_call_hoc(char const *const command); +SectionListIterator *nrn_new_sectionlist_iterator(hoc_Item *my_sectionlist); +void nrn_free_sectionlist_iterator(SectionListIterator *sl); +Section *nrn_sectionlist_iterator_next(SectionListIterator sl); int nrn_sectionlist_iterator_done(SectionListIterator sl); -int nrn_vector_capacity(Object* vec); -double* nrn_vector_data_ptr(Object* vec); - +int nrn_vector_capacity(Object *vec); +double *nrn_vector_data_ptr(Object *vec); } From 6e98ba04734c15c2eef946b971ccb2cc66887f51 Mon Sep 17 00:00:00 2001 From: "Robert A. McDougal" Date: Sun, 14 May 2023 11:32:54 -0400 Subject: [PATCH 03/65] nrnpy_set_pr_etal should be extern C --- src/nrniv/nrnapi.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/nrniv/nrnapi.cpp b/src/nrniv/nrnapi.cpp index ec405287ed..e2467ac6d4 100644 --- a/src/nrniv/nrnapi.cpp +++ b/src/nrniv/nrnapi.cpp @@ -13,7 +13,7 @@ extern int nrn_nobanner_; extern int diam_changed; extern int nrn_try_catch_nest_depth; -void nrnpy_set_pr_etal(int (*cbpr_stdoe)(int, char *), int (*cbpass)()); +extern "C" void nrnpy_set_pr_etal(int (*cbpr_stdoe)(int, char *), int (*cbpass)()); int ivocmain_session(int, const char **, const char **, int start_session); void simpleconnectsection(); extern Object *hoc_newobj1(Symbol *, int); From 8d4e8b52b9401754fcc06bfbb5fadf3eb2c9709e Mon Sep 17 00:00:00 2001 From: "Robert A. McDougal" Date: Sun, 14 May 2023 13:13:17 -0400 Subject: [PATCH 04/65] nrn_call_function leaves results on stack --- src/ivoc/ocjump.cpp | 3 ++- src/nrniv/nrnapi.cpp | 1 + src/nrniv/nrnapi.h | 2 ++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/ivoc/ocjump.cpp b/src/ivoc/ocjump.cpp index b30bb8aeec..ae9c12129c 100644 --- a/src/ivoc/ocjump.cpp +++ b/src/ivoc/ocjump.cpp @@ -143,10 +143,11 @@ void OcJump::execute_throw_on_exception(Object* obj, Symbol* sym, int narg) { } void OcJump::execute_throw_on_exception(Symbol* sym, int narg) { + // NOTE: return value is left on the stack saved_state before{}; try_catch_depth_increment tell_children_we_will_catch{}; try { - hoc_call_func(sym, narg); + hoc_pushx(hoc_call_func(sym, narg)); } catch (...) { before.restore(); throw; diff --git a/src/nrniv/nrnapi.cpp b/src/nrniv/nrnapi.cpp index e2467ac6d4..444b87513b 100644 --- a/src/nrniv/nrnapi.cpp +++ b/src/nrniv/nrnapi.cpp @@ -182,6 +182,7 @@ void nrn_call_method(Object *obj, Symbol *method_sym, int narg) { } void nrn_call_function(Symbol *sym, int narg) { + // NOTE: this differs from hoc_call_func in that the response remains on the stack OcJump::execute_throw_on_exception(sym, narg); } diff --git a/src/nrniv/nrnapi.h b/src/nrniv/nrnapi.h index ef1972ad28..783340e100 100644 --- a/src/nrniv/nrnapi.h +++ b/src/nrniv/nrnapi.h @@ -42,6 +42,7 @@ char const *nrn_secname(Section *sec); void nrn_push_section(Section *sec); void nrn_pop_section(void); void nrn_insert_mechanism(Section *sec, Symbol *mechanism); +// TODO: set nseg /**************************************** * Functions, objects, and the stack @@ -64,6 +65,7 @@ Object *nrn_new_object(Symbol *sym, int narg); Symbol *nrn_get_method_symbol(Object *obj, char const *const name); void nrn_call_method(Object *obj, Symbol *method_sym, int narg); void nrn_call_function(Symbol *sym, int narg); +// TODO: do we need a nrn_ref_object? void nrn_unref_object(Object *obj); /**************************************** From 6f5016f031ad07232dd75e6e5c224c2e8461dab1 Mon Sep 17 00:00:00 2001 From: "Robert A. McDougal" Date: Sun, 14 May 2023 15:01:45 -0400 Subject: [PATCH 05/65] segments, properties --- src/nrniv/nrnapi.cpp | 64 ++++++++++++++++++++++++++++++++++++++++++++ src/nrniv/nrnapi.h | 23 +++++++++++++--- 2 files changed, 84 insertions(+), 3 deletions(-) diff --git a/src/nrniv/nrnapi.cpp b/src/nrniv/nrnapi.cpp index 444b87513b..3e98236c34 100644 --- a/src/nrniv/nrnapi.cpp +++ b/src/nrniv/nrnapi.cpp @@ -4,6 +4,7 @@ #include "nrnmpiuse.h" #include "ocfunc.h" #include "ocjump.h" +#include "nrniv_mf.h" #include "parse.hpp" @@ -17,6 +18,7 @@ extern "C" void nrnpy_set_pr_etal(int (*cbpr_stdoe)(int, char *), int (*cbpass)( int ivocmain_session(int, const char **, const char **, int start_session); void simpleconnectsection(); extern Object *hoc_newobj1(Symbol *, int); +extern void nrn_change_nseg(Section*, int); /**************************************** * Initialization @@ -77,6 +79,21 @@ void nrn_set_section_length(Section *sec, double length) { sec->recalc_area_ = 1; } +double nrn_get_section_length(Section *sec) { + return section_length(sec); +} + +double nrn_get_section_Ra(Section* sec) { + return nrn_ra(sec); +} + +void nrn_set_section_Ra(Section* sec, double val) { + // TODO: ensure val > 0 + sec->prop->dparam[7] = val; + diam_changed = 1; + sec->recalc_area_ = 1; +} + char const *nrn_secname(Section *sec) { return secname(sec); } void nrn_push_section(Section *sec) { nrn_pushsec(sec); } @@ -88,6 +105,38 @@ void nrn_insert_mechanism(Section *sec, Symbol *mechanism) { mech_insert1(sec, mechanism->subtype); } +/**************************************** + * Segments + ****************************************/ + +int nrn_get_nseg(Section const * const sec) { + // always one more node than nseg + return sec->nnode - 1; +} + +void nrn_set_nseg(Section* const sec, const int nseg) { + nrn_change_nseg(sec, nseg); +} + + +void nrn_set_segment_diam(Section* const sec, const double x, const double diam) { + Node* const node = node_exact(sec, x); + // TODO: this is fine if no 3D points; does it work if there are 3D points? + for (auto prop = node->prop; prop; prop=prop->next) { + if (prop->_type == MORPHOLOGY) { + prop->param[0] = diam; + diam_changed = 1; + node->sec->recalc_area_ = 1; + break; + } + } +} + +double* nrn_get_rangevar_ptr(Section* const sec, Symbol* const sym, double const x) { + return nrn_rangepointer(sec, sym, x); +} + + /**************************************** * Functions, objects, and the stack ****************************************/ @@ -248,3 +297,18 @@ double *nrn_vector_data_ptr(Object *vec) { // TODO: throw exception if vec is not a Vector return vector_vec((IvocVect *)vec->u.this_pointer); } + +double* nrn_get_pp_property_ptr(Object* pp, const char* name) { + int index = hoc_table_lookup(name, pp->ctemplate->symtable)->u.rng.index; + return &ob2pntproc_0(pp)->prop->param[index]; +} + +double* nrn_get_steered_property_ptr(Object* obj, const char* name) { + assert(obj->ctemplate->steer); + auto sym2 = hoc_table_lookup(name, obj->ctemplate->symtable); + assert(sym2); + hoc_pushs(sym2); + // put the pointer for the memory location on the stack + obj->ctemplate->steer(obj->u.this_pointer); + return hoc_pxpop(); +} \ No newline at end of file diff --git a/src/nrniv/nrnapi.h b/src/nrniv/nrnapi.h index 783340e100..82eb4fcd3d 100644 --- a/src/nrniv/nrnapi.h +++ b/src/nrniv/nrnapi.h @@ -38,11 +38,22 @@ Section *nrn_new_section(char const *const name); void nrn_connect_sections(Section *child_sec, double child_x, Section *parent_sec, double parent_x); void nrn_set_section_length(Section *sec, double length); +double nrn_get_section_length(Section *sec); +double nrn_get_section_Ra(Section* sec); +void nrn_set_section_Ra(Section* sec, double val); char const *nrn_secname(Section *sec); void nrn_push_section(Section *sec); void nrn_pop_section(void); void nrn_insert_mechanism(Section *sec, Symbol *mechanism); -// TODO: set nseg + +/**************************************** + * Segments + ****************************************/ +int nrn_get_nseg(Section const * const sec); +void nrn_set_nseg(Section* const sec, const int nseg); +void nrn_set_segment_diam(Section* const sec, const double x, const double diam); +double* nrn_get_rangevar_ptr(Section* const sec, Symbol* const sym, double const x); + /**************************************** * Functions, objects, and the stack @@ -67,6 +78,7 @@ void nrn_call_method(Object *obj, Symbol *method_sym, int narg); void nrn_call_function(Symbol *sym, int narg); // TODO: do we need a nrn_ref_object? void nrn_unref_object(Object *obj); +// TODO: need a way to get the type of an object as a string /**************************************** * Miscellaneous @@ -74,8 +86,13 @@ void nrn_unref_object(Object *obj); int nrn_call_hoc(char const *const command); SectionListIterator *nrn_new_sectionlist_iterator(hoc_Item *my_sectionlist); void nrn_free_sectionlist_iterator(SectionListIterator *sl); -Section *nrn_sectionlist_iterator_next(SectionListIterator sl); -int nrn_sectionlist_iterator_done(SectionListIterator sl); +Section *nrn_sectionlist_iterator_next(SectionListIterator* sl); +int nrn_sectionlist_iterator_done(SectionListIterator* sl); int nrn_vector_capacity(Object *vec); double *nrn_vector_data_ptr(Object *vec); +double* nrn_get_pp_property_ptr(Object* pp, const char* name); +double* nrn_get_steered_property_ptr(Object* obj, const char* name); +// TODO: need a way to get hoc_Item* corresponding to allsec, a given SectionList +// TODO: need a way to iterate over symbol trees (top level and per object) +// TODO: need a way of extracting information from a ShapePlotInterface } From bac48bcae38edc3aedb29e1eb06c168d6665a685 Mon Sep 17 00:00:00 2001 From: "Robert A. McDougal" Date: Sun, 14 May 2023 15:30:05 -0400 Subject: [PATCH 06/65] including hocdec.h to try to avoid Datum errors on some systems --- src/nrniv/nrnapi.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/nrniv/nrnapi.h b/src/nrniv/nrnapi.h index 82eb4fcd3d..85c247cf1f 100644 --- a/src/nrniv/nrnapi.h +++ b/src/nrniv/nrnapi.h @@ -1,5 +1,6 @@ #pragma once +#include "hocdec.h" #include "section.h" // we define these here to allow the API to be independent of internal details From 9f9279994b6a94f8c9038a9e839e046edec609e5 Mon Sep 17 00:00:00 2001 From: "Robert A. McDougal" Date: Sun, 14 May 2023 20:51:09 -0400 Subject: [PATCH 07/65] sectionlist and allsec hoc_Item getters --- src/nrniv/nrnapi.cpp | 9 +++++++++ src/nrniv/nrnapi.h | 4 +++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/src/nrniv/nrnapi.cpp b/src/nrniv/nrnapi.cpp index 3e98236c34..a007d1064c 100644 --- a/src/nrniv/nrnapi.cpp +++ b/src/nrniv/nrnapi.cpp @@ -136,6 +136,15 @@ double* nrn_get_rangevar_ptr(Section* const sec, Symbol* const sym, double const return nrn_rangepointer(sec, sym, x); } +hoc_Item* nrn_get_allsec(void) { + return section_list; +} + +hoc_Item* nrn_get_sectionlist_data(Object* obj) { + // TODO: verify the obj is in fact a SectionList + return (hoc_Item*) obj->u.this_pointer; +} + /**************************************** * Functions, objects, and the stack diff --git a/src/nrniv/nrnapi.h b/src/nrniv/nrnapi.h index 85c247cf1f..67c1d8a40b 100644 --- a/src/nrniv/nrnapi.h +++ b/src/nrniv/nrnapi.h @@ -46,6 +46,9 @@ char const *nrn_secname(Section *sec); void nrn_push_section(Section *sec); void nrn_pop_section(void); void nrn_insert_mechanism(Section *sec, Symbol *mechanism); +hoc_Item* nrn_get_allsec(void); +hoc_Item* nrn_get_sectionlist_data(Object* obj); + /**************************************** * Segments @@ -93,7 +96,6 @@ int nrn_vector_capacity(Object *vec); double *nrn_vector_data_ptr(Object *vec); double* nrn_get_pp_property_ptr(Object* pp, const char* name); double* nrn_get_steered_property_ptr(Object* obj, const char* name); -// TODO: need a way to get hoc_Item* corresponding to allsec, a given SectionList // TODO: need a way to iterate over symbol trees (top level and per object) // TODO: need a way of extracting information from a ShapePlotInterface } From 8cb0757071c8ca7d4663fc1b093298d736d6dc9e Mon Sep 17 00:00:00 2001 From: "Robert A. McDougal" Date: Sun, 14 May 2023 20:57:04 -0400 Subject: [PATCH 08/65] ran clang-format --- src/ivoc/ocjump.cpp | 276 +++++++++++++++++++++---------------------- src/ivoc/ocjump.h | 35 +++--- src/nrniv/nrnapi.cpp | 98 ++++++++------- src/nrniv/nrnapi.h | 28 ++--- 4 files changed, 213 insertions(+), 224 deletions(-) diff --git a/src/ivoc/ocjump.cpp b/src/ivoc/ocjump.cpp index ae9c12129c..da04f32f8e 100644 --- a/src/ivoc/ocjump.cpp +++ b/src/ivoc/ocjump.cpp @@ -12,172 +12,168 @@ #include -extern Objectdata* hoc_top_level_data; -extern Symlist* hoc_top_level_symlist; -extern Symlist* hoc_symlist; -extern Object* hoc_thisobject; +extern Objectdata *hoc_top_level_data; +extern Symlist *hoc_top_level_symlist; +extern Symlist *hoc_symlist; +extern Object *hoc_thisobject; extern int hoc_execerror_messages; -bool hoc_valid_stmt(const char* stmt, Object* ob) { - std::string s{stmt}; - s.append(1, '\n'); - return OcJump::execute(s.c_str(), ob); +bool hoc_valid_stmt(const char *stmt, Object *ob) { + std::string s{stmt}; + s.append(1, '\n'); + return OcJump::execute(s.c_str(), ob); } void hoc_execute1() { - Object* ob{}; - int hem{1}; - if (ifarg(2)) { - if (hoc_is_object_arg(2)) { - ob = *hoc_objgetarg(2); - if (ifarg(3)) { - hem = chkarg(3, 0., 1.); - } - } else { - hem = chkarg(2, 0., 1.); - } + Object *ob{}; + int hem{1}; + if (ifarg(2)) { + if (hoc_is_object_arg(2)) { + ob = *hoc_objgetarg(2); + if (ifarg(3)) { + hem = chkarg(3, 0., 1.); + } + } else { + hem = chkarg(2, 0., 1.); } - - auto const hemold = std::exchange(hoc_execerror_messages, hem); - auto const old_mpiabort_flag = std::exchange(nrn_mpiabort_on_error_, 0); - bool const b = hoc_valid_stmt(hoc_gargstr(1), ob); - nrn_mpiabort_on_error_ = old_mpiabort_flag; - hoc_execerror_messages = hemold; - hoc_retpushx(b); + } + + auto const hemold = std::exchange(hoc_execerror_messages, hem); + auto const old_mpiabort_flag = std::exchange(nrn_mpiabort_on_error_, 0); + bool const b = hoc_valid_stmt(hoc_gargstr(1), ob); + nrn_mpiabort_on_error_ = old_mpiabort_flag; + hoc_execerror_messages = hemold; + hoc_retpushx(b); } #if HAVE_IV -bool Oc::valid_expr(Symbol* s) { - return OcJump::execute(s->u.u_proc->defn.in); -} +bool Oc::valid_expr(Symbol *s) { return OcJump::execute(s->u.u_proc->defn.in); } -bool Oc::valid_stmt(const char* stmt, Object* ob) { - return hoc_valid_stmt(stmt, ob); +bool Oc::valid_stmt(const char *stmt, Object *ob) { + return hoc_valid_stmt(stmt, ob); } #endif //------------------------------------------------------------------ -void hoc_execute(Inst*); +void hoc_execute(Inst *); namespace { struct saved_state { - saved_state() { - // not complete but it is good for expressions and it can be improved - oc_save_hoc_oop(&o1, &o2, &o4, &o5); - oc_save_code(&c1, &c2, c3, &c4, &c5, &c6, &c7, &c8, c9, &c10, &c11, &c12); - oc_save_input_info(&i1, &i2, &i3, &i4); - oc_save_cabcode(&cc1, &cc2); - } - void restore() { - oc_restore_hoc_oop(&o1, &o2, &o4, &o5); - oc_restore_code(&c1, &c2, c3, &c4, &c5, &c6, &c7, &c8, c9, &c10, &c11, &c12); - oc_restore_input_info(i1, i2, i3, i4); - oc_restore_cabcode(&cc1, &cc2); - } - - private: - // hoc_oop - Object* o1{}; - Objectdata* o2{}; - int o4{}; - Symlist* o5{}; - - // code - Inst* c1{}; - Inst* c2{}; - std::size_t c3{}; - nrn::oc::frame* c4{}; - int c5{}; - int c6{}; - Inst* c7{}; - nrn::oc::frame* c8{}; - std::size_t c9{}; - Symlist* c10{}; - Inst* c11{}; - int c12{}; - - // input_info - const char* i1{}; - int i2{}; - int i3{}; - NrnFILEWrap* i4{}; - - // cabcode - int cc1{}; - int cc2{}; + saved_state() { + // not complete but it is good for expressions and it can be improved + oc_save_hoc_oop(&o1, &o2, &o4, &o5); + oc_save_code(&c1, &c2, c3, &c4, &c5, &c6, &c7, &c8, c9, &c10, &c11, &c12); + oc_save_input_info(&i1, &i2, &i3, &i4); + oc_save_cabcode(&cc1, &cc2); + } + void restore() { + oc_restore_hoc_oop(&o1, &o2, &o4, &o5); + oc_restore_code(&c1, &c2, c3, &c4, &c5, &c6, &c7, &c8, c9, &c10, &c11, + &c12); + oc_restore_input_info(i1, i2, i3, i4); + oc_restore_cabcode(&cc1, &cc2); + } + +private: + // hoc_oop + Object *o1{}; + Objectdata *o2{}; + int o4{}; + Symlist *o5{}; + + // code + Inst *c1{}; + Inst *c2{}; + std::size_t c3{}; + nrn::oc::frame *c4{}; + int c5{}; + int c6{}; + Inst *c7{}; + nrn::oc::frame *c8{}; + std::size_t c9{}; + Symlist *c10{}; + Inst *c11{}; + int c12{}; + + // input_info + const char *i1{}; + int i2{}; + int i3{}; + NrnFILEWrap *i4{}; + + // cabcode + int cc1{}; + int cc2{}; }; -} // namespace - -bool OcJump::execute(Inst* p) { - saved_state before{}; - try_catch_depth_increment tell_children_we_will_catch{}; - try { - hoc_execute(p); - return true; - } catch (...) { - before.restore(); - return false; - } +} // namespace + +bool OcJump::execute(Inst *p) { + saved_state before{}; + try_catch_depth_increment tell_children_we_will_catch{}; + try { + hoc_execute(p); + return true; + } catch (...) { + before.restore(); + return false; + } } -bool OcJump::execute(const char* stmt, Object* ob) { - saved_state before{}; - try_catch_depth_increment tell_children_we_will_catch{}; - try { - hoc_obj_run(stmt, ob); - return true; - } catch (...) { - before.restore(); - return false; - } +bool OcJump::execute(const char *stmt, Object *ob) { + saved_state before{}; + try_catch_depth_increment tell_children_we_will_catch{}; + try { + hoc_obj_run(stmt, ob); + return true; + } catch (...) { + before.restore(); + return false; + } } -void OcJump::execute_throw_on_exception(Object* obj, Symbol* sym, int narg) { - saved_state before{}; - try_catch_depth_increment tell_children_we_will_catch{}; - try { - hoc_call_ob_proc(obj, sym, narg); - } catch (...) { - before.restore(); - throw; - } +void OcJump::execute_throw_on_exception(Object *obj, Symbol *sym, int narg) { + saved_state before{}; + try_catch_depth_increment tell_children_we_will_catch{}; + try { + hoc_call_ob_proc(obj, sym, narg); + } catch (...) { + before.restore(); + throw; + } } -void OcJump::execute_throw_on_exception(Symbol* sym, int narg) { - // NOTE: return value is left on the stack - saved_state before{}; - try_catch_depth_increment tell_children_we_will_catch{}; - try { - hoc_pushx(hoc_call_func(sym, narg)); - } catch (...) { - before.restore(); - throw; - } +void OcJump::execute_throw_on_exception(Symbol *sym, int narg) { + // NOTE: return value is left on the stack + saved_state before{}; + try_catch_depth_increment tell_children_we_will_catch{}; + try { + hoc_pushx(hoc_call_func(sym, narg)); + } catch (...) { + before.restore(); + throw; + } } - -void* OcJump::fpycall(void* (*f)(void*, void*), void* a, void* b) { - saved_state before{}; - try_catch_depth_increment tell_children_we_will_catch{}; - try { - return (*f)(a, b); - } catch (...) { - before.restore(); - throw; - } +void *OcJump::fpycall(void *(*f)(void *, void *), void *a, void *b) { + saved_state before{}; + try_catch_depth_increment tell_children_we_will_catch{}; + try { + return (*f)(a, b); + } catch (...) { + before.restore(); + throw; + } } -ObjectContext::ObjectContext(Object* obj) { - oc_save_hoc_oop(&a1, &a2, &a4, &a5); - hoc_thisobject = obj; - if (obj) { - hoc_objectdata = obj->u.dataspace; - hoc_symlist = obj->ctemplate->symtable; - } else { - hoc_objectdata = hoc_top_level_data; - hoc_symlist = hoc_top_level_symlist; - } +ObjectContext::ObjectContext(Object *obj) { + oc_save_hoc_oop(&a1, &a2, &a4, &a5); + hoc_thisobject = obj; + if (obj) { + hoc_objectdata = obj->u.dataspace; + hoc_symlist = obj->ctemplate->symtable; + } else { + hoc_objectdata = hoc_top_level_data; + hoc_symlist = hoc_top_level_symlist; + } } -ObjectContext::~ObjectContext() { - oc_restore_hoc_oop(&a1, &a2, &a4, &a5); -} +ObjectContext::~ObjectContext() { oc_restore_hoc_oop(&a1, &a2, &a4, &a5); } diff --git a/src/ivoc/ocjump.h b/src/ivoc/ocjump.h index b6c1aafb1e..7d3efaab0d 100644 --- a/src/ivoc/ocjump.h +++ b/src/ivoc/ocjump.h @@ -4,7 +4,8 @@ struct Object; union Objectdata; struct Symlist; -/** @brief How many NEURON try { ... } catch(...) { ... } blocks are in the call stack. +/** @brief How many NEURON try { ... } catch(...) { ... } blocks are in the call + * stack. * * Errors inside NEURON are triggered using hoc_execerror, which ultimately * throws an exception. To replicate the old logic, we sometimes need to insert @@ -17,29 +18,25 @@ extern int nrn_try_catch_nest_depth; /** @brief Helper type for incrementing/decrementing nrn_try_catch_nest_depth. */ struct try_catch_depth_increment { - try_catch_depth_increment() { - ++nrn_try_catch_nest_depth; - } - ~try_catch_depth_increment() { - --nrn_try_catch_nest_depth; - } + try_catch_depth_increment() { ++nrn_try_catch_nest_depth; } + ~try_catch_depth_increment() { --nrn_try_catch_nest_depth; } }; struct ObjectContext { - ObjectContext(Object*); - ~ObjectContext(); + ObjectContext(Object *); + ~ObjectContext(); - private: - Object* a1; - Objectdata* a2; - int a4; - Symlist* a5; +private: + Object *a1; + Objectdata *a2; + int a4; + Symlist *a5; }; struct OcJump { - static bool execute(Inst* p); - static bool execute(const char*, Object* ob = NULL); - static void* fpycall(void* (*) (void*, void*), void*, void*); - static void execute_throw_on_exception(Symbol* sym, int narg); - static void execute_throw_on_exception(Object* obj, Symbol* sym, int narg); + static bool execute(Inst *p); + static bool execute(const char *, Object *ob = NULL); + static void *fpycall(void *(*)(void *, void *), void *, void *); + static void execute_throw_on_exception(Symbol *sym, int narg); + static void execute_throw_on_exception(Object *obj, Symbol *sym, int narg); }; diff --git a/src/nrniv/nrnapi.cpp b/src/nrniv/nrnapi.cpp index a007d1064c..2cb94fd9b4 100644 --- a/src/nrniv/nrnapi.cpp +++ b/src/nrniv/nrnapi.cpp @@ -1,10 +1,10 @@ #include "nrnapi.h" #include "../../nrnconf.h" +#include "nrniv_mf.h" #include "nrnmpi.h" #include "nrnmpiuse.h" #include "ocfunc.h" #include "ocjump.h" -#include "nrniv_mf.h" #include "parse.hpp" @@ -14,11 +14,12 @@ extern int nrn_nobanner_; extern int diam_changed; extern int nrn_try_catch_nest_depth; -extern "C" void nrnpy_set_pr_etal(int (*cbpr_stdoe)(int, char *), int (*cbpass)()); +extern "C" void nrnpy_set_pr_etal(int (*cbpr_stdoe)(int, char *), + int (*cbpass)()); int ivocmain_session(int, const char **, const char **, int start_session); void simpleconnectsection(); extern Object *hoc_newobj1(Symbol *, int); -extern void nrn_change_nseg(Section*, int); +extern void nrn_change_nseg(Section *, int); /**************************************** * Initialization @@ -79,19 +80,15 @@ void nrn_set_section_length(Section *sec, double length) { sec->recalc_area_ = 1; } -double nrn_get_section_length(Section *sec) { - return section_length(sec); -} +double nrn_get_section_length(Section *sec) { return section_length(sec); } -double nrn_get_section_Ra(Section* sec) { - return nrn_ra(sec); -} +double nrn_get_section_Ra(Section *sec) { return nrn_ra(sec); } -void nrn_set_section_Ra(Section* sec, double val) { - // TODO: ensure val > 0 - sec->prop->dparam[7] = val; - diam_changed = 1; - sec->recalc_area_ = 1; +void nrn_set_section_Ra(Section *sec, double val) { + // TODO: ensure val > 0 + sec->prop->dparam[7] = val; + diam_changed = 1; + sec->recalc_area_ = 1; } char const *nrn_secname(Section *sec) { return secname(sec); } @@ -109,43 +106,41 @@ void nrn_insert_mechanism(Section *sec, Symbol *mechanism) { * Segments ****************************************/ -int nrn_get_nseg(Section const * const sec) { - // always one more node than nseg - return sec->nnode - 1; +int nrn_get_nseg(Section const *const sec) { + // always one more node than nseg + return sec->nnode - 1; } -void nrn_set_nseg(Section* const sec, const int nseg) { - nrn_change_nseg(sec, nseg); +void nrn_set_nseg(Section *const sec, const int nseg) { + nrn_change_nseg(sec, nseg); } - -void nrn_set_segment_diam(Section* const sec, const double x, const double diam) { - Node* const node = node_exact(sec, x); - // TODO: this is fine if no 3D points; does it work if there are 3D points? - for (auto prop = node->prop; prop; prop=prop->next) { - if (prop->_type == MORPHOLOGY) { - prop->param[0] = diam; - diam_changed = 1; - node->sec->recalc_area_ = 1; - break; - } +void nrn_set_segment_diam(Section *const sec, const double x, + const double diam) { + Node *const node = node_exact(sec, x); + // TODO: this is fine if no 3D points; does it work if there are 3D points? + for (auto prop = node->prop; prop; prop = prop->next) { + if (prop->_type == MORPHOLOGY) { + prop->param[0] = diam; + diam_changed = 1; + node->sec->recalc_area_ = 1; + break; } + } } -double* nrn_get_rangevar_ptr(Section* const sec, Symbol* const sym, double const x) { - return nrn_rangepointer(sec, sym, x); +double *nrn_get_rangevar_ptr(Section *const sec, Symbol *const sym, + double const x) { + return nrn_rangepointer(sec, sym, x); } -hoc_Item* nrn_get_allsec(void) { - return section_list; -} +hoc_Item *nrn_get_allsec(void) { return section_list; } -hoc_Item* nrn_get_sectionlist_data(Object* obj) { - // TODO: verify the obj is in fact a SectionList - return (hoc_Item*) obj->u.this_pointer; +hoc_Item *nrn_get_sectionlist_data(Object *obj) { + // TODO: verify the obj is in fact a SectionList + return (hoc_Item *)obj->u.this_pointer; } - /**************************************** * Functions, objects, and the stack ****************************************/ @@ -240,7 +235,8 @@ void nrn_call_method(Object *obj, Symbol *method_sym, int narg) { } void nrn_call_function(Symbol *sym, int narg) { - // NOTE: this differs from hoc_call_func in that the response remains on the stack + // NOTE: this differs from hoc_call_func in that the response remains on the + // stack OcJump::execute_throw_on_exception(sym, narg); } @@ -307,17 +303,17 @@ double *nrn_vector_data_ptr(Object *vec) { return vector_vec((IvocVect *)vec->u.this_pointer); } -double* nrn_get_pp_property_ptr(Object* pp, const char* name) { - int index = hoc_table_lookup(name, pp->ctemplate->symtable)->u.rng.index; - return &ob2pntproc_0(pp)->prop->param[index]; +double *nrn_get_pp_property_ptr(Object *pp, const char *name) { + int index = hoc_table_lookup(name, pp->ctemplate->symtable)->u.rng.index; + return &ob2pntproc_0(pp)->prop->param[index]; } -double* nrn_get_steered_property_ptr(Object* obj, const char* name) { - assert(obj->ctemplate->steer); - auto sym2 = hoc_table_lookup(name, obj->ctemplate->symtable); - assert(sym2); - hoc_pushs(sym2); - // put the pointer for the memory location on the stack - obj->ctemplate->steer(obj->u.this_pointer); - return hoc_pxpop(); +double *nrn_get_steered_property_ptr(Object *obj, const char *name) { + assert(obj->ctemplate->steer); + auto sym2 = hoc_table_lookup(name, obj->ctemplate->symtable); + assert(sym2); + hoc_pushs(sym2); + // put the pointer for the memory location on the stack + obj->ctemplate->steer(obj->u.this_pointer); + return hoc_pxpop(); } \ No newline at end of file diff --git a/src/nrniv/nrnapi.h b/src/nrniv/nrnapi.h index 67c1d8a40b..19357dbb81 100644 --- a/src/nrniv/nrnapi.h +++ b/src/nrniv/nrnapi.h @@ -40,24 +40,24 @@ void nrn_connect_sections(Section *child_sec, double child_x, Section *parent_sec, double parent_x); void nrn_set_section_length(Section *sec, double length); double nrn_get_section_length(Section *sec); -double nrn_get_section_Ra(Section* sec); -void nrn_set_section_Ra(Section* sec, double val); +double nrn_get_section_Ra(Section *sec); +void nrn_set_section_Ra(Section *sec, double val); char const *nrn_secname(Section *sec); void nrn_push_section(Section *sec); void nrn_pop_section(void); void nrn_insert_mechanism(Section *sec, Symbol *mechanism); -hoc_Item* nrn_get_allsec(void); -hoc_Item* nrn_get_sectionlist_data(Object* obj); - +hoc_Item *nrn_get_allsec(void); +hoc_Item *nrn_get_sectionlist_data(Object *obj); /**************************************** * Segments ****************************************/ -int nrn_get_nseg(Section const * const sec); -void nrn_set_nseg(Section* const sec, const int nseg); -void nrn_set_segment_diam(Section* const sec, const double x, const double diam); -double* nrn_get_rangevar_ptr(Section* const sec, Symbol* const sym, double const x); - +int nrn_get_nseg(Section const *const sec); +void nrn_set_nseg(Section *const sec, const int nseg); +void nrn_set_segment_diam(Section *const sec, const double x, + const double diam); +double *nrn_get_rangevar_ptr(Section *const sec, Symbol *const sym, + double const x); /**************************************** * Functions, objects, and the stack @@ -90,12 +90,12 @@ void nrn_unref_object(Object *obj); int nrn_call_hoc(char const *const command); SectionListIterator *nrn_new_sectionlist_iterator(hoc_Item *my_sectionlist); void nrn_free_sectionlist_iterator(SectionListIterator *sl); -Section *nrn_sectionlist_iterator_next(SectionListIterator* sl); -int nrn_sectionlist_iterator_done(SectionListIterator* sl); +Section *nrn_sectionlist_iterator_next(SectionListIterator *sl); +int nrn_sectionlist_iterator_done(SectionListIterator *sl); int nrn_vector_capacity(Object *vec); double *nrn_vector_data_ptr(Object *vec); -double* nrn_get_pp_property_ptr(Object* pp, const char* name); -double* nrn_get_steered_property_ptr(Object* obj, const char* name); +double *nrn_get_pp_property_ptr(Object *pp, const char *name); +double *nrn_get_steered_property_ptr(Object *obj, const char *name); // TODO: need a way to iterate over symbol trees (top level and per object) // TODO: need a way of extracting information from a ShapePlotInterface } From aff2229cfbe45303fee42d78c21dd17efffa841b Mon Sep 17 00:00:00 2001 From: "Robert A. McDougal" Date: Sun, 14 May 2023 21:23:20 -0400 Subject: [PATCH 09/65] symbol and object introspection --- src/nrniv/nrnapi.cpp | 8 ++++++++ src/nrniv/nrnapi.h | 3 ++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/nrniv/nrnapi.cpp b/src/nrniv/nrnapi.cpp index 2cb94fd9b4..d64e68b54a 100644 --- a/src/nrniv/nrnapi.cpp +++ b/src/nrniv/nrnapi.cpp @@ -242,6 +242,10 @@ void nrn_call_function(Symbol *sym, int narg) { void nrn_unref_object(Object *obj) { hoc_obj_unref(obj); } +char const * nrn_get_class_name(Object* obj) { + return obj->ctemplate->sym->name; +} + /**************************************** * Miscellaneous ****************************************/ @@ -316,4 +320,8 @@ double *nrn_get_steered_property_ptr(Object *obj, const char *name) { // put the pointer for the memory location on the stack obj->ctemplate->steer(obj->u.this_pointer); return hoc_pxpop(); +} + +char const * nrn_get_symbol_name(Symbol* sym) { + return sym->name; } \ No newline at end of file diff --git a/src/nrniv/nrnapi.h b/src/nrniv/nrnapi.h index 19357dbb81..12a8ee2d5f 100644 --- a/src/nrniv/nrnapi.h +++ b/src/nrniv/nrnapi.h @@ -82,7 +82,7 @@ void nrn_call_method(Object *obj, Symbol *method_sym, int narg); void nrn_call_function(Symbol *sym, int narg); // TODO: do we need a nrn_ref_object? void nrn_unref_object(Object *obj); -// TODO: need a way to get the type of an object as a string +char const * nrn_get_class_name(Object* obj); /**************************************** * Miscellaneous @@ -96,6 +96,7 @@ int nrn_vector_capacity(Object *vec); double *nrn_vector_data_ptr(Object *vec); double *nrn_get_pp_property_ptr(Object *pp, const char *name); double *nrn_get_steered_property_ptr(Object *obj, const char *name); +char const * nrn_get_symbol_name(Symbol* sym); // TODO: need a way to iterate over symbol trees (top level and per object) // TODO: need a way of extracting information from a ShapePlotInterface } From 4ca7f3cbbfdf7e54fac630273735798043c13c8f Mon Sep 17 00:00:00 2001 From: "Robert A. McDougal" Date: Sun, 14 May 2023 21:25:43 -0400 Subject: [PATCH 10/65] minor comment edits --- src/nrniv/nrnapi.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/nrniv/nrnapi.cpp b/src/nrniv/nrnapi.cpp index d64e68b54a..a0d525ea59 100644 --- a/src/nrniv/nrnapi.cpp +++ b/src/nrniv/nrnapi.cpp @@ -72,8 +72,8 @@ void nrn_connect_sections(Section *child_sec, double child_x, void nrn_set_section_length(Section *sec, double length) { // TODO: call can_change_morph(sec) to check pt3dconst_; how should we handle // that? + // TODO: is there a named constant so we don't have to use the magic number 2? sec->prop->dparam[2] = length; - // dparam[7].val is for Ra // nrn_length_change updates 3D points if needed nrn_length_change(sec, length); diam_changed = 1; @@ -86,6 +86,7 @@ double nrn_get_section_Ra(Section *sec) { return nrn_ra(sec); } void nrn_set_section_Ra(Section *sec, double val) { // TODO: ensure val > 0 + // TODO: is there a named constant so we don't have to use the magic number 7? sec->prop->dparam[7] = val; diam_changed = 1; sec->recalc_area_ = 1; From a0057039ff6f6f8482e6eafe2badbe63f4fb7ab5 Mon Sep 17 00:00:00 2001 From: "Robert A. McDougal" Date: Sun, 14 May 2023 22:16:38 -0400 Subject: [PATCH 11/65] symbol table getting and interating --- src/nrniv/nrnapi.cpp | 47 +++++++++++++++++++++++++++++++++++++++----- src/nrniv/nrnapi.h | 22 ++++++++++++++++++--- 2 files changed, 61 insertions(+), 8 deletions(-) diff --git a/src/nrniv/nrnapi.cpp b/src/nrniv/nrnapi.cpp index a0d525ea59..966dd6b879 100644 --- a/src/nrniv/nrnapi.cpp +++ b/src/nrniv/nrnapi.cpp @@ -243,8 +243,8 @@ void nrn_call_function(Symbol *sym, int narg) { void nrn_unref_object(Object *obj) { hoc_obj_unref(obj); } -char const * nrn_get_class_name(Object* obj) { - return obj->ctemplate->sym->name; +char const *nrn_get_class_name(Object *obj) { + return obj->ctemplate->sym->name; } /**************************************** @@ -282,6 +282,23 @@ int SectionListIterator::done(void) { return 0; } +SymbolTableIterator::SymbolTableIterator(Symlist *list) { + current = list->first; +} + +char const *SymbolTableIterator::next(void) { + auto result = current->name; + current = current->next; + return result; +} + +int SymbolTableIterator::done(void) { + if (!current) { + return 1; + } + return 0; +} + // copy semantics isn't great, but only two data items // and is cleaner to use in a for loop than having to free memory at the end SectionListIterator *nrn_new_sectionlist_iterator(hoc_Item *my_sectionlist) { @@ -298,6 +315,20 @@ int nrn_sectionlist_iterator_done(SectionListIterator *sl) { return sl->done(); } +SymbolTableIterator *nrn_new_symbol_table_iterator(Symlist *my_symbol_table) { + return new SymbolTableIterator(my_symbol_table); +} + +void nrn_free_symbol_table_iterator(SymbolTableIterator *st) { delete st; } + +char const *nrn_symbol_table_iterator_next(SymbolTableIterator *st) { + return st->next(); +} + +int nrn_symbol_table_iterator_done(SymbolTableIterator *st) { + return st->done(); +} + int nrn_vector_capacity(Object *vec) { // TODO: throw exception if vec is not a Vector return vector_capacity((IvocVect *)vec->u.this_pointer); @@ -323,6 +354,12 @@ double *nrn_get_steered_property_ptr(Object *obj, const char *name) { return hoc_pxpop(); } -char const * nrn_get_symbol_name(Symbol* sym) { - return sym->name; -} \ No newline at end of file +char const *nrn_get_symbol_name(Symbol *sym) { return sym->name; } + +Symlist *nrn_get_symbol_table(Symbol *sym) { + // TODO: ensure sym is an object or class + // NOTE: to use with an object, call nrn_get_symbol(nrn_get_class_name(obj)) + return sym->u.ctemplate->symtable; +} + +Symlist *nrn_get_global_symbol_table(void) { return hoc_built_in_symlist; } \ No newline at end of file diff --git a/src/nrniv/nrnapi.h b/src/nrniv/nrnapi.h index 12a8ee2d5f..c0a3d2933e 100644 --- a/src/nrniv/nrnapi.h +++ b/src/nrniv/nrnapi.h @@ -25,6 +25,16 @@ class SectionListIterator { hoc_Item *current; }; +class SymbolTableIterator { +public: + SymbolTableIterator(Symlist *); + char const *next(void); + int done(void); + +private: + Symbol *current; +}; + extern "C" { /**************************************** * Initialization @@ -64,6 +74,7 @@ double *nrn_get_rangevar_ptr(Section *const sec, Symbol *const sym, ****************************************/ Symbol *nrn_get_symbol(char const *const name); int nrn_get_symbol_type(Symbol *sym); +// TODO: need a way of mapping type identifiers to meaningful names double *nrn_get_symbol_ptr(Symbol *sym); void nrn_push_double(double val); double nrn_pop_double(void); @@ -82,7 +93,7 @@ void nrn_call_method(Object *obj, Symbol *method_sym, int narg); void nrn_call_function(Symbol *sym, int narg); // TODO: do we need a nrn_ref_object? void nrn_unref_object(Object *obj); -char const * nrn_get_class_name(Object* obj); +char const *nrn_get_class_name(Object *obj); /**************************************** * Miscellaneous @@ -92,11 +103,16 @@ SectionListIterator *nrn_new_sectionlist_iterator(hoc_Item *my_sectionlist); void nrn_free_sectionlist_iterator(SectionListIterator *sl); Section *nrn_sectionlist_iterator_next(SectionListIterator *sl); int nrn_sectionlist_iterator_done(SectionListIterator *sl); +SymbolTableIterator *nrn_new_symbol_table_iterator(Symlist *my_symbol_table); +void nrn_free_symbol_table_iterator(SymbolTableIterator *st); +char const *nrn_symbol_table_iterator_next(SymbolTableIterator *st); +int nrn_symbol_table_iterator_done(SymbolTableIterator *st); int nrn_vector_capacity(Object *vec); double *nrn_vector_data_ptr(Object *vec); double *nrn_get_pp_property_ptr(Object *pp, const char *name); double *nrn_get_steered_property_ptr(Object *obj, const char *name); -char const * nrn_get_symbol_name(Symbol* sym); -// TODO: need a way to iterate over symbol trees (top level and per object) +char const *nrn_get_symbol_name(Symbol *sym); +Symlist *nrn_get_symbol_table(Symbol *sym); +Symlist *nrn_get_global_symbol_table(void); // TODO: need a way of extracting information from a ShapePlotInterface } From 93d6ec3863257d2c0dfeb297702fee8e196401b6 Mon Sep 17 00:00:00 2001 From: "Robert A. McDougal" Date: Sun, 14 May 2023 22:36:37 -0400 Subject: [PATCH 12/65] object ref, push --- src/nrniv/nrnapi.cpp | 4 ++++ src/nrniv/nrnapi.h | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/nrniv/nrnapi.cpp b/src/nrniv/nrnapi.cpp index 966dd6b879..a3bcdeebf4 100644 --- a/src/nrniv/nrnapi.cpp +++ b/src/nrniv/nrnapi.cpp @@ -172,6 +172,8 @@ void nrn_push_int(int i) { hoc_pushi(i); } int nrn_pop_int(void) { return hoc_ipop(); } +void nrn_push_object(Object *obj) { hoc_push_object(obj); } + Object *nrn_pop_object(void) { // NOTE: the returned object should be unref'd when no longer needed Object **obptr = hoc_objpop(); @@ -241,6 +243,8 @@ void nrn_call_function(Symbol *sym, int narg) { OcJump::execute_throw_on_exception(sym, narg); } +void nrn_ref_object(Object *obj) { obj->refcount++; } + void nrn_unref_object(Object *obj) { hoc_obj_unref(obj); } char const *nrn_get_class_name(Object *obj) { diff --git a/src/nrniv/nrnapi.h b/src/nrniv/nrnapi.h index c0a3d2933e..8cfd2c7e4a 100644 --- a/src/nrniv/nrnapi.h +++ b/src/nrniv/nrnapi.h @@ -84,6 +84,7 @@ void nrn_push_str(char **str); char **nrn_pop_str(void); void nrn_push_int(int i); int nrn_pop_int(void); +void nrn_push_object(Object *obj); Object *nrn_pop_object(void); int nrn_stack_type(void); char const *const nrn_stack_type_name(int id); @@ -91,7 +92,7 @@ Object *nrn_new_object(Symbol *sym, int narg); Symbol *nrn_get_method_symbol(Object *obj, char const *const name); void nrn_call_method(Object *obj, Symbol *method_sym, int narg); void nrn_call_function(Symbol *sym, int narg); -// TODO: do we need a nrn_ref_object? +void nrn_ref_object(Object *obj); void nrn_unref_object(Object *obj); char const *nrn_get_class_name(Object *obj); From fa6a234f674ed7dc60ee465924166ee7a47c5162 Mon Sep 17 00:00:00 2001 From: "Robert A. McDougal" Date: Mon, 15 May 2023 14:04:39 -0400 Subject: [PATCH 13/65] Renamed files to avoid having two nrnapi.h files. On some systems (most? but not the one I used for everything else), some files tried to include the wrong nrnapi.h during the "make install" phase. --- cmake/NeuronFileLists.cmake | 2 +- src/nrniv/{nrnapi.cpp => neuronapi.cpp} | 2 +- src/nrniv/{nrnapi.h => neuronapi.h} | 0 3 files changed, 2 insertions(+), 2 deletions(-) rename src/nrniv/{nrnapi.cpp => neuronapi.cpp} (99%) rename src/nrniv/{nrnapi.h => neuronapi.h} (100%) diff --git a/cmake/NeuronFileLists.cmake b/cmake/NeuronFileLists.cmake index a38e5125f5..bff5a80bea 100644 --- a/cmake/NeuronFileLists.cmake +++ b/cmake/NeuronFileLists.cmake @@ -226,7 +226,7 @@ set(NRNIV_FILE_LIST ndatclas.cpp netpar.cpp nonlinz.cpp - nrnapi.cpp + neuronapi.cpp nrncore_write.cpp nrncore_write/callbacks/nrncore_callbacks.cpp nrncore_write/data/cell_group.cpp diff --git a/src/nrniv/nrnapi.cpp b/src/nrniv/neuronapi.cpp similarity index 99% rename from src/nrniv/nrnapi.cpp rename to src/nrniv/neuronapi.cpp index a3bcdeebf4..a18ccd7fe9 100644 --- a/src/nrniv/nrnapi.cpp +++ b/src/nrniv/neuronapi.cpp @@ -1,4 +1,4 @@ -#include "nrnapi.h" +#include "neuronapi.h" #include "../../nrnconf.h" #include "nrniv_mf.h" #include "nrnmpi.h" diff --git a/src/nrniv/nrnapi.h b/src/nrniv/neuronapi.h similarity index 100% rename from src/nrniv/nrnapi.h rename to src/nrniv/neuronapi.h From f9eb4e35f78847354367e781edcadb6b67367770 Mon Sep 17 00:00:00 2001 From: "Robert A. McDougal" Date: Mon, 15 May 2023 14:45:11 -0400 Subject: [PATCH 14/65] possible fix for no nrnmpi_stubs case --- src/nrniv/neuronapi.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/nrniv/neuronapi.cpp b/src/nrniv/neuronapi.cpp index a18ccd7fe9..3ae0f0c114 100644 --- a/src/nrniv/neuronapi.cpp +++ b/src/nrniv/neuronapi.cpp @@ -28,8 +28,10 @@ extern void nrn_change_nseg(Section *, int); int nrn_init(int argc, const char **argv) { nrn_nobanner_ = 1; int exit_status = ivocmain_session(argc, argv, nullptr, 0); +#if NRNMPI #if NRNMPI_DYNAMICLOAD nrnmpi_stubs(); +#endif #endif return exit_status; } From f4fcc7de85cf0701b2c4f2e55138c13c443d5f01 Mon Sep 17 00:00:00 2001 From: "Robert A. McDougal" Date: Mon, 15 May 2023 15:08:32 -0400 Subject: [PATCH 15/65] this really ought to fix the nrnmpi_stubs missing case --- src/nrniv/neuronapi.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/nrniv/neuronapi.cpp b/src/nrniv/neuronapi.cpp index 3ae0f0c114..5e87213db2 100644 --- a/src/nrniv/neuronapi.cpp +++ b/src/nrniv/neuronapi.cpp @@ -30,8 +30,10 @@ int nrn_init(int argc, const char **argv) { int exit_status = ivocmain_session(argc, argv, nullptr, 0); #if NRNMPI #if NRNMPI_DYNAMICLOAD +#ifdef nrnmpi_stubs nrnmpi_stubs(); #endif +#endif #endif return exit_status; } From e6afbb0ec5b9a67cb771b2c5a7f050b0017a54cb Mon Sep 17 00:00:00 2001 From: "Robert A. McDougal" Date: Mon, 15 May 2023 15:25:21 -0400 Subject: [PATCH 16/65] neuronapi.cpp no longer uses its .h, that is now a header for 3rd party tools --- cmake/NeuronFileLists.cmake | 1 + src/nrniv/neuronapi.cpp | 37 +++++++- src/nrniv/neuronapi.h | 167 +++++++++++++++--------------------- 3 files changed, 108 insertions(+), 97 deletions(-) diff --git a/cmake/NeuronFileLists.cmake b/cmake/NeuronFileLists.cmake index bff5a80bea..0c525403d1 100644 --- a/cmake/NeuronFileLists.cmake +++ b/cmake/NeuronFileLists.cmake @@ -29,6 +29,7 @@ set(HEADER_FILES_TO_INSTALL multicore.h multisplit.h neuron.h + neuronapi.h newton.hpp newton_struct.h newton_thread.hpp diff --git a/src/nrniv/neuronapi.cpp b/src/nrniv/neuronapi.cpp index 5e87213db2..3904ad4ba6 100644 --- a/src/nrniv/neuronapi.cpp +++ b/src/nrniv/neuronapi.cpp @@ -1,4 +1,3 @@ -#include "neuronapi.h" #include "../../nrnconf.h" #include "nrniv_mf.h" #include "nrnmpi.h" @@ -8,6 +7,42 @@ #include "parse.hpp" +#include "hocdec.h" +#include "section.h" + + +// we define these here to allow the API to be independent of internal details +#define STACK_IS_STR 1 +#define STACK_IS_VAR 2 +#define STACK_IS_NUM 3 +#define STACK_IS_OBJVAR 4 +#define STACK_IS_OBJTMP 5 +#define STACK_IS_USERINT 6 +#define STACK_IS_SYM 7 +#define STACK_IS_OBJUNREF 8 +#define STACK_UNKNOWN -1 + +class SectionListIterator { +public: + SectionListIterator(hoc_Item *); + Section *next(void); + int done(void); + +private: + hoc_Item *initial; + hoc_Item *current; +}; + +class SymbolTableIterator { +public: + SymbolTableIterator(Symlist *); + char const *next(void); + int done(void); + +private: + Symbol *current; +}; + /**************************************** * Connections to the rest of NEURON ****************************************/ diff --git a/src/nrniv/neuronapi.h b/src/nrniv/neuronapi.h index 8cfd2c7e4a..a36a20feae 100644 --- a/src/nrniv/neuronapi.h +++ b/src/nrniv/neuronapi.h @@ -1,119 +1,94 @@ #pragma once -#include "hocdec.h" -#include "section.h" - -// we define these here to allow the API to be independent of internal details -#define STACK_IS_STR 1 -#define STACK_IS_VAR 2 -#define STACK_IS_NUM 3 -#define STACK_IS_OBJVAR 4 -#define STACK_IS_OBJTMP 5 -#define STACK_IS_USERINT 6 -#define STACK_IS_SYM 7 -#define STACK_IS_OBJUNREF 8 -#define STACK_UNKNOWN -1 - -class SectionListIterator { -public: - SectionListIterator(hoc_Item *); - Section *next(void); - int done(void); - -private: - hoc_Item *initial; - hoc_Item *current; -}; - -class SymbolTableIterator { -public: - SymbolTableIterator(Symlist *); - char const *next(void); - int done(void); - -private: - Symbol *current; -}; - +#ifdef __cplusplus extern "C" { +#endif +struct Symbol; +struct Object; +struct Section; +struct SectionListIterator; +struct hoc_Item; +struct SymbolTableIterator; +struct Symlist; + /**************************************** * Initialization ****************************************/ -int nrn_init(int argc, const char **argv); -void nrn_redirect_stdout(int (*myprint)(int, char *)); +extern int (*nrn_init)(int argc, const char **argv); +extern void (*nrn_redirect_stdout)(int (*myprint)(int, char *)); /**************************************** * Sections ****************************************/ -Section *nrn_new_section(char const *const name); -void nrn_connect_sections(Section *child_sec, double child_x, - Section *parent_sec, double parent_x); -void nrn_set_section_length(Section *sec, double length); -double nrn_get_section_length(Section *sec); -double nrn_get_section_Ra(Section *sec); -void nrn_set_section_Ra(Section *sec, double val); -char const *nrn_secname(Section *sec); -void nrn_push_section(Section *sec); -void nrn_pop_section(void); -void nrn_insert_mechanism(Section *sec, Symbol *mechanism); -hoc_Item *nrn_get_allsec(void); -hoc_Item *nrn_get_sectionlist_data(Object *obj); +extern Section *(*nrn_new_section)(char const *const name); +extern void (*nrn_connect_sections)(Section *child_sec, double child_x, + Section *parent_sec, double parent_x); +extern void (*nrn_set_section_length)(Section *sec, double length); +extern double (*nrn_get_section_length)(Section *sec); +extern double (*nrn_get_section_Ra)(Section* sec); +extern void (*nrn_set_section_Ra)(Section* sec, double val); +extern char const *(*nrn_secname)(Section *sec); +extern void (*nrn_push_section)(Section *sec); +extern void (*nrn_pop_section)(void); +extern void (*nrn_insert_mechanism)(Section *sec, Symbol *mechanism); +extern hoc_Item* (*nrn_get_allsec)(void); +extern hoc_Item* (*nrn_get_sectionlist_data)(Object* obj); /**************************************** * Segments ****************************************/ -int nrn_get_nseg(Section const *const sec); -void nrn_set_nseg(Section *const sec, const int nseg); -void nrn_set_segment_diam(Section *const sec, const double x, - const double diam); -double *nrn_get_rangevar_ptr(Section *const sec, Symbol *const sym, - double const x); +extern int (*nrn_get_nseg)(Section const * const sec); +extern void (*nrn_set_nseg)(Section* const sec, const int nseg); +extern void (*nrn_set_segment_diam)(Section* const sec, const double x, const double diam); +extern double* (*nrn_get_rangevar_ptr)(Section* const sec, Symbol* const sym, double const x); /**************************************** * Functions, objects, and the stack ****************************************/ -Symbol *nrn_get_symbol(char const *const name); -int nrn_get_symbol_type(Symbol *sym); -// TODO: need a way of mapping type identifiers to meaningful names -double *nrn_get_symbol_ptr(Symbol *sym); -void nrn_push_double(double val); -double nrn_pop_double(void); -void nrn_push_double_ptr(double *addr); -double *nrn_pop_double_ptr(void); -void nrn_push_str(char **str); -char **nrn_pop_str(void); -void nrn_push_int(int i); -int nrn_pop_int(void); -void nrn_push_object(Object *obj); -Object *nrn_pop_object(void); -int nrn_stack_type(void); -char const *const nrn_stack_type_name(int id); -Object *nrn_new_object(Symbol *sym, int narg); -Symbol *nrn_get_method_symbol(Object *obj, char const *const name); -void nrn_call_method(Object *obj, Symbol *method_sym, int narg); -void nrn_call_function(Symbol *sym, int narg); -void nrn_ref_object(Object *obj); -void nrn_unref_object(Object *obj); -char const *nrn_get_class_name(Object *obj); +extern Symbol *(*nrn_get_symbol)(char const *const name); +extern int (*nrn_get_symbol_type)(Symbol *sym); +extern double *(*nrn_get_symbol_ptr)(Symbol *sym); +extern void (*nrn_push_double)(double val); +extern double (*nrn_pop_double)(void); +extern void (*nrn_push_double_ptr)(double *addr); +extern double *(*nrn_pop_double_ptr)(void); +extern void (*nrn_push_str)(char **str); +extern char **(*nrn_pop_str)(void); +extern void (*nrn_push_int)(int i); +extern int (*nrn_pop_int)(void); +extern void (*nrn_push_object)(Object* obj); +extern Object *(*nrn_pop_object)(void); +extern int (*nrn_stack_type)(void); +extern char const *const (*nrn_stack_type_name)(int id); +extern Object *(*nrn_new_object)(Symbol *sym, int narg); +extern Symbol *(*nrn_get_method_symbol)(Object *obj, char const *const name); +extern void (*nrn_call_method)(Object *obj, Symbol *method_sym, int narg); +extern void (*nrn_call_function)(Symbol *sym, int narg); +extern void (*nrn_ref_object)(Object *obj); +extern void (*nrn_unref_object)(Object *obj); +extern char const * (*nrn_get_class_name)(Object* obj); /**************************************** * Miscellaneous ****************************************/ -int nrn_call_hoc(char const *const command); -SectionListIterator *nrn_new_sectionlist_iterator(hoc_Item *my_sectionlist); -void nrn_free_sectionlist_iterator(SectionListIterator *sl); -Section *nrn_sectionlist_iterator_next(SectionListIterator *sl); -int nrn_sectionlist_iterator_done(SectionListIterator *sl); -SymbolTableIterator *nrn_new_symbol_table_iterator(Symlist *my_symbol_table); -void nrn_free_symbol_table_iterator(SymbolTableIterator *st); -char const *nrn_symbol_table_iterator_next(SymbolTableIterator *st); -int nrn_symbol_table_iterator_done(SymbolTableIterator *st); -int nrn_vector_capacity(Object *vec); -double *nrn_vector_data_ptr(Object *vec); -double *nrn_get_pp_property_ptr(Object *pp, const char *name); -double *nrn_get_steered_property_ptr(Object *obj, const char *name); -char const *nrn_get_symbol_name(Symbol *sym); -Symlist *nrn_get_symbol_table(Symbol *sym); -Symlist *nrn_get_global_symbol_table(void); -// TODO: need a way of extracting information from a ShapePlotInterface +extern int (*nrn_call_hoc)(char const *const command); +extern SectionListIterator *(*nrn_new_sectionlist_iterator)(hoc_Item *my_sectionlist); +extern void (*nrn_free_sectionlist_iterator)(SectionListIterator *sl); +extern Section *(*nrn_sectionlist_iterator_next)(SectionListIterator* sl); +extern int (*nrn_sectionlist_iterator_done)(SectionListIterator* sl); +extern SymbolTableIterator *(*nrn_new_symbol_table_iterator)(Symlist *my_symbol_table); +extern void (*nrn_free_symbol_table_iterator)(SymbolTableIterator *st); +extern char const *(*nrn_symbol_table_iterator_next)(SymbolTableIterator *st); +extern int (*nrn_symbol_table_iterator_done)(SymbolTableIterator *st); +extern int (*nrn_vector_capacity)(Object *vec); +extern double *(*nrn_vector_data_ptr)(Object *vec); +extern double* (*nrn_get_pp_property_ptr)(Object* pp, const char* name); +extern double* (*nrn_get_steered_property_ptr)(Object* obj, const char* name); +extern char const * (*nrn_get_symbol_name)(Symbol* sym); +extern Symlist * (*nrn_get_symbol_table)(Symbol* sym); +extern Symlist * (*nrn_get_global_symbol_table)(void); +// TODO: need shapeplot information extraction + +#ifdef __cplusplus } +#endif \ No newline at end of file From 20758c816cbfa29b71c4e9ee5c89f0b34affb761 Mon Sep 17 00:00:00 2001 From: "Robert A. McDougal" Date: Mon, 15 May 2023 19:28:38 -0400 Subject: [PATCH 17/65] switched to enum for stack types --- src/nrniv/neuronapi.cpp | 25 ++++++++++++++----------- src/nrniv/neuronapi.h | 19 +++++++++++++++++-- 2 files changed, 31 insertions(+), 13 deletions(-) diff --git a/src/nrniv/neuronapi.cpp b/src/nrniv/neuronapi.cpp index 3904ad4ba6..1df7ad8658 100644 --- a/src/nrniv/neuronapi.cpp +++ b/src/nrniv/neuronapi.cpp @@ -12,15 +12,18 @@ // we define these here to allow the API to be independent of internal details -#define STACK_IS_STR 1 -#define STACK_IS_VAR 2 -#define STACK_IS_NUM 3 -#define STACK_IS_OBJVAR 4 -#define STACK_IS_OBJTMP 5 -#define STACK_IS_USERINT 6 -#define STACK_IS_SYM 7 -#define STACK_IS_OBJUNREF 8 -#define STACK_UNKNOWN -1 +typedef enum { + STACK_IS_STR = 1, + STACK_IS_VAR = 2, + STACK_IS_NUM = 3, + STACK_IS_OBJVAR = 4, + STACK_IS_OBJTMP = 5, + STACK_IS_USERINT = 6, + STACK_IS_SYM = 7, + STACK_IS_OBJUNREF = 8, + STACK_UNKNOWN = -1 +} stack_types_t; + class SectionListIterator { public: @@ -222,7 +225,7 @@ Object *nrn_pop_object(void) { return new_ob_ptr; } -int nrn_stack_type(void) { +stack_types_t nrn_stack_type(void) { switch (hoc_stack_type()) { case STRING: return STACK_IS_STR; @@ -244,7 +247,7 @@ int nrn_stack_type(void) { return STACK_UNKNOWN; } -char const *const nrn_stack_type_name(int id) { +char const *const nrn_stack_type_name(stack_types_t id) { switch (id) { case STACK_IS_STR: return "STRING"; diff --git a/src/nrniv/neuronapi.h b/src/nrniv/neuronapi.h index a36a20feae..06efd981ae 100644 --- a/src/nrniv/neuronapi.h +++ b/src/nrniv/neuronapi.h @@ -11,6 +11,18 @@ struct hoc_Item; struct SymbolTableIterator; struct Symlist; +typedef enum { + STACK_IS_STR = 1, + STACK_IS_VAR = 2, + STACK_IS_NUM = 3, + STACK_IS_OBJVAR = 4, + STACK_IS_OBJTMP = 5, + STACK_IS_USERINT = 6, + STACK_IS_SYM = 7, + STACK_IS_OBJUNREF = 8, + STACK_UNKNOWN = -1 +} stack_types_t; + /**************************************** * Initialization ****************************************/ @@ -58,10 +70,13 @@ extern void (*nrn_push_int)(int i); extern int (*nrn_pop_int)(void); extern void (*nrn_push_object)(Object* obj); extern Object *(*nrn_pop_object)(void); -extern int (*nrn_stack_type)(void); -extern char const *const (*nrn_stack_type_name)(int id); +extern stack_types_t (*nrn_stack_type)(void); +extern char const *const (*nrn_stack_type_name)(stack_types_t id); extern Object *(*nrn_new_object)(Symbol *sym, int narg); extern Symbol *(*nrn_get_method_symbol)(Object *obj, char const *const name); +// TODO: the next two functions throw exceptions in C++; need a version that +// returns a bool success indicator instead (this is actually the +// classic behavior of OcJump) extern void (*nrn_call_method)(Object *obj, Symbol *method_sym, int narg); extern void (*nrn_call_function)(Symbol *sym, int narg); extern void (*nrn_ref_object)(Object *obj); From 61560a1f76b33021e067232960316ad2934651d1 Mon Sep 17 00:00:00 2001 From: "Robert A. McDougal" Date: Tue, 16 May 2023 04:06:22 -0400 Subject: [PATCH 18/65] clang-format update --- src/ivoc/ocjump.cpp | 275 +++++++++---------- src/ivoc/ocjump.h | 32 ++- src/nrniv/neuronapi.cpp | 575 ++++++++++++++++++++++------------------ src/nrniv/neuronapi.h | 100 +++---- 4 files changed, 520 insertions(+), 462 deletions(-) diff --git a/src/ivoc/ocjump.cpp b/src/ivoc/ocjump.cpp index da04f32f8e..09932c1e3f 100644 --- a/src/ivoc/ocjump.cpp +++ b/src/ivoc/ocjump.cpp @@ -12,168 +12,171 @@ #include -extern Objectdata *hoc_top_level_data; -extern Symlist *hoc_top_level_symlist; -extern Symlist *hoc_symlist; -extern Object *hoc_thisobject; +extern Objectdata* hoc_top_level_data; +extern Symlist* hoc_top_level_symlist; +extern Symlist* hoc_symlist; +extern Object* hoc_thisobject; extern int hoc_execerror_messages; -bool hoc_valid_stmt(const char *stmt, Object *ob) { - std::string s{stmt}; - s.append(1, '\n'); - return OcJump::execute(s.c_str(), ob); +bool hoc_valid_stmt(const char* stmt, Object* ob) { + std::string s{stmt}; + s.append(1, '\n'); + return OcJump::execute(s.c_str(), ob); } void hoc_execute1() { - Object *ob{}; - int hem{1}; - if (ifarg(2)) { - if (hoc_is_object_arg(2)) { - ob = *hoc_objgetarg(2); - if (ifarg(3)) { - hem = chkarg(3, 0., 1.); - } - } else { - hem = chkarg(2, 0., 1.); + Object* ob{}; + int hem{1}; + if (ifarg(2)) { + if (hoc_is_object_arg(2)) { + ob = *hoc_objgetarg(2); + if (ifarg(3)) { + hem = chkarg(3, 0., 1.); + } + } else { + hem = chkarg(2, 0., 1.); + } } - } - - auto const hemold = std::exchange(hoc_execerror_messages, hem); - auto const old_mpiabort_flag = std::exchange(nrn_mpiabort_on_error_, 0); - bool const b = hoc_valid_stmt(hoc_gargstr(1), ob); - nrn_mpiabort_on_error_ = old_mpiabort_flag; - hoc_execerror_messages = hemold; - hoc_retpushx(b); + + auto const hemold = std::exchange(hoc_execerror_messages, hem); + auto const old_mpiabort_flag = std::exchange(nrn_mpiabort_on_error_, 0); + bool const b = hoc_valid_stmt(hoc_gargstr(1), ob); + nrn_mpiabort_on_error_ = old_mpiabort_flag; + hoc_execerror_messages = hemold; + hoc_retpushx(b); } #if HAVE_IV -bool Oc::valid_expr(Symbol *s) { return OcJump::execute(s->u.u_proc->defn.in); } +bool Oc::valid_expr(Symbol* s) { + return OcJump::execute(s->u.u_proc->defn.in); +} -bool Oc::valid_stmt(const char *stmt, Object *ob) { - return hoc_valid_stmt(stmt, ob); +bool Oc::valid_stmt(const char* stmt, Object* ob) { + return hoc_valid_stmt(stmt, ob); } #endif //------------------------------------------------------------------ -void hoc_execute(Inst *); +void hoc_execute(Inst*); namespace { struct saved_state { - saved_state() { - // not complete but it is good for expressions and it can be improved - oc_save_hoc_oop(&o1, &o2, &o4, &o5); - oc_save_code(&c1, &c2, c3, &c4, &c5, &c6, &c7, &c8, c9, &c10, &c11, &c12); - oc_save_input_info(&i1, &i2, &i3, &i4); - oc_save_cabcode(&cc1, &cc2); - } - void restore() { - oc_restore_hoc_oop(&o1, &o2, &o4, &o5); - oc_restore_code(&c1, &c2, c3, &c4, &c5, &c6, &c7, &c8, c9, &c10, &c11, - &c12); - oc_restore_input_info(i1, i2, i3, i4); - oc_restore_cabcode(&cc1, &cc2); - } - -private: - // hoc_oop - Object *o1{}; - Objectdata *o2{}; - int o4{}; - Symlist *o5{}; - - // code - Inst *c1{}; - Inst *c2{}; - std::size_t c3{}; - nrn::oc::frame *c4{}; - int c5{}; - int c6{}; - Inst *c7{}; - nrn::oc::frame *c8{}; - std::size_t c9{}; - Symlist *c10{}; - Inst *c11{}; - int c12{}; - - // input_info - const char *i1{}; - int i2{}; - int i3{}; - NrnFILEWrap *i4{}; - - // cabcode - int cc1{}; - int cc2{}; + saved_state() { + // not complete but it is good for expressions and it can be improved + oc_save_hoc_oop(&o1, &o2, &o4, &o5); + oc_save_code(&c1, &c2, c3, &c4, &c5, &c6, &c7, &c8, c9, &c10, &c11, &c12); + oc_save_input_info(&i1, &i2, &i3, &i4); + oc_save_cabcode(&cc1, &cc2); + } + void restore() { + oc_restore_hoc_oop(&o1, &o2, &o4, &o5); + oc_restore_code(&c1, &c2, c3, &c4, &c5, &c6, &c7, &c8, c9, &c10, &c11, &c12); + oc_restore_input_info(i1, i2, i3, i4); + oc_restore_cabcode(&cc1, &cc2); + } + + private: + // hoc_oop + Object* o1{}; + Objectdata* o2{}; + int o4{}; + Symlist* o5{}; + + // code + Inst* c1{}; + Inst* c2{}; + std::size_t c3{}; + nrn::oc::frame* c4{}; + int c5{}; + int c6{}; + Inst* c7{}; + nrn::oc::frame* c8{}; + std::size_t c9{}; + Symlist* c10{}; + Inst* c11{}; + int c12{}; + + // input_info + const char* i1{}; + int i2{}; + int i3{}; + NrnFILEWrap* i4{}; + + // cabcode + int cc1{}; + int cc2{}; }; -} // namespace - -bool OcJump::execute(Inst *p) { - saved_state before{}; - try_catch_depth_increment tell_children_we_will_catch{}; - try { - hoc_execute(p); - return true; - } catch (...) { - before.restore(); - return false; - } +} // namespace + +bool OcJump::execute(Inst* p) { + saved_state before{}; + try_catch_depth_increment tell_children_we_will_catch{}; + try { + hoc_execute(p); + return true; + } catch (...) { + before.restore(); + return false; + } } -bool OcJump::execute(const char *stmt, Object *ob) { - saved_state before{}; - try_catch_depth_increment tell_children_we_will_catch{}; - try { - hoc_obj_run(stmt, ob); - return true; - } catch (...) { - before.restore(); - return false; - } +bool OcJump::execute(const char* stmt, Object* ob) { + saved_state before{}; + try_catch_depth_increment tell_children_we_will_catch{}; + try { + hoc_obj_run(stmt, ob); + return true; + } catch (...) { + before.restore(); + return false; + } } -void OcJump::execute_throw_on_exception(Object *obj, Symbol *sym, int narg) { - saved_state before{}; - try_catch_depth_increment tell_children_we_will_catch{}; - try { - hoc_call_ob_proc(obj, sym, narg); - } catch (...) { - before.restore(); - throw; - } +void OcJump::execute_throw_on_exception(Object* obj, Symbol* sym, int narg) { + saved_state before{}; + try_catch_depth_increment tell_children_we_will_catch{}; + try { + hoc_call_ob_proc(obj, sym, narg); + } catch (...) { + before.restore(); + throw; + } } -void OcJump::execute_throw_on_exception(Symbol *sym, int narg) { - // NOTE: return value is left on the stack - saved_state before{}; - try_catch_depth_increment tell_children_we_will_catch{}; - try { - hoc_pushx(hoc_call_func(sym, narg)); - } catch (...) { - before.restore(); - throw; - } +void OcJump::execute_throw_on_exception(Symbol* sym, int narg) { + // NOTE: return value is left on the stack + saved_state before{}; + try_catch_depth_increment tell_children_we_will_catch{}; + try { + hoc_pushx(hoc_call_func(sym, narg)); + } catch (...) { + before.restore(); + throw; + } } -void *OcJump::fpycall(void *(*f)(void *, void *), void *a, void *b) { - saved_state before{}; - try_catch_depth_increment tell_children_we_will_catch{}; - try { - return (*f)(a, b); - } catch (...) { - before.restore(); - throw; - } +void* OcJump::fpycall(void* (*f)(void*, void*), void* a, void* b) { + saved_state before{}; + try_catch_depth_increment tell_children_we_will_catch{}; + try { + return (*f)(a, b); + } catch (...) { + before.restore(); + throw; + } } -ObjectContext::ObjectContext(Object *obj) { - oc_save_hoc_oop(&a1, &a2, &a4, &a5); - hoc_thisobject = obj; - if (obj) { - hoc_objectdata = obj->u.dataspace; - hoc_symlist = obj->ctemplate->symtable; - } else { - hoc_objectdata = hoc_top_level_data; - hoc_symlist = hoc_top_level_symlist; - } +ObjectContext::ObjectContext(Object* obj) { + oc_save_hoc_oop(&a1, &a2, &a4, &a5); + hoc_thisobject = obj; + if (obj) { + hoc_objectdata = obj->u.dataspace; + hoc_symlist = obj->ctemplate->symtable; + } else { + hoc_objectdata = hoc_top_level_data; + hoc_symlist = hoc_top_level_symlist; + } } -ObjectContext::~ObjectContext() { oc_restore_hoc_oop(&a1, &a2, &a4, &a5); } +ObjectContext::~ObjectContext() { + oc_restore_hoc_oop(&a1, &a2, &a4, &a5); +} diff --git a/src/ivoc/ocjump.h b/src/ivoc/ocjump.h index 7d3efaab0d..89ec2538fe 100644 --- a/src/ivoc/ocjump.h +++ b/src/ivoc/ocjump.h @@ -18,25 +18,29 @@ extern int nrn_try_catch_nest_depth; /** @brief Helper type for incrementing/decrementing nrn_try_catch_nest_depth. */ struct try_catch_depth_increment { - try_catch_depth_increment() { ++nrn_try_catch_nest_depth; } - ~try_catch_depth_increment() { --nrn_try_catch_nest_depth; } + try_catch_depth_increment() { + ++nrn_try_catch_nest_depth; + } + ~try_catch_depth_increment() { + --nrn_try_catch_nest_depth; + } }; struct ObjectContext { - ObjectContext(Object *); - ~ObjectContext(); + ObjectContext(Object*); + ~ObjectContext(); -private: - Object *a1; - Objectdata *a2; - int a4; - Symlist *a5; + private: + Object* a1; + Objectdata* a2; + int a4; + Symlist* a5; }; struct OcJump { - static bool execute(Inst *p); - static bool execute(const char *, Object *ob = NULL); - static void *fpycall(void *(*)(void *, void *), void *, void *); - static void execute_throw_on_exception(Symbol *sym, int narg); - static void execute_throw_on_exception(Object *obj, Symbol *sym, int narg); + static bool execute(Inst* p); + static bool execute(const char*, Object* ob = NULL); + static void* fpycall(void* (*) (void*, void*), void*, void*); + static void execute_throw_on_exception(Symbol* sym, int narg); + static void execute_throw_on_exception(Object* obj, Symbol* sym, int narg); }; diff --git a/src/nrniv/neuronapi.cpp b/src/nrniv/neuronapi.cpp index 1df7ad8658..b79f90b4d8 100644 --- a/src/nrniv/neuronapi.cpp +++ b/src/nrniv/neuronapi.cpp @@ -13,37 +13,37 @@ // we define these here to allow the API to be independent of internal details typedef enum { - STACK_IS_STR = 1, - STACK_IS_VAR = 2, - STACK_IS_NUM = 3, - STACK_IS_OBJVAR = 4, - STACK_IS_OBJTMP = 5, - STACK_IS_USERINT = 6, - STACK_IS_SYM = 7, - STACK_IS_OBJUNREF = 8, - STACK_UNKNOWN = -1 + STACK_IS_STR = 1, + STACK_IS_VAR = 2, + STACK_IS_NUM = 3, + STACK_IS_OBJVAR = 4, + STACK_IS_OBJTMP = 5, + STACK_IS_USERINT = 6, + STACK_IS_SYM = 7, + STACK_IS_OBJUNREF = 8, + STACK_UNKNOWN = -1 } stack_types_t; class SectionListIterator { -public: - SectionListIterator(hoc_Item *); - Section *next(void); - int done(void); - -private: - hoc_Item *initial; - hoc_Item *current; + public: + SectionListIterator(hoc_Item*); + Section* next(void); + int done(void); + + private: + hoc_Item* initial; + hoc_Item* current; }; class SymbolTableIterator { -public: - SymbolTableIterator(Symlist *); - char const *next(void); - int done(void); + public: + SymbolTableIterator(Symlist*); + char const* next(void); + int done(void); -private: - Symbol *current; + private: + Symbol* current; }; /**************************************** @@ -52,360 +52,409 @@ class SymbolTableIterator { extern int nrn_nobanner_; extern int diam_changed; extern int nrn_try_catch_nest_depth; -extern "C" void nrnpy_set_pr_etal(int (*cbpr_stdoe)(int, char *), - int (*cbpass)()); -int ivocmain_session(int, const char **, const char **, int start_session); +extern "C" void nrnpy_set_pr_etal(int (*cbpr_stdoe)(int, char*), int (*cbpass)()); +int ivocmain_session(int, const char**, const char**, int start_session); void simpleconnectsection(); -extern Object *hoc_newobj1(Symbol *, int); -extern void nrn_change_nseg(Section *, int); +extern Object* hoc_newobj1(Symbol*, int); +extern void nrn_change_nseg(Section*, int); /**************************************** * Initialization ****************************************/ -int nrn_init(int argc, const char **argv) { - nrn_nobanner_ = 1; - int exit_status = ivocmain_session(argc, argv, nullptr, 0); +int nrn_init(int argc, const char** argv) { + nrn_nobanner_ = 1; + int exit_status = ivocmain_session(argc, argv, nullptr, 0); #if NRNMPI #if NRNMPI_DYNAMICLOAD #ifdef nrnmpi_stubs - nrnmpi_stubs(); + nrnmpi_stubs(); #endif #endif #endif - return exit_status; + return exit_status; } -void nrn_redirect_stdout(int (*myprint)(int, char *)) { - // the first argument of myprint is an integer indicating the output stream - // if the int is 1, then stdout, else stderr - // the char* is the message to display - nrnpy_set_pr_etal(myprint, nullptr); +void nrn_redirect_stdout(int (*myprint)(int, char*)) { + // the first argument of myprint is an integer indicating the output stream + // if the int is 1, then stdout, else stderr + // the char* is the message to display + nrnpy_set_pr_etal(myprint, nullptr); } /**************************************** * Sections ****************************************/ -Section *nrn_new_section(char const *const name) { - // TODO: check for memory leaks; should we free the symbol, pitm, etc? - Symbol *symbol = new Symbol; - auto pitm = new hoc_Item *; - char *name_ptr = new char[strlen(name)]; - strcpy(name_ptr, name); - symbol->name = name_ptr; - symbol->type = 1; - symbol->u.oboff = 0; - symbol->arayinfo = 0; - hoc_install_object_data_index(symbol); - new_sections(nullptr, symbol, pitm, 1); - return (*pitm)->element.sec; +Section* nrn_new_section(char const* const name) { + // TODO: check for memory leaks; should we free the symbol, pitm, etc? + Symbol* symbol = new Symbol; + auto pitm = new hoc_Item*; + char* name_ptr = new char[strlen(name)]; + strcpy(name_ptr, name); + symbol->name = name_ptr; + symbol->type = 1; + symbol->u.oboff = 0; + symbol->arayinfo = 0; + hoc_install_object_data_index(symbol); + new_sections(nullptr, symbol, pitm, 1); + return (*pitm)->element.sec; } -void nrn_connect_sections(Section *child_sec, double child_x, - Section *parent_sec, double parent_x) { - nrn_pushsec(child_sec); - hoc_pushx(child_x); - nrn_pushsec(parent_sec); - hoc_pushx(parent_x); - simpleconnectsection(); +void nrn_connect_sections(Section* child_sec, + double child_x, + Section* parent_sec, + double parent_x) { + nrn_pushsec(child_sec); + hoc_pushx(child_x); + nrn_pushsec(parent_sec); + hoc_pushx(parent_x); + simpleconnectsection(); } -void nrn_set_section_length(Section *sec, double length) { - // TODO: call can_change_morph(sec) to check pt3dconst_; how should we handle - // that? - // TODO: is there a named constant so we don't have to use the magic number 2? - sec->prop->dparam[2] = length; - // nrn_length_change updates 3D points if needed - nrn_length_change(sec, length); - diam_changed = 1; - sec->recalc_area_ = 1; +void nrn_set_section_length(Section* sec, double length) { + // TODO: call can_change_morph(sec) to check pt3dconst_; how should we handle + // that? + // TODO: is there a named constant so we don't have to use the magic number 2? + sec->prop->dparam[2] = length; + // nrn_length_change updates 3D points if needed + nrn_length_change(sec, length); + diam_changed = 1; + sec->recalc_area_ = 1; } -double nrn_get_section_length(Section *sec) { return section_length(sec); } +double nrn_get_section_length(Section* sec) { + return section_length(sec); +} -double nrn_get_section_Ra(Section *sec) { return nrn_ra(sec); } +double nrn_get_section_Ra(Section* sec) { + return nrn_ra(sec); +} -void nrn_set_section_Ra(Section *sec, double val) { - // TODO: ensure val > 0 - // TODO: is there a named constant so we don't have to use the magic number 7? - sec->prop->dparam[7] = val; - diam_changed = 1; - sec->recalc_area_ = 1; +void nrn_set_section_Ra(Section* sec, double val) { + // TODO: ensure val > 0 + // TODO: is there a named constant so we don't have to use the magic number 7? + sec->prop->dparam[7] = val; + diam_changed = 1; + sec->recalc_area_ = 1; } -char const *nrn_secname(Section *sec) { return secname(sec); } +char const* nrn_secname(Section* sec) { + return secname(sec); +} -void nrn_push_section(Section *sec) { nrn_pushsec(sec); } +void nrn_push_section(Section* sec) { + nrn_pushsec(sec); +} -void nrn_pop_section(void) { nrn_sec_pop(); } +void nrn_pop_section(void) { + nrn_sec_pop(); +} -void nrn_insert_mechanism(Section *sec, Symbol *mechanism) { - // TODO: throw exception if mechanism is not an insertable mechanism? - mech_insert1(sec, mechanism->subtype); +void nrn_insert_mechanism(Section* sec, Symbol* mechanism) { + // TODO: throw exception if mechanism is not an insertable mechanism? + mech_insert1(sec, mechanism->subtype); } /**************************************** * Segments ****************************************/ -int nrn_get_nseg(Section const *const sec) { - // always one more node than nseg - return sec->nnode - 1; +int nrn_get_nseg(Section const* const sec) { + // always one more node than nseg + return sec->nnode - 1; } -void nrn_set_nseg(Section *const sec, const int nseg) { - nrn_change_nseg(sec, nseg); +void nrn_set_nseg(Section* const sec, const int nseg) { + nrn_change_nseg(sec, nseg); } -void nrn_set_segment_diam(Section *const sec, const double x, - const double diam) { - Node *const node = node_exact(sec, x); - // TODO: this is fine if no 3D points; does it work if there are 3D points? - for (auto prop = node->prop; prop; prop = prop->next) { - if (prop->_type == MORPHOLOGY) { - prop->param[0] = diam; - diam_changed = 1; - node->sec->recalc_area_ = 1; - break; +void nrn_set_segment_diam(Section* const sec, const double x, const double diam) { + Node* const node = node_exact(sec, x); + // TODO: this is fine if no 3D points; does it work if there are 3D points? + for (auto prop = node->prop; prop; prop = prop->next) { + if (prop->_type == MORPHOLOGY) { + prop->param[0] = diam; + diam_changed = 1; + node->sec->recalc_area_ = 1; + break; + } } - } } -double *nrn_get_rangevar_ptr(Section *const sec, Symbol *const sym, - double const x) { - return nrn_rangepointer(sec, sym, x); +double* nrn_get_rangevar_ptr(Section* const sec, Symbol* const sym, double const x) { + return nrn_rangepointer(sec, sym, x); } -hoc_Item *nrn_get_allsec(void) { return section_list; } +hoc_Item* nrn_get_allsec(void) { + return section_list; +} -hoc_Item *nrn_get_sectionlist_data(Object *obj) { - // TODO: verify the obj is in fact a SectionList - return (hoc_Item *)obj->u.this_pointer; +hoc_Item* nrn_get_sectionlist_data(Object* obj) { + // TODO: verify the obj is in fact a SectionList + return (hoc_Item*) obj->u.this_pointer; } /**************************************** * Functions, objects, and the stack ****************************************/ -Symbol *nrn_get_symbol(char const *const name) { return hoc_lookup(name); } +Symbol* nrn_get_symbol(char const* const name) { + return hoc_lookup(name); +} -int nrn_get_symbol_type(Symbol *sym) { - // TODO: these types are in parse.hpp and are not the same between versions, - // so we really should wrap - return sym->type; +int nrn_get_symbol_type(Symbol* sym) { + // TODO: these types are in parse.hpp and are not the same between versions, + // so we really should wrap + return sym->type; } -double *nrn_get_symbol_ptr(Symbol *sym) { return sym->u.pval; } +double* nrn_get_symbol_ptr(Symbol* sym) { + return sym->u.pval; +} -void nrn_push_double(double val) { hoc_pushx(val); } +void nrn_push_double(double val) { + hoc_pushx(val); +} -double nrn_pop_double(void) { return hoc_xpop(); } +double nrn_pop_double(void) { + return hoc_xpop(); +} -void nrn_push_double_ptr(double *addr) { hoc_pushpx(addr); } +void nrn_push_double_ptr(double* addr) { + hoc_pushpx(addr); +} -double *nrn_pop_double_ptr(void) { return hoc_pxpop(); } +double* nrn_pop_double_ptr(void) { + return hoc_pxpop(); +} -void nrn_push_str(char **str) { hoc_pushstr(str); } +void nrn_push_str(char** str) { + hoc_pushstr(str); +} -char **nrn_pop_str(void) { return hoc_strpop(); } +char** nrn_pop_str(void) { + return hoc_strpop(); +} -void nrn_push_int(int i) { hoc_pushi(i); } +void nrn_push_int(int i) { + hoc_pushi(i); +} -int nrn_pop_int(void) { return hoc_ipop(); } +int nrn_pop_int(void) { + return hoc_ipop(); +} -void nrn_push_object(Object *obj) { hoc_push_object(obj); } +void nrn_push_object(Object* obj) { + hoc_push_object(obj); +} -Object *nrn_pop_object(void) { - // NOTE: the returned object should be unref'd when no longer needed - Object **obptr = hoc_objpop(); - Object *new_ob_ptr = *obptr; - new_ob_ptr->refcount++; - hoc_tobj_unref(obptr); - return new_ob_ptr; +Object* nrn_pop_object(void) { + // NOTE: the returned object should be unref'd when no longer needed + Object** obptr = hoc_objpop(); + Object* new_ob_ptr = *obptr; + new_ob_ptr->refcount++; + hoc_tobj_unref(obptr); + return new_ob_ptr; } stack_types_t nrn_stack_type(void) { - switch (hoc_stack_type()) { - case STRING: - return STACK_IS_STR; - case VAR: - return STACK_IS_VAR; - case NUMBER: - return STACK_IS_NUM; - case OBJECTVAR: - return STACK_IS_OBJVAR; - case OBJECTTMP: - return STACK_IS_OBJTMP; - case USERINT: - return STACK_IS_USERINT; - case SYMBOL: - return STACK_IS_SYM; - case STKOBJ_UNREF: - return STACK_IS_OBJUNREF; - } - return STACK_UNKNOWN; -} - -char const *const nrn_stack_type_name(stack_types_t id) { - switch (id) { - case STACK_IS_STR: - return "STRING"; - case STACK_IS_VAR: - return "VAR"; - case STACK_IS_NUM: - return "NUMBER"; - case STACK_IS_OBJVAR: - return "OBJECTVAR"; - case STACK_IS_OBJTMP: - return "OBJECTTMP"; - case STACK_IS_USERINT: - return "USERINT"; - case STACK_IS_SYM: - return "SYMBOL"; - case STACK_IS_OBJUNREF: - return "STKOBJ_UNREF"; - } - return "UNKNOWN"; -} - -Object *nrn_new_object(Symbol *sym, int narg) { return hoc_newobj1(sym, narg); } - -Symbol *nrn_get_method_symbol(Object *obj, char const *const name) { - return hoc_table_lookup(name, obj->ctemplate->symtable); -} - -void nrn_call_method(Object *obj, Symbol *method_sym, int narg) { - OcJump::execute_throw_on_exception(obj, method_sym, narg); -} - -void nrn_call_function(Symbol *sym, int narg) { - // NOTE: this differs from hoc_call_func in that the response remains on the - // stack - OcJump::execute_throw_on_exception(sym, narg); -} - -void nrn_ref_object(Object *obj) { obj->refcount++; } - -void nrn_unref_object(Object *obj) { hoc_obj_unref(obj); } - -char const *nrn_get_class_name(Object *obj) { - return obj->ctemplate->sym->name; + switch (hoc_stack_type()) { + case STRING: + return STACK_IS_STR; + case VAR: + return STACK_IS_VAR; + case NUMBER: + return STACK_IS_NUM; + case OBJECTVAR: + return STACK_IS_OBJVAR; + case OBJECTTMP: + return STACK_IS_OBJTMP; + case USERINT: + return STACK_IS_USERINT; + case SYMBOL: + return STACK_IS_SYM; + case STKOBJ_UNREF: + return STACK_IS_OBJUNREF; + } + return STACK_UNKNOWN; +} + +char const* const nrn_stack_type_name(stack_types_t id) { + switch (id) { + case STACK_IS_STR: + return "STRING"; + case STACK_IS_VAR: + return "VAR"; + case STACK_IS_NUM: + return "NUMBER"; + case STACK_IS_OBJVAR: + return "OBJECTVAR"; + case STACK_IS_OBJTMP: + return "OBJECTTMP"; + case STACK_IS_USERINT: + return "USERINT"; + case STACK_IS_SYM: + return "SYMBOL"; + case STACK_IS_OBJUNREF: + return "STKOBJ_UNREF"; + } + return "UNKNOWN"; } -/**************************************** - * Miscellaneous - ****************************************/ -int nrn_call_hoc(char const *const command) { return hoc_oc(command); } +Object* nrn_new_object(Symbol* sym, int narg) { + return hoc_newobj1(sym, narg); +} -SectionListIterator::SectionListIterator(hoc_Item *my_sectionlist) { - initial = my_sectionlist; - current = my_sectionlist->next; +Symbol* nrn_get_method_symbol(Object* obj, char const* const name) { + return hoc_table_lookup(name, obj->ctemplate->symtable); } -Section *SectionListIterator::next(void) { - // NOTE: if no next element, returns nullptr - while (true) { - Section *sec = current->element.sec; +void nrn_call_method(Object* obj, Symbol* method_sym, int narg) { + OcJump::execute_throw_on_exception(obj, method_sym, narg); +} - if (sec->prop) { - current = current->next; - return sec; - } - hoc_l_delete(current); - section_unref(sec); - current = current->next; - if (current == initial) { - return nullptr; +void nrn_call_function(Symbol* sym, int narg) { + // NOTE: this differs from hoc_call_func in that the response remains on the + // stack + OcJump::execute_throw_on_exception(sym, narg); +} + +void nrn_ref_object(Object* obj) { + obj->refcount++; +} + +void nrn_unref_object(Object* obj) { + hoc_obj_unref(obj); +} + +char const* nrn_get_class_name(Object* obj) { + return obj->ctemplate->sym->name; +} + +/**************************************** + * Miscellaneous + ****************************************/ +int nrn_call_hoc(char const* const command) { + return hoc_oc(command); +} + +SectionListIterator::SectionListIterator(hoc_Item* my_sectionlist) { + initial = my_sectionlist; + current = my_sectionlist->next; +} + +Section* SectionListIterator::next(void) { + // NOTE: if no next element, returns nullptr + while (true) { + Section* sec = current->element.sec; + + if (sec->prop) { + current = current->next; + return sec; + } + hoc_l_delete(current); + section_unref(sec); + current = current->next; + if (current == initial) { + return nullptr; + } } - } } int SectionListIterator::done(void) { - if (initial == current) { - return 1; - } - return 0; + if (initial == current) { + return 1; + } + return 0; } -SymbolTableIterator::SymbolTableIterator(Symlist *list) { - current = list->first; +SymbolTableIterator::SymbolTableIterator(Symlist* list) { + current = list->first; } -char const *SymbolTableIterator::next(void) { - auto result = current->name; - current = current->next; - return result; +char const* SymbolTableIterator::next(void) { + auto result = current->name; + current = current->next; + return result; } int SymbolTableIterator::done(void) { - if (!current) { - return 1; - } - return 0; + if (!current) { + return 1; + } + return 0; } // copy semantics isn't great, but only two data items // and is cleaner to use in a for loop than having to free memory at the end -SectionListIterator *nrn_new_sectionlist_iterator(hoc_Item *my_sectionlist) { - return new SectionListIterator(my_sectionlist); +SectionListIterator* nrn_new_sectionlist_iterator(hoc_Item* my_sectionlist) { + return new SectionListIterator(my_sectionlist); } -void nrn_free_sectionlist_iterator(SectionListIterator *sl) { delete sl; } +void nrn_free_sectionlist_iterator(SectionListIterator* sl) { + delete sl; +} -Section *nrn_sectionlist_iterator_next(SectionListIterator *sl) { - return sl->next(); +Section* nrn_sectionlist_iterator_next(SectionListIterator* sl) { + return sl->next(); } -int nrn_sectionlist_iterator_done(SectionListIterator *sl) { - return sl->done(); +int nrn_sectionlist_iterator_done(SectionListIterator* sl) { + return sl->done(); } -SymbolTableIterator *nrn_new_symbol_table_iterator(Symlist *my_symbol_table) { - return new SymbolTableIterator(my_symbol_table); +SymbolTableIterator* nrn_new_symbol_table_iterator(Symlist* my_symbol_table) { + return new SymbolTableIterator(my_symbol_table); } -void nrn_free_symbol_table_iterator(SymbolTableIterator *st) { delete st; } +void nrn_free_symbol_table_iterator(SymbolTableIterator* st) { + delete st; +} -char const *nrn_symbol_table_iterator_next(SymbolTableIterator *st) { - return st->next(); +char const* nrn_symbol_table_iterator_next(SymbolTableIterator* st) { + return st->next(); } -int nrn_symbol_table_iterator_done(SymbolTableIterator *st) { - return st->done(); +int nrn_symbol_table_iterator_done(SymbolTableIterator* st) { + return st->done(); } -int nrn_vector_capacity(Object *vec) { - // TODO: throw exception if vec is not a Vector - return vector_capacity((IvocVect *)vec->u.this_pointer); +int nrn_vector_capacity(Object* vec) { + // TODO: throw exception if vec is not a Vector + return vector_capacity((IvocVect*) vec->u.this_pointer); } -double *nrn_vector_data_ptr(Object *vec) { - // TODO: throw exception if vec is not a Vector - return vector_vec((IvocVect *)vec->u.this_pointer); +double* nrn_vector_data_ptr(Object* vec) { + // TODO: throw exception if vec is not a Vector + return vector_vec((IvocVect*) vec->u.this_pointer); } -double *nrn_get_pp_property_ptr(Object *pp, const char *name) { - int index = hoc_table_lookup(name, pp->ctemplate->symtable)->u.rng.index; - return &ob2pntproc_0(pp)->prop->param[index]; +double* nrn_get_pp_property_ptr(Object* pp, const char* name) { + int index = hoc_table_lookup(name, pp->ctemplate->symtable)->u.rng.index; + return &ob2pntproc_0(pp)->prop->param[index]; } -double *nrn_get_steered_property_ptr(Object *obj, const char *name) { - assert(obj->ctemplate->steer); - auto sym2 = hoc_table_lookup(name, obj->ctemplate->symtable); - assert(sym2); - hoc_pushs(sym2); - // put the pointer for the memory location on the stack - obj->ctemplate->steer(obj->u.this_pointer); - return hoc_pxpop(); +double* nrn_get_steered_property_ptr(Object* obj, const char* name) { + assert(obj->ctemplate->steer); + auto sym2 = hoc_table_lookup(name, obj->ctemplate->symtable); + assert(sym2); + hoc_pushs(sym2); + // put the pointer for the memory location on the stack + obj->ctemplate->steer(obj->u.this_pointer); + return hoc_pxpop(); } -char const *nrn_get_symbol_name(Symbol *sym) { return sym->name; } +char const* nrn_get_symbol_name(Symbol* sym) { + return sym->name; +} -Symlist *nrn_get_symbol_table(Symbol *sym) { - // TODO: ensure sym is an object or class - // NOTE: to use with an object, call nrn_get_symbol(nrn_get_class_name(obj)) - return sym->u.ctemplate->symtable; +Symlist* nrn_get_symbol_table(Symbol* sym) { + // TODO: ensure sym is an object or class + // NOTE: to use with an object, call nrn_get_symbol(nrn_get_class_name(obj)) + return sym->u.ctemplate->symtable; } -Symlist *nrn_get_global_symbol_table(void) { return hoc_built_in_symlist; } \ No newline at end of file +Symlist* nrn_get_global_symbol_table(void) { + return hoc_built_in_symlist; +} \ No newline at end of file diff --git a/src/nrniv/neuronapi.h b/src/nrniv/neuronapi.h index 06efd981ae..64d73f0e9a 100644 --- a/src/nrniv/neuronapi.h +++ b/src/nrniv/neuronapi.h @@ -12,44 +12,46 @@ struct SymbolTableIterator; struct Symlist; typedef enum { - STACK_IS_STR = 1, - STACK_IS_VAR = 2, - STACK_IS_NUM = 3, - STACK_IS_OBJVAR = 4, - STACK_IS_OBJTMP = 5, - STACK_IS_USERINT = 6, - STACK_IS_SYM = 7, - STACK_IS_OBJUNREF = 8, - STACK_UNKNOWN = -1 + STACK_IS_STR = 1, + STACK_IS_VAR = 2, + STACK_IS_NUM = 3, + STACK_IS_OBJVAR = 4, + STACK_IS_OBJTMP = 5, + STACK_IS_USERINT = 6, + STACK_IS_SYM = 7, + STACK_IS_OBJUNREF = 8, + STACK_UNKNOWN = -1 } stack_types_t; /**************************************** * Initialization ****************************************/ -extern int (*nrn_init)(int argc, const char **argv); -extern void (*nrn_redirect_stdout)(int (*myprint)(int, char *)); +extern int (*nrn_init)(int argc, const char** argv); +extern void (*nrn_redirect_stdout)(int (*myprint)(int, char*)); /**************************************** * Sections ****************************************/ -extern Section *(*nrn_new_section)(char const *const name); -extern void (*nrn_connect_sections)(Section *child_sec, double child_x, - Section *parent_sec, double parent_x); -extern void (*nrn_set_section_length)(Section *sec, double length); -extern double (*nrn_get_section_length)(Section *sec); +extern Section* (*nrn_new_section)(char const* const name); +extern void (*nrn_connect_sections)(Section* child_sec, + double child_x, + Section* parent_sec, + double parent_x); +extern void (*nrn_set_section_length)(Section* sec, double length); +extern double (*nrn_get_section_length)(Section* sec); extern double (*nrn_get_section_Ra)(Section* sec); extern void (*nrn_set_section_Ra)(Section* sec, double val); -extern char const *(*nrn_secname)(Section *sec); -extern void (*nrn_push_section)(Section *sec); +extern char const* (*nrn_secname)(Section* sec); +extern void (*nrn_push_section)(Section* sec); extern void (*nrn_pop_section)(void); -extern void (*nrn_insert_mechanism)(Section *sec, Symbol *mechanism); +extern void (*nrn_insert_mechanism)(Section* sec, Symbol* mechanism); extern hoc_Item* (*nrn_get_allsec)(void); extern hoc_Item* (*nrn_get_sectionlist_data)(Object* obj); /**************************************** * Segments ****************************************/ -extern int (*nrn_get_nseg)(Section const * const sec); +extern int (*nrn_get_nseg)(Section const* const sec); extern void (*nrn_set_nseg)(Section* const sec, const int nseg); extern void (*nrn_set_segment_diam)(Section* const sec, const double x, const double diam); extern double* (*nrn_get_rangevar_ptr)(Section* const sec, Symbol* const sym, double const x); @@ -57,51 +59,51 @@ extern double* (*nrn_get_rangevar_ptr)(Section* const sec, Symbol* const sym, do /**************************************** * Functions, objects, and the stack ****************************************/ -extern Symbol *(*nrn_get_symbol)(char const *const name); -extern int (*nrn_get_symbol_type)(Symbol *sym); -extern double *(*nrn_get_symbol_ptr)(Symbol *sym); +extern Symbol* (*nrn_get_symbol)(char const* const name); +extern int (*nrn_get_symbol_type)(Symbol* sym); +extern double* (*nrn_get_symbol_ptr)(Symbol* sym); extern void (*nrn_push_double)(double val); extern double (*nrn_pop_double)(void); -extern void (*nrn_push_double_ptr)(double *addr); -extern double *(*nrn_pop_double_ptr)(void); -extern void (*nrn_push_str)(char **str); -extern char **(*nrn_pop_str)(void); +extern void (*nrn_push_double_ptr)(double* addr); +extern double* (*nrn_pop_double_ptr)(void); +extern void (*nrn_push_str)(char** str); +extern char** (*nrn_pop_str)(void); extern void (*nrn_push_int)(int i); extern int (*nrn_pop_int)(void); extern void (*nrn_push_object)(Object* obj); -extern Object *(*nrn_pop_object)(void); +extern Object* (*nrn_pop_object)(void); extern stack_types_t (*nrn_stack_type)(void); -extern char const *const (*nrn_stack_type_name)(stack_types_t id); -extern Object *(*nrn_new_object)(Symbol *sym, int narg); -extern Symbol *(*nrn_get_method_symbol)(Object *obj, char const *const name); +extern char const* const (*nrn_stack_type_name)(stack_types_t id); +extern Object* (*nrn_new_object)(Symbol* sym, int narg); +extern Symbol* (*nrn_get_method_symbol)(Object* obj, char const* const name); // TODO: the next two functions throw exceptions in C++; need a version that // returns a bool success indicator instead (this is actually the // classic behavior of OcJump) -extern void (*nrn_call_method)(Object *obj, Symbol *method_sym, int narg); -extern void (*nrn_call_function)(Symbol *sym, int narg); -extern void (*nrn_ref_object)(Object *obj); -extern void (*nrn_unref_object)(Object *obj); -extern char const * (*nrn_get_class_name)(Object* obj); +extern void (*nrn_call_method)(Object* obj, Symbol* method_sym, int narg); +extern void (*nrn_call_function)(Symbol* sym, int narg); +extern void (*nrn_ref_object)(Object* obj); +extern void (*nrn_unref_object)(Object* obj); +extern char const* (*nrn_get_class_name)(Object* obj); /**************************************** * Miscellaneous ****************************************/ -extern int (*nrn_call_hoc)(char const *const command); -extern SectionListIterator *(*nrn_new_sectionlist_iterator)(hoc_Item *my_sectionlist); -extern void (*nrn_free_sectionlist_iterator)(SectionListIterator *sl); -extern Section *(*nrn_sectionlist_iterator_next)(SectionListIterator* sl); +extern int (*nrn_call_hoc)(char const* const command); +extern SectionListIterator* (*nrn_new_sectionlist_iterator)(hoc_Item* my_sectionlist); +extern void (*nrn_free_sectionlist_iterator)(SectionListIterator* sl); +extern Section* (*nrn_sectionlist_iterator_next)(SectionListIterator* sl); extern int (*nrn_sectionlist_iterator_done)(SectionListIterator* sl); -extern SymbolTableIterator *(*nrn_new_symbol_table_iterator)(Symlist *my_symbol_table); -extern void (*nrn_free_symbol_table_iterator)(SymbolTableIterator *st); -extern char const *(*nrn_symbol_table_iterator_next)(SymbolTableIterator *st); -extern int (*nrn_symbol_table_iterator_done)(SymbolTableIterator *st); -extern int (*nrn_vector_capacity)(Object *vec); -extern double *(*nrn_vector_data_ptr)(Object *vec); +extern SymbolTableIterator* (*nrn_new_symbol_table_iterator)(Symlist* my_symbol_table); +extern void (*nrn_free_symbol_table_iterator)(SymbolTableIterator* st); +extern char const* (*nrn_symbol_table_iterator_next)(SymbolTableIterator* st); +extern int (*nrn_symbol_table_iterator_done)(SymbolTableIterator* st); +extern int (*nrn_vector_capacity)(Object* vec); +extern double* (*nrn_vector_data_ptr)(Object* vec); extern double* (*nrn_get_pp_property_ptr)(Object* pp, const char* name); extern double* (*nrn_get_steered_property_ptr)(Object* obj, const char* name); -extern char const * (*nrn_get_symbol_name)(Symbol* sym); -extern Symlist * (*nrn_get_symbol_table)(Symbol* sym); -extern Symlist * (*nrn_get_global_symbol_table)(void); +extern char const* (*nrn_get_symbol_name)(Symbol* sym); +extern Symlist* (*nrn_get_symbol_table)(Symbol* sym); +extern Symlist* (*nrn_get_global_symbol_table)(void); // TODO: need shapeplot information extraction #ifdef __cplusplus From 1d7d4a3ac508bf1a7b3da48115b817e152f80405 Mon Sep 17 00:00:00 2001 From: "Robert A. McDougal" Date: Tue, 16 May 2023 05:12:28 -0400 Subject: [PATCH 19/65] fixed lost extern C, removed unnecessary externs --- src/nrniv/neuronapi.cpp | 6 +- src/nrniv/neuronapi.h | 118 ++++++++++++++++++++-------------------- 2 files changed, 64 insertions(+), 60 deletions(-) diff --git a/src/nrniv/neuronapi.cpp b/src/nrniv/neuronapi.cpp index b79f90b4d8..a31c216cd3 100644 --- a/src/nrniv/neuronapi.cpp +++ b/src/nrniv/neuronapi.cpp @@ -58,6 +58,8 @@ void simpleconnectsection(); extern Object* hoc_newobj1(Symbol*, int); extern void nrn_change_nseg(Section*, int); +extern "C" { + /**************************************** * Initialization ****************************************/ @@ -298,8 +300,9 @@ char const* const nrn_stack_type_name(stack_types_t id) { return "SYMBOL"; case STACK_IS_OBJUNREF: return "STKOBJ_UNREF"; + default: + return "UNKNOWN"; } - return "UNKNOWN"; } Object* nrn_new_object(Symbol* sym, int narg) { @@ -457,4 +460,5 @@ Symlist* nrn_get_symbol_table(Symbol* sym) { Symlist* nrn_get_global_symbol_table(void) { return hoc_built_in_symlist; +} } \ No newline at end of file diff --git a/src/nrniv/neuronapi.h b/src/nrniv/neuronapi.h index 64d73f0e9a..cd91b41ce6 100644 --- a/src/nrniv/neuronapi.h +++ b/src/nrniv/neuronapi.h @@ -26,84 +26,84 @@ typedef enum { /**************************************** * Initialization ****************************************/ -extern int (*nrn_init)(int argc, const char** argv); -extern void (*nrn_redirect_stdout)(int (*myprint)(int, char*)); +int (*nrn_init)(int argc, const char** argv); +void (*nrn_redirect_stdout)(int (*myprint)(int, char*)); /**************************************** * Sections ****************************************/ -extern Section* (*nrn_new_section)(char const* const name); -extern void (*nrn_connect_sections)(Section* child_sec, - double child_x, - Section* parent_sec, - double parent_x); -extern void (*nrn_set_section_length)(Section* sec, double length); -extern double (*nrn_get_section_length)(Section* sec); -extern double (*nrn_get_section_Ra)(Section* sec); -extern void (*nrn_set_section_Ra)(Section* sec, double val); -extern char const* (*nrn_secname)(Section* sec); -extern void (*nrn_push_section)(Section* sec); -extern void (*nrn_pop_section)(void); -extern void (*nrn_insert_mechanism)(Section* sec, Symbol* mechanism); -extern hoc_Item* (*nrn_get_allsec)(void); -extern hoc_Item* (*nrn_get_sectionlist_data)(Object* obj); +Section* (*nrn_new_section)(char const* name); +void (*nrn_connect_sections)(Section* child_sec, + double child_x, + Section* parent_sec, + double parent_x); +void (*nrn_set_section_length)(Section* sec, double length); +double (*nrn_get_section_length)(Section* sec); +double (*nrn_get_section_Ra)(Section* sec); +void (*nrn_set_section_Ra)(Section* sec, double val); +char const* (*nrn_secname)(Section* sec); +void (*nrn_push_section)(Section* sec); +void (*nrn_pop_section)(void); +void (*nrn_insert_mechanism)(Section* sec, Symbol* mechanism); +hoc_Item* (*nrn_get_allsec)(void); +hoc_Item* (*nrn_get_sectionlist_data)(Object* obj); /**************************************** * Segments ****************************************/ -extern int (*nrn_get_nseg)(Section const* const sec); -extern void (*nrn_set_nseg)(Section* const sec, const int nseg); -extern void (*nrn_set_segment_diam)(Section* const sec, const double x, const double diam); -extern double* (*nrn_get_rangevar_ptr)(Section* const sec, Symbol* const sym, double const x); +int (*nrn_get_nseg)(Section const* sec); +void (*nrn_set_nseg)(Section* const sec, int nseg); +void (*nrn_set_segment_diam)(Section* sec, double x, double diam); +double* (*nrn_get_rangevar_ptr)(Section* sec, Symbol* sym, double x); /**************************************** * Functions, objects, and the stack ****************************************/ -extern Symbol* (*nrn_get_symbol)(char const* const name); -extern int (*nrn_get_symbol_type)(Symbol* sym); -extern double* (*nrn_get_symbol_ptr)(Symbol* sym); -extern void (*nrn_push_double)(double val); -extern double (*nrn_pop_double)(void); -extern void (*nrn_push_double_ptr)(double* addr); -extern double* (*nrn_pop_double_ptr)(void); -extern void (*nrn_push_str)(char** str); -extern char** (*nrn_pop_str)(void); -extern void (*nrn_push_int)(int i); -extern int (*nrn_pop_int)(void); -extern void (*nrn_push_object)(Object* obj); -extern Object* (*nrn_pop_object)(void); -extern stack_types_t (*nrn_stack_type)(void); -extern char const* const (*nrn_stack_type_name)(stack_types_t id); -extern Object* (*nrn_new_object)(Symbol* sym, int narg); -extern Symbol* (*nrn_get_method_symbol)(Object* obj, char const* const name); +Symbol* (*nrn_get_symbol)(char const* name); +int (*nrn_get_symbol_type)(Symbol* sym); +double* (*nrn_get_symbol_ptr)(Symbol* sym); +void (*nrn_push_double)(double val); +double (*nrn_pop_double)(void); +void (*nrn_push_double_ptr)(double* addr); +double* (*nrn_pop_double_ptr)(void); +void (*nrn_push_str)(char** str); +char** (*nrn_pop_str)(void); +void (*nrn_push_int)(int i); +int (*nrn_pop_int)(void); +void (*nrn_push_object)(Object* obj); +Object* (*nrn_pop_object)(void); +stack_types_t (*nrn_stack_type)(void); +char const* const (*nrn_stack_type_name)(stack_types_t id); +Object* (*nrn_new_object)(Symbol* sym, int narg); +Symbol* (*nrn_get_method_symbol)(Object* obj, char const* name); // TODO: the next two functions throw exceptions in C++; need a version that // returns a bool success indicator instead (this is actually the // classic behavior of OcJump) -extern void (*nrn_call_method)(Object* obj, Symbol* method_sym, int narg); -extern void (*nrn_call_function)(Symbol* sym, int narg); -extern void (*nrn_ref_object)(Object* obj); -extern void (*nrn_unref_object)(Object* obj); -extern char const* (*nrn_get_class_name)(Object* obj); +void (*nrn_call_method)(Object* obj, Symbol* method_sym, int narg); +void (*nrn_call_function)(Symbol* sym, int narg); +void (*nrn_ref_object)(Object* obj); +void (*nrn_unref_object)(Object* obj); +char const* (*nrn_get_class_name)(Object* obj); /**************************************** * Miscellaneous ****************************************/ -extern int (*nrn_call_hoc)(char const* const command); -extern SectionListIterator* (*nrn_new_sectionlist_iterator)(hoc_Item* my_sectionlist); -extern void (*nrn_free_sectionlist_iterator)(SectionListIterator* sl); -extern Section* (*nrn_sectionlist_iterator_next)(SectionListIterator* sl); -extern int (*nrn_sectionlist_iterator_done)(SectionListIterator* sl); -extern SymbolTableIterator* (*nrn_new_symbol_table_iterator)(Symlist* my_symbol_table); -extern void (*nrn_free_symbol_table_iterator)(SymbolTableIterator* st); -extern char const* (*nrn_symbol_table_iterator_next)(SymbolTableIterator* st); -extern int (*nrn_symbol_table_iterator_done)(SymbolTableIterator* st); -extern int (*nrn_vector_capacity)(Object* vec); -extern double* (*nrn_vector_data_ptr)(Object* vec); -extern double* (*nrn_get_pp_property_ptr)(Object* pp, const char* name); -extern double* (*nrn_get_steered_property_ptr)(Object* obj, const char* name); -extern char const* (*nrn_get_symbol_name)(Symbol* sym); -extern Symlist* (*nrn_get_symbol_table)(Symbol* sym); -extern Symlist* (*nrn_get_global_symbol_table)(void); +int (*nrn_call_hoc)(char const* command); +SectionListIterator* (*nrn_new_sectionlist_iterator)(hoc_Item* my_sectionlist); +void (*nrn_free_sectionlist_iterator)(SectionListIterator* sl); +Section* (*nrn_sectionlist_iterator_next)(SectionListIterator* sl); +int (*nrn_sectionlist_iterator_done)(SectionListIterator* sl); +SymbolTableIterator* (*nrn_new_symbol_table_iterator)(Symlist* my_symbol_table); +void (*nrn_free_symbol_table_iterator)(SymbolTableIterator* st); +char const* (*nrn_symbol_table_iterator_next)(SymbolTableIterator* st); +int (*nrn_symbol_table_iterator_done)(SymbolTableIterator* st); +int (*nrn_vector_capacity)(Object* vec); +double* (*nrn_vector_data_ptr)(Object* vec); +double* (*nrn_get_pp_property_ptr)(Object* pp, const char* name); +double* (*nrn_get_steered_property_ptr)(Object* obj, const char* name); +char const* (*nrn_get_symbol_name)(Symbol* sym); +Symlist* (*nrn_get_symbol_table)(Symbol* sym); +Symlist* (*nrn_get_global_symbol_table)(void); // TODO: need shapeplot information extraction #ifdef __cplusplus From 2e89ba1e4608ce015b60390321d768ba94e817c4 Mon Sep 17 00:00:00 2001 From: "Robert A. McDougal" Date: Tue, 16 May 2023 05:15:25 -0400 Subject: [PATCH 20/65] test: hh_sim --- test/api/hh_sim.cpp | 126 ++++++++++++++++++++++++++++++++++++++++++++ test/api/makefile | 22 ++++++++ 2 files changed, 148 insertions(+) create mode 100644 test/api/hh_sim.cpp create mode 100644 test/api/makefile diff --git a/test/api/hh_sim.cpp b/test/api/hh_sim.cpp new file mode 100644 index 0000000000..77f18acfa0 --- /dev/null +++ b/test/api/hh_sim.cpp @@ -0,0 +1,126 @@ +// NOTE: this assumes neuronapi.h is on your CPLUS_INCLUDE_PATH +#include "neuronapi.h" +#include +#include +#include +#include + +using std::cout; +using std::endl; +using std::ofstream; + +static const char* argv[] = {"hh_sim", "-nogui", "-nopython", nullptr}; + +extern "C" void modl_reg() {}; + +void setup_neuron_api(void) { + void* handle = dlopen("libnrniv.dylib", RTLD_NOW | RTLD_LOCAL); + if (!handle) { + cout << "Couldn't open dylib." << endl << dlerror() << endl; + exit(-1); + } + nrn_init = reinterpret_cast(dlsym(handle, "nrn_init")); + assert(nrn_init); + nrn_push_str = reinterpret_cast(dlsym(handle, "nrn_push_str")); + nrn_call_function = reinterpret_cast(dlsym(handle, "nrn_call_function")); + nrn_get_symbol = reinterpret_cast(dlsym(handle, "nrn_get_symbol")); + nrn_pop_double = reinterpret_cast(dlsym(handle, "nrn_pop_double")); + nrn_push_section = reinterpret_cast(dlsym(handle, "nrn_push_section")); + nrn_new_section = reinterpret_cast(dlsym(handle, "nrn_new_section")); + nrn_set_nseg = reinterpret_cast(dlsym(handle, "nrn_set_nseg")); + nrn_insert_mechanism = reinterpret_cast(dlsym(handle, "nrn_insert_mechanism")); + nrn_push_double = reinterpret_cast(dlsym(handle, "nrn_push_double")); + nrn_new_object = reinterpret_cast(dlsym(handle, "nrn_new_object")); + nrn_get_pp_property_ptr = reinterpret_cast(dlsym(handle, "nrn_get_pp_property_ptr")); + nrn_push_double_ptr = reinterpret_cast(dlsym(handle, "nrn_push_double_ptr")); + nrn_get_rangevar_ptr = reinterpret_cast(dlsym(handle, "nrn_get_rangevar_ptr")); + nrn_call_method = reinterpret_cast(dlsym(handle, "nrn_call_method")); + nrn_unref_object = reinterpret_cast(dlsym(handle, "nrn_unref_object")); + nrn_vector_capacity = reinterpret_cast(dlsym(handle, "nrn_vector_capacity")); + nrn_vector_data_ptr = reinterpret_cast(dlsym(handle, "nrn_vector_data_ptr")); + nrn_get_method_symbol = reinterpret_cast(dlsym(handle, "nrn_get_method_symbol")); + nrn_call_method = reinterpret_cast(dlsym(handle, "nrn_call_method")); + nrn_pop_object = reinterpret_cast(dlsym(handle, "nrn_pop_object")); + nrn_get_symbol_ptr = reinterpret_cast(dlsym(handle, "nrn_get_symbol_ptr")); +} + +int main(void) { + Section* soma; + Object* iclamp; + Object* v; + Object* t; + char* temp_str; + + setup_neuron_api(); + nrn_init(3, argv); + + // load the stdrun library + temp_str = new char[11]; + strcpy(temp_str, "stdrun.hoc"); + nrn_push_str(&temp_str); + nrn_call_function(nrn_get_symbol("load_file"), 1); + nrn_pop_double(); + delete[] temp_str; + + + // topology + soma = nrn_new_section("soma"); + nrn_set_nseg(soma, 3); + + // define soma morphology with two 3d points + nrn_push_section(soma); + // (0, 0, 0, 10) + nrn_push_double(0); + nrn_push_double(0); + nrn_push_double(0); + nrn_push_double(10); + nrn_call_function(nrn_get_symbol("pt3dadd"), 4); + nrn_pop_double(); // pt3dadd returns a number + // (10, 0, 0, 10) + nrn_push_double(10); + nrn_push_double(0); + nrn_push_double(0); + nrn_push_double(10); + nrn_call_function(nrn_get_symbol("pt3dadd"), 4); + nrn_pop_double(); // pt3dadd returns a number + + // ion channels + nrn_insert_mechanism(soma, nrn_get_symbol("hh")); + + // current clamp at soma(0.5) + nrn_push_double(0.5); + iclamp = nrn_new_object(nrn_get_symbol("IClamp"), 1); + *nrn_get_pp_property_ptr(iclamp, "amp") = 0.3; + *nrn_get_pp_property_ptr(iclamp, "del") = 1; + *nrn_get_pp_property_ptr(iclamp, "dur") = 0.1; + + // setup recording + v = nrn_new_object(nrn_get_symbol("Vector"), 0); + nrn_push_double_ptr(nrn_get_rangevar_ptr(soma, nrn_get_symbol("v"), 0.5)); + nrn_call_method(v, nrn_get_method_symbol(v, "record"), 1); + nrn_unref_object(nrn_pop_object()); // record returns the vector + t = nrn_new_object(nrn_get_symbol("Vector"), 0); + nrn_push_double_ptr(nrn_get_symbol_ptr(nrn_get_symbol("t"))); + nrn_call_method(t, nrn_get_method_symbol(t, "record"), 1); + nrn_unref_object(nrn_pop_object()); // record returns the vector + + // finitialize(-65) + nrn_push_double(-65); + nrn_call_function(nrn_get_symbol("finitialize"), 1); + nrn_pop_double(); + + // continuerun(10) + nrn_push_double(10); + nrn_call_function(nrn_get_symbol("continuerun"), 1); + nrn_pop_double(); + + double* tvec = nrn_vector_data_ptr(t); + double* vvec = nrn_vector_data_ptr(v); + ofstream out_file; + out_file.open("hh_sim.csv"); + for (auto i = 0; i < nrn_vector_capacity(t); i++) { + out_file << tvec[i] << "," << vvec[i] << endl; + } + out_file.close(); + cout << "Results saved to hh_sim.csv" << endl; +} \ No newline at end of file diff --git a/test/api/makefile b/test/api/makefile new file mode 100644 index 0000000000..aaf5d5bc4d --- /dev/null +++ b/test/api/makefile @@ -0,0 +1,22 @@ +ifeq ($(OS),Windows_NT) + UNAME_S := Windows +else + UNAME_S := $(shell uname -s) +endif + + +ifeq ($(UNAME_S),Linux) + CXXFLAGS = -g -rdynamic -Wl,--no-as-needed -ldl -Wall + CXXFLAGSNOLINKER = -g -Wl,--no-as-needed -ldl -Wall +endif +ifeq ($(UNAME_S),Darwin) + CXXFLAGS = -std=c++14 -g -rdynamic -ldl -Wall + CXXFLAGSNOLINKER = -std=c++14 -g -Wall +endif + +# TODO: handle Windows (mingw?) + +all: hh_sim + +hh_sim: hh_sim.cpp + $(CXX) $(CXXFLAGS) hh_sim.cpp -o hh_sim From d49347637a09ed9137bfa4e3ba6ad18e25ecaa7f Mon Sep 17 00:00:00 2001 From: "Robert A. McDougal" Date: Tue, 16 May 2023 05:23:27 -0400 Subject: [PATCH 21/65] test: vclamp.cpp --- test/api/makefile | 6 ++- test/api/vclamp.cpp | 120 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 125 insertions(+), 1 deletion(-) create mode 100644 test/api/vclamp.cpp diff --git a/test/api/makefile b/test/api/makefile index aaf5d5bc4d..6f3199a4bc 100644 --- a/test/api/makefile +++ b/test/api/makefile @@ -16,7 +16,11 @@ endif # TODO: handle Windows (mingw?) -all: hh_sim +all: hh_sim vclamp hh_sim: hh_sim.cpp $(CXX) $(CXXFLAGS) hh_sim.cpp -o hh_sim + +vclamp: vclamp.cpp + $(CXX) $(CXXFLAGS) vclamp.cpp -o vclamp + diff --git a/test/api/vclamp.cpp b/test/api/vclamp.cpp new file mode 100644 index 0000000000..0e6440ad51 --- /dev/null +++ b/test/api/vclamp.cpp @@ -0,0 +1,120 @@ +// NOTE: this assumes neuronapi.h is on your CPLUS_INCLUDE_PATH +#include "neuronapi.h" +#include +#include +#include +#include + +using std::cout; +using std::endl; +using std::ofstream; + +static const char* argv[] = {"hh_sim", "-nogui", "-nopython", nullptr}; + +extern "C" void modl_reg() {}; + +void setup_neuron_api(void) { + void* handle = dlopen("libnrniv.dylib", RTLD_NOW | RTLD_LOCAL); + if (!handle) { + cout << "Couldn't open dylib." << endl << dlerror() << endl; + exit(-1); + } + nrn_init = reinterpret_cast(dlsym(handle, "nrn_init")); + assert(nrn_init); + nrn_push_str = reinterpret_cast(dlsym(handle, "nrn_push_str")); + nrn_call_function = reinterpret_cast(dlsym(handle, "nrn_call_function")); + nrn_get_symbol = reinterpret_cast(dlsym(handle, "nrn_get_symbol")); + nrn_pop_double = reinterpret_cast(dlsym(handle, "nrn_pop_double")); + nrn_push_section = reinterpret_cast(dlsym(handle, "nrn_push_section")); + nrn_new_section = reinterpret_cast(dlsym(handle, "nrn_new_section")); + nrn_push_double = reinterpret_cast(dlsym(handle, "nrn_push_double")); + nrn_new_object = reinterpret_cast(dlsym(handle, "nrn_new_object")); + nrn_get_pp_property_ptr = reinterpret_cast(dlsym(handle, "nrn_get_pp_property_ptr")); + nrn_push_double_ptr = reinterpret_cast(dlsym(handle, "nrn_push_double_ptr")); + nrn_get_rangevar_ptr = reinterpret_cast(dlsym(handle, "nrn_get_rangevar_ptr")); + nrn_call_method = reinterpret_cast(dlsym(handle, "nrn_call_method")); + nrn_unref_object = reinterpret_cast(dlsym(handle, "nrn_unref_object")); + nrn_vector_capacity = reinterpret_cast(dlsym(handle, "nrn_vector_capacity")); + nrn_vector_data_ptr = reinterpret_cast(dlsym(handle, "nrn_vector_data_ptr")); + nrn_get_method_symbol = reinterpret_cast(dlsym(handle, "nrn_get_method_symbol")); + nrn_call_method = reinterpret_cast(dlsym(handle, "nrn_call_method")); + nrn_pop_object = reinterpret_cast(dlsym(handle, "nrn_pop_object")); + nrn_get_symbol_ptr = reinterpret_cast(dlsym(handle, "nrn_get_symbol_ptr")); + nrn_set_section_length = reinterpret_cast(dlsym(handle, "nrn_set_section_length")); + nrn_set_segment_diam = reinterpret_cast(dlsym(handle, "nrn_set_segment_diam")); +} + +int main(void) { + Section* soma; + Object* vclamp; + Object* v; + Object* t; + char* temp_str; + + setup_neuron_api(); + nrn_init(3, argv); + + // load the stdrun library + temp_str = new char[11]; + strcpy(temp_str, "stdrun.hoc"); + nrn_push_str(&temp_str); + nrn_call_function(nrn_get_symbol("load_file"), 1); + nrn_pop_double(); + delete[] temp_str; + + + // topology + soma = nrn_new_section("soma"); + + // define soma morphology with two 3d points + nrn_push_section(soma); + nrn_set_section_length(soma, 10); + nrn_set_segment_diam(soma, 0.5, 3); + + // voltage clamp at soma(0.5) + nrn_push_double(0.5); + vclamp = nrn_new_object(nrn_get_symbol("VClamp"), 1); + auto vclamp_amp = nrn_get_pp_property_ptr(vclamp, "amp"); + auto vclamp_dur = nrn_get_pp_property_ptr(vclamp, "dur"); + + // 0 mV for 1 ms; 10 mV for the next 2 ms; 5 mV for the next 3 ms + + vclamp_amp[0] = 0; + vclamp_amp[1] = 10; + vclamp_amp[2] = 5; + + vclamp_dur[0] = 1; + vclamp_dur[1] = 2; + vclamp_dur[2] = 3; + + // setup recording + v = nrn_new_object(nrn_get_symbol("Vector"), 0); + nrn_push_double_ptr(nrn_get_rangevar_ptr(soma, nrn_get_symbol("v"), 0.5)); + nrn_call_method(v, nrn_get_method_symbol(v, "record"), 1); + nrn_unref_object(nrn_pop_object()); // record returns the vector + t = nrn_new_object(nrn_get_symbol("Vector"), 0); + nrn_push_double_ptr(nrn_get_symbol_ptr(nrn_get_symbol("t"))); + nrn_call_method(t, nrn_get_method_symbol(t, "record"), 1); + nrn_unref_object(nrn_pop_object()); // record returns the vector + + // finitialize(-65) + nrn_push_double(-65); + nrn_call_function(nrn_get_symbol("finitialize"), 1); + nrn_pop_double(); + + // continuerun(6) + nrn_push_double(6); + nrn_call_function(nrn_get_symbol("continuerun"), 1); + nrn_pop_double(); + + double* tvec = nrn_vector_data_ptr(t); + double* vvec = nrn_vector_data_ptr(v); + ofstream out_file; + out_file.open("vclamp.csv"); + for (auto i = 0; i < nrn_vector_capacity(t); i++) { + out_file << tvec[i] << "," << vvec[i] << endl; + } + out_file.close(); + cout << "Results saved to vclamp.csv" << endl; + +} \ No newline at end of file From 1dc20790856b23f742fdfeab3a8fd3418af8bfe8 Mon Sep 17 00:00:00 2001 From: "Robert A. McDougal" Date: Tue, 16 May 2023 05:37:11 -0400 Subject: [PATCH 22/65] fix for vclamp name --- test/api/vclamp.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/api/vclamp.cpp b/test/api/vclamp.cpp index 0e6440ad51..97c0327b9e 100644 --- a/test/api/vclamp.cpp +++ b/test/api/vclamp.cpp @@ -9,7 +9,7 @@ using std::cout; using std::endl; using std::ofstream; -static const char* argv[] = {"hh_sim", "-nogui", "-nopython", nullptr}; +static const char* argv[] = {"vclamp", "-nogui", "-nopython", nullptr}; extern "C" void modl_reg() {}; From 28842daa0eda5fc25ffb57f06f3eddd6f7f57f96 Mon Sep 17 00:00:00 2001 From: "Robert A. McDougal" Date: Tue, 16 May 2023 05:43:40 -0400 Subject: [PATCH 23/65] needed typedefs for C to be happy --- src/nrniv/neuronapi.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/nrniv/neuronapi.h b/src/nrniv/neuronapi.h index cd91b41ce6..e578bc2411 100644 --- a/src/nrniv/neuronapi.h +++ b/src/nrniv/neuronapi.h @@ -3,13 +3,13 @@ #ifdef __cplusplus extern "C" { #endif -struct Symbol; -struct Object; -struct Section; -struct SectionListIterator; -struct hoc_Item; -struct SymbolTableIterator; -struct Symlist; +typedef struct Symbol Symbol; +typedef struct Object Object; +typedef struct Section Section; +typedef struct SectionListIterator SectionListIterator; +typedef struct hoc_Item hoc_Item; +typedef struct SymbolTableIterator SymbolTableIterator; +typedef struct Symlist Symlist; typedef enum { STACK_IS_STR = 1, From 31f9a2959244671ea68e3650eb24faf0d3cedcf3 Mon Sep 17 00:00:00 2001 From: "Robert A. McDougal" Date: Tue, 16 May 2023 06:08:25 -0400 Subject: [PATCH 24/65] test: sections.c --- test/api/makefile | 6 +++- test/api/sections.c | 81 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 86 insertions(+), 1 deletion(-) create mode 100644 test/api/sections.c diff --git a/test/api/makefile b/test/api/makefile index 6f3199a4bc..085af3c99f 100644 --- a/test/api/makefile +++ b/test/api/makefile @@ -7,16 +7,18 @@ endif ifeq ($(UNAME_S),Linux) CXXFLAGS = -g -rdynamic -Wl,--no-as-needed -ldl -Wall + CCFLAGS = -g -rdynamic -Wl,--no-as-needed -ldl -Wall CXXFLAGSNOLINKER = -g -Wl,--no-as-needed -ldl -Wall endif ifeq ($(UNAME_S),Darwin) CXXFLAGS = -std=c++14 -g -rdynamic -ldl -Wall + CCFLAGS = -g -rdynamic -ldl -Wall CXXFLAGSNOLINKER = -std=c++14 -g -Wall endif # TODO: handle Windows (mingw?) -all: hh_sim vclamp +all: hh_sim vclamp sections hh_sim: hh_sim.cpp $(CXX) $(CXXFLAGS) hh_sim.cpp -o hh_sim @@ -24,3 +26,5 @@ hh_sim: hh_sim.cpp vclamp: vclamp.cpp $(CXX) $(CXXFLAGS) vclamp.cpp -o vclamp +sections: sections.c + $(CC) $(CCFLAGS) sections.c -o sections diff --git a/test/api/sections.c b/test/api/sections.c new file mode 100644 index 0000000000..53892b91f4 --- /dev/null +++ b/test/api/sections.c @@ -0,0 +1,81 @@ +/* NOTE: this assumes neuronapi.h is on your CPLUS_INCLUDE_PATH */ +#include "neuronapi.h" +#include +#include +#include +#include + +static const char* argv[] = {"sections", "-nogui", "-nopython", NULL}; + +void modl_reg() {}; + +void setup_neuron_api(void) { + void* handle = dlopen("libnrniv.dylib", RTLD_NOW | RTLD_LOCAL); + if (!handle) { + printf("Couldn't open dylib.\n%s\n", dlerror()); + exit(-1); + } + nrn_init = (int (*)(int, const char **))(dlsym(handle, "nrn_init")); + assert(nrn_init); /* NOTE: this function only exists in versions of NEURON with the API defined */ + nrn_new_section = (Section *(*)(char const *))(dlsym(handle, "nrn_new_section")); + nrn_connect_sections = (void (*)(Section*, double, Section*, double))(dlsym(handle, "nrn_connect_sections")); + nrn_set_nseg = (void (*)(Section*, int))(dlsym(handle, "nrn_set_nseg")); + nrn_call_function = (void (*)(Symbol*, int))(dlsym(handle, "nrn_call_function")); + nrn_get_symbol = (Symbol* (*)(char const *))(dlsym(handle, "nrn_get_symbol")); + nrn_new_object = (Object* (*)(Symbol *, int))(dlsym(handle, "nrn_new_object")); + nrn_push_section = (void (*)(Section *))(dlsym(handle, "nrn_push_section")); + nrn_pop_section = (void (*)(void))(dlsym(handle, "nrn_pop_section")); + nrn_get_method_symbol = (Symbol* (*)(Object*, char const*))(dlsym(handle, "nrn_get_method_symbol")); + nrn_call_method = (void (*)(Object*, Symbol*, int))(dlsym(handle, "nrn_call_method")); + nrn_new_sectionlist_iterator = (SectionListIterator* (*)(hoc_Item*))(dlsym(handle, "nrn_new_sectionlist_iterator")); + nrn_get_allsec = (hoc_Item* (*)(void))(dlsym(handle, "nrn_get_allsec")); + nrn_sectionlist_iterator_done = (int (*)(SectionListIterator*))(dlsym(handle, "nrn_sectionlist_iterator_done")); + nrn_sectionlist_iterator_next = (Section* (*)(SectionListIterator*))(dlsym(handle, "nrn_sectionlist_iterator_next")); + nrn_free_sectionlist_iterator = (void (*)(SectionListIterator*))(dlsym(handle, "nrn_free_sectionlist_iterator")); + nrn_secname = (char const* (*)(Section*))(dlsym(handle, "nrn_secname")); + nrn_get_sectionlist_data = (hoc_Item* (*)(Object*))(dlsym(handle, "nrn_get_sectionlist_data")); + +} + +int main(void) { + setup_neuron_api(); + nrn_init(3, argv); + + // topology + Section* soma = nrn_new_section("soma"); + Section* dend1 = nrn_new_section("dend1"); + Section* dend2 = nrn_new_section("dend2"); + Section* dend3 = nrn_new_section("dend3"); + Section* axon = nrn_new_section("axon"); + nrn_connect_sections(dend1, 0, soma, 1); + nrn_connect_sections(dend2, 0, dend1, 1); + nrn_connect_sections(dend3, 0, dend1, 1); + nrn_connect_sections(axon, 0, soma, 0); + nrn_set_nseg(axon, 5); + + // print out the morphology + nrn_call_function(nrn_get_symbol("topology"), 0); + + /* create a SectionList that is dend1 and its children */ + Object* seclist = nrn_new_object(nrn_get_symbol("SectionList"), 0); + nrn_push_section(dend1); + nrn_call_method(seclist, nrn_get_method_symbol(seclist, "subtree"), 0); + nrn_pop_section(); + + /* loop over allsec, print out */ + printf("allsec:\n"); + SectionListIterator* sli = nrn_new_sectionlist_iterator(nrn_get_allsec()); + for (;!nrn_sectionlist_iterator_done(sli);) { + Section* sec=nrn_sectionlist_iterator_next(sli); + printf(" %s\n", nrn_secname(sec)); + } + nrn_free_sectionlist_iterator(sli); + + printf("\ndend1's subtree:\n"); + sli = nrn_new_sectionlist_iterator(nrn_get_sectionlist_data(seclist)); + for (;!nrn_sectionlist_iterator_done(sli);) { + Section* sec=nrn_sectionlist_iterator_next(sli); + printf(" %s\n", nrn_secname(sec)); + } + nrn_free_sectionlist_iterator(sli); +} \ No newline at end of file From bdaaff2c95cdd357ddeff54b9e6d7373703892b4 Mon Sep 17 00:00:00 2001 From: "Robert A. McDougal" Date: Tue, 16 May 2023 06:16:27 -0400 Subject: [PATCH 25/65] clang-format --- test/api/hh_sim.cpp | 61 +++++++++++++++++++++++++------------------ test/api/sections.c | 61 ++++++++++++++++++++++++------------------- test/api/vclamp.cpp | 63 ++++++++++++++++++++++++++------------------- 3 files changed, 107 insertions(+), 78 deletions(-) diff --git a/test/api/hh_sim.cpp b/test/api/hh_sim.cpp index 77f18acfa0..3155717d0e 100644 --- a/test/api/hh_sim.cpp +++ b/test/api/hh_sim.cpp @@ -11,37 +11,48 @@ using std::ofstream; static const char* argv[] = {"hh_sim", "-nogui", "-nopython", nullptr}; -extern "C" void modl_reg() {}; +extern "C" void modl_reg(){}; void setup_neuron_api(void) { - void* handle = dlopen("libnrniv.dylib", RTLD_NOW | RTLD_LOCAL); + void* handle = dlopen("libnrniv.dylib", RTLD_NOW | RTLD_LOCAL); if (!handle) { cout << "Couldn't open dylib." << endl << dlerror() << endl; exit(-1); - } - nrn_init = reinterpret_cast(dlsym(handle, "nrn_init")); + } + nrn_init = reinterpret_cast(dlsym(handle, "nrn_init")); assert(nrn_init); - nrn_push_str = reinterpret_cast(dlsym(handle, "nrn_push_str")); - nrn_call_function = reinterpret_cast(dlsym(handle, "nrn_call_function")); - nrn_get_symbol = reinterpret_cast(dlsym(handle, "nrn_get_symbol")); - nrn_pop_double = reinterpret_cast(dlsym(handle, "nrn_pop_double")); - nrn_push_section = reinterpret_cast(dlsym(handle, "nrn_push_section")); - nrn_new_section = reinterpret_cast(dlsym(handle, "nrn_new_section")); - nrn_set_nseg = reinterpret_cast(dlsym(handle, "nrn_set_nseg")); - nrn_insert_mechanism = reinterpret_cast(dlsym(handle, "nrn_insert_mechanism")); - nrn_push_double = reinterpret_cast(dlsym(handle, "nrn_push_double")); - nrn_new_object = reinterpret_cast(dlsym(handle, "nrn_new_object")); - nrn_get_pp_property_ptr = reinterpret_cast(dlsym(handle, "nrn_get_pp_property_ptr")); - nrn_push_double_ptr = reinterpret_cast(dlsym(handle, "nrn_push_double_ptr")); - nrn_get_rangevar_ptr = reinterpret_cast(dlsym(handle, "nrn_get_rangevar_ptr")); - nrn_call_method = reinterpret_cast(dlsym(handle, "nrn_call_method")); - nrn_unref_object = reinterpret_cast(dlsym(handle, "nrn_unref_object")); - nrn_vector_capacity = reinterpret_cast(dlsym(handle, "nrn_vector_capacity")); - nrn_vector_data_ptr = reinterpret_cast(dlsym(handle, "nrn_vector_data_ptr")); - nrn_get_method_symbol = reinterpret_cast(dlsym(handle, "nrn_get_method_symbol")); - nrn_call_method = reinterpret_cast(dlsym(handle, "nrn_call_method")); + nrn_push_str = reinterpret_cast(dlsym(handle, "nrn_push_str")); + nrn_call_function = reinterpret_cast( + dlsym(handle, "nrn_call_function")); + nrn_get_symbol = reinterpret_cast(dlsym(handle, "nrn_get_symbol")); + nrn_pop_double = reinterpret_cast(dlsym(handle, "nrn_pop_double")); + nrn_push_section = reinterpret_cast( + dlsym(handle, "nrn_push_section")); + nrn_new_section = reinterpret_cast(dlsym(handle, "nrn_new_section")); + nrn_set_nseg = reinterpret_cast(dlsym(handle, "nrn_set_nseg")); + nrn_insert_mechanism = reinterpret_cast( + dlsym(handle, "nrn_insert_mechanism")); + nrn_push_double = reinterpret_cast(dlsym(handle, "nrn_push_double")); + nrn_new_object = reinterpret_cast(dlsym(handle, "nrn_new_object")); + nrn_get_pp_property_ptr = reinterpret_cast( + dlsym(handle, "nrn_get_pp_property_ptr")); + nrn_push_double_ptr = reinterpret_cast( + dlsym(handle, "nrn_push_double_ptr")); + nrn_get_rangevar_ptr = reinterpret_cast( + dlsym(handle, "nrn_get_rangevar_ptr")); + nrn_call_method = reinterpret_cast(dlsym(handle, "nrn_call_method")); + nrn_unref_object = reinterpret_cast( + dlsym(handle, "nrn_unref_object")); + nrn_vector_capacity = reinterpret_cast( + dlsym(handle, "nrn_vector_capacity")); + nrn_vector_data_ptr = reinterpret_cast( + dlsym(handle, "nrn_vector_data_ptr")); + nrn_get_method_symbol = reinterpret_cast( + dlsym(handle, "nrn_get_method_symbol")); + nrn_call_method = reinterpret_cast(dlsym(handle, "nrn_call_method")); nrn_pop_object = reinterpret_cast(dlsym(handle, "nrn_pop_object")); - nrn_get_symbol_ptr = reinterpret_cast(dlsym(handle, "nrn_get_symbol_ptr")); + nrn_get_symbol_ptr = reinterpret_cast( + dlsym(handle, "nrn_get_symbol_ptr")); } int main(void) { @@ -66,7 +77,7 @@ int main(void) { // topology soma = nrn_new_section("soma"); nrn_set_nseg(soma, 3); - + // define soma morphology with two 3d points nrn_push_section(soma); // (0, 0, 0, 10) diff --git a/test/api/sections.c b/test/api/sections.c index 53892b91f4..273a64851f 100644 --- a/test/api/sections.c +++ b/test/api/sections.c @@ -7,34 +7,41 @@ static const char* argv[] = {"sections", "-nogui", "-nopython", NULL}; -void modl_reg() {}; +void modl_reg(){}; void setup_neuron_api(void) { - void* handle = dlopen("libnrniv.dylib", RTLD_NOW | RTLD_LOCAL); + void* handle = dlopen("libnrniv.dylib", RTLD_NOW | RTLD_LOCAL); if (!handle) { printf("Couldn't open dylib.\n%s\n", dlerror()); exit(-1); - } - nrn_init = (int (*)(int, const char **))(dlsym(handle, "nrn_init")); - assert(nrn_init); /* NOTE: this function only exists in versions of NEURON with the API defined */ - nrn_new_section = (Section *(*)(char const *))(dlsym(handle, "nrn_new_section")); - nrn_connect_sections = (void (*)(Section*, double, Section*, double))(dlsym(handle, "nrn_connect_sections")); - nrn_set_nseg = (void (*)(Section*, int))(dlsym(handle, "nrn_set_nseg")); - nrn_call_function = (void (*)(Symbol*, int))(dlsym(handle, "nrn_call_function")); - nrn_get_symbol = (Symbol* (*)(char const *))(dlsym(handle, "nrn_get_symbol")); - nrn_new_object = (Object* (*)(Symbol *, int))(dlsym(handle, "nrn_new_object")); - nrn_push_section = (void (*)(Section *))(dlsym(handle, "nrn_push_section")); + } + nrn_init = (int (*)(int, const char**))(dlsym(handle, "nrn_init")); + assert(nrn_init); /* NOTE: this function only exists in versions of NEURON with the API defined + */ + nrn_new_section = (Section * (*) (char const*) )(dlsym(handle, "nrn_new_section")); + nrn_connect_sections = (void (*)(Section*, double, Section*, double))( + dlsym(handle, "nrn_connect_sections")); + nrn_set_nseg = (void (*)(Section*, int))(dlsym(handle, "nrn_set_nseg")); + nrn_call_function = (void (*)(Symbol*, int))(dlsym(handle, "nrn_call_function")); + nrn_get_symbol = (Symbol * (*) (char const*) )(dlsym(handle, "nrn_get_symbol")); + nrn_new_object = (Object * (*) (Symbol*, int) )(dlsym(handle, "nrn_new_object")); + nrn_push_section = (void (*)(Section*))(dlsym(handle, "nrn_push_section")); nrn_pop_section = (void (*)(void))(dlsym(handle, "nrn_pop_section")); - nrn_get_method_symbol = (Symbol* (*)(Object*, char const*))(dlsym(handle, "nrn_get_method_symbol")); + nrn_get_method_symbol = (Symbol * + (*) (Object*, char const*) )(dlsym(handle, "nrn_get_method_symbol")); nrn_call_method = (void (*)(Object*, Symbol*, int))(dlsym(handle, "nrn_call_method")); - nrn_new_sectionlist_iterator = (SectionListIterator* (*)(hoc_Item*))(dlsym(handle, "nrn_new_sectionlist_iterator")); - nrn_get_allsec = (hoc_Item* (*)(void))(dlsym(handle, "nrn_get_allsec")); - nrn_sectionlist_iterator_done = (int (*)(SectionListIterator*))(dlsym(handle, "nrn_sectionlist_iterator_done")); - nrn_sectionlist_iterator_next = (Section* (*)(SectionListIterator*))(dlsym(handle, "nrn_sectionlist_iterator_next")); - nrn_free_sectionlist_iterator = (void (*)(SectionListIterator*))(dlsym(handle, "nrn_free_sectionlist_iterator")); - nrn_secname = (char const* (*)(Section*))(dlsym(handle, "nrn_secname")); - nrn_get_sectionlist_data = (hoc_Item* (*)(Object*))(dlsym(handle, "nrn_get_sectionlist_data")); - + nrn_new_sectionlist_iterator = (SectionListIterator * (*) (hoc_Item*) )( + dlsym(handle, "nrn_new_sectionlist_iterator")); + nrn_get_allsec = (hoc_Item * (*) (void) )(dlsym(handle, "nrn_get_allsec")); + nrn_sectionlist_iterator_done = (int (*)(SectionListIterator*))( + dlsym(handle, "nrn_sectionlist_iterator_done")); + nrn_sectionlist_iterator_next = (Section * (*) (SectionListIterator*) )( + dlsym(handle, "nrn_sectionlist_iterator_next")); + nrn_free_sectionlist_iterator = (void (*)(SectionListIterator*))( + dlsym(handle, "nrn_free_sectionlist_iterator")); + nrn_secname = (char const* (*) (Section*) )(dlsym(handle, "nrn_secname")); + nrn_get_sectionlist_data = (hoc_Item * + (*) (Object*) )(dlsym(handle, "nrn_get_sectionlist_data")); } int main(void) { @@ -52,7 +59,7 @@ int main(void) { nrn_connect_sections(dend3, 0, dend1, 1); nrn_connect_sections(axon, 0, soma, 0); nrn_set_nseg(axon, 5); - + // print out the morphology nrn_call_function(nrn_get_symbol("topology"), 0); @@ -65,17 +72,17 @@ int main(void) { /* loop over allsec, print out */ printf("allsec:\n"); SectionListIterator* sli = nrn_new_sectionlist_iterator(nrn_get_allsec()); - for (;!nrn_sectionlist_iterator_done(sli);) { - Section* sec=nrn_sectionlist_iterator_next(sli); + for (; !nrn_sectionlist_iterator_done(sli);) { + Section* sec = nrn_sectionlist_iterator_next(sli); printf(" %s\n", nrn_secname(sec)); } nrn_free_sectionlist_iterator(sli); printf("\ndend1's subtree:\n"); sli = nrn_new_sectionlist_iterator(nrn_get_sectionlist_data(seclist)); - for (;!nrn_sectionlist_iterator_done(sli);) { - Section* sec=nrn_sectionlist_iterator_next(sli); + for (; !nrn_sectionlist_iterator_done(sli);) { + Section* sec = nrn_sectionlist_iterator_next(sli); printf(" %s\n", nrn_secname(sec)); } - nrn_free_sectionlist_iterator(sli); + nrn_free_sectionlist_iterator(sli); } \ No newline at end of file diff --git a/test/api/vclamp.cpp b/test/api/vclamp.cpp index 97c0327b9e..d3a291e59d 100644 --- a/test/api/vclamp.cpp +++ b/test/api/vclamp.cpp @@ -11,37 +11,49 @@ using std::ofstream; static const char* argv[] = {"vclamp", "-nogui", "-nopython", nullptr}; -extern "C" void modl_reg() {}; +extern "C" void modl_reg(){}; void setup_neuron_api(void) { - void* handle = dlopen("libnrniv.dylib", RTLD_NOW | RTLD_LOCAL); + void* handle = dlopen("libnrniv.dylib", RTLD_NOW | RTLD_LOCAL); if (!handle) { cout << "Couldn't open dylib." << endl << dlerror() << endl; exit(-1); - } - nrn_init = reinterpret_cast(dlsym(handle, "nrn_init")); + } + nrn_init = reinterpret_cast(dlsym(handle, "nrn_init")); assert(nrn_init); - nrn_push_str = reinterpret_cast(dlsym(handle, "nrn_push_str")); - nrn_call_function = reinterpret_cast(dlsym(handle, "nrn_call_function")); - nrn_get_symbol = reinterpret_cast(dlsym(handle, "nrn_get_symbol")); - nrn_pop_double = reinterpret_cast(dlsym(handle, "nrn_pop_double")); - nrn_push_section = reinterpret_cast(dlsym(handle, "nrn_push_section")); - nrn_new_section = reinterpret_cast(dlsym(handle, "nrn_new_section")); - nrn_push_double = reinterpret_cast(dlsym(handle, "nrn_push_double")); - nrn_new_object = reinterpret_cast(dlsym(handle, "nrn_new_object")); - nrn_get_pp_property_ptr = reinterpret_cast(dlsym(handle, "nrn_get_pp_property_ptr")); - nrn_push_double_ptr = reinterpret_cast(dlsym(handle, "nrn_push_double_ptr")); - nrn_get_rangevar_ptr = reinterpret_cast(dlsym(handle, "nrn_get_rangevar_ptr")); - nrn_call_method = reinterpret_cast(dlsym(handle, "nrn_call_method")); - nrn_unref_object = reinterpret_cast(dlsym(handle, "nrn_unref_object")); - nrn_vector_capacity = reinterpret_cast(dlsym(handle, "nrn_vector_capacity")); - nrn_vector_data_ptr = reinterpret_cast(dlsym(handle, "nrn_vector_data_ptr")); - nrn_get_method_symbol = reinterpret_cast(dlsym(handle, "nrn_get_method_symbol")); - nrn_call_method = reinterpret_cast(dlsym(handle, "nrn_call_method")); + nrn_push_str = reinterpret_cast(dlsym(handle, "nrn_push_str")); + nrn_call_function = reinterpret_cast( + dlsym(handle, "nrn_call_function")); + nrn_get_symbol = reinterpret_cast(dlsym(handle, "nrn_get_symbol")); + nrn_pop_double = reinterpret_cast(dlsym(handle, "nrn_pop_double")); + nrn_push_section = reinterpret_cast( + dlsym(handle, "nrn_push_section")); + nrn_new_section = reinterpret_cast(dlsym(handle, "nrn_new_section")); + nrn_push_double = reinterpret_cast(dlsym(handle, "nrn_push_double")); + nrn_new_object = reinterpret_cast(dlsym(handle, "nrn_new_object")); + nrn_get_pp_property_ptr = reinterpret_cast( + dlsym(handle, "nrn_get_pp_property_ptr")); + nrn_push_double_ptr = reinterpret_cast( + dlsym(handle, "nrn_push_double_ptr")); + nrn_get_rangevar_ptr = reinterpret_cast( + dlsym(handle, "nrn_get_rangevar_ptr")); + nrn_call_method = reinterpret_cast(dlsym(handle, "nrn_call_method")); + nrn_unref_object = reinterpret_cast( + dlsym(handle, "nrn_unref_object")); + nrn_vector_capacity = reinterpret_cast( + dlsym(handle, "nrn_vector_capacity")); + nrn_vector_data_ptr = reinterpret_cast( + dlsym(handle, "nrn_vector_data_ptr")); + nrn_get_method_symbol = reinterpret_cast( + dlsym(handle, "nrn_get_method_symbol")); + nrn_call_method = reinterpret_cast(dlsym(handle, "nrn_call_method")); nrn_pop_object = reinterpret_cast(dlsym(handle, "nrn_pop_object")); - nrn_get_symbol_ptr = reinterpret_cast(dlsym(handle, "nrn_get_symbol_ptr")); - nrn_set_section_length = reinterpret_cast(dlsym(handle, "nrn_set_section_length")); - nrn_set_segment_diam = reinterpret_cast(dlsym(handle, "nrn_set_segment_diam")); + nrn_get_symbol_ptr = reinterpret_cast( + dlsym(handle, "nrn_get_symbol_ptr")); + nrn_set_section_length = reinterpret_cast( + dlsym(handle, "nrn_set_section_length")); + nrn_set_segment_diam = reinterpret_cast( + dlsym(handle, "nrn_set_segment_diam")); } int main(void) { @@ -65,7 +77,7 @@ int main(void) { // topology soma = nrn_new_section("soma"); - + // define soma morphology with two 3d points nrn_push_section(soma); nrn_set_section_length(soma, 10); @@ -116,5 +128,4 @@ int main(void) { } out_file.close(); cout << "Results saved to vclamp.csv" << endl; - } \ No newline at end of file From 0a689c83b028a1b029e5f0eced860284562e8ffe Mon Sep 17 00:00:00 2001 From: "Robert A. McDougal" Date: Wed, 17 May 2023 21:44:56 -0400 Subject: [PATCH 26/65] replaced hoc_Item with new synonym nrn_Item --- src/nrniv/neuronapi.cpp | 20 +++++++++++--------- src/nrniv/neuronapi.h | 8 ++++---- test/api/sections.c | 6 +++--- 3 files changed, 18 insertions(+), 16 deletions(-) diff --git a/src/nrniv/neuronapi.cpp b/src/nrniv/neuronapi.cpp index a31c216cd3..ea162affc0 100644 --- a/src/nrniv/neuronapi.cpp +++ b/src/nrniv/neuronapi.cpp @@ -24,16 +24,18 @@ typedef enum { STACK_UNKNOWN = -1 } stack_types_t; +typedef hoc_Item nrn_Item; + class SectionListIterator { public: - SectionListIterator(hoc_Item*); + SectionListIterator(nrn_Item*); Section* next(void); int done(void); private: - hoc_Item* initial; - hoc_Item* current; + nrn_Item* initial; + nrn_Item* current; }; class SymbolTableIterator { @@ -91,7 +93,7 @@ void nrn_redirect_stdout(int (*myprint)(int, char*)) { Section* nrn_new_section(char const* const name) { // TODO: check for memory leaks; should we free the symbol, pitm, etc? Symbol* symbol = new Symbol; - auto pitm = new hoc_Item*; + auto pitm = new nrn_Item*; char* name_ptr = new char[strlen(name)]; strcpy(name_ptr, name); symbol->name = name_ptr; @@ -188,13 +190,13 @@ double* nrn_get_rangevar_ptr(Section* const sec, Symbol* const sym, double const return nrn_rangepointer(sec, sym, x); } -hoc_Item* nrn_get_allsec(void) { +nrn_Item* nrn_get_allsec(void) { return section_list; } -hoc_Item* nrn_get_sectionlist_data(Object* obj) { +nrn_Item* nrn_get_sectionlist_data(Object* obj) { // TODO: verify the obj is in fact a SectionList - return (hoc_Item*) obj->u.this_pointer; + return (nrn_Item*) obj->u.this_pointer; } /**************************************** @@ -342,7 +344,7 @@ int nrn_call_hoc(char const* const command) { return hoc_oc(command); } -SectionListIterator::SectionListIterator(hoc_Item* my_sectionlist) { +SectionListIterator::SectionListIterator(nrn_Item* my_sectionlist) { initial = my_sectionlist; current = my_sectionlist->next; } @@ -391,7 +393,7 @@ int SymbolTableIterator::done(void) { // copy semantics isn't great, but only two data items // and is cleaner to use in a for loop than having to free memory at the end -SectionListIterator* nrn_new_sectionlist_iterator(hoc_Item* my_sectionlist) { +SectionListIterator* nrn_new_sectionlist_iterator(nrn_Item* my_sectionlist) { return new SectionListIterator(my_sectionlist); } diff --git a/src/nrniv/neuronapi.h b/src/nrniv/neuronapi.h index e578bc2411..95e31eed5e 100644 --- a/src/nrniv/neuronapi.h +++ b/src/nrniv/neuronapi.h @@ -7,7 +7,7 @@ typedef struct Symbol Symbol; typedef struct Object Object; typedef struct Section Section; typedef struct SectionListIterator SectionListIterator; -typedef struct hoc_Item hoc_Item; +typedef struct hoc_Item nrn_Item; typedef struct SymbolTableIterator SymbolTableIterator; typedef struct Symlist Symlist; @@ -45,8 +45,8 @@ char const* (*nrn_secname)(Section* sec); void (*nrn_push_section)(Section* sec); void (*nrn_pop_section)(void); void (*nrn_insert_mechanism)(Section* sec, Symbol* mechanism); -hoc_Item* (*nrn_get_allsec)(void); -hoc_Item* (*nrn_get_sectionlist_data)(Object* obj); +nrn_Item* (*nrn_get_allsec)(void); +nrn_Item* (*nrn_get_sectionlist_data)(Object* obj); /**************************************** * Segments @@ -89,7 +89,7 @@ char const* (*nrn_get_class_name)(Object* obj); * Miscellaneous ****************************************/ int (*nrn_call_hoc)(char const* command); -SectionListIterator* (*nrn_new_sectionlist_iterator)(hoc_Item* my_sectionlist); +SectionListIterator* (*nrn_new_sectionlist_iterator)(nrn_Item* my_sectionlist); void (*nrn_free_sectionlist_iterator)(SectionListIterator* sl); Section* (*nrn_sectionlist_iterator_next)(SectionListIterator* sl); int (*nrn_sectionlist_iterator_done)(SectionListIterator* sl); diff --git a/test/api/sections.c b/test/api/sections.c index 273a64851f..8ea718754e 100644 --- a/test/api/sections.c +++ b/test/api/sections.c @@ -30,9 +30,9 @@ void setup_neuron_api(void) { nrn_get_method_symbol = (Symbol * (*) (Object*, char const*) )(dlsym(handle, "nrn_get_method_symbol")); nrn_call_method = (void (*)(Object*, Symbol*, int))(dlsym(handle, "nrn_call_method")); - nrn_new_sectionlist_iterator = (SectionListIterator * (*) (hoc_Item*) )( + nrn_new_sectionlist_iterator = (SectionListIterator * (*) (nrn_Item*) )( dlsym(handle, "nrn_new_sectionlist_iterator")); - nrn_get_allsec = (hoc_Item * (*) (void) )(dlsym(handle, "nrn_get_allsec")); + nrn_get_allsec = (nrn_Item * (*) (void) )(dlsym(handle, "nrn_get_allsec")); nrn_sectionlist_iterator_done = (int (*)(SectionListIterator*))( dlsym(handle, "nrn_sectionlist_iterator_done")); nrn_sectionlist_iterator_next = (Section * (*) (SectionListIterator*) )( @@ -40,7 +40,7 @@ void setup_neuron_api(void) { nrn_free_sectionlist_iterator = (void (*)(SectionListIterator*))( dlsym(handle, "nrn_free_sectionlist_iterator")); nrn_secname = (char const* (*) (Section*) )(dlsym(handle, "nrn_secname")); - nrn_get_sectionlist_data = (hoc_Item * + nrn_get_sectionlist_data = (nrn_Item * (*) (Object*) )(dlsym(handle, "nrn_get_sectionlist_data")); } From e422638152e2c07b7e8edb47111bbb1ec71ef631 Mon Sep 17 00:00:00 2001 From: "Robert A. McDougal" Date: Wed, 17 May 2023 21:48:56 -0400 Subject: [PATCH 27/65] removed inconsistency in typedef even though it was probably harmless --- src/nrniv/neuronapi.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/nrniv/neuronapi.h b/src/nrniv/neuronapi.h index 95e31eed5e..dd924d9e00 100644 --- a/src/nrniv/neuronapi.h +++ b/src/nrniv/neuronapi.h @@ -7,7 +7,7 @@ typedef struct Symbol Symbol; typedef struct Object Object; typedef struct Section Section; typedef struct SectionListIterator SectionListIterator; -typedef struct hoc_Item nrn_Item; +typedef struct nrn_Item nrn_Item; typedef struct SymbolTableIterator SymbolTableIterator; typedef struct Symlist Symlist; From bd606d23d315ecf0ecad6c37c608621612dcd332 Mon Sep 17 00:00:00 2001 From: "Robert A. McDougal" Date: Wed, 17 May 2023 22:39:31 -0400 Subject: [PATCH 28/65] netcon example shows no need for dlsym --- test/api/makefile | 6 +- test/api/netcon.cpp | 134 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 139 insertions(+), 1 deletion(-) create mode 100644 test/api/netcon.cpp diff --git a/test/api/makefile b/test/api/makefile index 085af3c99f..ec2262615c 100644 --- a/test/api/makefile +++ b/test/api/makefile @@ -18,7 +18,7 @@ endif # TODO: handle Windows (mingw?) -all: hh_sim vclamp sections +all: hh_sim vclamp sections netcon hh_sim: hh_sim.cpp $(CXX) $(CXXFLAGS) hh_sim.cpp -o hh_sim @@ -28,3 +28,7 @@ vclamp: vclamp.cpp sections: sections.c $(CC) $(CCFLAGS) sections.c -o sections + +# TODO: dynamic lookup is probably not possible on Windows +netcon: netcon.cpp + $(CXX) $(CXXFLAGS) -undefined dynamic_lookup netcon.cpp -o netcon diff --git a/test/api/netcon.cpp b/test/api/netcon.cpp new file mode 100644 index 0000000000..e817fee9ed --- /dev/null +++ b/test/api/netcon.cpp @@ -0,0 +1,134 @@ +// NOTE: this assumes neuronapi.h is on your CPLUS_INCLUDE_PATH +#include +#include +#include +#include + +using std::cout; +using std::endl; +using std::ofstream; + +typedef struct Symbol Symbol; +typedef struct Object Object; +typedef struct Section Section; +typedef struct SectionListIterator SectionListIterator; +typedef struct nrn_Item nrn_Item; +typedef struct SymbolTableIterator SymbolTableIterator; +typedef struct Symlist Symlist; + +extern "C" { +int nrn_init(int argc, const char **argv); +void nrn_push_str(char **str); +void nrn_call_function(Symbol *sym, int narg); +double nrn_pop_double(void); +Section *nrn_new_section(char const *const name); +Symbol* nrn_get_symbol(char const* const name); +void nrn_insert_mechanism(Section* sec, Symbol* mechanism); +Object* nrn_new_object(Symbol* sym, int narg); +void nrn_call_method(Object *obj, Symbol *method_sym, int narg); +double* nrn_get_pp_property_ptr(Object* pp, const char* name); +void nrn_push_double(double val); +void nrn_push_object(Object* obj); +Symbol* nrn_get_method_symbol(Object* obj, char const* const name); +Object* nrn_pop_object(void); +void nrn_unref_object(Object* obj); +double* nrn_vector_data_ptr(Object* vec); +int nrn_vector_capacity(Object* vec); +double* nrn_get_steered_property_ptr(Object* obj, const char* name); +double* nrn_get_rangevar_ptr(Section* const sec, Symbol* const sym, double const x); +void nrn_push_double_ptr(double* addr); +double* nrn_get_symbol_ptr(Symbol* sym); +} + +static const char* argv[] = {"netcon", "-nogui", "-nopython", nullptr}; + +extern "C" void modl_reg() {}; + +int main(void) { + Object* v; + Object* t; + char* temp_str; + + // Note: cannot use RTLD_LOCAL here + void* handle = dlopen("libnrniv.dylib", RTLD_NOW); + if (!handle) { + cout << "Couldn't open dylib." << endl << dlerror() << endl; + exit(-1); + } + + nrn_init(3, argv); + + // load the stdrun library + temp_str = new char[11]; + strcpy(temp_str, "stdrun.hoc"); + nrn_push_str(&temp_str); + nrn_call_function(nrn_get_symbol("load_file"), 1); + nrn_pop_double(); + delete[] temp_str; + + + // topology + auto soma = nrn_new_section("soma"); + + // ion channels + nrn_insert_mechanism(soma, nrn_get_symbol("hh")); + + // NetStim + auto ns = nrn_new_object(nrn_get_symbol("NetStim"), 0); + *nrn_get_pp_property_ptr(ns, "start") = 5; + *nrn_get_pp_property_ptr(ns, "noise") = 1; + *nrn_get_pp_property_ptr(ns, "interval") = 5; + *nrn_get_pp_property_ptr(ns, "number") = 10; + + // syn = h.ExpSyn(soma(0.5)) + nrn_push_double(0.5); + auto syn = nrn_new_object(nrn_get_symbol("ExpSyn"), 1); + *nrn_get_pp_property_ptr(syn, "tau") = 3; // 3 ms timeconstant + *nrn_get_pp_property_ptr(syn, "e") = 0; // 0 mV reversal potential (excitatory synapse) + + // nc = h.NetCon(ns, syn) + nrn_push_object(ns); + nrn_push_object(syn); + auto nc = nrn_new_object(nrn_get_symbol("NetCon"), 2); + nrn_get_steered_property_ptr(nc, "weight")[0] = 0.5; + *nrn_get_steered_property_ptr(nc, "delay") = 0; + + auto vec = nrn_new_object(nrn_get_symbol("Vector"), 0); + + // nc.record(vec) + nrn_push_object(vec); + nrn_call_method(nc, nrn_get_method_symbol(nc, "record"), 1); + // TODO: record probably put something on the stack that should be removed + + // setup recording + v = nrn_new_object(nrn_get_symbol("Vector"), 0); + nrn_push_double_ptr(nrn_get_rangevar_ptr(soma, nrn_get_symbol("v"), 0.5)); + nrn_call_method(v, nrn_get_method_symbol(v, "record"), 1); + nrn_unref_object(nrn_pop_object()); // record returns the vector + t = nrn_new_object(nrn_get_symbol("Vector"), 0); + nrn_push_double_ptr(nrn_get_symbol_ptr(nrn_get_symbol("t"))); + nrn_call_method(t, nrn_get_method_symbol(t, "record"), 1); + nrn_unref_object(nrn_pop_object()); // record returns the vector + + // finitialize(-65) + nrn_push_double(-65); + nrn_call_function(nrn_get_symbol("finitialize"), 1); + nrn_pop_double(); + + // continuerun(100) + nrn_push_double(100); + nrn_call_function(nrn_get_symbol("continuerun"), 1); + nrn_pop_double(); + + double* tvec = nrn_vector_data_ptr(t); + double* vvec = nrn_vector_data_ptr(v); + ofstream out_file; + out_file.open("netcon.csv"); + for (auto i = 0; i < nrn_vector_capacity(t); i++) { + out_file << tvec[i] << "," << vvec[i] << endl; + } + out_file.close(); + cout << "Results saved to netcon.csv" << endl; + + dlclose(handle); +} \ No newline at end of file From 5631706b1a2d968f7645167161c6db23fe7c7453 Mon Sep 17 00:00:00 2001 From: "Robert A. McDougal" Date: Wed, 17 May 2023 23:06:34 -0400 Subject: [PATCH 29/65] support for .so files in addition to .dylib --- test/api/hh_sim.cpp | 7 +++++-- test/api/makefile | 8 +++++++- test/api/netcon.cpp | 27 +++++++++++++++------------ test/api/sections.c | 7 +++++-- test/api/vclamp.cpp | 7 +++++-- 5 files changed, 37 insertions(+), 19 deletions(-) diff --git a/test/api/hh_sim.cpp b/test/api/hh_sim.cpp index 3155717d0e..879806f908 100644 --- a/test/api/hh_sim.cpp +++ b/test/api/hh_sim.cpp @@ -16,8 +16,11 @@ extern "C" void modl_reg(){}; void setup_neuron_api(void) { void* handle = dlopen("libnrniv.dylib", RTLD_NOW | RTLD_LOCAL); if (!handle) { - cout << "Couldn't open dylib." << endl << dlerror() << endl; - exit(-1); + handle = dlopen("libnrniv.so", RTLD_NOW | RTLD_LOCAL); + if (!handle) { + cout << "Couldn't open NEURON library." << endl << dlerror() << endl; + exit(-1); + } } nrn_init = reinterpret_cast(dlsym(handle, "nrn_init")); assert(nrn_init); diff --git a/test/api/makefile b/test/api/makefile index ec2262615c..b60ad68af2 100644 --- a/test/api/makefile +++ b/test/api/makefile @@ -29,6 +29,12 @@ vclamp: vclamp.cpp sections: sections.c $(CC) $(CCFLAGS) sections.c -o sections -# TODO: dynamic lookup is probably not possible on Windows +# TODO: dynamic lookup is probably not possible on Windows; need to have a +# version of the library available during linking (but won't have to be +# embedded) netcon: netcon.cpp $(CXX) $(CXXFLAGS) -undefined dynamic_lookup netcon.cpp -o netcon + +# TODO: introspection example + +# TODO: morphology example with PlotShape \ No newline at end of file diff --git a/test/api/netcon.cpp b/test/api/netcon.cpp index e817fee9ed..dc142b35de 100644 --- a/test/api/netcon.cpp +++ b/test/api/netcon.cpp @@ -17,15 +17,15 @@ typedef struct SymbolTableIterator SymbolTableIterator; typedef struct Symlist Symlist; extern "C" { -int nrn_init(int argc, const char **argv); -void nrn_push_str(char **str); -void nrn_call_function(Symbol *sym, int narg); +int nrn_init(int argc, const char** argv); +void nrn_push_str(char** str); +void nrn_call_function(Symbol* sym, int narg); double nrn_pop_double(void); -Section *nrn_new_section(char const *const name); +Section* nrn_new_section(char const* const name); Symbol* nrn_get_symbol(char const* const name); void nrn_insert_mechanism(Section* sec, Symbol* mechanism); Object* nrn_new_object(Symbol* sym, int narg); -void nrn_call_method(Object *obj, Symbol *method_sym, int narg); +void nrn_call_method(Object* obj, Symbol* method_sym, int narg); double* nrn_get_pp_property_ptr(Object* pp, const char* name); void nrn_push_double(double val); void nrn_push_object(Object* obj); @@ -42,7 +42,7 @@ double* nrn_get_symbol_ptr(Symbol* sym); static const char* argv[] = {"netcon", "-nogui", "-nopython", nullptr}; -extern "C" void modl_reg() {}; +extern "C" void modl_reg(){}; int main(void) { Object* v; @@ -50,10 +50,13 @@ int main(void) { char* temp_str; // Note: cannot use RTLD_LOCAL here - void* handle = dlopen("libnrniv.dylib", RTLD_NOW); + void* handle = dlopen("libnrniv.dylib", RTLD_NOW); if (!handle) { - cout << "Couldn't open dylib." << endl << dlerror() << endl; - exit(-1); + handle = dlopen("libnrniv.so", RTLD_NOW); + if (!handle) { + cout << "Couldn't open NEURON library." << endl << dlerror() << endl; + exit(-1); + } } nrn_init(3, argv); @@ -83,8 +86,8 @@ int main(void) { // syn = h.ExpSyn(soma(0.5)) nrn_push_double(0.5); auto syn = nrn_new_object(nrn_get_symbol("ExpSyn"), 1); - *nrn_get_pp_property_ptr(syn, "tau") = 3; // 3 ms timeconstant - *nrn_get_pp_property_ptr(syn, "e") = 0; // 0 mV reversal potential (excitatory synapse) + *nrn_get_pp_property_ptr(syn, "tau") = 3; // 3 ms timeconstant + *nrn_get_pp_property_ptr(syn, "e") = 0; // 0 mV reversal potential (excitatory synapse) // nc = h.NetCon(ns, syn) nrn_push_object(ns); @@ -92,7 +95,7 @@ int main(void) { auto nc = nrn_new_object(nrn_get_symbol("NetCon"), 2); nrn_get_steered_property_ptr(nc, "weight")[0] = 0.5; *nrn_get_steered_property_ptr(nc, "delay") = 0; - + auto vec = nrn_new_object(nrn_get_symbol("Vector"), 0); // nc.record(vec) diff --git a/test/api/sections.c b/test/api/sections.c index 8ea718754e..9873e02842 100644 --- a/test/api/sections.c +++ b/test/api/sections.c @@ -12,8 +12,11 @@ void modl_reg(){}; void setup_neuron_api(void) { void* handle = dlopen("libnrniv.dylib", RTLD_NOW | RTLD_LOCAL); if (!handle) { - printf("Couldn't open dylib.\n%s\n", dlerror()); - exit(-1); + handle = dlopen("libnrniv.so", RTLD_NOW | RTLD_LOCAL); + if (!handle) { + printf("Couldn't open NEURON library.\n%s\n", dlerror()); + exit(-1); + } } nrn_init = (int (*)(int, const char**))(dlsym(handle, "nrn_init")); assert(nrn_init); /* NOTE: this function only exists in versions of NEURON with the API defined diff --git a/test/api/vclamp.cpp b/test/api/vclamp.cpp index d3a291e59d..ee938e626e 100644 --- a/test/api/vclamp.cpp +++ b/test/api/vclamp.cpp @@ -16,8 +16,11 @@ extern "C" void modl_reg(){}; void setup_neuron_api(void) { void* handle = dlopen("libnrniv.dylib", RTLD_NOW | RTLD_LOCAL); if (!handle) { - cout << "Couldn't open dylib." << endl << dlerror() << endl; - exit(-1); + handle = dlopen("libnrniv.so", RTLD_NOW | RTLD_LOCAL); + if (!handle) { + cout << "Couldn't open NEURON library." << endl << dlerror() << endl; + exit(-1); + } } nrn_init = reinterpret_cast(dlsym(handle, "nrn_init")); assert(nrn_init); From 87028b31c530182324701c43f0d6cdbaedea5da6 Mon Sep 17 00:00:00 2001 From: Robert A McDougal Date: Thu, 18 May 2023 16:42:14 -0400 Subject: [PATCH 30/65] removed an excess const We'll still treat the pointer as const, but the user has no reason to care. --- src/nrniv/neuronapi.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/nrniv/neuronapi.h b/src/nrniv/neuronapi.h index dd924d9e00..3a1f3e45ac 100644 --- a/src/nrniv/neuronapi.h +++ b/src/nrniv/neuronapi.h @@ -52,7 +52,7 @@ nrn_Item* (*nrn_get_sectionlist_data)(Object* obj); * Segments ****************************************/ int (*nrn_get_nseg)(Section const* sec); -void (*nrn_set_nseg)(Section* const sec, int nseg); +void (*nrn_set_nseg)(Section* sec, int nseg); void (*nrn_set_segment_diam)(Section* sec, double x, double diam); double* (*nrn_get_rangevar_ptr)(Section* sec, Symbol* sym, double x); @@ -108,4 +108,4 @@ Symlist* (*nrn_get_global_symbol_table)(void); #ifdef __cplusplus } -#endif \ No newline at end of file +#endif From 0c85738673fcd683878b6087c9362b79eda08674 Mon Sep 17 00:00:00 2001 From: Olli Lupton Date: Sun, 25 Jun 2023 03:40:25 +0200 Subject: [PATCH 31/65] Add Robert's API tests to CTest (#2365) * build + run tests * fixups * different fixup * missing #include * add -rdynamic * bugfix flagged by ASan --- CMakeLists.txt | 6 +- src/nrniv/neuronapi.cpp | 2 +- test/CMakeLists.txt | 5 + test/api/CMakeLists.txt | 35 + test/api/hh_sim.cpp | 2 + test/api/makefile | 40 - test/api/ref/hh_sim.csv | 401 ++++ test/api/ref/netcon.csv | 4001 +++++++++++++++++++++++++++++++++++++++ test/api/ref/vclamp.csv | 241 +++ test/api/vclamp.cpp | 2 + 10 files changed, 4693 insertions(+), 42 deletions(-) create mode 100644 test/api/CMakeLists.txt delete mode 100644 test/api/makefile create mode 100644 test/api/ref/hh_sim.csv create mode 100644 test/api/ref/netcon.csv create mode 100644 test/api/ref/vclamp.csv diff --git a/CMakeLists.txt b/CMakeLists.txt index a880ce155f..f8a21f700e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -598,7 +598,11 @@ endfunction() set(NRN_RUN_FROM_BUILD_DIR_ENV "NEURONHOME=${PROJECT_BINARY_DIR}/share/nrn" "NRNHOME=${PROJECT_BINARY_DIR}") prepend_to_var(PATH "${PROJECT_BINARY_DIR}/bin") -prepend_to_var(LD_LIBRARY_PATH "${PROJECT_BINARY_DIR}/lib") +if(APPLE) + prepend_to_var(DYLD_LIBRARY_PATH "${PROJECT_BINARY_DIR}/lib") +else() + prepend_to_var(LD_LIBRARY_PATH "${PROJECT_BINARY_DIR}/lib") +endif() if(NRN_ENABLE_CORENEURON) list(APPEND NRN_RUN_FROM_BUILD_DIR_ENV "CORENRNHOME=${PROJECT_BINARY_DIR}") endif() diff --git a/src/nrniv/neuronapi.cpp b/src/nrniv/neuronapi.cpp index ea162affc0..7b775cd6fe 100644 --- a/src/nrniv/neuronapi.cpp +++ b/src/nrniv/neuronapi.cpp @@ -94,7 +94,7 @@ Section* nrn_new_section(char const* const name) { // TODO: check for memory leaks; should we free the symbol, pitm, etc? Symbol* symbol = new Symbol; auto pitm = new nrn_Item*; - char* name_ptr = new char[strlen(name)]; + char* name_ptr = new char[strlen(name) + 1]; strcpy(name_ptr, name); symbol->name = name_ptr; symbol->type = 1; diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index ae90d68b85..2008d7be03 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -29,6 +29,11 @@ foreach(target ${catch2_targets}) endif() endforeach() +# ============================================================================= +# API test executables +# ============================================================================= +add_subdirectory(api) + # ============================================================================= # Copy necessary hoc files to build directory if they have not been copied yet # ============================================================================= diff --git a/test/api/CMakeLists.txt b/test/api/CMakeLists.txt new file mode 100644 index 0000000000..a5c843450c --- /dev/null +++ b/test/api/CMakeLists.txt @@ -0,0 +1,35 @@ +# These produce reference files called hh_sim.csv and so on +set(api_tests_with_reference_files hh_sim.cpp netcon.cpp vclamp.cpp) +set(api_tests_without_reference_files sections.c) +set(api_tests ${api_tests_with_reference_files} ${api_tests_without_reference_files}) +foreach(api_test_file hh_sim.cpp netcon.cpp sections.c vclamp.cpp) + string(REPLACE "." "_" api_test_name "${api_test_file}") + add_executable(${api_test_name} ${api_test_file}) + cpp_cc_configure_sanitizers(TARGET ${api_test_name}) + target_link_libraries(${api_test_name} ${CMAKE_DL_LIBS}) + target_link_options(${api_test_name} PRIVATE -rdynamic) + set(test_name "api::${api_test_name}") + add_test(NAME "${test_name}" COMMAND ${api_test_name}) + set_property(TEST "${test_name}" PROPERTY ENVIRONMENT "${NRN_RUN_FROM_BUILD_DIR_ENV}") + if(api_test_file IN_LIST api_tests_with_reference_files) + get_filename_component(basename "${api_test_file}" NAME_WLE) + add_test(NAME "${test_name}::comparison" + COMMAND diff ${basename}.csv ${CMAKE_CURRENT_SOURCE_DIR}/ref/${basename}.csv) + set_tests_properties("${test_name}::comparison" PROPERTIES DEPENDS "${test_name}") + endif() +endforeach() + +# The netcon.cpp file is a test of doing: +# ~~~ +# extern "C" void foo(); // no definition of this is linked +# int main() { +# ... = dlopen("libnrniv...", ...); // loads definition of foo() +# foo(); +# } +# ~~~ +# which requires special options to allow an executable with undefined symbols to be linked. +if(APPLE) + target_link_options(netcon_cpp PRIVATE -undefined dynamic_lookup) +else() + target_link_options(netcon_cpp PRIVATE -Wl,--unresolved-symbols=ignore-all) +endif() diff --git a/test/api/hh_sim.cpp b/test/api/hh_sim.cpp index 879806f908..7c22c9edd2 100644 --- a/test/api/hh_sim.cpp +++ b/test/api/hh_sim.cpp @@ -1,6 +1,8 @@ // NOTE: this assumes neuronapi.h is on your CPLUS_INCLUDE_PATH #include "neuronapi.h" #include + +#include #include #include #include diff --git a/test/api/makefile b/test/api/makefile deleted file mode 100644 index b60ad68af2..0000000000 --- a/test/api/makefile +++ /dev/null @@ -1,40 +0,0 @@ -ifeq ($(OS),Windows_NT) - UNAME_S := Windows -else - UNAME_S := $(shell uname -s) -endif - - -ifeq ($(UNAME_S),Linux) - CXXFLAGS = -g -rdynamic -Wl,--no-as-needed -ldl -Wall - CCFLAGS = -g -rdynamic -Wl,--no-as-needed -ldl -Wall - CXXFLAGSNOLINKER = -g -Wl,--no-as-needed -ldl -Wall -endif -ifeq ($(UNAME_S),Darwin) - CXXFLAGS = -std=c++14 -g -rdynamic -ldl -Wall - CCFLAGS = -g -rdynamic -ldl -Wall - CXXFLAGSNOLINKER = -std=c++14 -g -Wall -endif - -# TODO: handle Windows (mingw?) - -all: hh_sim vclamp sections netcon - -hh_sim: hh_sim.cpp - $(CXX) $(CXXFLAGS) hh_sim.cpp -o hh_sim - -vclamp: vclamp.cpp - $(CXX) $(CXXFLAGS) vclamp.cpp -o vclamp - -sections: sections.c - $(CC) $(CCFLAGS) sections.c -o sections - -# TODO: dynamic lookup is probably not possible on Windows; need to have a -# version of the library available during linking (but won't have to be -# embedded) -netcon: netcon.cpp - $(CXX) $(CXXFLAGS) -undefined dynamic_lookup netcon.cpp -o netcon - -# TODO: introspection example - -# TODO: morphology example with PlotShape \ No newline at end of file diff --git a/test/api/ref/hh_sim.csv b/test/api/ref/hh_sim.csv new file mode 100644 index 0000000000..bb08dec305 --- /dev/null +++ b/test/api/ref/hh_sim.csv @@ -0,0 +1,401 @@ +0,-65 +0.025,-64.9993 +0.05,-64.9985 +0.075,-64.9978 +0.1,-64.9971 +0.125,-64.9964 +0.15,-64.9957 +0.175,-64.995 +0.2,-64.9943 +0.225,-64.9937 +0.25,-64.993 +0.275,-64.9923 +0.3,-64.9917 +0.325,-64.991 +0.35,-64.9904 +0.375,-64.9898 +0.4,-64.9891 +0.425,-64.9885 +0.45,-64.9879 +0.475,-64.9873 +0.5,-64.9867 +0.525,-64.9861 +0.55,-64.9855 +0.575,-64.9849 +0.6,-64.9843 +0.625,-64.9838 +0.65,-64.9832 +0.675,-64.9826 +0.7,-64.9821 +0.725,-64.9815 +0.75,-64.981 +0.775,-64.9804 +0.8,-64.9799 +0.825,-64.9793 +0.85,-64.9788 +0.875,-64.9783 +0.9,-64.9778 +0.925,-64.9772 +0.95,-64.9767 +0.975,-64.9762 +1,-64.9757 +1.025,-62.6267 +1.05,-60.3155 +1.075,-58.0385 +1.1,-55.7926 +1.125,-55.9213 +1.15,-56.0344 +1.175,-56.1325 +1.2,-56.2154 +1.225,-56.2832 +1.25,-56.3361 +1.275,-56.3744 +1.3,-56.3988 +1.325,-56.4098 +1.35,-56.4079 +1.375,-56.3937 +1.4,-56.3679 +1.425,-56.331 +1.45,-56.2835 +1.475,-56.2259 +1.5,-56.1586 +1.525,-56.0819 +1.55,-55.9962 +1.575,-55.9017 +1.6,-55.7985 +1.625,-55.6867 +1.65,-55.5664 +1.675,-55.4374 +1.7,-55.2998 +1.725,-55.1532 +1.75,-54.9975 +1.775,-54.8322 +1.8,-54.6571 +1.825,-54.4715 +1.85,-54.2749 +1.875,-54.0666 +1.9,-53.8458 +1.925,-53.6115 +1.95,-53.3627 +1.975,-53.0983 +2,-52.8168 +2.025,-52.5166 +2.05,-52.1959 +2.075,-51.8527 +2.1,-51.4847 +2.125,-51.089 +2.15,-50.6627 +2.175,-50.202 +2.2,-49.7028 +2.225,-49.1601 +2.25,-48.5684 +2.275,-47.9207 +2.3,-47.2093 +2.325,-46.4247 +2.35,-45.5556 +2.375,-44.5887 +2.4,-43.5079 +2.425,-42.2936 +2.45,-40.9222 +2.475,-39.3652 +2.5,-37.5878 +2.525,-35.548 +2.55,-33.1954 +2.575,-30.4703 +2.6,-27.3042 +2.625,-23.6215 +2.65,-19.3467 +2.675,-14.4178 +2.7,-8.81037 +2.725,-2.5739 +2.75,4.1292 +2.775,11.0022 +2.8,17.6417 +2.825,23.6253 +2.85,28.6267 +2.875,32.4957 +2.9,35.2621 +2.925,37.0784 +2.95,38.1456 +2.975,38.6564 +3,38.7679 +3.025,38.5958 +3.05,38.2201 +3.075,37.6939 +3.1,37.0523 +3.125,36.3185 +3.15,35.5081 +3.175,34.6321 +3.2,33.6988 +3.225,32.7148 +3.25,31.6855 +3.275,30.6155 +3.3,29.5092 +3.325,28.3703 +3.35,27.2026 +3.375,26.0092 +3.4,24.7935 +3.425,23.5584 +3.45,22.3065 +3.475,21.0406 +3.5,19.763 +3.525,18.4761 +3.55,17.1818 +3.575,15.8821 +3.6,14.5789 +3.625,13.2736 +3.65,11.9679 +3.675,10.6629 +3.7,9.36008 +3.725,8.06035 +3.75,6.76472 +3.775,5.47404 +3.8,4.18907 +3.825,2.91045 +3.85,1.63876 +3.875,0.374448 +3.9,-0.882072 +3.925,-2.13048 +3.95,-3.37053 +3.975,-4.60203 +4,-5.82484 +4.025,-7.0389 +4.05,-8.24417 +4.075,-9.44068 +4.1,-10.6285 +4.125,-11.8078 +4.15,-12.9786 +4.175,-14.1412 +4.2,-15.2959 +4.225,-16.4429 +4.25,-17.5826 +4.275,-18.7154 +4.3,-19.8418 +4.325,-20.9622 +4.35,-22.0774 +4.375,-23.1879 +4.4,-24.2945 +4.425,-25.3982 +4.45,-26.4999 +4.475,-27.6007 +4.5,-28.7019 +4.525,-29.8049 +4.55,-30.9112 +4.575,-32.0225 +4.6,-33.1408 +4.625,-34.2682 +4.65,-35.407 +4.675,-36.5597 +4.7,-37.7289 +4.725,-38.9175 +4.75,-40.1286 +4.775,-41.3653 +4.8,-42.6308 +4.825,-43.9283 +4.85,-45.261 +4.875,-46.6315 +4.9,-48.0421 +4.925,-49.4944 +4.95,-50.9887 +4.975,-52.5241 +5,-54.0973 +5.025,-55.7031 +5.05,-57.3332 +5.075,-58.9761 +5.1,-60.617 +5.125,-62.2382 +5.15,-63.8196 +5.175,-65.3398 +5.2,-66.7778 +5.225,-68.115 +5.25,-69.3363 +5.275,-70.432 +5.3,-71.3983 +5.325,-72.2365 +5.35,-72.9529 +5.375,-73.5572 +5.4,-74.0612 +5.425,-74.4775 +5.45,-74.8186 +5.475,-75.0963 +5.5,-75.3211 +5.525,-75.5022 +5.55,-75.6476 +5.575,-75.7638 +5.6,-75.8563 +5.625,-75.9297 +5.65,-75.9875 +5.675,-76.0327 +5.7,-76.0678 +5.725,-76.0947 +5.75,-76.1148 +5.775,-76.1296 +5.8,-76.1399 +5.825,-76.1466 +5.85,-76.1504 +5.875,-76.1518 +5.9,-76.1512 +5.925,-76.1489 +5.95,-76.1453 +5.975,-76.1405 +6,-76.1348 +6.025,-76.1283 +6.05,-76.1211 +6.075,-76.1133 +6.1,-76.1051 +6.125,-76.0964 +6.15,-76.0873 +6.175,-76.0779 +6.2,-76.0682 +6.225,-76.0582 +6.25,-76.0481 +6.275,-76.0377 +6.3,-76.0271 +6.325,-76.0163 +6.35,-76.0053 +6.375,-75.9942 +6.4,-75.9829 +6.425,-75.9715 +6.45,-75.96 +6.475,-75.9483 +6.5,-75.9365 +6.525,-75.9245 +6.55,-75.9125 +6.575,-75.9003 +6.6,-75.8879 +6.625,-75.8755 +6.65,-75.863 +6.675,-75.8503 +6.7,-75.8375 +6.725,-75.8246 +6.75,-75.8116 +6.775,-75.7985 +6.8,-75.7852 +6.825,-75.7718 +6.85,-75.7584 +6.875,-75.7448 +6.9,-75.7311 +6.925,-75.7172 +6.95,-75.7033 +6.975,-75.6893 +7,-75.6751 +7.025,-75.6608 +7.05,-75.6464 +7.075,-75.6319 +7.1,-75.6173 +7.125,-75.6025 +7.15,-75.5877 +7.175,-75.5727 +7.2,-75.5576 +7.225,-75.5424 +7.25,-75.5271 +7.275,-75.5117 +7.3,-75.4961 +7.325,-75.4805 +7.35,-75.4647 +7.375,-75.4488 +7.4,-75.4328 +7.425,-75.4166 +7.45,-75.4004 +7.475,-75.384 +7.5,-75.3675 +7.525,-75.3509 +7.55,-75.3342 +7.575,-75.3173 +7.6,-75.3004 +7.625,-75.2833 +7.65,-75.2661 +7.675,-75.2488 +7.7,-75.2314 +7.725,-75.2138 +7.75,-75.1962 +7.775,-75.1784 +7.8,-75.1605 +7.825,-75.1425 +7.85,-75.1244 +7.875,-75.1061 +7.9,-75.0878 +7.925,-75.0693 +7.95,-75.0507 +7.975,-75.032 +8,-75.0131 +8.025,-74.9942 +8.05,-74.9751 +8.075,-74.9559 +8.1,-74.9367 +8.125,-74.9172 +8.15,-74.8977 +8.175,-74.8781 +8.2,-74.8583 +8.225,-74.8385 +8.25,-74.8185 +8.275,-74.7984 +8.3,-74.7782 +8.325,-74.7578 +8.35,-74.7374 +8.375,-74.7168 +8.4,-74.6962 +8.425,-74.6754 +8.45,-74.6545 +8.475,-74.6335 +8.5,-74.6124 +8.525,-74.5912 +8.55,-74.5699 +8.575,-74.5484 +8.6,-74.5269 +8.625,-74.5052 +8.65,-74.4834 +8.675,-74.4616 +8.7,-74.4396 +8.725,-74.4175 +8.75,-74.3953 +8.775,-74.373 +8.8,-74.3506 +8.825,-74.3281 +8.85,-74.3055 +8.875,-74.2828 +8.9,-74.2599 +8.925,-74.237 +8.95,-74.214 +8.975,-74.1909 +9,-74.1676 +9.025,-74.1443 +9.05,-74.1209 +9.075,-74.0973 +9.1,-74.0737 +9.125,-74.05 +9.15,-74.0262 +9.175,-74.0023 +9.2,-73.9783 +9.225,-73.9542 +9.25,-73.93 +9.275,-73.9057 +9.3,-73.8813 +9.325,-73.8568 +9.35,-73.8322 +9.375,-73.8076 +9.4,-73.7828 +9.425,-73.758 +9.45,-73.7331 +9.475,-73.7081 +9.5,-73.683 +9.525,-73.6578 +9.55,-73.6325 +9.575,-73.6072 +9.6,-73.5818 +9.625,-73.5563 +9.65,-73.5307 +9.675,-73.505 +9.7,-73.4792 +9.725,-73.4534 +9.75,-73.4275 +9.775,-73.4015 +9.8,-73.3755 +9.825,-73.3493 +9.85,-73.3231 +9.875,-73.2968 +9.9,-73.2705 +9.925,-73.244 +9.95,-73.2175 +9.975,-73.191 +10,-73.1644 diff --git a/test/api/ref/netcon.csv b/test/api/ref/netcon.csv new file mode 100644 index 0000000000..dfd7643c0e --- /dev/null +++ b/test/api/ref/netcon.csv @@ -0,0 +1,4001 @@ +0,-65 +0.025,-64.9993 +0.05,-64.9985 +0.075,-64.9978 +0.1,-64.9971 +0.125,-64.9964 +0.15,-64.9957 +0.175,-64.995 +0.2,-64.9943 +0.225,-64.9937 +0.25,-64.993 +0.275,-64.9923 +0.3,-64.9917 +0.325,-64.991 +0.35,-64.9904 +0.375,-64.9898 +0.4,-64.9891 +0.425,-64.9885 +0.45,-64.9879 +0.475,-64.9873 +0.5,-64.9867 +0.525,-64.9861 +0.55,-64.9855 +0.575,-64.9849 +0.6,-64.9843 +0.625,-64.9838 +0.65,-64.9832 +0.675,-64.9826 +0.7,-64.9821 +0.725,-64.9815 +0.75,-64.981 +0.775,-64.9804 +0.8,-64.9799 +0.825,-64.9793 +0.85,-64.9788 +0.875,-64.9783 +0.9,-64.9778 +0.925,-64.9772 +0.95,-64.9767 +0.975,-64.9762 +1,-64.9757 +1.025,-64.9752 +1.05,-64.9747 +1.075,-64.9742 +1.1,-64.9738 +1.125,-64.9733 +1.15,-64.9728 +1.175,-64.9723 +1.2,-64.9719 +1.225,-64.9714 +1.25,-64.971 +1.275,-64.9705 +1.3,-64.9701 +1.325,-64.9696 +1.35,-64.9692 +1.375,-64.9688 +1.4,-64.9683 +1.425,-64.9679 +1.45,-64.9675 +1.475,-64.9671 +1.5,-64.9667 +1.525,-64.9663 +1.55,-64.9659 +1.575,-64.9655 +1.6,-64.9651 +1.625,-64.9647 +1.65,-64.9644 +1.675,-64.964 +1.7,-64.9636 +1.725,-64.9633 +1.75,-64.9629 +1.775,-64.9625 +1.8,-64.9622 +1.825,-64.9619 +1.85,-64.9615 +1.875,-64.9612 +1.9,-64.9609 +1.925,-64.9605 +1.95,-64.9602 +1.975,-64.9599 +2,-64.9596 +2.025,-64.9593 +2.05,-64.959 +2.075,-64.9587 +2.1,-64.9584 +2.125,-64.9581 +2.15,-64.9578 +2.175,-64.9576 +2.2,-64.9573 +2.225,-64.957 +2.25,-64.9568 +2.275,-64.9565 +2.3,-64.9562 +2.325,-64.956 +2.35,-64.9558 +2.375,-64.9555 +2.4,-64.9553 +2.425,-64.9551 +2.45,-64.9548 +2.475,-64.9546 +2.5,-64.9544 +2.525,-64.9542 +2.55,-64.954 +2.575,-64.9538 +2.6,-64.9536 +2.625,-64.9534 +2.65,-64.9532 +2.675,-64.953 +2.7,-64.9528 +2.725,-64.9526 +2.75,-64.9525 +2.775,-64.9523 +2.8,-64.9521 +2.825,-64.952 +2.85,-64.9518 +2.875,-64.9516 +2.9,-64.9515 +2.925,-64.9514 +2.95,-64.9512 +2.975,-64.9511 +3,-64.9509 +3.025,-64.9508 +3.05,-64.9507 +3.075,-64.9506 +3.1,-64.9505 +3.125,-64.9503 +3.15,-64.9502 +3.175,-64.9501 +3.2,-64.95 +3.225,-64.9499 +3.25,-64.9498 +3.275,-64.9497 +3.3,-64.9497 +3.325,-64.9496 +3.35,-64.9495 +3.375,-64.9494 +3.4,-64.9493 +3.425,-64.9493 +3.45,-64.9492 +3.475,-64.9492 +3.5,-64.9491 +3.525,-64.949 +3.55,-64.949 +3.575,-64.9489 +3.6,-64.9489 +3.625,-64.9489 +3.65,-64.9488 +3.675,-64.9488 +3.7,-64.9488 +3.725,-64.9487 +3.75,-64.9487 +3.775,-64.9487 +3.8,-64.9487 +3.825,-64.9486 +3.85,-64.9486 +3.875,-64.9486 +3.9,-64.9486 +3.925,-64.9486 +3.95,-64.9486 +3.975,-64.9486 +4,-64.9486 +4.025,-64.9486 +4.05,-64.9486 +4.075,-64.9487 +4.1,-64.9487 +4.125,-64.9487 +4.15,-64.9487 +4.175,-64.9487 +4.2,-64.9488 +4.225,-64.9488 +4.25,-64.9488 +4.275,-64.9489 +4.3,-64.9489 +4.325,-64.9489 +4.35,-64.949 +4.375,-64.949 +4.4,-64.9491 +4.425,-64.9491 +4.45,-64.9492 +4.475,-64.9492 +4.5,-64.9493 +4.525,-64.9494 +4.55,-64.9494 +4.575,-64.9495 +4.6,-64.9496 +4.625,-64.9496 +4.65,-64.9497 +4.675,-64.9498 +4.7,-64.9498 +4.725,-64.9499 +4.75,-64.95 +4.775,-64.9501 +4.8,-64.9502 +4.825,-64.9502 +4.85,-64.9503 +4.875,-64.9504 +4.9,-64.9505 +4.925,-64.9506 +4.95,-64.9507 +4.975,-64.9508 +5,-64.9509 +5.025,-64.951 +5.05,-64.9511 +5.075,-64.9512 +5.1,-64.9513 +5.125,-64.9514 +5.15,-64.9515 +5.175,-64.9516 +5.2,-64.9517 +5.225,-64.9518 +5.25,-64.952 +5.275,-64.9521 +5.3,-64.9522 +5.325,-64.9523 +5.35,-64.9524 +5.375,-64.9526 +5.4,-64.9527 +5.425,-64.9528 +5.45,-64.9529 +5.475,-64.953 +5.5,-64.9532 +5.525,-64.9533 +5.55,-64.9534 +5.575,-64.9536 +5.6,-64.9537 +5.625,-64.9538 +5.65,-64.954 +5.675,-64.9541 +5.7,-64.9542 +5.725,-64.9544 +5.75,-64.9545 +5.775,-64.9546 +5.8,-64.9548 +5.825,-64.9549 +5.85,-64.9551 +5.875,-64.9552 +5.9,-64.9553 +5.925,-64.9555 +5.95,-64.9556 +5.975,-64.9558 +6,-64.9559 +6.025,-64.9561 +6.05,-64.9562 +6.075,-64.9564 +6.1,-64.9565 +6.125,-64.9567 +6.15,-64.9568 +6.175,-64.9569 +6.2,-64.9571 +6.225,-64.9572 +6.25,-64.9574 +6.275,-64.9575 +6.3,-64.9577 +6.325,-64.9579 +6.35,-64.958 +6.375,-64.9582 +6.4,-64.9583 +6.425,-64.9585 +6.45,-64.9586 +6.475,-64.9588 +6.5,-64.9589 +6.525,-64.9591 +6.55,-64.9592 +6.575,-64.9594 +6.6,-64.9595 +6.625,-64.9597 +6.65,-64.9598 +6.675,-64.96 +6.7,-64.9602 +6.725,-64.9603 +6.75,-64.9605 +6.775,-64.9606 +6.8,-64.9608 +6.825,-64.9609 +6.85,-64.9611 +6.875,-64.9612 +6.9,-64.9614 +6.925,-64.9616 +6.95,-64.9617 +6.975,-64.9619 +7,-64.962 +7.025,-64.9622 +7.05,-64.9623 +7.075,-64.9625 +7.1,-64.9626 +7.125,-64.9628 +7.15,-64.9629 +7.175,-64.9631 +7.2,-64.9632 +7.225,-64.9634 +7.25,-64.9636 +7.275,-64.9637 +7.3,-64.9639 +7.325,-64.964 +7.35,-64.9642 +7.375,-64.9643 +7.4,-64.9645 +7.425,-64.9646 +7.45,-64.9648 +7.475,-64.9649 +7.5,-64.9651 +7.525,-64.4608 +7.55,-63.9725 +7.575,-63.4992 +7.6,-63.04 +7.625,-62.5942 +7.65,-62.161 +7.675,-61.7397 +7.7,-60.8568 +7.725,-60.0055 +7.75,-59.1835 +7.775,-58.3885 +7.8,-57.618 +7.825,-56.8694 +7.85,-56.1402 +7.875,-55.4275 +7.9,-54.7283 +7.925,-54.0392 +7.95,-53.3566 +7.975,-52.6767 +8,-51.9952 +8.025,-51.3073 +8.05,-50.6077 +8.075,-49.8906 +8.1,-49.1493 +8.125,-48.3762 +8.15,-47.563 +8.175,-46.6995 +8.2,-45.7744 +8.225,-44.7741 +8.25,-43.6827 +8.275,-42.4811 +8.3,-41.1466 +8.325,-39.6515 +8.35,-37.9624 +8.375,-36.0386 +8.4,-33.8309 +8.425,-31.2801 +8.45,-28.3166 +8.475,-24.8606 +8.5,-20.827 +8.525,-16.1355 +8.55,-10.7316 +8.575,-4.62164 +8.6,2.08138 +8.625,9.1196 +8.65,16.0937 +8.675,22.537 +8.7,28.0444 +8.725,32.3864 +8.75,35.5435 +8.775,37.6563 +8.8,38.9389 +8.825,39.6072 +8.85,39.8397 +8.875,39.7679 +8.9,39.4819 +8.925,39.0405 +8.95,38.4814 +8.975,37.8289 +9,37.099 +9.025,36.3026 +9.05,35.4477 +9.075,34.5405 +9.1,33.5861 +9.125,32.5888 +9.15,31.5527 +9.175,30.4812 +9.2,29.3779 +9.225,28.246 +9.25,27.0884 +9.275,25.908 +9.3,24.7077 +9.325,23.4899 +9.35,22.2572 +9.375,21.0117 +9.4,19.7558 +9.425,18.4914 +9.45,17.2203 +9.475,15.9444 +9.5,14.6652 +9.525,13.3842 +9.55,12.1028 +9.575,10.8222 +9.6,9.5435 +9.625,8.26776 +9.65,6.99587 +9.675,5.72861 +9.7,4.46672 +9.725,3.2108 +9.75,1.96141 +9.775,0.718992 +9.8,-0.516048 +9.825,-1.74339 +9.85,-2.96277 +9.875,-4.174 +9.9,-5.37691 +9.925,-6.57142 +9.95,-7.75747 +9.975,-8.93505 +10,-10.1042 +10.025,-11.265 +10.05,-12.4176 +10.075,-13.5621 +10.1,-14.6988 +10.125,-15.8278 +10.15,-16.9495 +10.175,-18.0642 +10.2,-19.1722 +10.225,-20.2741 +10.25,-21.3703 +10.275,-22.4615 +10.3,-23.5482 +10.325,-24.6312 +10.35,-25.7113 +10.375,-26.7895 +10.4,-27.8669 +10.425,-28.9446 +10.45,-30.0239 +10.475,-31.1064 +10.5,-32.1936 +10.525,-33.2872 +10.55,-34.3894 +10.575,-35.5021 +10.6,-36.6277 +10.625,-37.7686 +10.65,-38.9274 +10.675,-40.1068 +10.7,-41.3097 +10.725,-42.5389 +10.75,-43.7971 +10.775,-45.087 +10.8,-46.4108 +10.825,-47.7705 +10.85,-49.1671 +10.875,-50.6007 +10.9,-52.07 +10.925,-53.5721 +10.95,-55.1018 +10.975,-56.6516 +11,-58.2112 +11.025,-59.7676 +11.05,-61.305 +11.075,-62.8058 +11.1,-64.2511 +11.125,-65.6225 +11.15,-66.9028 +11.175,-68.0783 +11.2,-69.1393 +11.225,-70.081 +11.25,-70.9035 +11.275,-71.6112 +11.3,-72.2119 +11.325,-72.7155 +11.35,-73.1333 +11.375,-73.4766 +11.4,-73.7564 +11.425,-73.9829 +11.45,-74.1649 +11.475,-74.3104 +11.5,-74.4258 +11.525,-74.5167 +11.55,-74.5878 +11.575,-74.6428 +11.6,-74.6848 +11.625,-74.7162 +11.65,-74.7391 +11.675,-74.7551 +11.7,-74.7655 +11.725,-74.7714 +11.75,-74.7735 +11.775,-74.7727 +11.8,-74.7695 +11.825,-74.7642 +11.85,-74.7573 +11.875,-74.749 +11.9,-74.7396 +11.925,-74.7292 +11.95,-74.7181 +11.975,-74.7063 +12,-74.694 +12.025,-74.6812 +12.05,-74.668 +12.075,-74.6545 +12.1,-74.6407 +12.125,-74.6266 +12.15,-74.6123 +12.175,-74.5977 +12.2,-74.583 +12.225,-74.5682 +12.25,-74.5532 +12.275,-74.538 +12.3,-74.5228 +12.325,-74.5074 +12.35,-74.4919 +12.375,-74.4763 +12.4,-74.4606 +12.425,-74.4448 +12.45,-74.4289 +12.475,-74.4129 +12.5,-74.3968 +12.525,-74.3807 +12.55,-74.3645 +12.575,-74.3481 +12.6,-74.3318 +12.625,-74.3153 +12.65,-74.2987 +12.675,-74.2821 +12.7,-74.2654 +12.725,-74.2486 +12.75,-74.2318 +12.775,-74.2149 +12.8,-74.1979 +12.825,-74.1808 +12.85,-74.1637 +12.875,-74.1465 +12.9,-74.1292 +12.925,-74.1118 +12.95,-74.0944 +12.975,-74.0769 +13,-74.0594 +13.025,-74.0417 +13.05,-74.024 +13.075,-74.0062 +13.1,-73.9884 +13.125,-73.9705 +13.15,-73.9525 +13.175,-73.9345 +13.2,-73.9164 +13.225,-73.8982 +13.25,-73.8799 +13.275,-73.8616 +13.3,-73.8432 +13.325,-73.8248 +13.35,-73.2783 +13.375,-72.7885 +13.4,-72.349 +13.425,-71.954 +13.45,-71.5983 +13.475,-71.2777 +13.5,-70.9882 +13.525,-70.7264 +13.55,-70.4893 +13.575,-70.2743 +13.6,-70.0789 +13.625,-69.9011 +13.65,-69.739 +13.675,-69.5911 +13.7,-69.4559 +13.725,-69.332 +13.75,-69.2183 +13.775,-69.1139 +13.8,-69.0177 +13.825,-68.9291 +13.85,-68.8472 +13.875,-68.7713 +13.9,-68.7011 +13.925,-68.6358 +13.95,-68.575 +13.975,-68.5184 +14,-68.4655 +14.025,-68.416 +14.05,-68.3697 +14.075,-68.3261 +14.1,-68.2851 +14.125,-68.2465 +14.15,-68.2101 +14.175,-68.1756 +14.2,-68.1429 +14.225,-68.1119 +14.25,-68.0824 +14.275,-68.0543 +14.3,-68.0275 +14.325,-68.0019 +14.35,-67.9774 +14.375,-67.9539 +14.4,-67.9314 +14.425,-67.9097 +14.45,-67.8889 +14.475,-67.8688 +14.5,-67.8494 +14.525,-67.8306 +14.55,-67.8125 +14.575,-67.7949 +14.6,-67.7779 +14.625,-67.7613 +14.65,-67.7453 +14.675,-67.7296 +14.7,-67.7144 +14.725,-67.6996 +14.75,-67.6851 +14.775,-67.671 +14.8,-67.6572 +14.825,-67.6438 +14.85,-67.6306 +14.875,-67.6177 +14.9,-67.605 +14.925,-67.5927 +14.95,-67.5805 +14.975,-67.5686 +15,-67.5569 +15.025,-67.5454 +15.05,-67.5341 +15.075,-67.5231 +15.1,-67.5122 +15.125,-67.5014 +15.15,-67.4909 +15.175,-67.4805 +15.2,-67.4703 +15.225,-67.4602 +15.25,-67.4503 +15.275,-67.4405 +15.3,-67.4308 +15.325,-67.4213 +15.35,-67.412 +15.375,-67.4027 +15.4,-66.8912 +15.425,-66.4152 +15.45,-65.9722 +15.475,-65.5597 +15.5,-65.1756 +15.525,-64.8177 +15.55,-64.4842 +15.575,-64.1734 +15.6,-63.8835 +15.625,-63.6133 +15.65,-63.3612 +15.675,-63.1261 +15.7,-62.9067 +15.725,-62.7019 +15.75,-62.5107 +15.775,-62.3323 +15.8,-62.1657 +15.825,-62.01 +15.85,-61.8647 +15.875,-61.7289 +15.9,-61.6021 +15.925,-61.4836 +15.95,-61.373 +15.975,-61.2696 +16,-61.173 +16.025,-61.0829 +16.05,-60.9987 +16.075,-60.9202 +16.1,-60.847 +16.125,-60.7787 +16.15,-60.7151 +16.175,-60.656 +16.2,-60.601 +16.225,-60.55 +16.25,-60.5027 +16.275,-60.4589 +16.3,-60.4185 +16.325,-60.3814 +16.35,-60.3472 +16.375,-60.316 +16.4,-60.2876 +16.425,-60.2618 +16.45,-60.2386 +16.475,-60.2178 +16.5,-60.1994 +16.525,-60.1833 +16.55,-60.1693 +16.575,-60.1574 +16.6,-60.1476 +16.625,-60.1397 +16.65,-60.1337 +16.675,-60.1296 +16.7,-60.1272 +16.725,-60.1266 +16.75,-60.1276 +16.775,-60.1303 +16.8,-60.1346 +16.825,-60.1404 +16.85,-60.1477 +16.875,-60.1565 +16.9,-60.1667 +16.925,-60.1783 +16.95,-60.1912 +16.975,-60.2054 +17,-60.221 +17.025,-60.2377 +17.05,-60.2557 +17.075,-60.2749 +17.1,-60.2953 +17.125,-60.3167 +17.15,-60.3393 +17.175,-60.3629 +17.2,-60.3875 +17.225,-60.4132 +17.25,-60.4398 +17.275,-60.4674 +17.3,-60.4959 +17.325,-60.5254 +17.35,-60.5556 +17.375,-60.5868 +17.4,-60.6187 +17.425,-60.6514 +17.45,-60.6849 +17.475,-60.7192 +17.5,-60.7541 +17.525,-60.7897 +17.55,-60.826 +17.575,-60.8629 +17.6,-60.9004 +17.625,-60.9385 +17.65,-60.9772 +17.675,-61.0163 +17.7,-61.056 +17.725,-61.0962 +17.75,-61.1368 +17.775,-61.1778 +17.8,-60.758 +17.825,-60.3656 +17.85,-59.9983 +17.875,-59.6541 +17.9,-59.3309 +17.925,-59.0273 +17.95,-58.7414 +17.975,-58.4721 +18,-58.2178 +18.025,-57.9774 +18.05,-57.7497 +18.075,-57.5337 +18.1,-57.3284 +18.125,-57.1329 +18.15,-56.9463 +18.175,-56.7679 +18.2,-56.5968 +18.225,-56.4325 +18.25,-56.2743 +18.275,-56.1215 +18.3,-55.9737 +18.325,-55.4122 +18.35,-54.8822 +18.375,-54.3799 +18.4,-53.9018 +18.425,-53.4446 +18.45,-53.0052 +18.475,-52.5806 +18.5,-52.1678 +18.525,-51.7641 +18.55,-51.3669 +18.575,-50.9733 +18.6,-50.5808 +18.625,-50.1867 +18.65,-49.7883 +18.675,-49.383 +18.7,-48.968 +18.725,-48.5403 +18.75,-48.097 +18.775,-47.6349 +18.8,-47.1503 +18.825,-46.6396 +18.85,-46.0986 +18.875,-45.5227 +18.9,-44.9068 +18.925,-44.245 +18.95,-43.5307 +18.975,-42.7565 +19,-41.9139 +19.025,-40.9928 +19.05,-39.9821 +19.075,-38.8686 +19.1,-37.6374 +19.125,-36.2714 +19.15,-34.7509 +19.175,-33.0541 +19.2,-31.1568 +19.225,-29.0327 +19.25,-26.6549 +19.275,-23.9974 +19.3,-21.0379 +19.325,-17.7626 +19.35,-14.1722 +19.375,-10.2891 +19.4,-6.16524 +19.425,-1.88703 +19.45,2.42539 +19.475,6.62737 +19.5,10.5677 +19.525,14.1108 +19.55,17.157 +19.575,19.653 +19.6,21.5922 +19.625,23.0049 +19.65,23.9455 +19.675,24.4786 +19.7,24.6701 +19.725,24.5799 +19.75,24.2601 +19.775,23.7537 +19.8,23.0957 +19.825,22.3141 +19.85,21.4312 +19.875,20.465 +19.9,19.4301 +19.925,18.3381 +19.95,17.1992 +19.975,16.0214 +20,14.8118 +20.025,13.5764 +20.05,12.3205 +20.075,11.0484 +20.1,9.76415 +20.125,8.47113 +20.15,7.17233 +20.175,5.87036 +20.2,4.56748 +20.225,3.26566 +20.25,1.96661 +20.275,0.671801 +20.3,-0.617521 +20.325,-1.90029 +20.35,-3.17561 +20.375,-4.44275 +20.4,-5.70109 +20.425,-6.95016 +20.45,-8.18958 +20.475,-9.41909 +20.5,-10.6385 +20.525,-11.8477 +20.55,-13.0467 +20.575,-14.2355 +20.6,-15.4143 +20.625,-16.5831 +20.65,-17.7424 +20.675,-18.8923 +20.7,-20.0333 +20.725,-21.1658 +20.75,-22.2903 +20.775,-23.4075 +20.8,-24.5181 +20.825,-25.6228 +20.85,-26.7225 +20.875,-27.8184 +20.9,-28.9114 +20.925,-30.0028 +20.95,-31.0941 +20.975,-32.1867 +21,-33.2824 +21.025,-34.3829 +21.05,-35.4902 +21.075,-36.6063 +21.1,-37.7336 +21.125,-38.8743 +21.15,-40.0308 +21.175,-41.2057 +21.2,-42.4013 +21.225,-43.62 +21.25,-44.8641 +21.275,-46.1355 +21.3,-47.4357 +21.325,-48.7656 +21.35,-50.1251 +21.375,-51.5133 +21.4,-52.9276 +21.425,-54.3641 +21.45,-55.8168 +21.475,-57.2775 +21.5,-58.7361 +21.525,-60.1803 +21.55,-61.5961 +21.575,-62.9684 +21.6,-64.282 +21.625,-65.5224 +21.65,-66.6768 +21.675,-67.7355 +21.7,-68.6923 +21.725,-69.5444 +21.75,-70.2929 +21.775,-70.9422 +21.8,-71.4987 +21.825,-71.9708 +21.85,-72.3675 +21.875,-72.6982 +21.9,-72.9718 +21.925,-73.1968 +21.95,-72.9078 +21.975,-72.6753 +22,-72.4866 +22.025,-72.3321 +22.05,-72.2044 +22.075,-72.0979 +22.1,-72.0081 +22.125,-71.9316 +22.15,-71.8658 +22.175,-71.8084 +22.2,-71.7579 +22.225,-71.7129 +22.25,-71.6723 +22.275,-71.6353 +22.3,-71.6012 +22.325,-71.5695 +22.35,-71.5397 +22.375,-71.5115 +22.4,-71.4846 +22.425,-71.4588 +22.45,-71.4338 +22.475,-71.4095 +22.5,-71.3859 +22.525,-71.3627 +22.55,-71.34 +22.575,-71.3176 +22.6,-71.2954 +22.625,-71.2736 +22.65,-71.2519 +22.675,-71.2304 +22.7,-71.2091 +22.725,-71.1879 +22.75,-71.1668 +22.775,-71.1458 +22.8,-71.125 +22.825,-71.1041 +22.85,-71.0834 +22.875,-71.0627 +22.9,-71.0421 +22.925,-71.0215 +22.95,-71.001 +22.975,-70.9805 +23,-70.9601 +23.025,-70.9397 +23.05,-70.9194 +23.075,-70.8991 +23.1,-70.8788 +23.125,-70.8586 +23.15,-70.8385 +23.175,-70.8183 +23.2,-70.7982 +23.225,-70.7782 +23.25,-70.7582 +23.275,-70.7382 +23.3,-70.7183 +23.325,-70.6984 +23.35,-70.6785 +23.375,-70.6587 +23.4,-70.6389 +23.425,-70.6192 +23.45,-70.5995 +23.475,-70.5798 +23.5,-70.5602 +23.525,-70.5407 +23.55,-70.5211 +23.575,-70.5017 +23.6,-70.4822 +23.625,-70.4628 +23.65,-70.4435 +23.675,-70.4242 +23.7,-70.4049 +23.725,-70.3857 +23.75,-70.3666 +23.775,-70.3475 +23.8,-70.3284 +23.825,-70.3094 +23.85,-70.2904 +23.875,-70.2715 +23.9,-70.2526 +23.925,-70.2338 +23.95,-70.215 +23.975,-70.1963 +24,-70.1776 +24.025,-70.159 +24.05,-70.1404 +24.075,-70.1219 +24.1,-70.1034 +24.125,-70.085 +24.15,-70.0667 +24.175,-70.0484 +24.2,-70.0301 +24.225,-70.0119 +24.25,-69.9938 +24.275,-69.9757 +24.3,-69.9576 +24.325,-69.9396 +24.35,-69.9217 +24.375,-69.9038 +24.4,-69.886 +24.425,-69.8683 +24.45,-69.8505 +24.475,-69.8329 +24.5,-69.8153 +24.525,-69.7978 +24.55,-69.7803 +24.575,-69.7629 +24.6,-69.7455 +24.625,-69.7282 +24.65,-69.7109 +24.675,-69.6938 +24.7,-69.6766 +24.725,-69.6595 +24.75,-69.6425 +24.775,-69.6256 +24.8,-69.6087 +24.825,-69.5918 +24.85,-69.575 +24.875,-69.5583 +24.9,-69.5417 +24.925,-69.5251 +24.95,-69.5085 +24.975,-69.492 +25,-69.4756 +25.025,-69.4592 +25.05,-69.4429 +25.075,-69.4267 +25.1,-69.4105 +25.125,-69.3944 +25.15,-69.3783 +25.175,-69.3623 +25.2,-69.3463 +25.225,-69.3304 +25.25,-69.3146 +25.275,-69.2988 +25.3,-69.2831 +25.325,-69.2675 +25.35,-69.2519 +25.375,-69.2364 +25.4,-69.2209 +25.425,-69.2055 +25.45,-69.1901 +25.475,-69.1749 +25.5,-69.1596 +25.525,-69.1445 +25.55,-69.1293 +25.575,-69.1143 +25.6,-69.0993 +25.625,-69.0844 +25.65,-69.0695 +25.675,-69.0547 +25.7,-69.0399 +25.725,-69.0252 +25.75,-69.0106 +25.775,-68.996 +25.8,-68.9815 +25.825,-68.967 +25.85,-68.9526 +25.875,-68.9383 +25.9,-68.924 +25.925,-68.9098 +25.95,-68.8956 +25.975,-68.8815 +26,-68.8674 +26.025,-68.8534 +26.05,-68.8395 +26.075,-68.8256 +26.1,-68.8118 +26.125,-68.798 +26.15,-68.7843 +26.175,-68.7706 +26.2,-68.757 +26.225,-68.7435 +26.25,-68.73 +26.275,-68.7166 +26.3,-68.7032 +26.325,-68.6899 +26.35,-68.6766 +26.375,-68.6634 +26.4,-68.6502 +26.425,-68.6371 +26.45,-68.6241 +26.475,-68.6111 +26.5,-68.5981 +26.525,-68.5853 +26.55,-68.5724 +26.575,-68.5596 +26.6,-68.5469 +26.625,-68.5342 +26.65,-68.5216 +26.675,-68.509 +26.7,-68.4965 +26.725,-68.484 +26.75,-68.4716 +26.775,-68.4593 +26.8,-68.4469 +26.825,-68.4347 +26.85,-68.4225 +26.875,-68.4103 +26.9,-68.3982 +26.925,-68.3861 +26.95,-68.3741 +26.975,-68.3621 +27,-68.3502 +27.025,-68.3383 +27.05,-68.3265 +27.075,-68.3147 +27.1,-68.303 +27.125,-68.2913 +27.15,-68.2797 +27.175,-68.2681 +27.2,-68.2565 +27.225,-68.245 +27.25,-68.2336 +27.275,-68.2222 +27.3,-68.2108 +27.325,-68.1995 +27.35,-68.1883 +27.375,-68.177 +27.4,-68.1658 +27.425,-68.1547 +27.45,-68.1436 +27.475,-68.1326 +27.5,-68.1216 +27.525,-68.1106 +27.55,-68.0997 +27.575,-68.0888 +27.6,-68.0779 +27.625,-68.0671 +27.65,-68.0564 +27.675,-68.0457 +27.7,-68.035 +27.725,-68.0244 +27.75,-68.0138 +27.775,-68.0032 +27.8,-67.9927 +27.825,-67.9822 +27.85,-67.9718 +27.875,-67.9614 +27.9,-67.951 +27.925,-67.9407 +27.95,-67.9304 +27.975,-67.9201 +28,-67.9099 +28.025,-67.8998 +28.05,-67.8896 +28.075,-67.8795 +28.1,-67.8694 +28.125,-67.8594 +28.15,-67.8494 +28.175,-67.8395 +28.2,-67.8295 +28.225,-67.8196 +28.25,-67.8098 +28.275,-67.8 +28.3,-67.7902 +28.325,-67.7804 +28.35,-67.7707 +28.375,-67.761 +28.4,-67.7513 +28.425,-67.7417 +28.45,-67.7321 +28.475,-67.7225 +28.5,-67.713 +28.525,-67.7035 +28.55,-67.694 +28.575,-67.6846 +28.6,-67.6752 +28.625,-67.6658 +28.65,-67.6565 +28.675,-67.6471 +28.7,-67.6379 +28.725,-67.6286 +28.75,-67.6194 +28.775,-67.6101 +28.8,-67.601 +28.825,-67.5918 +28.85,-67.5827 +28.875,-67.5736 +28.9,-67.5645 +28.925,-67.5555 +28.95,-67.5465 +28.975,-67.5375 +29,-67.5285 +29.025,-67.5196 +29.05,-67.5107 +29.075,-67.5018 +29.1,-67.493 +29.125,-67.4841 +29.15,-67.4753 +29.175,-67.4665 +29.2,-67.4578 +29.225,-67.449 +29.25,-67.4403 +29.275,-67.4316 +29.3,-67.423 +29.325,-67.4143 +29.35,-67.4057 +29.375,-67.3971 +29.4,-67.3886 +29.425,-67.38 +29.45,-67.3715 +29.475,-67.363 +29.5,-67.3545 +29.525,-67.346 +29.55,-67.3376 +29.575,-67.3292 +29.6,-67.3208 +29.625,-67.3124 +29.65,-67.304 +29.675,-67.2957 +29.7,-67.2874 +29.725,-67.2791 +29.75,-67.2708 +29.775,-67.2626 +29.8,-67.2543 +29.825,-67.2461 +29.85,-67.2379 +29.875,-67.2297 +29.9,-67.2216 +29.925,-67.2134 +29.95,-67.2053 +29.975,-67.1972 +30,-67.1891 +30.025,-67.181 +30.05,-67.173 +30.075,-67.1649 +30.1,-67.1569 +30.125,-67.1489 +30.15,-67.1409 +30.175,-67.133 +30.2,-67.125 +30.225,-67.1171 +30.25,-67.1092 +30.275,-67.1013 +30.3,-67.0934 +30.325,-67.0855 +30.35,-67.0777 +30.375,-67.0698 +30.4,-67.062 +30.425,-67.0542 +30.45,-67.0464 +30.475,-67.0387 +30.5,-67.0309 +30.525,-67.0232 +30.55,-67.0154 +30.575,-67.0077 +30.6,-67 +30.625,-66.9923 +30.65,-66.9847 +30.675,-66.977 +30.7,-66.9694 +30.725,-66.9617 +30.75,-66.9541 +30.775,-66.9465 +30.8,-66.9389 +30.825,-66.9314 +30.85,-66.9238 +30.875,-66.9163 +30.9,-66.9087 +30.925,-66.9012 +30.95,-66.8937 +30.975,-66.8862 +31,-66.8788 +31.025,-66.8713 +31.05,-66.8638 +31.075,-66.8564 +31.1,-66.849 +31.125,-66.8416 +31.15,-66.8342 +31.175,-66.8268 +31.2,-66.8194 +31.225,-66.812 +31.25,-66.8047 +31.275,-66.7974 +31.3,-66.79 +31.325,-66.7827 +31.35,-66.7754 +31.375,-66.7681 +31.4,-66.7609 +31.425,-66.7536 +31.45,-66.7463 +31.475,-66.7391 +31.5,-66.7319 +31.525,-66.7247 +31.55,-66.7174 +31.575,-66.7103 +31.6,-66.7031 +31.625,-66.6959 +31.65,-66.6887 +31.675,-66.6816 +31.7,-66.6745 +31.725,-66.6673 +31.75,-66.6602 +31.775,-66.6531 +31.8,-66.646 +31.825,-66.6389 +31.85,-66.6319 +31.875,-66.6248 +31.9,-66.6178 +31.925,-66.6107 +31.95,-66.6037 +31.975,-66.5967 +32,-66.5897 +32.025,-66.5827 +32.05,-66.5757 +32.075,-66.5687 +32.1,-66.5618 +32.125,-66.5548 +32.15,-66.5479 +32.175,-66.541 +32.2,-66.5341 +32.225,-66.5272 +32.25,-66.5203 +32.275,-66.5134 +32.3,-66.5065 +32.325,-66.4997 +32.35,-66.4928 +32.375,-66.486 +32.4,-66.4791 +32.425,-66.4723 +32.45,-66.4655 +32.475,-66.4587 +32.5,-66.4519 +32.525,-66.4452 +32.55,-66.4384 +32.575,-66.4316 +32.6,-66.4249 +32.625,-66.4182 +32.65,-66.4115 +32.675,-66.4047 +32.7,-66.398 +32.725,-66.3914 +32.75,-66.3847 +32.775,-66.378 +32.8,-66.3714 +32.825,-66.3647 +32.85,-66.3581 +32.875,-66.3515 +32.9,-66.3449 +32.925,-66.3383 +32.95,-66.3317 +32.975,-66.3251 +33,-66.3185 +33.025,-66.312 +33.05,-66.3054 +33.075,-66.2989 +33.1,-66.2924 +33.125,-66.2859 +33.15,-66.2794 +33.175,-66.2729 +33.2,-66.2664 +33.225,-66.26 +33.25,-66.2535 +33.275,-66.2471 +33.3,-66.2406 +33.325,-66.2342 +33.35,-66.2278 +33.375,-66.2214 +33.4,-66.215 +33.425,-66.2087 +33.45,-66.2023 +33.475,-66.1959 +33.5,-66.1896 +33.525,-66.1833 +33.55,-66.177 +33.575,-66.1707 +33.6,-66.1644 +33.625,-66.1581 +33.65,-66.1518 +33.675,-66.1456 +33.7,-66.1393 +33.725,-66.1331 +33.75,-66.1269 +33.775,-66.1207 +33.8,-66.1145 +33.825,-66.1083 +33.85,-66.1021 +33.875,-66.096 +33.9,-66.0898 +33.925,-66.0837 +33.95,-66.0776 +33.975,-66.0715 +34,-66.0654 +34.025,-66.0593 +34.05,-66.0532 +34.075,-66.0472 +34.1,-66.0411 +34.125,-66.0351 +34.15,-66.0291 +34.175,-66.0231 +34.2,-66.0171 +34.225,-66.0111 +34.25,-66.0052 +34.275,-65.9992 +34.3,-65.9933 +34.325,-65.9873 +34.35,-65.9814 +34.375,-65.9755 +34.4,-65.9696 +34.425,-65.9638 +34.45,-65.9579 +34.475,-65.9521 +34.5,-65.9462 +34.525,-65.9404 +34.55,-65.9346 +34.575,-65.9288 +34.6,-65.923 +34.625,-65.9173 +34.65,-65.9115 +34.675,-65.9058 +34.7,-65.9001 +34.725,-65.8944 +34.75,-65.8887 +34.775,-65.883 +34.8,-65.8773 +34.825,-65.8717 +34.85,-65.866 +34.875,-65.8604 +34.9,-65.8548 +34.925,-65.8492 +34.95,-65.8436 +34.975,-65.8381 +35,-65.8325 +35.025,-65.827 +35.05,-65.8215 +35.075,-65.816 +35.1,-65.8105 +35.125,-65.805 +35.15,-65.7995 +35.175,-65.7941 +35.2,-65.7887 +35.225,-65.273 +35.25,-64.774 +35.275,-64.291 +35.3,-63.8231 +35.325,-63.3695 +35.35,-62.9297 +35.375,-62.5029 +35.4,-62.0884 +35.425,-61.6855 +35.45,-61.2935 +35.475,-60.9119 +35.5,-60.5399 +35.525,-60.1768 +35.55,-59.8219 +35.575,-59.4746 +35.6,-59.1342 +35.625,-58.7999 +35.65,-58.471 +35.675,-58.1467 +35.7,-57.8263 +35.725,-57.509 +35.75,-57.194 +35.775,-56.8804 +35.8,-56.5674 +35.825,-56.254 +35.85,-55.9393 +35.875,-55.6223 +35.9,-55.302 +35.925,-54.9771 +35.95,-54.6466 +35.975,-54.3092 +36,-53.9633 +36.025,-53.6077 +36.05,-53.2405 +36.075,-52.86 +36.1,-52.4641 +36.125,-52.0508 +36.15,-51.6173 +36.175,-51.161 +36.2,-50.6786 +36.225,-50.1665 +36.25,-49.6205 +36.275,-49.0357 +36.3,-48.4066 +36.325,-47.7266 +36.35,-46.988 +36.375,-46.1817 +36.4,-45.297 +36.425,-44.3209 +36.45,-43.2382 +36.475,-42.0303 +36.5,-40.6747 +36.525,-39.1444 +36.55,-37.4065 +36.575,-35.4216 +36.6,-33.1421 +36.625,-30.5119 +36.65,-27.4664 +36.675,-23.9341 +36.7,-19.8426 +36.725,-15.1298 +36.75,-9.76516 +36.775,-3.78132 +36.8,2.68946 +36.825,9.39073 +36.85,15.9569 +36.875,21.9832 +36.9,27.1304 +36.925,31.2105 +36.95,34.2083 +36.975,36.2408 +37,37.4896 +37.025,38.1422 +37.05,38.3592 +37.075,38.2631 +37.1,37.9411 +37.125,37.4526 +37.15,36.8372 +37.175,36.1213 +37.2,35.3229 +37.225,34.4546 +37.25,33.5257 +37.275,32.5434 +37.3,31.5138 +37.325,30.4418 +37.35,29.3321 +37.375,28.1887 +37.4,27.0155 +37.425,25.8159 +37.45,24.5933 +37.475,23.3508 +37.5,22.0913 +37.525,20.8174 +37.55,19.5317 +37.575,18.2365 +37.6,16.9341 +37.625,15.6263 +37.65,14.315 +37.675,13.002 +37.7,11.6887 +37.725,10.3765 +37.75,9.0667 +37.775,7.76036 +37.8,6.45848 +37.825,5.16194 +37.85,3.8715 +37.875,2.58784 +37.9,1.31151 +37.925,0.0430043 +37.95,-1.21729 +37.975,-2.46904 +38,-3.712 +38.025,-4.94598 +38.05,-6.17085 +38.075,-7.38653 +38.1,-8.59302 +38.125,-9.79034 +38.15,-10.9786 +38.175,-12.1578 +38.2,-13.3283 +38.225,-14.4901 +38.25,-15.6436 +38.275,-16.7891 +38.3,-17.9269 +38.325,-19.0574 +38.35,-20.1812 +38.375,-21.2987 +38.4,-22.4105 +38.425,-23.5174 +38.45,-24.6201 +38.475,-25.7195 +38.5,-26.8166 +38.525,-27.9125 +38.55,-29.0085 +38.575,-30.106 +38.6,-31.2064 +38.625,-32.3116 +38.65,-33.4234 +38.675,-34.5438 +38.7,-35.6752 +38.725,-36.8199 +38.75,-37.9805 +38.775,-39.1597 +38.8,-40.3606 +38.825,-41.5859 +38.85,-42.8388 +38.875,-44.1222 +38.9,-45.4388 +38.925,-46.7911 +38.95,-48.1811 +38.975,-49.6097 +39,-51.077 +39.025,-52.5816 +39.05,-54.1201 +39.075,-55.6869 +39.1,-57.2737 +39.125,-58.8693 +39.15,-60.4595 +39.175,-62.0274 +39.2,-63.5544 +39.225,-65.0205 +39.25,-66.4066 +39.275,-67.6955 +39.3,-68.8738 +39.325,-69.9325 +39.35,-70.8681 +39.375,-71.6819 +39.4,-72.3796 +39.425,-72.9701 +39.45,-73.4641 +39.475,-73.8735 +39.5,-74.2099 +39.525,-74.4843 +39.55,-74.707 +39.575,-74.8865 +39.6,-75.0307 +39.625,-75.1459 +39.65,-75.2374 +39.675,-75.3097 +39.7,-75.3663 +39.725,-75.4103 +39.75,-75.444 +39.775,-75.4693 +39.8,-75.4879 +39.825,-75.501 +39.85,-75.5095 +39.875,-75.5144 +39.9,-75.5163 +39.925,-75.5157 +39.95,-75.5131 +39.975,-75.5088 +40,-75.5031 +40.025,-75.4962 +40.05,-75.4884 +40.075,-75.4797 +40.1,-75.4704 +40.125,-75.4605 +40.15,-75.45 +40.175,-75.4392 +40.2,-75.4279 +40.225,-75.4164 +40.25,-75.4045 +40.275,-75.3924 +40.3,-75.3801 +40.325,-75.3675 +40.35,-75.3548 +40.375,-75.3419 +40.4,-75.3288 +40.425,-75.3156 +40.45,-75.3022 +40.475,-75.2887 +40.5,-75.2751 +40.525,-75.2614 +40.55,-75.2475 +40.575,-75.2335 +40.6,-75.2194 +40.625,-75.2052 +40.65,-75.1909 +40.675,-75.1765 +40.7,-75.162 +40.725,-75.1474 +40.75,-75.1327 +40.775,-75.1179 +40.8,-75.1029 +40.825,-75.0879 +40.85,-75.0728 +40.875,-75.0576 +40.9,-75.0423 +40.925,-75.0269 +40.95,-75.0114 +40.975,-74.9958 +41,-74.9801 +41.025,-74.9643 +41.05,-74.9484 +41.075,-74.9324 +41.1,-74.9163 +41.125,-74.9001 +41.15,-74.8839 +41.175,-74.8675 +41.2,-74.851 +41.225,-74.8345 +41.25,-74.8178 +41.275,-74.8011 +41.3,-74.7842 +41.325,-74.7673 +41.35,-74.7503 +41.375,-74.7331 +41.4,-74.7159 +41.425,-74.6986 +41.45,-74.6812 +41.475,-74.6637 +41.5,-74.6461 +41.525,-74.6284 +41.55,-74.6106 +41.575,-74.5927 +41.6,-74.5747 +41.625,-74.5566 +41.65,-74.5385 +41.675,-74.5202 +41.7,-74.5019 +41.725,-74.4834 +41.75,-74.4649 +41.775,-74.4462 +41.8,-74.4275 +41.825,-74.4087 +41.85,-74.3898 +41.875,-74.3708 +41.9,-74.3517 +41.925,-74.3325 +41.95,-74.3132 +41.975,-74.2939 +42,-74.2744 +42.025,-74.2549 +42.05,-74.2353 +42.075,-74.2155 +42.1,-74.1957 +42.125,-74.1758 +42.15,-74.1558 +42.175,-74.1357 +42.2,-74.1156 +42.225,-74.0953 +42.25,-74.075 +42.275,-74.0546 +42.3,-74.034 +42.325,-74.0135 +42.35,-73.9928 +42.375,-73.972 +42.4,-73.9511 +42.425,-73.9302 +42.45,-73.9092 +42.475,-73.8881 +42.5,-73.8669 +42.525,-73.8456 +42.55,-73.8243 +42.575,-73.8028 +42.6,-73.7813 +42.625,-73.7597 +42.65,-73.738 +42.675,-73.7163 +42.7,-73.6945 +42.725,-73.6725 +42.75,-73.6506 +42.775,-73.6285 +42.8,-73.6063 +42.825,-73.5841 +42.85,-73.5618 +42.875,-73.5395 +42.9,-72.9675 +42.925,-72.4329 +42.95,-71.933 +42.975,-71.4652 +43,-71.0273 +43.025,-70.617 +43.05,-70.2325 +43.075,-69.8718 +43.1,-69.5335 +43.125,-69.2159 +43.15,-68.9176 +43.175,-68.6374 +43.2,-68.374 +43.225,-67.6179 +43.25,-66.9138 +43.275,-66.2579 +43.3,-65.6467 +43.325,-65.0769 +43.35,-64.5457 +43.375,-64.0504 +43.4,-63.5884 +43.425,-63.1573 +43.45,-62.7549 +43.475,-62.3794 +43.5,-62.0286 +43.525,-61.701 +43.55,-61.3948 +43.575,-61.1085 +43.6,-60.8406 +43.625,-60.5899 +43.65,-60.3551 +43.675,-60.1349 +43.7,-59.9285 +43.725,-59.7346 +43.75,-59.5525 +43.775,-59.3812 +43.8,-59.2199 +43.825,-59.068 +43.85,-58.9246 +43.875,-58.7893 +43.9,-58.6613 +43.925,-58.5402 +43.95,-58.4255 +43.975,-58.3167 +44,-58.2134 +44.025,-58.1153 +44.05,-58.0219 +44.075,-57.933 +44.1,-57.8484 +44.125,-57.7676 +44.15,-57.6906 +44.175,-57.617 +44.2,-57.5468 +44.225,-57.4796 +44.25,-57.4155 +44.275,-57.3541 +44.3,-57.2954 +44.325,-57.2394 +44.35,-57.1857 +44.375,-57.1345 +44.4,-57.0856 +44.425,-57.0389 +44.45,-56.9943 +44.475,-56.9519 +44.5,-56.9115 +44.525,-56.8731 +44.55,-56.8367 +44.575,-56.8022 +44.6,-56.7696 +44.625,-56.7389 +44.65,-56.7101 +44.675,-56.6831 +44.7,-56.6579 +44.725,-56.6346 +44.75,-56.613 +44.775,-56.5933 +44.8,-56.5753 +44.825,-56.5592 +44.85,-56.5449 +44.875,-56.5324 +44.9,-56.5217 +44.925,-56.5128 +44.95,-56.5058 +44.975,-56.5005 +45,-56.4972 +45.025,-56.4957 +45.05,-56.4961 +45.075,-56.4983 +45.1,-56.5025 +45.125,-56.5086 +45.15,-56.5167 +45.175,-56.5267 +45.2,-56.5386 +45.225,-56.5526 +45.25,-56.5686 +45.275,-56.5866 +45.3,-56.6066 +45.325,-56.6287 +45.35,-56.6529 +45.375,-56.6792 +45.4,-56.7076 +45.425,-56.7381 +45.45,-56.7708 +45.475,-56.8056 +45.5,-56.8426 +45.525,-56.8818 +45.55,-56.9231 +45.575,-56.9667 +45.6,-57.0125 +45.625,-57.0605 +45.65,-57.1107 +45.675,-57.1631 +45.7,-57.2177 +45.725,-57.2746 +45.75,-57.3336 +45.775,-57.3948 +45.8,-57.4582 +45.825,-57.5238 +45.85,-57.5915 +45.875,-57.6613 +45.9,-57.7332 +45.925,-57.8072 +45.95,-57.8832 +45.975,-57.9612 +46,-58.0412 +46.025,-58.1231 +46.05,-58.2068 +46.075,-58.2923 +46.1,-58.3796 +46.125,-58.4687 +46.15,-58.5593 +46.175,-58.6515 +46.2,-58.7452 +46.225,-58.8404 +46.25,-58.9369 +46.275,-59.0347 +46.3,-59.1336 +46.325,-59.2337 +46.35,-59.3349 +46.375,-59.4369 +46.4,-59.5399 +46.425,-59.6435 +46.45,-59.7479 +46.475,-59.8528 +46.5,-59.9582 +46.525,-60.064 +46.55,-60.1701 +46.575,-60.2764 +46.6,-60.3828 +46.625,-60.4893 +46.65,-60.5956 +46.675,-60.7018 +46.7,-60.8078 +46.725,-60.9134 +46.75,-61.0185 +46.775,-61.1232 +46.8,-61.2273 +46.825,-61.3308 +46.85,-61.4335 +46.875,-61.5354 +46.9,-61.6365 +46.925,-61.7366 +46.95,-61.8358 +46.975,-61.9339 +47,-62.0309 +47.025,-62.1267 +47.05,-62.2214 +47.075,-62.3149 +47.1,-62.407 +47.125,-62.4979 +47.15,-62.5875 +47.175,-62.6756 +47.2,-62.7624 +47.225,-62.8478 +47.25,-62.9318 +47.275,-63.0143 +47.3,-63.0954 +47.325,-63.175 +47.35,-63.2532 +47.375,-63.3299 +47.4,-63.4051 +47.425,-63.4789 +47.45,-63.5512 +47.475,-63.622 +47.5,-63.6914 +47.525,-63.7593 +47.55,-63.8258 +47.575,-63.8909 +47.6,-63.9546 +47.625,-64.0169 +47.65,-64.0778 +47.675,-64.1373 +47.7,-64.1955 +47.725,-64.2524 +47.75,-64.308 +47.775,-64.3623 +47.8,-64.4153 +47.825,-64.4671 +47.85,-64.5177 +47.875,-64.567 +47.9,-64.6152 +47.925,-64.6623 +47.95,-64.7082 +47.975,-64.753 +48,-64.7967 +48.025,-64.8393 +48.05,-64.8809 +48.075,-64.9215 +48.1,-64.9611 +48.125,-64.9997 +48.15,-65.0373 +48.175,-65.074 +48.2,-65.1098 +48.225,-65.1447 +48.25,-65.1788 +48.275,-65.212 +48.3,-65.2443 +48.325,-65.2759 +48.35,-65.3066 +48.375,-65.3366 +48.4,-65.3659 +48.425,-65.3944 +48.45,-65.4222 +48.475,-65.4493 +48.5,-65.4757 +48.525,-65.5014 +48.55,-65.5265 +48.575,-65.551 +48.6,-65.5748 +48.625,-65.5981 +48.65,-65.6207 +48.675,-65.6428 +48.7,-65.6644 +48.725,-65.6854 +48.75,-65.7059 +48.775,-65.7258 +48.8,-65.7453 +48.825,-65.7642 +48.85,-65.7827 +48.875,-65.8008 +48.9,-65.8183 +48.925,-65.8355 +48.95,-65.8522 +48.975,-65.8685 +49,-65.8844 +49.025,-65.8999 +49.05,-65.915 +49.075,-65.9297 +49.1,-65.944 +49.125,-65.958 +49.15,-65.9717 +49.175,-65.985 +49.2,-65.9979 +49.225,-66.0106 +49.25,-66.0229 +49.275,-66.0349 +49.3,-66.0466 +49.325,-66.058 +49.35,-66.0692 +49.375,-66.08 +49.4,-66.0906 +49.425,-66.1009 +49.45,-66.1109 +49.475,-66.1207 +49.5,-66.1303 +49.525,-66.1396 +49.55,-66.1487 +49.575,-66.1575 +49.6,-66.1661 +49.625,-66.1745 +49.65,-66.1827 +49.675,-66.1906 +49.7,-66.1984 +49.725,-66.206 +49.75,-66.2133 +49.775,-66.2205 +49.8,-66.2275 +49.825,-66.2343 +49.85,-66.2409 +49.875,-66.2473 +49.9,-66.2536 +49.925,-66.2597 +49.95,-66.2656 +49.975,-66.2714 +50,-66.277 +50.025,-66.2825 +50.05,-66.2878 +50.075,-66.2929 +50.1,-66.298 +50.125,-66.3028 +50.15,-66.3076 +50.175,-66.3122 +50.2,-66.3166 +50.225,-66.321 +50.25,-66.3252 +50.275,-66.3293 +50.3,-66.3332 +50.325,-66.337 +50.35,-66.3408 +50.375,-66.3444 +50.4,-66.3478 +50.425,-66.3512 +50.45,-66.3545 +50.475,-66.3576 +50.5,-66.3607 +50.525,-66.3636 +50.55,-66.3665 +50.575,-66.3692 +50.6,-66.3719 +50.625,-66.3744 +50.65,-66.3769 +50.675,-66.3792 +50.7,-66.3815 +50.725,-66.3837 +50.75,-66.3858 +50.775,-66.3878 +50.8,-66.3897 +50.825,-66.3915 +50.85,-66.3933 +50.875,-66.3949 +50.9,-66.3965 +50.925,-66.398 +50.95,-66.3995 +50.975,-66.4008 +51,-66.4021 +51.025,-66.4033 +51.05,-66.4044 +51.075,-66.4055 +51.1,-66.4065 +51.125,-66.4074 +51.15,-66.4082 +51.175,-66.409 +51.2,-66.4097 +51.225,-66.4104 +51.25,-66.4109 +51.275,-66.4115 +51.3,-66.4119 +51.325,-66.4123 +51.35,-66.4126 +51.375,-66.4129 +51.4,-66.4131 +51.425,-66.4133 +51.45,-66.4134 +51.475,-66.4134 +51.5,-66.4134 +51.525,-66.4133 +51.55,-66.4132 +51.575,-66.413 +51.6,-66.4127 +51.625,-66.4124 +51.65,-66.4121 +51.675,-66.4117 +51.7,-66.4112 +51.725,-66.4107 +51.75,-66.4102 +51.775,-66.4096 +51.8,-66.4089 +51.825,-66.4083 +51.85,-66.4075 +51.875,-66.4067 +51.9,-66.4059 +51.925,-66.405 +51.95,-66.4041 +51.975,-66.4031 +52,-66.4021 +52.025,-66.401 +52.05,-66.3999 +52.075,-66.3988 +52.1,-66.3976 +52.125,-66.3964 +52.15,-66.3951 +52.175,-66.3938 +52.2,-66.3924 +52.225,-66.391 +52.25,-66.3896 +52.275,-66.3881 +52.3,-66.3866 +52.325,-66.3851 +52.35,-66.3835 +52.375,-66.3818 +52.4,-66.3802 +52.425,-66.3785 +52.45,-66.3767 +52.475,-66.375 +52.5,-66.3732 +52.525,-66.3713 +52.55,-66.3694 +52.575,-66.3675 +52.6,-66.3656 +52.625,-66.3636 +52.65,-66.3616 +52.675,-66.3596 +52.7,-66.3575 +52.725,-66.3554 +52.75,-66.3532 +52.775,-66.351 +52.8,-66.3488 +52.825,-66.3466 +52.85,-66.3443 +52.875,-66.342 +52.9,-66.3397 +52.925,-66.3373 +52.95,-66.335 +52.975,-66.3325 +53,-66.3301 +53.025,-66.3276 +53.05,-66.3251 +53.075,-66.3226 +53.1,-66.32 +53.125,-66.3174 +53.15,-66.3148 +53.175,-66.3122 +53.2,-66.3095 +53.225,-66.3068 +53.25,-66.3041 +53.275,-66.3014 +53.3,-66.2986 +53.325,-66.2958 +53.35,-66.293 +53.375,-66.2901 +53.4,-66.2873 +53.425,-66.2844 +53.45,-66.2815 +53.475,-66.2785 +53.5,-66.2755 +53.525,-66.2726 +53.55,-66.2695 +53.575,-66.2665 +53.6,-66.2635 +53.625,-66.2604 +53.65,-66.2573 +53.675,-66.2541 +53.7,-66.251 +53.725,-66.2478 +53.75,-66.2447 +53.775,-66.2414 +53.8,-66.2382 +53.825,-66.235 +53.85,-66.2317 +53.875,-66.2284 +53.9,-66.2251 +53.925,-66.2218 +53.95,-66.2184 +53.975,-66.2151 +54,-66.2117 +54.025,-66.2083 +54.05,-66.2049 +54.075,-66.2014 +54.1,-66.198 +54.125,-66.1945 +54.15,-66.191 +54.175,-66.1875 +54.2,-66.184 +54.225,-66.1804 +54.25,-66.1769 +54.275,-66.1733 +54.3,-66.1697 +54.325,-66.1661 +54.35,-66.1625 +54.375,-66.1588 +54.4,-66.1552 +54.425,-66.1515 +54.45,-66.1478 +54.475,-66.1441 +54.5,-66.1404 +54.525,-66.1367 +54.55,-66.1329 +54.575,-66.1292 +54.6,-66.1254 +54.625,-66.1216 +54.65,-66.1179 +54.675,-66.114 +54.7,-66.1102 +54.725,-66.1064 +54.75,-66.1025 +54.775,-66.0987 +54.8,-66.0948 +54.825,-66.0909 +54.85,-66.087 +54.875,-66.0831 +54.9,-66.0792 +54.925,-66.0753 +54.95,-66.0714 +54.975,-66.0674 +55,-66.0635 +55.025,-66.0595 +55.05,-66.0555 +55.075,-66.0515 +55.1,-66.0475 +55.125,-66.0435 +55.15,-66.0395 +55.175,-66.0355 +55.2,-66.0314 +55.225,-66.0274 +55.25,-66.0233 +55.275,-66.0193 +55.3,-66.0152 +55.325,-66.0111 +55.35,-66.007 +55.375,-66.003 +55.4,-65.9989 +55.425,-65.9948 +55.45,-65.9906 +55.475,-65.9865 +55.5,-65.9824 +55.525,-65.9783 +55.55,-65.9741 +55.575,-65.97 +55.6,-65.9658 +55.625,-65.9617 +55.65,-65.9575 +55.675,-65.9533 +55.7,-65.9491 +55.725,-65.945 +55.75,-65.9408 +55.775,-65.9366 +55.8,-65.9324 +55.825,-65.9282 +55.85,-65.924 +55.875,-65.9198 +55.9,-65.9156 +55.925,-65.9114 +55.95,-65.9071 +55.975,-65.9029 +56,-65.8987 +56.025,-65.8945 +56.05,-65.8902 +56.075,-65.886 +56.1,-65.8818 +56.125,-65.8775 +56.15,-65.8733 +56.175,-65.869 +56.2,-65.8648 +56.225,-65.8605 +56.25,-65.8563 +56.275,-65.852 +56.3,-65.8478 +56.325,-65.8435 +56.35,-65.8393 +56.375,-65.835 +56.4,-65.8308 +56.425,-65.8265 +56.45,-65.8223 +56.475,-65.818 +56.5,-65.8137 +56.525,-65.8095 +56.55,-65.8052 +56.575,-65.801 +56.6,-65.7967 +56.625,-65.7925 +56.65,-65.7882 +56.675,-65.784 +56.7,-65.7797 +56.725,-65.7755 +56.75,-65.7712 +56.775,-65.767 +56.8,-65.7627 +56.825,-65.7585 +56.85,-65.7542 +56.875,-65.75 +56.9,-65.7458 +56.925,-65.7415 +56.95,-65.7373 +56.975,-65.7331 +57,-65.7288 +57.025,-65.7246 +57.05,-65.7204 +57.075,-65.7162 +57.1,-65.712 +57.125,-65.7078 +57.15,-65.7036 +57.175,-65.6994 +57.2,-65.6952 +57.225,-65.691 +57.25,-65.6868 +57.275,-65.6826 +57.3,-65.6784 +57.325,-65.6742 +57.35,-65.6701 +57.375,-65.6659 +57.4,-65.6617 +57.425,-65.6576 +57.45,-65.6534 +57.475,-65.6493 +57.5,-65.6451 +57.525,-65.641 +57.55,-65.6369 +57.575,-65.6328 +57.6,-65.6286 +57.625,-65.6245 +57.65,-65.6204 +57.675,-65.6163 +57.7,-65.6122 +57.725,-65.6082 +57.75,-65.6041 +57.775,-65.6 +57.8,-65.596 +57.825,-65.5919 +57.85,-65.5879 +57.875,-65.5838 +57.9,-65.5798 +57.925,-65.5758 +57.95,-65.5717 +57.975,-65.5677 +58,-65.5637 +58.025,-65.5597 +58.05,-65.5558 +58.075,-65.5518 +58.1,-65.5478 +58.125,-65.5438 +58.15,-65.5399 +58.175,-65.536 +58.2,-65.532 +58.225,-65.5281 +58.25,-65.5242 +58.275,-65.5203 +58.3,-65.5164 +58.325,-65.5125 +58.35,-65.5086 +58.375,-65.5047 +58.4,-65.5009 +58.425,-65.497 +58.45,-65.4932 +58.475,-65.4894 +58.5,-65.4855 +58.525,-65.4817 +58.55,-65.4779 +58.575,-65.4742 +58.6,-65.4704 +58.625,-65.4666 +58.65,-65.4628 +58.675,-65.4591 +58.7,-65.4554 +58.725,-65.4516 +58.75,-65.4479 +58.775,-65.4442 +58.8,-65.4405 +58.825,-65.4369 +58.85,-65.4332 +58.875,-65.4295 +58.9,-65.4259 +58.925,-65.4223 +58.95,-65.4186 +58.975,-65.415 +59,-65.4114 +59.025,-65.4078 +59.05,-65.4043 +59.075,-65.4007 +59.1,-65.3971 +59.125,-65.3936 +59.15,-65.3901 +59.175,-65.3866 +59.2,-65.3831 +59.225,-65.3796 +59.25,-65.3761 +59.275,-65.3726 +59.3,-65.3692 +59.325,-65.3658 +59.35,-65.3623 +59.375,-65.3589 +59.4,-65.3555 +59.425,-65.3521 +59.45,-65.3488 +59.475,-65.3454 +59.5,-65.3421 +59.525,-65.3387 +59.55,-65.3354 +59.575,-65.3321 +59.6,-65.3288 +59.625,-65.3255 +59.65,-65.3223 +59.675,-65.319 +59.7,-65.3158 +59.725,-65.3125 +59.75,-65.3093 +59.775,-65.3061 +59.8,-65.303 +59.825,-65.2998 +59.85,-65.2966 +59.875,-65.2935 +59.9,-65.2904 +59.925,-65.2873 +59.95,-65.2842 +59.975,-65.2811 +60,-65.278 +60.025,-65.275 +60.05,-65.2719 +60.075,-65.2689 +60.1,-65.2659 +60.125,-65.2629 +60.15,-65.2599 +60.175,-65.2569 +60.2,-65.254 +60.225,-65.251 +60.25,-65.2481 +60.275,-65.2452 +60.3,-65.2423 +60.325,-65.2394 +60.35,-65.2366 +60.375,-65.2337 +60.4,-65.2309 +60.425,-65.2281 +60.45,-65.2253 +60.475,-65.2225 +60.5,-65.2197 +60.525,-65.2169 +60.55,-65.2142 +60.575,-65.2115 +60.6,-65.2088 +60.625,-65.2061 +60.65,-65.2034 +60.675,-65.2007 +60.7,-65.1981 +60.725,-65.1954 +60.75,-65.1928 +60.775,-65.1902 +60.8,-65.1876 +60.825,-65.185 +60.85,-65.1825 +60.875,-65.1799 +60.9,-65.1774 +60.925,-65.1749 +60.95,-65.1724 +60.975,-65.1699 +61,-65.1674 +61.025,-65.165 +61.05,-65.1625 +61.075,-65.1601 +61.1,-65.1577 +61.125,-65.1553 +61.15,-65.153 +61.175,-65.1506 +61.2,-65.1482 +61.225,-65.1459 +61.25,-65.1436 +61.275,-65.1413 +61.3,-65.139 +61.325,-65.1368 +61.35,-65.1345 +61.375,-65.1323 +61.4,-65.1301 +61.425,-65.1279 +61.45,-65.1257 +61.475,-65.1235 +61.5,-65.1213 +61.525,-65.1192 +61.55,-65.1171 +61.575,-65.115 +61.6,-65.1129 +61.625,-65.1108 +61.65,-65.1087 +61.675,-65.1067 +61.7,-65.1046 +61.725,-65.1026 +61.75,-65.1006 +61.775,-65.0986 +61.8,-65.0967 +61.825,-65.0947 +61.85,-65.0928 +61.875,-65.0908 +61.9,-65.0889 +61.925,-65.087 +61.95,-65.0851 +61.975,-65.0833 +62,-65.0814 +62.025,-65.0796 +62.05,-65.0778 +62.075,-65.076 +62.1,-65.0742 +62.125,-65.0724 +62.15,-65.0706 +62.175,-65.0689 +62.2,-65.0672 +62.225,-65.0655 +62.25,-65.0638 +62.275,-65.0621 +62.3,-65.0604 +62.325,-65.0588 +62.35,-65.0571 +62.375,-65.0555 +62.4,-65.0539 +62.425,-65.0523 +62.45,-65.0507 +62.475,-65.0491 +62.5,-65.0476 +62.525,-65.0461 +62.55,-65.0445 +62.575,-65.043 +62.6,-65.0415 +62.625,-65.0401 +62.65,-65.0386 +62.675,-65.0371 +62.7,-65.0357 +62.725,-65.0343 +62.75,-65.0329 +62.775,-65.0315 +62.8,-65.0301 +62.825,-65.0288 +62.85,-65.0274 +62.875,-65.0261 +62.9,-65.0248 +62.925,-65.0234 +62.95,-65.0222 +62.975,-65.0209 +63,-65.0196 +63.025,-65.0184 +63.05,-65.0171 +63.075,-65.0159 +63.1,-65.0147 +63.125,-65.0135 +63.15,-65.0123 +63.175,-65.0111 +63.2,-65.01 +63.225,-65.0088 +63.25,-65.0077 +63.275,-65.0066 +63.3,-65.0055 +63.325,-65.0044 +63.35,-65.0033 +63.375,-65.0023 +63.4,-65.0012 +63.425,-65.0002 +63.45,-64.9991 +63.475,-64.9981 +63.5,-64.9971 +63.525,-64.9961 +63.55,-64.9952 +63.575,-64.9942 +63.6,-64.9933 +63.625,-64.9923 +63.65,-64.9914 +63.675,-64.9905 +63.7,-64.9896 +63.725,-64.9887 +63.75,-64.9878 +63.775,-64.987 +63.8,-64.9861 +63.825,-64.9853 +63.85,-64.9845 +63.875,-64.9836 +63.9,-64.9828 +63.925,-64.9821 +63.95,-64.9813 +63.975,-64.9805 +64,-64.9798 +64.025,-64.979 +64.05,-64.9783 +64.075,-64.9776 +64.1,-64.9768 +64.125,-64.9761 +64.15,-64.9755 +64.175,-64.9748 +64.2,-64.9741 +64.225,-64.9735 +64.25,-64.9728 +64.275,-64.9722 +64.3,-64.9716 +64.325,-64.971 +64.35,-64.9704 +64.375,-64.9698 +64.4,-64.9692 +64.425,-64.9686 +64.45,-64.9681 +64.475,-64.9675 +64.5,-64.967 +64.525,-64.9664 +64.55,-64.9659 +64.575,-64.9654 +64.6,-64.9649 +64.625,-64.9644 +64.65,-64.964 +64.675,-64.9635 +64.7,-64.963 +64.725,-64.9626 +64.75,-64.9621 +64.775,-64.9617 +64.8,-64.9613 +64.825,-64.9609 +64.85,-64.9605 +64.875,-64.9601 +64.9,-64.9597 +64.925,-64.9593 +64.95,-64.959 +64.975,-64.9586 +65,-64.9583 +65.025,-64.9579 +65.05,-64.9576 +65.075,-64.9573 +65.1,-64.9569 +65.125,-64.9566 +65.15,-64.9563 +65.175,-64.9561 +65.2,-64.9558 +65.225,-64.9555 +65.25,-64.9552 +65.275,-64.955 +65.3,-64.9547 +65.325,-64.9545 +65.35,-64.9543 +65.375,-64.954 +65.4,-64.9538 +65.425,-64.9536 +65.45,-64.9534 +65.475,-64.9532 +65.5,-64.953 +65.525,-64.9528 +65.55,-64.9527 +65.575,-64.9525 +65.6,-64.9523 +65.625,-64.9522 +65.65,-64.952 +65.675,-64.9519 +65.7,-64.9518 +65.725,-64.9516 +65.75,-64.9515 +65.775,-64.9514 +65.8,-64.9513 +65.825,-64.9512 +65.85,-64.9511 +65.875,-64.951 +65.9,-64.951 +65.925,-64.9509 +65.95,-64.9508 +65.975,-64.9508 +66,-64.9507 +66.025,-64.9506 +66.05,-64.9506 +66.075,-64.9506 +66.1,-64.9505 +66.125,-64.9505 +66.15,-64.9505 +66.175,-64.9505 +66.2,-64.9505 +66.225,-64.9504 +66.25,-64.9504 +66.275,-64.9505 +66.3,-64.9505 +66.325,-64.9505 +66.35,-64.9505 +66.375,-64.9505 +66.4,-64.9505 +66.425,-64.9506 +66.45,-64.9506 +66.475,-64.9507 +66.5,-64.9507 +66.525,-64.9508 +66.55,-64.9508 +66.575,-64.9509 +66.6,-64.9509 +66.625,-64.951 +66.65,-64.9511 +66.675,-64.9512 +66.7,-64.9512 +66.725,-64.9513 +66.75,-64.9514 +66.775,-64.9515 +66.8,-64.9516 +66.825,-64.9517 +66.85,-64.9518 +66.875,-64.9519 +66.9,-64.952 +66.925,-64.9522 +66.95,-64.9523 +66.975,-64.9524 +67,-64.9525 +67.025,-64.9526 +67.05,-64.9528 +67.075,-64.9529 +67.1,-64.9531 +67.125,-64.9532 +67.15,-64.9533 +67.175,-64.9535 +67.2,-64.9536 +67.225,-64.9538 +67.25,-64.9539 +67.275,-64.9541 +67.3,-64.9543 +67.325,-64.9544 +67.35,-64.9546 +67.375,-64.9548 +67.4,-64.9549 +67.425,-64.9551 +67.45,-64.9553 +67.475,-64.9554 +67.5,-64.9556 +67.525,-64.9558 +67.55,-64.956 +67.575,-64.9562 +67.6,-64.9564 +67.625,-64.9565 +67.65,-64.9567 +67.675,-64.9569 +67.7,-64.9571 +67.725,-64.9573 +67.75,-64.9575 +67.775,-64.9577 +67.8,-64.9579 +67.825,-64.9581 +67.85,-64.9583 +67.875,-64.9585 +67.9,-64.9587 +67.925,-64.9589 +67.95,-64.9591 +67.975,-64.9593 +68,-64.9596 +68.025,-64.9598 +68.05,-64.96 +68.075,-64.9602 +68.1,-64.9604 +68.125,-64.9606 +68.15,-64.9608 +68.175,-64.9611 +68.2,-64.9613 +68.225,-64.9615 +68.25,-64.9617 +68.275,-64.9619 +68.3,-64.9622 +68.325,-64.9624 +68.35,-64.9626 +68.375,-64.9628 +68.4,-64.963 +68.425,-64.9633 +68.45,-64.9635 +68.475,-64.9637 +68.5,-64.9639 +68.525,-64.9642 +68.55,-64.9644 +68.575,-64.9646 +68.6,-64.9648 +68.625,-64.9651 +68.65,-64.9653 +68.675,-64.9655 +68.7,-64.9657 +68.725,-64.966 +68.75,-64.9662 +68.775,-64.9664 +68.8,-64.9666 +68.825,-64.9669 +68.85,-64.9671 +68.875,-64.9673 +68.9,-64.9675 +68.925,-64.9678 +68.95,-64.968 +68.975,-64.9682 +69,-64.9684 +69.025,-64.9687 +69.05,-64.9689 +69.075,-64.9691 +69.1,-64.9693 +69.125,-64.9695 +69.15,-64.9698 +69.175,-64.97 +69.2,-64.9702 +69.225,-64.9704 +69.25,-64.9706 +69.275,-64.9709 +69.3,-64.9711 +69.325,-64.9713 +69.35,-64.9715 +69.375,-64.9717 +69.4,-64.9719 +69.425,-64.9722 +69.45,-64.9724 +69.475,-64.9726 +69.5,-64.9728 +69.525,-64.973 +69.55,-64.9732 +69.575,-64.9734 +69.6,-64.9736 +69.625,-64.9738 +69.65,-64.974 +69.675,-64.9742 +69.7,-64.9744 +69.725,-64.9746 +69.75,-64.9748 +69.775,-64.975 +69.8,-64.9752 +69.825,-64.9754 +69.85,-64.9756 +69.875,-64.9758 +69.9,-64.976 +69.925,-64.9762 +69.95,-64.9764 +69.975,-64.9766 +70,-64.9768 +70.025,-64.977 +70.05,-64.9771 +70.075,-64.9773 +70.1,-64.9775 +70.125,-64.9777 +70.15,-64.9779 +70.175,-64.9781 +70.2,-64.9782 +70.225,-64.9784 +70.25,-64.9786 +70.275,-64.9788 +70.3,-64.9789 +70.325,-64.9791 +70.35,-64.9793 +70.375,-64.9794 +70.4,-64.9796 +70.425,-64.9798 +70.45,-64.9799 +70.475,-64.9801 +70.5,-64.9803 +70.525,-64.9804 +70.55,-64.9806 +70.575,-64.9807 +70.6,-64.9809 +70.625,-64.981 +70.65,-64.9812 +70.675,-64.9813 +70.7,-64.9815 +70.725,-64.9816 +70.75,-64.9818 +70.775,-64.9819 +70.8,-64.9821 +70.825,-64.9822 +70.85,-64.9824 +70.875,-64.9825 +70.9,-64.9826 +70.925,-64.9828 +70.95,-64.9829 +70.975,-64.983 +71,-64.9832 +71.025,-64.9833 +71.05,-64.9834 +71.075,-64.9835 +71.1,-64.9837 +71.125,-64.9838 +71.15,-64.9839 +71.175,-64.984 +71.2,-64.9841 +71.225,-64.9843 +71.25,-64.9844 +71.275,-64.9845 +71.3,-64.9846 +71.325,-64.9847 +71.35,-64.9848 +71.375,-64.9849 +71.4,-64.985 +71.425,-64.9851 +71.45,-64.9852 +71.475,-64.9853 +71.5,-64.9854 +71.525,-64.9855 +71.55,-64.9856 +71.575,-64.9857 +71.6,-64.9858 +71.625,-64.9859 +71.65,-64.986 +71.675,-64.9861 +71.7,-64.9861 +71.725,-64.9862 +71.75,-64.9863 +71.775,-64.9864 +71.8,-64.9865 +71.825,-64.9865 +71.85,-64.9866 +71.875,-64.9867 +71.9,-64.9868 +71.925,-64.9868 +71.95,-64.9869 +71.975,-64.987 +72,-64.987 +72.025,-64.9871 +72.05,-64.9872 +72.075,-64.9872 +72.1,-64.9873 +72.125,-64.9873 +72.15,-64.9874 +72.175,-64.9875 +72.2,-64.9875 +72.225,-64.9876 +72.25,-64.9876 +72.275,-64.9877 +72.3,-64.9877 +72.325,-64.9878 +72.35,-64.9878 +72.375,-64.9878 +72.4,-64.9879 +72.425,-64.9879 +72.45,-64.988 +72.475,-64.988 +72.5,-64.988 +72.525,-64.9881 +72.55,-64.9881 +72.575,-64.9881 +72.6,-64.9882 +72.625,-64.9882 +72.65,-64.9882 +72.675,-64.9883 +72.7,-64.9883 +72.725,-64.9883 +72.75,-64.9883 +72.775,-64.9883 +72.8,-64.9884 +72.825,-64.9884 +72.85,-64.9884 +72.875,-64.9884 +72.9,-64.9884 +72.925,-64.9884 +72.95,-64.9885 +72.975,-64.9885 +73,-64.9885 +73.025,-64.9885 +73.05,-64.9885 +73.075,-64.9885 +73.1,-64.9885 +73.125,-64.9885 +73.15,-64.9885 +73.175,-64.9885 +73.2,-64.9885 +73.225,-64.9885 +73.25,-64.9885 +73.275,-64.9885 +73.3,-64.9885 +73.325,-64.9885 +73.35,-64.9885 +73.375,-64.9885 +73.4,-64.9885 +73.425,-64.9884 +73.45,-64.9884 +73.475,-64.9884 +73.5,-64.9884 +73.525,-64.9884 +73.55,-64.9884 +73.575,-64.9884 +73.6,-64.9883 +73.625,-64.9883 +73.65,-64.9883 +73.675,-64.9883 +73.7,-64.9883 +73.725,-64.9882 +73.75,-64.9882 +73.775,-64.9882 +73.8,-64.9882 +73.825,-64.9881 +73.85,-64.9881 +73.875,-64.9881 +73.9,-64.988 +73.925,-64.988 +73.95,-64.988 +73.975,-64.988 +74,-64.9879 +74.025,-64.9879 +74.05,-64.9879 +74.075,-64.9878 +74.1,-64.9878 +74.125,-64.9877 +74.15,-64.9877 +74.175,-64.9877 +74.2,-64.9876 +74.225,-64.9876 +74.25,-64.9875 +74.275,-64.9875 +74.3,-64.9875 +74.325,-64.9874 +74.35,-64.9874 +74.375,-64.9873 +74.4,-64.9873 +74.425,-64.9872 +74.45,-64.9872 +74.475,-64.9871 +74.5,-64.9871 +74.525,-64.9871 +74.55,-64.987 +74.575,-64.987 +74.6,-64.9869 +74.625,-64.9869 +74.65,-64.9868 +74.675,-64.9867 +74.7,-64.9867 +74.725,-64.9866 +74.75,-64.9866 +74.775,-64.9865 +74.8,-64.9865 +74.825,-64.9864 +74.85,-64.9864 +74.875,-64.9863 +74.9,-64.9863 +74.925,-64.9862 +74.95,-64.9861 +74.975,-64.9861 +75,-64.986 +75.025,-64.986 +75.05,-64.9859 +75.075,-64.9858 +75.1,-64.9858 +75.125,-64.9857 +75.15,-64.9857 +75.175,-64.9856 +75.2,-64.9855 +75.225,-64.9855 +75.25,-64.9854 +75.275,-64.9853 +75.3,-64.9853 +75.325,-64.9852 +75.35,-64.9852 +75.375,-64.9851 +75.4,-64.985 +75.425,-64.985 +75.45,-64.9849 +75.475,-64.9848 +75.5,-64.9848 +75.525,-64.9847 +75.55,-64.9846 +75.575,-64.9846 +75.6,-64.9845 +75.625,-64.9844 +75.65,-64.9844 +75.675,-64.9843 +75.7,-64.9842 +75.725,-64.9842 +75.75,-64.9841 +75.775,-64.984 +75.8,-64.984 +75.825,-64.9839 +75.85,-64.9838 +75.875,-64.9838 +75.9,-64.9837 +75.925,-64.9836 +75.95,-64.9836 +75.975,-64.9835 +76,-64.9834 +76.025,-64.9833 +76.05,-64.9833 +76.075,-64.9832 +76.1,-64.9831 +76.125,-64.9831 +76.15,-64.983 +76.175,-64.9829 +76.2,-64.9829 +76.225,-64.9828 +76.25,-64.9827 +76.275,-64.9827 +76.3,-64.9826 +76.325,-64.9825 +76.35,-64.9824 +76.375,-64.9824 +76.4,-64.9823 +76.425,-64.9822 +76.45,-64.9822 +76.475,-64.9821 +76.5,-64.982 +76.525,-64.982 +76.55,-64.9819 +76.575,-64.9818 +76.6,-64.9818 +76.625,-64.9817 +76.65,-64.9816 +76.675,-64.9815 +76.7,-64.9815 +76.725,-64.9814 +76.75,-64.9813 +76.775,-64.9813 +76.8,-64.9812 +76.825,-64.9811 +76.85,-64.9811 +76.875,-64.981 +76.9,-64.9809 +76.925,-64.9809 +76.95,-64.9808 +76.975,-64.9807 +77,-64.9807 +77.025,-64.9806 +77.05,-64.9805 +77.075,-64.9805 +77.1,-64.9804 +77.125,-64.9803 +77.15,-64.9803 +77.175,-64.9802 +77.2,-64.9801 +77.225,-64.9801 +77.25,-64.98 +77.275,-64.9799 +77.3,-64.9799 +77.325,-64.9798 +77.35,-64.9797 +77.375,-64.9797 +77.4,-64.9796 +77.425,-64.9796 +77.45,-64.9795 +77.475,-64.9794 +77.5,-64.9794 +77.525,-64.9793 +77.55,-64.9792 +77.575,-64.9792 +77.6,-64.9791 +77.625,-64.9791 +77.65,-64.979 +77.675,-64.9789 +77.7,-64.9789 +77.725,-64.9788 +77.75,-64.9787 +77.775,-64.9787 +77.8,-64.9786 +77.825,-64.9786 +77.85,-64.9785 +77.875,-64.9785 +77.9,-64.9784 +77.925,-64.9783 +77.95,-64.9783 +77.975,-64.9782 +78,-64.9782 +78.025,-64.9781 +78.05,-64.9781 +78.075,-64.978 +78.1,-64.9779 +78.125,-64.9779 +78.15,-64.9778 +78.175,-64.9778 +78.2,-64.9777 +78.225,-64.9777 +78.25,-64.9776 +78.275,-64.9776 +78.3,-64.9775 +78.325,-64.9775 +78.35,-64.9774 +78.375,-64.9774 +78.4,-64.9773 +78.425,-64.9772 +78.45,-64.9772 +78.475,-64.9771 +78.5,-64.9771 +78.525,-64.977 +78.55,-64.977 +78.575,-64.9769 +78.6,-64.9769 +78.625,-64.9769 +78.65,-64.9768 +78.675,-64.9768 +78.7,-64.9767 +78.725,-64.9767 +78.75,-64.9766 +78.775,-64.9766 +78.8,-64.9765 +78.825,-64.9765 +78.85,-64.9764 +78.875,-64.9764 +78.9,-64.9763 +78.925,-64.9763 +78.95,-64.9763 +78.975,-64.9762 +79,-64.9762 +79.025,-64.9761 +79.05,-64.9761 +79.075,-64.976 +79.1,-64.976 +79.125,-64.976 +79.15,-64.9759 +79.175,-64.9759 +79.2,-64.9758 +79.225,-64.9758 +79.25,-64.9758 +79.275,-64.9757 +79.3,-64.9757 +79.325,-64.9756 +79.35,-64.9756 +79.375,-64.9756 +79.4,-64.9755 +79.425,-64.9755 +79.45,-64.9755 +79.475,-64.9754 +79.5,-64.9754 +79.525,-64.9754 +79.55,-64.9753 +79.575,-64.9753 +79.6,-64.9753 +79.625,-64.9752 +79.65,-64.9752 +79.675,-64.9752 +79.7,-64.9751 +79.725,-64.9751 +79.75,-64.9751 +79.775,-64.975 +79.8,-64.975 +79.825,-64.975 +79.85,-64.9749 +79.875,-64.9749 +79.9,-64.9749 +79.925,-64.9749 +79.95,-64.9748 +79.975,-64.9748 +80,-64.9748 +80.025,-64.9747 +80.05,-64.9747 +80.075,-64.9747 +80.1,-64.9747 +80.125,-64.9746 +80.15,-64.9746 +80.175,-64.9746 +80.2,-64.9746 +80.225,-64.9745 +80.25,-64.9745 +80.275,-64.9745 +80.3,-64.9745 +80.325,-64.9744 +80.35,-64.9744 +80.375,-64.9744 +80.4,-64.9744 +80.425,-64.9744 +80.45,-64.9743 +80.475,-64.9743 +80.5,-64.9743 +80.525,-64.9743 +80.55,-64.9743 +80.575,-64.9742 +80.6,-64.9742 +80.625,-64.9742 +80.65,-64.9742 +80.675,-64.9742 +80.7,-64.9741 +80.725,-64.9741 +80.75,-64.9741 +80.775,-64.9741 +80.8,-64.9741 +80.825,-64.9741 +80.85,-64.974 +80.875,-64.974 +80.9,-64.974 +80.925,-64.974 +80.95,-64.974 +80.975,-64.974 +81,-64.9739 +81.025,-64.9739 +81.05,-64.9739 +81.075,-64.9739 +81.1,-64.9739 +81.125,-64.9739 +81.15,-64.9739 +81.175,-64.9739 +81.2,-64.9738 +81.225,-64.9738 +81.25,-64.9738 +81.275,-64.9738 +81.3,-64.9738 +81.325,-64.9738 +81.35,-64.9738 +81.375,-64.9738 +81.4,-64.9738 +81.425,-64.9737 +81.45,-64.9737 +81.475,-64.9737 +81.5,-64.9737 +81.525,-64.9737 +81.55,-64.9737 +81.575,-64.9737 +81.6,-64.9737 +81.625,-64.9737 +81.65,-64.9737 +81.675,-64.9737 +81.7,-64.9737 +81.725,-64.9737 +81.75,-64.9737 +81.775,-64.9736 +81.8,-64.9736 +81.825,-64.9736 +81.85,-64.9736 +81.875,-64.9736 +81.9,-64.9736 +81.925,-64.9736 +81.95,-64.9736 +81.975,-64.9736 +82,-64.9736 +82.025,-64.9736 +82.05,-64.9736 +82.075,-64.9736 +82.1,-64.9736 +82.125,-64.9736 +82.15,-64.9736 +82.175,-64.9736 +82.2,-64.9736 +82.225,-64.9736 +82.25,-64.9736 +82.275,-64.9736 +82.3,-64.9736 +82.325,-64.9736 +82.35,-64.9736 +82.375,-64.9736 +82.4,-64.9736 +82.425,-64.9736 +82.45,-64.9736 +82.475,-64.9736 +82.5,-64.9736 +82.525,-64.9736 +82.55,-64.9736 +82.575,-64.9736 +82.6,-64.9736 +82.625,-64.9736 +82.65,-64.9736 +82.675,-64.9736 +82.7,-64.9736 +82.725,-64.9736 +82.75,-64.9736 +82.775,-64.9736 +82.8,-64.9736 +82.825,-64.9736 +82.85,-64.9736 +82.875,-64.9736 +82.9,-64.9736 +82.925,-64.9736 +82.95,-64.9736 +82.975,-64.9736 +83,-64.9736 +83.025,-64.9736 +83.05,-64.9736 +83.075,-64.9736 +83.1,-64.9736 +83.125,-64.9736 +83.15,-64.9736 +83.175,-64.9736 +83.2,-64.9736 +83.225,-64.9736 +83.25,-64.9736 +83.275,-64.9737 +83.3,-64.9737 +83.325,-64.9737 +83.35,-64.9737 +83.375,-64.9737 +83.4,-64.9737 +83.425,-64.9737 +83.45,-64.9737 +83.475,-64.9737 +83.5,-64.9737 +83.525,-64.9737 +83.55,-64.9737 +83.575,-64.9737 +83.6,-64.9737 +83.625,-64.9737 +83.65,-64.9737 +83.675,-64.9737 +83.7,-64.9737 +83.725,-64.9738 +83.75,-64.9738 +83.775,-64.9738 +83.8,-64.9738 +83.825,-64.9738 +83.85,-64.9738 +83.875,-64.9738 +83.9,-64.9738 +83.925,-64.9738 +83.95,-64.9738 +83.975,-64.9738 +84,-64.9738 +84.025,-64.9738 +84.05,-64.9738 +84.075,-64.9738 +84.1,-64.9739 +84.125,-64.9739 +84.15,-64.9739 +84.175,-64.9739 +84.2,-64.9739 +84.225,-64.9739 +84.25,-64.9739 +84.275,-64.9739 +84.3,-64.9739 +84.325,-64.9739 +84.35,-64.9739 +84.375,-64.9739 +84.4,-64.9739 +84.425,-64.974 +84.45,-64.974 +84.475,-64.974 +84.5,-64.974 +84.525,-64.974 +84.55,-64.974 +84.575,-64.974 +84.6,-64.974 +84.625,-64.974 +84.65,-64.974 +84.675,-64.974 +84.7,-64.974 +84.725,-64.974 +84.75,-64.9741 +84.775,-64.9741 +84.8,-64.9741 +84.825,-64.9741 +84.85,-64.9741 +84.875,-64.9741 +84.9,-64.9741 +84.925,-64.9741 +84.95,-64.9741 +84.975,-64.9741 +85,-64.9741 +85.025,-64.9741 +85.05,-64.9741 +85.075,-64.9742 +85.1,-64.9742 +85.125,-64.9742 +85.15,-64.9742 +85.175,-64.9742 +85.2,-64.9742 +85.225,-64.9742 +85.25,-64.9742 +85.275,-64.9742 +85.3,-64.9742 +85.325,-64.9742 +85.35,-64.9742 +85.375,-64.9743 +85.4,-64.9743 +85.425,-64.9743 +85.45,-64.9743 +85.475,-64.9743 +85.5,-64.9743 +85.525,-64.9743 +85.55,-64.9743 +85.575,-64.9743 +85.6,-64.9743 +85.625,-64.9743 +85.65,-64.9743 +85.675,-64.9743 +85.7,-64.9744 +85.725,-64.9744 +85.75,-64.9744 +85.775,-64.9744 +85.8,-64.9744 +85.825,-64.9744 +85.85,-64.9744 +85.875,-64.9744 +85.9,-64.9744 +85.925,-64.9744 +85.95,-64.9744 +85.975,-64.9744 +86,-64.9744 +86.025,-64.9744 +86.05,-64.9745 +86.075,-64.9745 +86.1,-64.9745 +86.125,-64.9745 +86.15,-64.9745 +86.175,-64.9745 +86.2,-64.9745 +86.225,-64.9745 +86.25,-64.9745 +86.275,-64.9745 +86.3,-64.9745 +86.325,-64.9745 +86.35,-64.9745 +86.375,-64.9745 +86.4,-64.9745 +86.425,-64.9746 +86.45,-64.9746 +86.475,-64.9746 +86.5,-64.9746 +86.525,-64.9746 +86.55,-64.9746 +86.575,-64.9746 +86.6,-64.9746 +86.625,-64.9746 +86.65,-64.9746 +86.675,-64.9746 +86.7,-64.9746 +86.725,-64.9746 +86.75,-64.9746 +86.775,-64.9746 +86.8,-64.9746 +86.825,-64.9746 +86.85,-64.9747 +86.875,-64.9747 +86.9,-64.9747 +86.925,-64.9747 +86.95,-64.9747 +86.975,-64.9747 +87,-64.9747 +87.025,-64.9747 +87.05,-64.9747 +87.075,-64.9747 +87.1,-64.9747 +87.125,-64.9747 +87.15,-64.9747 +87.175,-64.9747 +87.2,-64.9747 +87.225,-64.9747 +87.25,-64.9747 +87.275,-64.9747 +87.3,-64.9747 +87.325,-64.9747 +87.35,-64.9747 +87.375,-64.9748 +87.4,-64.9748 +87.425,-64.9748 +87.45,-64.9748 +87.475,-64.9748 +87.5,-64.9748 +87.525,-64.9748 +87.55,-64.9748 +87.575,-64.9748 +87.6,-64.9748 +87.625,-64.9748 +87.65,-64.9748 +87.675,-64.9748 +87.7,-64.9748 +87.725,-64.9748 +87.75,-64.9748 +87.775,-64.9748 +87.8,-64.9748 +87.825,-64.9748 +87.85,-64.9748 +87.875,-64.9748 +87.9,-64.9748 +87.925,-64.9748 +87.95,-64.9748 +87.975,-64.9748 +88,-64.9748 +88.025,-64.9748 +88.05,-64.9748 +88.075,-64.9748 +88.1,-64.9748 +88.125,-64.9749 +88.15,-64.9749 +88.175,-64.9749 +88.2,-64.9749 +88.225,-64.9749 +88.25,-64.9749 +88.275,-64.9749 +88.3,-64.9749 +88.325,-64.9749 +88.35,-64.9749 +88.375,-64.9749 +88.4,-64.9749 +88.425,-64.9749 +88.45,-64.9749 +88.475,-64.9749 +88.5,-64.9749 +88.525,-64.9749 +88.55,-64.9749 +88.575,-64.9749 +88.6,-64.9749 +88.625,-64.9749 +88.65,-64.9749 +88.675,-64.9749 +88.7,-64.9749 +88.725,-64.9749 +88.75,-64.9749 +88.775,-64.9749 +88.8,-64.9749 +88.825,-64.9749 +88.85,-64.9749 +88.875,-64.9749 +88.9,-64.9749 +88.925,-64.9749 +88.95,-64.9749 +88.975,-64.9749 +89,-64.9749 +89.025,-64.9749 +89.05,-64.9749 +89.075,-64.9749 +89.1,-64.9749 +89.125,-64.9749 +89.15,-64.9749 +89.175,-64.9749 +89.2,-64.9749 +89.225,-64.9749 +89.25,-64.9749 +89.275,-64.9749 +89.3,-64.9749 +89.325,-64.9749 +89.35,-64.9749 +89.375,-64.9749 +89.4,-64.9749 +89.425,-64.9749 +89.45,-64.9749 +89.475,-64.9749 +89.5,-64.9749 +89.525,-64.9749 +89.55,-64.9749 +89.575,-64.9749 +89.6,-64.9749 +89.625,-64.9749 +89.65,-64.9749 +89.675,-64.9749 +89.7,-64.9749 +89.725,-64.9749 +89.75,-64.9749 +89.775,-64.9749 +89.8,-64.9749 +89.825,-64.9749 +89.85,-64.9749 +89.875,-64.9749 +89.9,-64.9749 +89.925,-64.9749 +89.95,-64.9749 +89.975,-64.9749 +90,-64.9749 +90.025,-64.9749 +90.05,-64.9749 +90.075,-64.9749 +90.1,-64.9749 +90.125,-64.9749 +90.15,-64.9749 +90.175,-64.9749 +90.2,-64.9749 +90.225,-64.9749 +90.25,-64.9749 +90.275,-64.9749 +90.3,-64.9749 +90.325,-64.9749 +90.35,-64.9749 +90.375,-64.9749 +90.4,-64.9749 +90.425,-64.9749 +90.45,-64.9749 +90.475,-64.9749 +90.5,-64.9748 +90.525,-64.9748 +90.55,-64.9748 +90.575,-64.9748 +90.6,-64.9748 +90.625,-64.9748 +90.65,-64.9748 +90.675,-64.9748 +90.7,-64.9748 +90.725,-64.9748 +90.75,-64.9748 +90.775,-64.9748 +90.8,-64.9748 +90.825,-64.9748 +90.85,-64.9748 +90.875,-64.9748 +90.9,-64.9748 +90.925,-64.9748 +90.95,-64.9748 +90.975,-64.9748 +91,-64.9748 +91.025,-64.9748 +91.05,-64.9748 +91.075,-64.9748 +91.1,-64.9748 +91.125,-64.9748 +91.15,-64.9748 +91.175,-64.9748 +91.2,-64.9748 +91.225,-64.9748 +91.25,-64.9748 +91.275,-64.9748 +91.3,-64.9748 +91.325,-64.9748 +91.35,-64.9748 +91.375,-64.9748 +91.4,-64.9748 +91.425,-64.9748 +91.45,-64.9748 +91.475,-64.9748 +91.5,-64.9747 +91.525,-64.9747 +91.55,-64.9747 +91.575,-64.9747 +91.6,-64.9747 +91.625,-64.9747 +91.65,-64.9747 +91.675,-64.9747 +91.7,-64.9747 +91.725,-64.9747 +91.75,-64.9747 +91.775,-64.9747 +91.8,-64.9747 +91.825,-64.9747 +91.85,-64.9747 +91.875,-64.9747 +91.9,-64.9747 +91.925,-64.9747 +91.95,-64.9747 +91.975,-64.9747 +92,-64.9747 +92.025,-64.9747 +92.05,-64.9747 +92.075,-64.9747 +92.1,-64.9747 +92.125,-64.9747 +92.15,-64.9747 +92.175,-64.9747 +92.2,-64.9747 +92.225,-64.9747 +92.25,-64.9747 +92.275,-64.9747 +92.3,-64.9747 +92.325,-64.9746 +92.35,-64.9746 +92.375,-64.9746 +92.4,-64.9746 +92.425,-64.9746 +92.45,-64.9746 +92.475,-64.9746 +92.5,-64.9746 +92.525,-64.9746 +92.55,-64.9746 +92.575,-64.9746 +92.6,-64.9746 +92.625,-64.9746 +92.65,-64.9746 +92.675,-64.9746 +92.7,-64.9746 +92.725,-64.9746 +92.75,-64.9746 +92.775,-64.9746 +92.8,-64.9746 +92.825,-64.9746 +92.85,-64.9746 +92.875,-64.9746 +92.9,-64.9746 +92.925,-64.9746 +92.95,-64.9746 +92.975,-64.9746 +93,-64.9746 +93.025,-64.9746 +93.05,-64.9746 +93.075,-64.9746 +93.1,-64.9746 +93.125,-64.9745 +93.15,-64.9745 +93.175,-64.9745 +93.2,-64.9745 +93.225,-64.9745 +93.25,-64.9745 +93.275,-64.9745 +93.3,-64.9745 +93.325,-64.9745 +93.35,-64.9745 +93.375,-64.9745 +93.4,-64.9745 +93.425,-64.9745 +93.45,-64.9745 +93.475,-64.9745 +93.5,-64.9745 +93.525,-64.9745 +93.55,-64.9745 +93.575,-64.9745 +93.6,-64.9745 +93.625,-64.9745 +93.65,-64.9745 +93.675,-64.9745 +93.7,-64.9745 +93.725,-64.9745 +93.75,-64.9745 +93.775,-64.9745 +93.8,-64.9745 +93.825,-64.9745 +93.85,-64.9745 +93.875,-64.9745 +93.9,-64.9745 +93.925,-64.9745 +93.95,-64.9745 +93.975,-64.9744 +94,-64.9744 +94.025,-64.9744 +94.05,-64.9744 +94.075,-64.9744 +94.1,-64.9744 +94.125,-64.9744 +94.15,-64.9744 +94.175,-64.9744 +94.2,-64.9744 +94.225,-64.9744 +94.25,-64.9744 +94.275,-64.9744 +94.3,-64.9744 +94.325,-64.9744 +94.35,-64.9744 +94.375,-64.9744 +94.4,-64.9744 +94.425,-64.9744 +94.45,-64.9744 +94.475,-64.9744 +94.5,-64.9744 +94.525,-64.9744 +94.55,-64.9744 +94.575,-64.9744 +94.6,-64.9744 +94.625,-64.9744 +94.65,-64.9744 +94.675,-64.9744 +94.7,-64.9744 +94.725,-64.9744 +94.75,-64.9744 +94.775,-64.9744 +94.8,-64.9744 +94.825,-64.9744 +94.85,-64.9744 +94.875,-64.9744 +94.9,-64.9744 +94.925,-64.9743 +94.95,-64.9743 +94.975,-64.9743 +95,-64.9743 +95.025,-64.9743 +95.05,-64.9743 +95.075,-64.9743 +95.1,-64.9743 +95.125,-64.9743 +95.15,-64.9743 +95.175,-64.9743 +95.2,-64.9743 +95.225,-64.9743 +95.25,-64.9743 +95.275,-64.9743 +95.3,-64.9743 +95.325,-64.9743 +95.35,-64.9743 +95.375,-64.9743 +95.4,-64.9743 +95.425,-64.9743 +95.45,-64.9743 +95.475,-64.9743 +95.5,-64.9743 +95.525,-64.9743 +95.55,-64.9743 +95.575,-64.9743 +95.6,-64.9743 +95.625,-64.9743 +95.65,-64.9743 +95.675,-64.9743 +95.7,-64.9743 +95.725,-64.9743 +95.75,-64.9743 +95.775,-64.9743 +95.8,-64.9743 +95.825,-64.9743 +95.85,-64.9743 +95.875,-64.9743 +95.9,-64.9743 +95.925,-64.9743 +95.95,-64.9743 +95.975,-64.9743 +96,-64.9743 +96.025,-64.9743 +96.05,-64.9743 +96.075,-64.9743 +96.1,-64.9743 +96.125,-64.9743 +96.15,-64.9743 +96.175,-64.9743 +96.2,-64.9742 +96.225,-64.9742 +96.25,-64.9742 +96.275,-64.9742 +96.3,-64.9742 +96.325,-64.9742 +96.35,-64.9742 +96.375,-64.9742 +96.4,-64.9742 +96.425,-64.9742 +96.45,-64.9742 +96.475,-64.9742 +96.5,-64.9742 +96.525,-64.9742 +96.55,-64.9742 +96.575,-64.9742 +96.6,-64.9742 +96.625,-64.9742 +96.65,-64.9742 +96.675,-64.9742 +96.7,-64.9742 +96.725,-64.9742 +96.75,-64.9742 +96.775,-64.9742 +96.8,-64.9742 +96.825,-64.9742 +96.85,-64.9742 +96.875,-64.9742 +96.9,-64.9742 +96.925,-64.9742 +96.95,-64.9742 +96.975,-64.9742 +97,-64.9742 +97.025,-64.9742 +97.05,-64.9742 +97.075,-64.9742 +97.1,-64.9742 +97.125,-64.9742 +97.15,-64.9742 +97.175,-64.9742 +97.2,-64.9742 +97.225,-64.9742 +97.25,-64.9742 +97.275,-64.9742 +97.3,-64.9742 +97.325,-64.9742 +97.35,-64.9742 +97.375,-64.9742 +97.4,-64.9742 +97.425,-64.9742 +97.45,-64.9742 +97.475,-64.9742 +97.5,-64.9742 +97.525,-64.9742 +97.55,-64.9742 +97.575,-64.9742 +97.6,-64.9742 +97.625,-64.9742 +97.65,-64.9742 +97.675,-64.9742 +97.7,-64.9742 +97.725,-64.9742 +97.75,-64.9742 +97.775,-64.9742 +97.8,-64.9742 +97.825,-64.9742 +97.85,-64.9742 +97.875,-64.9742 +97.9,-64.9742 +97.925,-64.9742 +97.95,-64.9742 +97.975,-64.9742 +98,-64.9742 +98.025,-64.9742 +98.05,-64.9742 +98.075,-64.9742 +98.1,-64.9742 +98.125,-64.9742 +98.15,-64.9742 +98.175,-64.9742 +98.2,-64.9742 +98.225,-64.9742 +98.25,-64.9742 +98.275,-64.9742 +98.3,-64.9742 +98.325,-64.9742 +98.35,-64.9742 +98.375,-64.9742 +98.4,-64.9742 +98.425,-64.9742 +98.45,-64.9742 +98.475,-64.9742 +98.5,-64.9742 +98.525,-64.9742 +98.55,-64.9742 +98.575,-64.9742 +98.6,-64.9742 +98.625,-64.9742 +98.65,-64.9742 +98.675,-64.9742 +98.7,-64.9742 +98.725,-64.9742 +98.75,-64.9742 +98.775,-64.9742 +98.8,-64.9742 +98.825,-64.9742 +98.85,-64.9742 +98.875,-64.9742 +98.9,-64.9742 +98.925,-64.9742 +98.95,-64.9742 +98.975,-64.9742 +99,-64.9742 +99.025,-64.9742 +99.05,-64.9742 +99.075,-64.9742 +99.1,-64.9742 +99.125,-64.9742 +99.15,-64.9742 +99.175,-64.9741 +99.2,-64.9741 +99.225,-64.9741 +99.25,-64.9741 +99.275,-64.9741 +99.3,-64.9741 +99.325,-64.9741 +99.35,-64.9741 +99.375,-64.9741 +99.4,-64.9741 +99.425,-64.9741 +99.45,-64.9741 +99.475,-64.9741 +99.5,-64.9741 +99.525,-64.9741 +99.55,-64.9741 +99.575,-64.9741 +99.6,-64.9741 +99.625,-64.9741 +99.65,-64.9741 +99.675,-64.9741 +99.7,-64.9741 +99.725,-64.9741 +99.75,-64.9741 +99.775,-64.9741 +99.8,-64.9741 +99.825,-64.9741 +99.85,-64.9741 +99.875,-64.9741 +99.9,-64.9741 +99.925,-64.9741 +99.95,-64.9741 +99.975,-64.9741 +100,-64.9741 diff --git a/test/api/ref/vclamp.csv b/test/api/ref/vclamp.csv new file mode 100644 index 0000000000..130ba712b5 --- /dev/null +++ b/test/api/ref/vclamp.csv @@ -0,0 +1,241 @@ +0,-65 +0.025,-2.5 +0.05,-0.0961537 +0.075,-0.00369822 +0.1,-0.000142239 +0.125,-5.47073e-06 +0.15,-2.10413e-07 +0.175,-8.09278e-09 +0.2,-3.11261e-10 +0.225,-1.19716e-11 +0.25,-4.60444e-13 +0.275,-1.77094e-14 +0.3,-6.8113e-16 +0.325,-2.61973e-17 +0.35,-1.00759e-18 +0.375,-3.87534e-20 +0.4,-1.49051e-21 +0.425,-5.73274e-23 +0.45,-2.2049e-24 +0.475,-8.48037e-26 +0.5,-3.26168e-27 +0.525,-1.25449e-28 +0.55,-4.82496e-30 +0.575,-1.85575e-31 +0.6,-7.13751e-33 +0.625,-2.7452e-34 +0.65,-1.05584e-35 +0.675,-4.06094e-37 +0.7,-1.5619e-38 +0.725,-6.0073e-40 +0.75,-2.3105e-41 +0.775,-8.88652e-43 +0.8,-3.41789e-44 +0.825,-1.31457e-45 +0.85,-5.05605e-47 +0.875,-1.94463e-48 +0.9,-7.47935e-50 +0.925,-2.87667e-51 +0.95,-1.10641e-52 +0.975,-4.25543e-54 +1,-1.6367e-55 +1.025,9.61519 +1.05,9.98501 +1.075,9.99923 +1.1,9.99978 +1.125,9.9998 +1.15,9.9998 +1.175,9.9998 +1.2,9.9998 +1.225,9.9998 +1.25,9.9998 +1.275,9.9998 +1.3,9.9998 +1.325,9.9998 +1.35,9.9998 +1.375,9.9998 +1.4,9.9998 +1.425,9.9998 +1.45,9.9998 +1.475,9.9998 +1.5,9.9998 +1.525,9.9998 +1.55,9.9998 +1.575,9.9998 +1.6,9.9998 +1.625,9.9998 +1.65,9.9998 +1.675,9.9998 +1.7,9.9998 +1.725,9.9998 +1.75,9.9998 +1.775,9.9998 +1.8,9.9998 +1.825,9.9998 +1.85,9.9998 +1.875,9.9998 +1.9,9.9998 +1.925,9.9998 +1.95,9.9998 +1.975,9.9998 +2,9.9998 +2.025,9.9998 +2.05,9.9998 +2.075,9.9998 +2.1,9.9998 +2.125,9.9998 +2.15,9.9998 +2.175,9.9998 +2.2,9.9998 +2.225,9.9998 +2.25,9.9998 +2.275,9.9998 +2.3,9.9998 +2.325,9.9998 +2.35,9.9998 +2.375,9.9998 +2.4,9.9998 +2.425,9.9998 +2.45,9.9998 +2.475,9.9998 +2.5,9.9998 +2.525,9.9998 +2.55,9.9998 +2.575,9.9998 +2.6,9.9998 +2.625,9.9998 +2.65,9.9998 +2.675,9.9998 +2.7,9.9998 +2.725,9.9998 +2.75,9.9998 +2.775,9.9998 +2.8,9.9998 +2.825,9.9998 +2.85,9.9998 +2.875,9.9998 +2.9,9.9998 +2.925,9.9998 +2.95,9.9998 +2.975,9.9998 +3,9.9998 +3.025,5.19221 +3.05,5.0073 +3.075,5.00018 +3.1,4.99991 +3.125,4.9999 +3.15,4.9999 +3.175,4.9999 +3.2,4.9999 +3.225,4.9999 +3.25,4.9999 +3.275,4.9999 +3.3,4.9999 +3.325,4.9999 +3.35,4.9999 +3.375,4.9999 +3.4,4.9999 +3.425,4.9999 +3.45,4.9999 +3.475,4.9999 +3.5,4.9999 +3.525,4.9999 +3.55,4.9999 +3.575,4.9999 +3.6,4.9999 +3.625,4.9999 +3.65,4.9999 +3.675,4.9999 +3.7,4.9999 +3.725,4.9999 +3.75,4.9999 +3.775,4.9999 +3.8,4.9999 +3.825,4.9999 +3.85,4.9999 +3.875,4.9999 +3.9,4.9999 +3.925,4.9999 +3.95,4.9999 +3.975,4.9999 +4,4.9999 +4.025,4.9999 +4.05,4.9999 +4.075,4.9999 +4.1,4.9999 +4.125,4.9999 +4.15,4.9999 +4.175,4.9999 +4.2,4.9999 +4.225,4.9999 +4.25,4.9999 +4.275,4.9999 +4.3,4.9999 +4.325,4.9999 +4.35,4.9999 +4.375,4.9999 +4.4,4.9999 +4.425,4.9999 +4.45,4.9999 +4.475,4.9999 +4.5,4.9999 +4.525,4.9999 +4.55,4.9999 +4.575,4.9999 +4.6,4.9999 +4.625,4.9999 +4.65,4.9999 +4.675,4.9999 +4.7,4.9999 +4.725,4.9999 +4.75,4.9999 +4.775,4.9999 +4.8,4.9999 +4.825,4.9999 +4.85,4.9999 +4.875,4.9999 +4.9,4.9999 +4.925,4.9999 +4.95,4.9999 +4.975,4.9999 +5,4.9999 +5.025,4.9999 +5.05,4.9999 +5.075,4.9999 +5.1,4.9999 +5.125,4.9999 +5.15,4.9999 +5.175,4.9999 +5.2,4.9999 +5.225,4.9999 +5.25,4.9999 +5.275,4.9999 +5.3,4.9999 +5.325,4.9999 +5.35,4.9999 +5.375,4.9999 +5.4,4.9999 +5.425,4.9999 +5.45,4.9999 +5.475,4.9999 +5.5,4.9999 +5.525,4.9999 +5.55,4.9999 +5.575,4.9999 +5.6,4.9999 +5.625,4.9999 +5.65,4.9999 +5.675,4.9999 +5.7,4.9999 +5.725,4.9999 +5.75,4.9999 +5.775,4.9999 +5.8,4.9999 +5.825,4.9999 +5.85,4.9999 +5.875,4.9999 +5.9,4.9999 +5.925,4.9999 +5.95,4.9999 +5.975,4.9999 +6,4.9999 diff --git a/test/api/vclamp.cpp b/test/api/vclamp.cpp index ee938e626e..6e9c26c775 100644 --- a/test/api/vclamp.cpp +++ b/test/api/vclamp.cpp @@ -1,6 +1,8 @@ // NOTE: this assumes neuronapi.h is on your CPLUS_INCLUDE_PATH #include "neuronapi.h" #include + +#include #include #include #include From 0b8fd3b5bd99abc2d77ee2e625bdff405baa770b Mon Sep 17 00:00:00 2001 From: "Robert A. McDougal" Date: Sun, 25 Jun 2023 10:31:30 -0400 Subject: [PATCH 32/65] fix to header file name of api --- cmake/NeuronFileLists.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/NeuronFileLists.cmake b/cmake/NeuronFileLists.cmake index 225753c492..78b6fedade 100644 --- a/cmake/NeuronFileLists.cmake +++ b/cmake/NeuronFileLists.cmake @@ -11,7 +11,7 @@ set(STRUCTURED_HEADER_FILES_TO_INSTALL set(HEADER_FILES_TO_INSTALL nrniv/backtrace_utils.h nrniv/bbsavestate.h - nrniv/nrnapi.h + nrniv/neuronapi.h nrnmpi/nrnmpidec.h nrnoc/cabvars.h nrnoc/md1redef.h From 7b48a89c76b2887f08e838051317380851efe913 Mon Sep 17 00:00:00 2001 From: "Robert A. McDougal" Date: Sun, 25 Jun 2023 15:53:24 -0400 Subject: [PATCH 33/65] hh_sim and sections work with handles don't have quantitative identity with the old hh_sim results, but very close. --- src/nrniv/neuronapi.cpp | 101 ++++-- src/nrniv/neuronapi.h | 51 +-- test/api/hh_sim.cpp | 121 ++++--- test/api/ref/hh_sim.csv | 750 ++++++++++++++++++++-------------------- test/api/sections.c | 52 +-- 5 files changed, 559 insertions(+), 516 deletions(-) diff --git a/src/nrniv/neuronapi.cpp b/src/nrniv/neuronapi.cpp index 7b775cd6fe..ee10ddafe4 100644 --- a/src/nrniv/neuronapi.cpp +++ b/src/nrniv/neuronapi.cpp @@ -90,7 +90,7 @@ void nrn_redirect_stdout(int (*myprint)(int, char*)) { * Sections ****************************************/ -Section* nrn_new_section(char const* const name) { +Section* nrn_section_new(char const* const name) { // TODO: check for memory leaks; should we free the symbol, pitm, etc? Symbol* symbol = new Symbol; auto pitm = new nrn_Item*; @@ -105,7 +105,7 @@ Section* nrn_new_section(char const* const name) { return (*pitm)->element.sec; } -void nrn_connect_sections(Section* child_sec, +void nrn_section_connect(Section* child_sec, double child_x, Section* parent_sec, double parent_x) { @@ -116,7 +116,7 @@ void nrn_connect_sections(Section* child_sec, simpleconnectsection(); } -void nrn_set_section_length(Section* sec, double length) { +void nrn_section_length_set(Section* sec, double length) { // TODO: call can_change_morph(sec) to check pt3dconst_; how should we handle // that? // TODO: is there a named constant so we don't have to use the magic number 2? @@ -164,21 +164,21 @@ void nrn_insert_mechanism(Section* sec, Symbol* mechanism) { * Segments ****************************************/ -int nrn_get_nseg(Section const* const sec) { +int nrn_nseg_get(Section const* const sec) { // always one more node than nseg return sec->nnode - 1; } -void nrn_set_nseg(Section* const sec, const int nseg) { +void nrn_nseg_set(Section* const sec, const int nseg) { nrn_change_nseg(sec, nseg); } -void nrn_set_segment_diam(Section* const sec, const double x, const double diam) { +void nrn_segment_diam_set(Section* const sec, const double x, const double diam) { Node* const node = node_exact(sec, x); // TODO: this is fine if no 3D points; does it work if there are 3D points? for (auto prop = node->prop; prop; prop = prop->next) { if (prop->_type == MORPHOLOGY) { - prop->param[0] = diam; + prop->param(0) = diam; diam_changed = 1; node->sec->recalc_area_ = 1; break; @@ -186,15 +186,23 @@ void nrn_set_segment_diam(Section* const sec, const double x, const double diam) } } -double* nrn_get_rangevar_ptr(Section* const sec, Symbol* const sym, double const x) { - return nrn_rangepointer(sec, sym, x); +double nrn_rangevar_get(Symbol* const sym, Section* const sec, double x) { + return *nrn_rangepointer(sec, sym, x); +} + +void nrn_rangevar_set(Symbol* const sym, Section* const sec, double x, double value) { + *nrn_rangepointer(sec, sym, x) = value; +} + +void nrn_rangevar_push(Symbol* const sym, Section* const sec, double x) { + hoc_push(nrn_rangepointer(sec, sym, x)); } nrn_Item* nrn_get_allsec(void) { return section_list; } -nrn_Item* nrn_get_sectionlist_data(Object* obj) { +nrn_Item* nrn_sectionlist_data_get(Object* obj) { // TODO: verify the obj is in fact a SectionList return (nrn_Item*) obj->u.this_pointer; } @@ -203,37 +211,41 @@ nrn_Item* nrn_get_sectionlist_data(Object* obj) { * Functions, objects, and the stack ****************************************/ -Symbol* nrn_get_symbol(char const* const name) { +Symbol* nrn_symbol(char const* const name) { return hoc_lookup(name); } -int nrn_get_symbol_type(Symbol* sym) { +int nrn_symbol_type(Symbol* sym) { // TODO: these types are in parse.hpp and are not the same between versions, // so we really should wrap return sym->type; } -double* nrn_get_symbol_ptr(Symbol* sym) { - return sym->u.pval; +void nrn_symbol_push(Symbol* sym) { + hoc_pushpx(sym->u.pval); } -void nrn_push_double(double val) { +/*double* nrn_get_symbol_ptr(Symbol* sym) { + return sym->u.pval; +}*/ + +void nrn_double_push(double val) { hoc_pushx(val); } -double nrn_pop_double(void) { +double nrn_double_pop(void) { return hoc_xpop(); } -void nrn_push_double_ptr(double* addr) { +void nrn_double_ptr_push(double* addr) { hoc_pushpx(addr); } -double* nrn_pop_double_ptr(void) { +double* nrn_double_ptr_pop(void) { return hoc_pxpop(); } -void nrn_push_str(char** str) { +void nrn_str_push(char** str) { hoc_pushstr(str); } @@ -241,19 +253,19 @@ char** nrn_pop_str(void) { return hoc_strpop(); } -void nrn_push_int(int i) { +void nrn_int_push(int i) { hoc_pushi(i); } -int nrn_pop_int(void) { +int nrn_int_pop(void) { return hoc_ipop(); } -void nrn_push_object(Object* obj) { +void nrn_object_push(Object* obj) { hoc_push_object(obj); } -Object* nrn_pop_object(void) { +Object* nrn_object_pop(void) { // NOTE: the returned object should be unref'd when no longer needed Object** obptr = hoc_objpop(); Object* new_ob_ptr = *obptr; @@ -307,29 +319,29 @@ char const* const nrn_stack_type_name(stack_types_t id) { } } -Object* nrn_new_object(Symbol* sym, int narg) { +Object* nrn_object_new(Symbol* sym, int narg) { return hoc_newobj1(sym, narg); } -Symbol* nrn_get_method_symbol(Object* obj, char const* const name) { +Symbol* nrn_method_symbol(Object* obj, char const* const name) { return hoc_table_lookup(name, obj->ctemplate->symtable); } -void nrn_call_method(Object* obj, Symbol* method_sym, int narg) { +void nrn_method_call(Object* obj, Symbol* method_sym, int narg) { OcJump::execute_throw_on_exception(obj, method_sym, narg); } -void nrn_call_function(Symbol* sym, int narg) { +void nrn_function_call(Symbol* sym, int narg) { // NOTE: this differs from hoc_call_func in that the response remains on the // stack OcJump::execute_throw_on_exception(sym, narg); } -void nrn_ref_object(Object* obj) { +void nrn_object_ref(Object* obj) { obj->refcount++; } -void nrn_unref_object(Object* obj) { +void nrn_object_unref(Object* obj) { hoc_obj_unref(obj); } @@ -340,7 +352,7 @@ char const* nrn_get_class_name(Object* obj) { /**************************************** * Miscellaneous ****************************************/ -int nrn_call_hoc(char const* const command) { +int nrn_hoc_call(char const* const command) { return hoc_oc(command); } @@ -435,9 +447,34 @@ double* nrn_vector_data_ptr(Object* vec) { return vector_vec((IvocVect*) vec->u.this_pointer); } -double* nrn_get_pp_property_ptr(Object* pp, const char* name) { +double nrn_pp_property_get(Object* pp, const char* name) { + int index = hoc_table_lookup(name, pp->ctemplate->symtable)->u.rng.index; + return *ob2pntproc_0(pp)->prop->param_handle(index); +} + +double nrn_pp_property_array_get(Object* pp, const char* name, int i) { + int index = hoc_table_lookup(name, pp->ctemplate->symtable)->u.rng.index; + return *ob2pntproc_0(pp)->prop->param_handle(index, i); +} + +void nrn_pp_property_set(Object* pp, const char* name, double value) { + int index = hoc_table_lookup(name, pp->ctemplate->symtable)->u.rng.index; + *ob2pntproc_0(pp)->prop->param_handle(index) = value; +} + +void nrn_pp_property_array_set(Object* pp, const char* name, int i, double value) { + int index = hoc_table_lookup(name, pp->ctemplate->symtable)->u.rng.index; + *ob2pntproc_0(pp)->prop->param_handle(index, i) = value; +} + +void nrn_pp_property_push(Object* pp, const char* name) { + int index = hoc_table_lookup(name, pp->ctemplate->symtable)->u.rng.index; + hoc_push(ob2pntproc_0(pp)->prop->param_handle(index)); +} + +void nrn_pp_property_array_push(Object* pp, const char* name, int i) { int index = hoc_table_lookup(name, pp->ctemplate->symtable)->u.rng.index; - return &ob2pntproc_0(pp)->prop->param[index]; + hoc_push(ob2pntproc_0(pp)->prop->param_handle(index, i)); } double* nrn_get_steered_property_ptr(Object* obj, const char* name) { diff --git a/src/nrniv/neuronapi.h b/src/nrniv/neuronapi.h index 3a1f3e45ac..2ea63c55e0 100644 --- a/src/nrniv/neuronapi.h +++ b/src/nrniv/neuronapi.h @@ -32,12 +32,12 @@ void (*nrn_redirect_stdout)(int (*myprint)(int, char*)); /**************************************** * Sections ****************************************/ -Section* (*nrn_new_section)(char const* name); -void (*nrn_connect_sections)(Section* child_sec, +Section* (*nrn_section_new)(char const* name); +void (*nrn_section_connect)(Section* child_sec, double child_x, Section* parent_sec, double parent_x); -void (*nrn_set_section_length)(Section* sec, double length); +void (*nrn_section_length_set)(Section* sec, double length); double (*nrn_get_section_length)(Section* sec); double (*nrn_get_section_Ra)(Section* sec); void (*nrn_set_section_Ra)(Section* sec, double val); @@ -46,43 +46,46 @@ void (*nrn_push_section)(Section* sec); void (*nrn_pop_section)(void); void (*nrn_insert_mechanism)(Section* sec, Symbol* mechanism); nrn_Item* (*nrn_get_allsec)(void); -nrn_Item* (*nrn_get_sectionlist_data)(Object* obj); +nrn_Item* (*nrn_sectionlist_data_get)(Object* obj); /**************************************** * Segments ****************************************/ -int (*nrn_get_nseg)(Section const* sec); -void (*nrn_set_nseg)(Section* sec, int nseg); -void (*nrn_set_segment_diam)(Section* sec, double x, double diam); -double* (*nrn_get_rangevar_ptr)(Section* sec, Symbol* sym, double x); +int (*nrn_nseg_get)(Section const* sec); +void (*nrn_nseg_set)(Section* sec, int nseg); +void (*nrn_segment_diam_set)(Section* sec, double x, double diam); +void (*nrn_rangevar_push)(Symbol* const sym, Section* const sec, double x); +double (*nrn_rangevar_get)(Symbol* const sym, Section* const sec, double x); +void (*nrn_rangevar_set)(Symbol* const sym, Section* const sec, double x, double value); /**************************************** * Functions, objects, and the stack ****************************************/ -Symbol* (*nrn_get_symbol)(char const* name); +Symbol* (*nrn_symbol)(char const* name); +void (*nrn_symbol_push)(Symbol* sym); int (*nrn_get_symbol_type)(Symbol* sym); double* (*nrn_get_symbol_ptr)(Symbol* sym); -void (*nrn_push_double)(double val); -double (*nrn_pop_double)(void); -void (*nrn_push_double_ptr)(double* addr); -double* (*nrn_pop_double_ptr)(void); -void (*nrn_push_str)(char** str); +void (*nrn_double_push)(double val); +double (*nrn_double_pop)(void); +void (*nrn_double_ptr_push)(double* addr); +double* (*nrn_double_ptr_pop)(void); +void (*nrn_str_push)(char** str); char** (*nrn_pop_str)(void); void (*nrn_push_int)(int i); int (*nrn_pop_int)(void); void (*nrn_push_object)(Object* obj); -Object* (*nrn_pop_object)(void); +Object* (*nrn_object_pop)(void); stack_types_t (*nrn_stack_type)(void); char const* const (*nrn_stack_type_name)(stack_types_t id); -Object* (*nrn_new_object)(Symbol* sym, int narg); -Symbol* (*nrn_get_method_symbol)(Object* obj, char const* name); +Object* (*nrn_object_new)(Symbol* sym, int narg); +Symbol* (*nrn_method_symbol)(Object* obj, char const* name); // TODO: the next two functions throw exceptions in C++; need a version that // returns a bool success indicator instead (this is actually the // classic behavior of OcJump) -void (*nrn_call_method)(Object* obj, Symbol* method_sym, int narg); -void (*nrn_call_function)(Symbol* sym, int narg); +void (*nrn_method_call)(Object* obj, Symbol* method_sym, int narg); +void (*nrn_function_call)(Symbol* sym, int narg); void (*nrn_ref_object)(Object* obj); -void (*nrn_unref_object)(Object* obj); +void (*nrn_object_unref)(Object* obj); char const* (*nrn_get_class_name)(Object* obj); /**************************************** @@ -99,8 +102,12 @@ char const* (*nrn_symbol_table_iterator_next)(SymbolTableIterator* st); int (*nrn_symbol_table_iterator_done)(SymbolTableIterator* st); int (*nrn_vector_capacity)(Object* vec); double* (*nrn_vector_data_ptr)(Object* vec); -double* (*nrn_get_pp_property_ptr)(Object* pp, const char* name); -double* (*nrn_get_steered_property_ptr)(Object* obj, const char* name); +double (*nrn_pp_property_get)(Object* pp, const char* name); +double (*nrn_pp_property_array_get)(Object* pp, const char* name, int i); +void (*nrn_pp_property_set)(Object* pp, const char* name, double value); +void (*nrn_pp_property_array_set)(Object* pp, const char* name, int i, double value); +void (*nrn_pp_property_push)(Object* pp, const char* name); +void (*nrn_pp_property_array_push)(Object* pp, const char* name, int i); char const* (*nrn_get_symbol_name)(Symbol* sym); Symlist* (*nrn_get_symbol_table)(Symbol* sym); Symlist* (*nrn_get_global_symbol_table)(void); diff --git a/test/api/hh_sim.cpp b/test/api/hh_sim.cpp index 7c22c9edd2..12a89e798a 100644 --- a/test/api/hh_sim.cpp +++ b/test/api/hh_sim.cpp @@ -26,38 +26,36 @@ void setup_neuron_api(void) { } nrn_init = reinterpret_cast(dlsym(handle, "nrn_init")); assert(nrn_init); - nrn_push_str = reinterpret_cast(dlsym(handle, "nrn_push_str")); - nrn_call_function = reinterpret_cast( - dlsym(handle, "nrn_call_function")); - nrn_get_symbol = reinterpret_cast(dlsym(handle, "nrn_get_symbol")); - nrn_pop_double = reinterpret_cast(dlsym(handle, "nrn_pop_double")); + nrn_str_push = reinterpret_cast(dlsym(handle, "nrn_str_push")); + nrn_function_call = reinterpret_cast( + dlsym(handle, "nrn_function_call")); + nrn_symbol = reinterpret_cast(dlsym(handle, "nrn_symbol")); + nrn_double_pop = reinterpret_cast(dlsym(handle, "nrn_double_pop")); nrn_push_section = reinterpret_cast( dlsym(handle, "nrn_push_section")); - nrn_new_section = reinterpret_cast(dlsym(handle, "nrn_new_section")); - nrn_set_nseg = reinterpret_cast(dlsym(handle, "nrn_set_nseg")); + nrn_section_new = reinterpret_cast(dlsym(handle, "nrn_section_new")); + nrn_nseg_set = reinterpret_cast(dlsym(handle, "nrn_nseg_set")); nrn_insert_mechanism = reinterpret_cast( dlsym(handle, "nrn_insert_mechanism")); - nrn_push_double = reinterpret_cast(dlsym(handle, "nrn_push_double")); - nrn_new_object = reinterpret_cast(dlsym(handle, "nrn_new_object")); - nrn_get_pp_property_ptr = reinterpret_cast( - dlsym(handle, "nrn_get_pp_property_ptr")); - nrn_push_double_ptr = reinterpret_cast( - dlsym(handle, "nrn_push_double_ptr")); - nrn_get_rangevar_ptr = reinterpret_cast( - dlsym(handle, "nrn_get_rangevar_ptr")); - nrn_call_method = reinterpret_cast(dlsym(handle, "nrn_call_method")); - nrn_unref_object = reinterpret_cast( - dlsym(handle, "nrn_unref_object")); + nrn_double_push = reinterpret_cast(dlsym(handle, "nrn_double_push")); + nrn_object_new = reinterpret_cast(dlsym(handle, "nrn_object_new")); + nrn_rangevar_push = reinterpret_cast( + dlsym(handle, "nrn_rangevar_push")); + nrn_method_call = reinterpret_cast(dlsym(handle, "nrn_method_call")); + nrn_object_unref = reinterpret_cast( + dlsym(handle, "nrn_object_unref")); nrn_vector_capacity = reinterpret_cast( dlsym(handle, "nrn_vector_capacity")); nrn_vector_data_ptr = reinterpret_cast( dlsym(handle, "nrn_vector_data_ptr")); - nrn_get_method_symbol = reinterpret_cast( - dlsym(handle, "nrn_get_method_symbol")); - nrn_call_method = reinterpret_cast(dlsym(handle, "nrn_call_method")); - nrn_pop_object = reinterpret_cast(dlsym(handle, "nrn_pop_object")); - nrn_get_symbol_ptr = reinterpret_cast( - dlsym(handle, "nrn_get_symbol_ptr")); + nrn_method_symbol = reinterpret_cast( + dlsym(handle, "nrn_method_symbol")); + nrn_method_call = reinterpret_cast(dlsym(handle, "nrn_method_call")); + nrn_object_pop = reinterpret_cast(dlsym(handle, "nrn_object_pop")); + nrn_symbol_push = reinterpret_cast( + dlsym(handle, "nrn_symbol_push")); + nrn_pp_property_set = reinterpret_cast( + dlsym(handle, "nrn_pp_property_set")); } int main(void) { @@ -73,62 +71,63 @@ int main(void) { // load the stdrun library temp_str = new char[11]; strcpy(temp_str, "stdrun.hoc"); - nrn_push_str(&temp_str); - nrn_call_function(nrn_get_symbol("load_file"), 1); - nrn_pop_double(); + nrn_str_push(&temp_str); + nrn_function_call(nrn_symbol("load_file"), 1); + nrn_double_pop(); delete[] temp_str; // topology - soma = nrn_new_section("soma"); - nrn_set_nseg(soma, 3); + soma = nrn_section_new("soma"); + nrn_nseg_set(soma, 3); // define soma morphology with two 3d points nrn_push_section(soma); // (0, 0, 0, 10) - nrn_push_double(0); - nrn_push_double(0); - nrn_push_double(0); - nrn_push_double(10); - nrn_call_function(nrn_get_symbol("pt3dadd"), 4); - nrn_pop_double(); // pt3dadd returns a number + nrn_double_push(0); + nrn_double_push(0); + nrn_double_push(0); + nrn_double_push(10); + nrn_function_call(nrn_symbol("pt3dadd"), 4); + nrn_double_pop(); // pt3dadd returns a number // (10, 0, 0, 10) - nrn_push_double(10); - nrn_push_double(0); - nrn_push_double(0); - nrn_push_double(10); - nrn_call_function(nrn_get_symbol("pt3dadd"), 4); - nrn_pop_double(); // pt3dadd returns a number + nrn_double_push(10); + nrn_double_push(0); + nrn_double_push(0); + nrn_double_push(10); + nrn_function_call(nrn_symbol("pt3dadd"), 4); + nrn_double_pop(); // pt3dadd returns a number // ion channels - nrn_insert_mechanism(soma, nrn_get_symbol("hh")); + nrn_insert_mechanism(soma, nrn_symbol("hh")); // current clamp at soma(0.5) - nrn_push_double(0.5); - iclamp = nrn_new_object(nrn_get_symbol("IClamp"), 1); - *nrn_get_pp_property_ptr(iclamp, "amp") = 0.3; - *nrn_get_pp_property_ptr(iclamp, "del") = 1; - *nrn_get_pp_property_ptr(iclamp, "dur") = 0.1; + nrn_double_push(0.5); + iclamp = nrn_object_new(nrn_symbol("IClamp"), 1); + nrn_pp_property_set(iclamp, "amp", 0.3); + nrn_pp_property_set(iclamp, "del", 1); + nrn_pp_property_set(iclamp, "dur", 0.1); // setup recording - v = nrn_new_object(nrn_get_symbol("Vector"), 0); - nrn_push_double_ptr(nrn_get_rangevar_ptr(soma, nrn_get_symbol("v"), 0.5)); - nrn_call_method(v, nrn_get_method_symbol(v, "record"), 1); - nrn_unref_object(nrn_pop_object()); // record returns the vector - t = nrn_new_object(nrn_get_symbol("Vector"), 0); - nrn_push_double_ptr(nrn_get_symbol_ptr(nrn_get_symbol("t"))); - nrn_call_method(t, nrn_get_method_symbol(t, "record"), 1); - nrn_unref_object(nrn_pop_object()); // record returns the vector + v = nrn_object_new(nrn_symbol("Vector"), 0); + nrn_rangevar_push(nrn_symbol("v"), soma, 0.5); + nrn_method_call(v, nrn_method_symbol(v, "record"), 1); + nrn_object_unref(nrn_object_pop()); // record returns the vector + t = nrn_object_new(nrn_symbol("Vector"), 0); + assert(nrn_symbol_push); + nrn_symbol_push(nrn_symbol("t")); + nrn_method_call(t, nrn_method_symbol(t, "record"), 1); + nrn_object_unref(nrn_object_pop()); // record returns the vector // finitialize(-65) - nrn_push_double(-65); - nrn_call_function(nrn_get_symbol("finitialize"), 1); - nrn_pop_double(); + nrn_double_push(-65); + nrn_function_call(nrn_symbol("finitialize"), 1); + nrn_double_pop(); // continuerun(10) - nrn_push_double(10); - nrn_call_function(nrn_get_symbol("continuerun"), 1); - nrn_pop_double(); + nrn_double_push(10); + nrn_function_call(nrn_symbol("continuerun"), 1); + nrn_double_pop(); double* tvec = nrn_vector_data_ptr(t); double* vvec = nrn_vector_data_ptr(v); diff --git a/test/api/ref/hh_sim.csv b/test/api/ref/hh_sim.csv index bb08dec305..e5cbb3132e 100644 --- a/test/api/ref/hh_sim.csv +++ b/test/api/ref/hh_sim.csv @@ -7,7 +7,7 @@ 0.15,-64.9957 0.175,-64.995 0.2,-64.9943 -0.225,-64.9937 +0.225,-64.9936 0.25,-64.993 0.275,-64.9923 0.3,-64.9917 @@ -23,379 +23,379 @@ 0.55,-64.9855 0.575,-64.9849 0.6,-64.9843 -0.625,-64.9838 -0.65,-64.9832 +0.625,-64.9837 +0.65,-64.9831 0.675,-64.9826 -0.7,-64.9821 -0.725,-64.9815 -0.75,-64.981 -0.775,-64.9804 -0.8,-64.9799 -0.825,-64.9793 -0.85,-64.9788 -0.875,-64.9783 -0.9,-64.9778 -0.925,-64.9772 -0.95,-64.9767 -0.975,-64.9762 -1,-64.9757 -1.025,-62.6267 -1.05,-60.3155 -1.075,-58.0385 -1.1,-55.7926 -1.125,-55.9213 -1.15,-56.0344 -1.175,-56.1325 -1.2,-56.2154 -1.225,-56.2832 -1.25,-56.3361 -1.275,-56.3744 -1.3,-56.3988 -1.325,-56.4098 -1.35,-56.4079 -1.375,-56.3937 -1.4,-56.3679 -1.425,-56.331 -1.45,-56.2835 -1.475,-56.2259 -1.5,-56.1586 -1.525,-56.0819 -1.55,-55.9962 -1.575,-55.9017 -1.6,-55.7985 -1.625,-55.6867 -1.65,-55.5664 -1.675,-55.4374 -1.7,-55.2998 -1.725,-55.1532 -1.75,-54.9975 -1.775,-54.8322 -1.8,-54.6571 -1.825,-54.4715 -1.85,-54.2749 -1.875,-54.0666 -1.9,-53.8458 -1.925,-53.6115 -1.95,-53.3627 -1.975,-53.0983 -2,-52.8168 -2.025,-52.5166 -2.05,-52.1959 -2.075,-51.8527 -2.1,-51.4847 -2.125,-51.089 -2.15,-50.6627 -2.175,-50.202 -2.2,-49.7028 -2.225,-49.1601 -2.25,-48.5684 -2.275,-47.9207 -2.3,-47.2093 -2.325,-46.4247 -2.35,-45.5556 -2.375,-44.5887 -2.4,-43.5079 -2.425,-42.2936 -2.45,-40.9222 -2.475,-39.3652 -2.5,-37.5878 -2.525,-35.548 -2.55,-33.1954 -2.575,-30.4703 -2.6,-27.3042 -2.625,-23.6215 -2.65,-19.3467 -2.675,-14.4178 -2.7,-8.81037 -2.725,-2.5739 -2.75,4.1292 -2.775,11.0022 -2.8,17.6417 -2.825,23.6253 -2.85,28.6267 -2.875,32.4957 -2.9,35.2621 -2.925,37.0784 -2.95,38.1456 -2.975,38.6564 -3,38.7679 -3.025,38.5958 -3.05,38.2201 -3.075,37.6939 -3.1,37.0523 -3.125,36.3185 -3.15,35.5081 -3.175,34.6321 -3.2,33.6988 -3.225,32.7148 -3.25,31.6855 -3.275,30.6155 -3.3,29.5092 -3.325,28.3703 -3.35,27.2026 -3.375,26.0092 -3.4,24.7935 -3.425,23.5584 -3.45,22.3065 -3.475,21.0406 -3.5,19.763 -3.525,18.4761 -3.55,17.1818 -3.575,15.8821 -3.6,14.5789 -3.625,13.2736 -3.65,11.9679 -3.675,10.6629 -3.7,9.36008 -3.725,8.06035 -3.75,6.76472 -3.775,5.47404 -3.8,4.18907 -3.825,2.91045 -3.85,1.63876 -3.875,0.374448 -3.9,-0.882072 -3.925,-2.13048 -3.95,-3.37053 -3.975,-4.60203 -4,-5.82484 -4.025,-7.0389 -4.05,-8.24417 -4.075,-9.44068 -4.1,-10.6285 -4.125,-11.8078 -4.15,-12.9786 -4.175,-14.1412 -4.2,-15.2959 -4.225,-16.4429 -4.25,-17.5826 -4.275,-18.7154 -4.3,-19.8418 -4.325,-20.9622 -4.35,-22.0774 -4.375,-23.1879 -4.4,-24.2945 -4.425,-25.3982 -4.45,-26.4999 -4.475,-27.6007 -4.5,-28.7019 -4.525,-29.8049 -4.55,-30.9112 -4.575,-32.0225 -4.6,-33.1408 -4.625,-34.2682 -4.65,-35.407 -4.675,-36.5597 -4.7,-37.7289 -4.725,-38.9175 -4.75,-40.1286 -4.775,-41.3653 -4.8,-42.6308 -4.825,-43.9283 -4.85,-45.261 -4.875,-46.6315 -4.9,-48.0421 -4.925,-49.4944 -4.95,-50.9887 -4.975,-52.5241 -5,-54.0973 -5.025,-55.7031 -5.05,-57.3332 -5.075,-58.9761 -5.1,-60.617 -5.125,-62.2382 -5.15,-63.8196 -5.175,-65.3398 -5.2,-66.7778 -5.225,-68.115 -5.25,-69.3363 -5.275,-70.432 -5.3,-71.3983 -5.325,-72.2365 -5.35,-72.9529 -5.375,-73.5572 -5.4,-74.0612 -5.425,-74.4775 -5.45,-74.8186 -5.475,-75.0963 -5.5,-75.3211 -5.525,-75.5022 -5.55,-75.6476 -5.575,-75.7638 -5.6,-75.8563 -5.625,-75.9297 -5.65,-75.9875 -5.675,-76.0327 -5.7,-76.0678 -5.725,-76.0947 -5.75,-76.1148 -5.775,-76.1296 -5.8,-76.1399 -5.825,-76.1466 -5.85,-76.1504 +0.7,-64.982 +0.725,-64.9814 +0.75,-64.9809 +0.775,-64.9803 +0.8,-64.9798 +0.825,-64.9792 +0.85,-64.9787 +0.875,-64.9782 +0.9,-64.9776 +0.925,-64.9771 +0.95,-64.9766 +0.975,-64.9761 +1,-64.9755 +1.025,-62.6265 +1.05,-60.3153 +1.075,-58.0383 +1.1,-55.7924 +1.125,-55.921 +1.15,-56.034 +1.175,-56.132 +1.2,-56.2148 +1.225,-56.2824 +1.25,-56.3352 +1.275,-56.3733 +1.3,-56.3975 +1.325,-56.4081 +1.35,-56.4058 +1.375,-56.3913 +1.4,-56.365 +1.425,-56.3276 +1.45,-56.2796 +1.475,-56.2214 +1.5,-56.1535 +1.525,-56.0762 +1.55,-55.9898 +1.575,-55.8946 +1.6,-55.7907 +1.625,-55.6782 +1.65,-55.5571 +1.675,-55.4272 +1.7,-55.2886 +1.725,-55.1409 +1.75,-54.9841 +1.775,-54.8177 +1.8,-54.6413 +1.825,-54.4543 +1.85,-54.2562 +1.875,-54.0463 +1.9,-53.8237 +1.925,-53.5876 +1.95,-53.3368 +1.975,-53.07 +2,-52.786 +2.025,-52.4832 +2.05,-52.1595 +2.075,-51.813 +2.1,-51.4413 +2.125,-51.0416 +2.15,-50.6108 +2.175,-50.145 +2.2,-49.6401 +2.225,-49.0911 +2.25,-48.4921 +2.275,-47.8362 +2.3,-47.1153 +2.325,-46.3199 +2.35,-45.4384 +2.375,-44.4569 +2.4,-43.3591 +2.425,-42.1248 +2.45,-40.73 +2.475,-39.1452 +2.5,-37.3348 +2.525,-35.2558 +2.55,-32.8565 +2.575,-30.076 +2.6,-26.8444 +2.625,-23.086 +2.65,-18.7256 +2.675,-13.7049 +2.7,-8.00686 +2.725,-1.69371 +2.75,5.0543 +2.775,11.9232 +2.8,18.5003 +2.825,24.3692 +2.85,29.2241 +2.875,32.9401 +2.9,35.5682 +2.925,37.2717 +2.95,38.2532 +2.975,38.7018 +3,38.7692 +3.025,38.5657 +3.05,38.1671 +3.075,37.6238 +3.1,36.9689 +3.125,36.2242 +3.15,35.4047 +3.175,34.5208 +3.2,33.5807 +3.225,32.5906 +3.25,31.5559 +3.275,30.4811 +3.3,29.3705 +3.325,28.2278 +3.35,27.0567 +3.375,25.8604 +3.4,24.6422 +3.425,23.4048 +3.45,22.1512 +3.475,20.8838 +3.5,19.605 +3.525,18.3171 +3.55,17.0222 +3.575,15.7221 +3.6,14.4186 +3.625,13.1133 +3.65,11.8077 +3.675,10.503 +3.7,9.20059 +3.725,7.90141 +3.75,6.60645 +3.775,5.31652 +3.8,4.03238 +3.825,2.75468 +3.85,1.48395 +3.875,0.220652 +3.9,-1.03482 +3.925,-2.28213 +3.95,-3.52107 +3.975,-4.75147 +4,-5.97317 +4.025,-7.18608 +4.05,-8.39022 +4.075,-9.58564 +4.1,-10.7724 +4.125,-11.9506 +4.15,-13.1204 +4.175,-14.282 +4.2,-15.4357 +4.225,-16.5819 +4.25,-17.7208 +4.275,-18.8528 +4.3,-19.9784 +4.325,-21.0982 +4.35,-22.2127 +4.375,-23.3227 +4.4,-24.4289 +4.425,-25.5324 +4.45,-26.6341 +4.475,-27.735 +4.5,-28.8365 +4.525,-29.9399 +4.55,-31.0467 +4.575,-32.1588 +4.6,-33.2781 +4.625,-34.4069 +4.65,-35.5473 +4.675,-36.7019 +4.7,-37.8735 +4.725,-39.0647 +4.75,-40.2788 +4.775,-41.5189 +4.8,-42.7881 +4.825,-44.0898 +4.85,-45.4269 +4.875,-46.8021 +4.9,-48.2176 +4.925,-49.6749 +4.95,-51.1741 +4.975,-52.714 +5,-54.2913 +5.025,-55.9003 +5.05,-57.5323 +5.075,-59.1754 +5.1,-60.8146 +5.125,-62.4318 +5.15,-64.0066 +5.175,-65.5178 +5.2,-66.9443 +5.225,-68.268 +5.25,-69.4745 +5.275,-70.5547 +5.3,-71.5052 +5.325,-72.3283 +5.35,-73.0307 +5.375,-73.6223 +5.4,-74.1151 +5.425,-74.5218 +5.45,-74.8547 +5.475,-75.1255 +5.5,-75.3447 +5.525,-75.5212 +5.55,-75.6628 +5.575,-75.7759 +5.6,-75.8659 +5.625,-75.9373 +5.65,-75.9934 +5.675,-76.0374 +5.7,-76.0714 +5.725,-76.0974 +5.75,-76.1168 +5.775,-76.131 +5.8,-76.1409 +5.825,-76.1472 +5.85,-76.1507 5.875,-76.1518 -5.9,-76.1512 -5.925,-76.1489 -5.95,-76.1453 -5.975,-76.1405 -6,-76.1348 -6.025,-76.1283 -6.05,-76.1211 -6.075,-76.1133 -6.1,-76.1051 -6.125,-76.0964 -6.15,-76.0873 -6.175,-76.0779 -6.2,-76.0682 -6.225,-76.0582 -6.25,-76.0481 -6.275,-76.0377 -6.3,-76.0271 -6.325,-76.0163 -6.35,-76.0053 -6.375,-75.9942 -6.4,-75.9829 -6.425,-75.9715 -6.45,-75.96 -6.475,-75.9483 -6.5,-75.9365 -6.525,-75.9245 -6.55,-75.9125 -6.575,-75.9003 -6.6,-75.8879 -6.625,-75.8755 -6.65,-75.863 -6.675,-75.8503 -6.7,-75.8375 -6.725,-75.8246 -6.75,-75.8116 -6.775,-75.7985 -6.8,-75.7852 -6.825,-75.7718 -6.85,-75.7584 -6.875,-75.7448 -6.9,-75.7311 -6.925,-75.7172 -6.95,-75.7033 -6.975,-75.6893 -7,-75.6751 -7.025,-75.6608 -7.05,-75.6464 -7.075,-75.6319 -7.1,-75.6173 -7.125,-75.6025 -7.15,-75.5877 -7.175,-75.5727 -7.2,-75.5576 -7.225,-75.5424 -7.25,-75.5271 -7.275,-75.5117 -7.3,-75.4961 -7.325,-75.4805 -7.35,-75.4647 -7.375,-75.4488 -7.4,-75.4328 -7.425,-75.4166 -7.45,-75.4004 -7.475,-75.384 -7.5,-75.3675 -7.525,-75.3509 -7.55,-75.3342 -7.575,-75.3173 -7.6,-75.3004 -7.625,-75.2833 -7.65,-75.2661 -7.675,-75.2488 -7.7,-75.2314 -7.725,-75.2138 -7.75,-75.1962 -7.775,-75.1784 -7.8,-75.1605 -7.825,-75.1425 -7.85,-75.1244 -7.875,-75.1061 -7.9,-75.0878 -7.925,-75.0693 -7.95,-75.0507 -7.975,-75.032 -8,-75.0131 -8.025,-74.9942 -8.05,-74.9751 -8.075,-74.9559 -8.1,-74.9367 -8.125,-74.9172 -8.15,-74.8977 -8.175,-74.8781 -8.2,-74.8583 -8.225,-74.8385 -8.25,-74.8185 -8.275,-74.7984 -8.3,-74.7782 -8.325,-74.7578 -8.35,-74.7374 -8.375,-74.7168 -8.4,-74.6962 -8.425,-74.6754 -8.45,-74.6545 -8.475,-74.6335 -8.5,-74.6124 -8.525,-74.5912 -8.55,-74.5699 -8.575,-74.5484 -8.6,-74.5269 -8.625,-74.5052 -8.65,-74.4834 -8.675,-74.4616 -8.7,-74.4396 -8.725,-74.4175 -8.75,-74.3953 -8.775,-74.373 -8.8,-74.3506 -8.825,-74.3281 -8.85,-74.3055 -8.875,-74.2828 -8.9,-74.2599 -8.925,-74.237 -8.95,-74.214 -8.975,-74.1909 -9,-74.1676 -9.025,-74.1443 -9.05,-74.1209 -9.075,-74.0973 -9.1,-74.0737 -9.125,-74.05 -9.15,-74.0262 -9.175,-74.0023 -9.2,-73.9783 -9.225,-73.9542 -9.25,-73.93 -9.275,-73.9057 -9.3,-73.8813 -9.325,-73.8568 -9.35,-73.8322 -9.375,-73.8076 -9.4,-73.7828 -9.425,-73.758 -9.45,-73.7331 -9.475,-73.7081 -9.5,-73.683 -9.525,-73.6578 -9.55,-73.6325 -9.575,-73.6072 -9.6,-73.5818 -9.625,-73.5563 -9.65,-73.5307 -9.675,-73.505 -9.7,-73.4792 -9.725,-73.4534 -9.75,-73.4275 -9.775,-73.4015 -9.8,-73.3755 -9.825,-73.3493 -9.85,-73.3231 -9.875,-73.2968 -9.9,-73.2705 -9.925,-73.244 -9.95,-73.2175 -9.975,-73.191 -10,-73.1644 +5.9,-76.151 +5.925,-76.1486 +5.95,-76.1448 +5.975,-76.1399 +6,-76.1341 +6.025,-76.1275 +6.05,-76.1202 +6.075,-76.1124 +6.1,-76.1041 +6.125,-76.0953 +6.15,-76.0862 +6.175,-76.0768 +6.2,-76.067 +6.225,-76.0571 +6.25,-76.0468 +6.275,-76.0364 +6.3,-76.0258 +6.325,-76.015 +6.35,-76.004 +6.375,-75.9929 +6.4,-75.9816 +6.425,-75.9702 +6.45,-75.9586 +6.475,-75.9469 +6.5,-75.9351 +6.525,-75.9231 +6.55,-75.911 +6.575,-75.8988 +6.6,-75.8865 +6.625,-75.874 +6.65,-75.8615 +6.675,-75.8488 +6.7,-75.836 +6.725,-75.8231 +6.75,-75.81 +6.775,-75.7969 +6.8,-75.7836 +6.825,-75.7703 +6.85,-75.7568 +6.875,-75.7432 +6.9,-75.7294 +6.925,-75.7156 +6.95,-75.7017 +6.975,-75.6876 +7,-75.6734 +7.025,-75.6591 +7.05,-75.6447 +7.075,-75.6302 +7.1,-75.6156 +7.125,-75.6008 +7.15,-75.5859 +7.175,-75.571 +7.2,-75.5559 +7.225,-75.5406 +7.25,-75.5253 +7.275,-75.5099 +7.3,-75.4943 +7.325,-75.4786 +7.35,-75.4628 +7.375,-75.4469 +7.4,-75.4309 +7.425,-75.4147 +7.45,-75.3984 +7.475,-75.3821 +7.5,-75.3656 +7.525,-75.3489 +7.55,-75.3322 +7.575,-75.3154 +7.6,-75.2984 +7.625,-75.2813 +7.65,-75.2641 +7.675,-75.2468 +7.7,-75.2293 +7.725,-75.2118 +7.75,-75.1941 +7.775,-75.1763 +7.8,-75.1584 +7.825,-75.1404 +7.85,-75.1222 +7.875,-75.104 +7.9,-75.0856 +7.925,-75.0671 +7.95,-75.0485 +7.975,-75.0298 +8,-75.0109 +8.025,-74.992 +8.05,-74.9729 +8.075,-74.9537 +8.1,-74.9344 +8.125,-74.915 +8.15,-74.8954 +8.175,-74.8758 +8.2,-74.856 +8.225,-74.8361 +8.25,-74.8161 +8.275,-74.796 +8.3,-74.7758 +8.325,-74.7555 +8.35,-74.735 +8.375,-74.7144 +8.4,-74.6938 +8.425,-74.673 +8.45,-74.6521 +8.475,-74.6311 +8.5,-74.61 +8.525,-74.5887 +8.55,-74.5674 +8.575,-74.5459 +8.6,-74.5244 +8.625,-74.5027 +8.65,-74.4809 +8.675,-74.459 +8.7,-74.437 +8.725,-74.4149 +8.75,-74.3927 +8.775,-74.3704 +8.8,-74.348 +8.825,-74.3255 +8.85,-74.3028 +8.875,-74.2801 +8.9,-74.2573 +8.925,-74.2343 +8.95,-74.2113 +8.975,-74.1882 +9,-74.1649 +9.025,-74.1416 +9.05,-74.1182 +9.075,-74.0946 +9.1,-74.071 +9.125,-74.0473 +9.15,-74.0234 +9.175,-73.9995 +9.2,-73.9755 +9.225,-73.9514 +9.25,-73.9272 +9.275,-73.9029 +9.3,-73.8785 +9.325,-73.854 +9.35,-73.8294 +9.375,-73.8048 +9.4,-73.78 +9.425,-73.7552 +9.45,-73.7302 +9.475,-73.7052 +9.5,-73.6801 +9.525,-73.6549 +9.55,-73.6296 +9.575,-73.6043 +9.6,-73.5788 +9.625,-73.5533 +9.65,-73.5277 +9.675,-73.502 +9.7,-73.4763 +9.725,-73.4504 +9.75,-73.4245 +9.775,-73.3985 +9.8,-73.3725 +9.825,-73.3463 +9.85,-73.3201 +9.875,-73.2938 +9.9,-73.2674 +9.925,-73.241 +9.95,-73.2145 +9.975,-73.1879 +10,-73.1613 diff --git a/test/api/sections.c b/test/api/sections.c index 9873e02842..d9eef47e25 100644 --- a/test/api/sections.c +++ b/test/api/sections.c @@ -21,18 +21,18 @@ void setup_neuron_api(void) { nrn_init = (int (*)(int, const char**))(dlsym(handle, "nrn_init")); assert(nrn_init); /* NOTE: this function only exists in versions of NEURON with the API defined */ - nrn_new_section = (Section * (*) (char const*) )(dlsym(handle, "nrn_new_section")); - nrn_connect_sections = (void (*)(Section*, double, Section*, double))( - dlsym(handle, "nrn_connect_sections")); - nrn_set_nseg = (void (*)(Section*, int))(dlsym(handle, "nrn_set_nseg")); - nrn_call_function = (void (*)(Symbol*, int))(dlsym(handle, "nrn_call_function")); - nrn_get_symbol = (Symbol * (*) (char const*) )(dlsym(handle, "nrn_get_symbol")); - nrn_new_object = (Object * (*) (Symbol*, int) )(dlsym(handle, "nrn_new_object")); + nrn_section_new = (Section * (*) (char const*) )(dlsym(handle, "nrn_section_new")); + nrn_section_connect = (void (*)(Section*, double, Section*, double))( + dlsym(handle, "nrn_section_connect")); + nrn_nseg_set = (void (*)(Section*, int))(dlsym(handle, "nrn_nseg_set")); + nrn_function_call = (void (*)(Symbol*, int))(dlsym(handle, "nrn_function_call")); + nrn_symbol = (Symbol * (*) (char const*) )(dlsym(handle, "nrn_symbol")); + nrn_object_new = (Object * (*) (Symbol*, int) )(dlsym(handle, "nrn_object_new")); nrn_push_section = (void (*)(Section*))(dlsym(handle, "nrn_push_section")); nrn_pop_section = (void (*)(void))(dlsym(handle, "nrn_pop_section")); - nrn_get_method_symbol = (Symbol * - (*) (Object*, char const*) )(dlsym(handle, "nrn_get_method_symbol")); - nrn_call_method = (void (*)(Object*, Symbol*, int))(dlsym(handle, "nrn_call_method")); + nrn_method_symbol = (Symbol * + (*) (Object*, char const*) )(dlsym(handle, "nrn_method_symbol")); + nrn_method_call = (void (*)(Object*, Symbol*, int))(dlsym(handle, "nrn_method_call")); nrn_new_sectionlist_iterator = (SectionListIterator * (*) (nrn_Item*) )( dlsym(handle, "nrn_new_sectionlist_iterator")); nrn_get_allsec = (nrn_Item * (*) (void) )(dlsym(handle, "nrn_get_allsec")); @@ -43,8 +43,8 @@ void setup_neuron_api(void) { nrn_free_sectionlist_iterator = (void (*)(SectionListIterator*))( dlsym(handle, "nrn_free_sectionlist_iterator")); nrn_secname = (char const* (*) (Section*) )(dlsym(handle, "nrn_secname")); - nrn_get_sectionlist_data = (nrn_Item * - (*) (Object*) )(dlsym(handle, "nrn_get_sectionlist_data")); + nrn_sectionlist_data_get = (nrn_Item * + (*) (Object*) )(dlsym(handle, "nrn_sectionlist_data_get")); } int main(void) { @@ -52,24 +52,24 @@ int main(void) { nrn_init(3, argv); // topology - Section* soma = nrn_new_section("soma"); - Section* dend1 = nrn_new_section("dend1"); - Section* dend2 = nrn_new_section("dend2"); - Section* dend3 = nrn_new_section("dend3"); - Section* axon = nrn_new_section("axon"); - nrn_connect_sections(dend1, 0, soma, 1); - nrn_connect_sections(dend2, 0, dend1, 1); - nrn_connect_sections(dend3, 0, dend1, 1); - nrn_connect_sections(axon, 0, soma, 0); - nrn_set_nseg(axon, 5); + Section* soma = nrn_section_new("soma"); + Section* dend1 = nrn_section_new("dend1"); + Section* dend2 = nrn_section_new("dend2"); + Section* dend3 = nrn_section_new("dend3"); + Section* axon = nrn_section_new("axon"); + nrn_section_connect(dend1, 0, soma, 1); + nrn_section_connect(dend2, 0, dend1, 1); + nrn_section_connect(dend3, 0, dend1, 1); + nrn_section_connect(axon, 0, soma, 0); + nrn_nseg_set(axon, 5); // print out the morphology - nrn_call_function(nrn_get_symbol("topology"), 0); + nrn_function_call(nrn_symbol("topology"), 0); /* create a SectionList that is dend1 and its children */ - Object* seclist = nrn_new_object(nrn_get_symbol("SectionList"), 0); + Object* seclist = nrn_object_new(nrn_symbol("SectionList"), 0); nrn_push_section(dend1); - nrn_call_method(seclist, nrn_get_method_symbol(seclist, "subtree"), 0); + nrn_method_call(seclist, nrn_method_symbol(seclist, "subtree"), 0); nrn_pop_section(); /* loop over allsec, print out */ @@ -82,7 +82,7 @@ int main(void) { nrn_free_sectionlist_iterator(sli); printf("\ndend1's subtree:\n"); - sli = nrn_new_sectionlist_iterator(nrn_get_sectionlist_data(seclist)); + sli = nrn_new_sectionlist_iterator(nrn_sectionlist_data_get(seclist)); for (; !nrn_sectionlist_iterator_done(sli);) { Section* sec = nrn_sectionlist_iterator_next(sli); printf(" %s\n", nrn_secname(sec)); From 6e929b64fde71e5f6f9a454e72f3a98ac921973f Mon Sep 17 00:00:00 2001 From: "Robert A. McDougal" Date: Sun, 25 Jun 2023 15:55:26 -0400 Subject: [PATCH 34/65] rename stack_types_t per @olupton --- src/nrniv/neuronapi.cpp | 6 +++--- src/nrniv/neuronapi.h | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/nrniv/neuronapi.cpp b/src/nrniv/neuronapi.cpp index ee10ddafe4..8bffbc652c 100644 --- a/src/nrniv/neuronapi.cpp +++ b/src/nrniv/neuronapi.cpp @@ -22,7 +22,7 @@ typedef enum { STACK_IS_SYM = 7, STACK_IS_OBJUNREF = 8, STACK_UNKNOWN = -1 -} stack_types_t; +} nrn_stack_types_t; typedef hoc_Item nrn_Item; @@ -274,7 +274,7 @@ Object* nrn_object_pop(void) { return new_ob_ptr; } -stack_types_t nrn_stack_type(void) { +nrn_stack_types_t nrn_stack_type(void) { switch (hoc_stack_type()) { case STRING: return STACK_IS_STR; @@ -296,7 +296,7 @@ stack_types_t nrn_stack_type(void) { return STACK_UNKNOWN; } -char const* const nrn_stack_type_name(stack_types_t id) { +char const* const nrn_stack_type_name(nrn_stack_types_t id) { switch (id) { case STACK_IS_STR: return "STRING"; diff --git a/src/nrniv/neuronapi.h b/src/nrniv/neuronapi.h index 2ea63c55e0..d00b069572 100644 --- a/src/nrniv/neuronapi.h +++ b/src/nrniv/neuronapi.h @@ -21,7 +21,7 @@ typedef enum { STACK_IS_SYM = 7, STACK_IS_OBJUNREF = 8, STACK_UNKNOWN = -1 -} stack_types_t; +} nrn_stack_types_t; /**************************************** * Initialization @@ -75,8 +75,8 @@ void (*nrn_push_int)(int i); int (*nrn_pop_int)(void); void (*nrn_push_object)(Object* obj); Object* (*nrn_object_pop)(void); -stack_types_t (*nrn_stack_type)(void); -char const* const (*nrn_stack_type_name)(stack_types_t id); +nrn_stack_types_t (*nrn_stack_type)(void); +char const* const (*nrn_stack_type_name)(nrn_stack_types_t id); Object* (*nrn_object_new)(Symbol* sym, int narg); Symbol* (*nrn_method_symbol)(Object* obj, char const* name); // TODO: the next two functions throw exceptions in C++; need a version that From 5ea51688af26e60bbd68d89a277384487cfe6ee4 Mon Sep 17 00:00:00 2001 From: "Robert A. McDougal" Date: Sun, 25 Jun 2023 16:23:33 -0400 Subject: [PATCH 35/65] format --- src/nrniv/neuronapi.cpp | 5 +- src/nrniv/neuronapi.h | 6 +-- test/api/hh_sim.cpp | 5 +- test/api/sections.c | 3 +- test/api/vclamp.cpp | 114 +++++++++++++++++++--------------------- 5 files changed, 61 insertions(+), 72 deletions(-) diff --git a/src/nrniv/neuronapi.cpp b/src/nrniv/neuronapi.cpp index 8bffbc652c..aeb45b94fa 100644 --- a/src/nrniv/neuronapi.cpp +++ b/src/nrniv/neuronapi.cpp @@ -105,10 +105,7 @@ Section* nrn_section_new(char const* const name) { return (*pitm)->element.sec; } -void nrn_section_connect(Section* child_sec, - double child_x, - Section* parent_sec, - double parent_x) { +void nrn_section_connect(Section* child_sec, double child_x, Section* parent_sec, double parent_x) { nrn_pushsec(child_sec); hoc_pushx(child_x); nrn_pushsec(parent_sec); diff --git a/src/nrniv/neuronapi.h b/src/nrniv/neuronapi.h index d00b069572..1ae431fa4f 100644 --- a/src/nrniv/neuronapi.h +++ b/src/nrniv/neuronapi.h @@ -34,9 +34,9 @@ void (*nrn_redirect_stdout)(int (*myprint)(int, char*)); ****************************************/ Section* (*nrn_section_new)(char const* name); void (*nrn_section_connect)(Section* child_sec, - double child_x, - Section* parent_sec, - double parent_x); + double child_x, + Section* parent_sec, + double parent_x); void (*nrn_section_length_set)(Section* sec, double length); double (*nrn_get_section_length)(Section* sec); double (*nrn_get_section_Ra)(Section* sec); diff --git a/test/api/hh_sim.cpp b/test/api/hh_sim.cpp index 12a89e798a..373609da99 100644 --- a/test/api/hh_sim.cpp +++ b/test/api/hh_sim.cpp @@ -52,10 +52,9 @@ void setup_neuron_api(void) { dlsym(handle, "nrn_method_symbol")); nrn_method_call = reinterpret_cast(dlsym(handle, "nrn_method_call")); nrn_object_pop = reinterpret_cast(dlsym(handle, "nrn_object_pop")); - nrn_symbol_push = reinterpret_cast( - dlsym(handle, "nrn_symbol_push")); + nrn_symbol_push = reinterpret_cast(dlsym(handle, "nrn_symbol_push")); nrn_pp_property_set = reinterpret_cast( - dlsym(handle, "nrn_pp_property_set")); + dlsym(handle, "nrn_pp_property_set")); } int main(void) { diff --git a/test/api/sections.c b/test/api/sections.c index d9eef47e25..13a67208b6 100644 --- a/test/api/sections.c +++ b/test/api/sections.c @@ -30,8 +30,7 @@ void setup_neuron_api(void) { nrn_object_new = (Object * (*) (Symbol*, int) )(dlsym(handle, "nrn_object_new")); nrn_push_section = (void (*)(Section*))(dlsym(handle, "nrn_push_section")); nrn_pop_section = (void (*)(void))(dlsym(handle, "nrn_pop_section")); - nrn_method_symbol = (Symbol * - (*) (Object*, char const*) )(dlsym(handle, "nrn_method_symbol")); + nrn_method_symbol = (Symbol * (*) (Object*, char const*) )(dlsym(handle, "nrn_method_symbol")); nrn_method_call = (void (*)(Object*, Symbol*, int))(dlsym(handle, "nrn_method_call")); nrn_new_sectionlist_iterator = (SectionListIterator * (*) (nrn_Item*) )( dlsym(handle, "nrn_new_sectionlist_iterator")); diff --git a/test/api/vclamp.cpp b/test/api/vclamp.cpp index 6e9c26c775..d35196671d 100644 --- a/test/api/vclamp.cpp +++ b/test/api/vclamp.cpp @@ -26,39 +26,36 @@ void setup_neuron_api(void) { } nrn_init = reinterpret_cast(dlsym(handle, "nrn_init")); assert(nrn_init); - nrn_push_str = reinterpret_cast(dlsym(handle, "nrn_push_str")); - nrn_call_function = reinterpret_cast( - dlsym(handle, "nrn_call_function")); - nrn_get_symbol = reinterpret_cast(dlsym(handle, "nrn_get_symbol")); - nrn_pop_double = reinterpret_cast(dlsym(handle, "nrn_pop_double")); + nrn_str_push = reinterpret_cast(dlsym(handle, "nrn_str_push")); + nrn_function_call = reinterpret_cast( + dlsym(handle, "nrn_function_call")); + nrn_symbol = reinterpret_cast(dlsym(handle, "nrn_symbol")); + nrn_double_pop = reinterpret_cast(dlsym(handle, "nrn_double_pop")); nrn_push_section = reinterpret_cast( dlsym(handle, "nrn_push_section")); - nrn_new_section = reinterpret_cast(dlsym(handle, "nrn_new_section")); - nrn_push_double = reinterpret_cast(dlsym(handle, "nrn_push_double")); - nrn_new_object = reinterpret_cast(dlsym(handle, "nrn_new_object")); - nrn_get_pp_property_ptr = reinterpret_cast( - dlsym(handle, "nrn_get_pp_property_ptr")); - nrn_push_double_ptr = reinterpret_cast( - dlsym(handle, "nrn_push_double_ptr")); - nrn_get_rangevar_ptr = reinterpret_cast( - dlsym(handle, "nrn_get_rangevar_ptr")); - nrn_call_method = reinterpret_cast(dlsym(handle, "nrn_call_method")); - nrn_unref_object = reinterpret_cast( - dlsym(handle, "nrn_unref_object")); + nrn_section_new = reinterpret_cast(dlsym(handle, "nrn_section_new")); + nrn_double_push = reinterpret_cast(dlsym(handle, "nrn_double_push")); + nrn_object_new = reinterpret_cast(dlsym(handle, "nrn_object_new")); + nrn_pp_property_array_set = reinterpret_cast( + dlsym(handle, "nrn_pp_property_array_set")); + nrn_rangevar_push = reinterpret_cast( + dlsym(handle, "nrn_rangevar_push")); + nrn_method_call = reinterpret_cast(dlsym(handle, "nrn_method_call")); + nrn_object_unref = reinterpret_cast( + dlsym(handle, "nrn_object_unref")); nrn_vector_capacity = reinterpret_cast( dlsym(handle, "nrn_vector_capacity")); nrn_vector_data_ptr = reinterpret_cast( dlsym(handle, "nrn_vector_data_ptr")); - nrn_get_method_symbol = reinterpret_cast( - dlsym(handle, "nrn_get_method_symbol")); - nrn_call_method = reinterpret_cast(dlsym(handle, "nrn_call_method")); - nrn_pop_object = reinterpret_cast(dlsym(handle, "nrn_pop_object")); - nrn_get_symbol_ptr = reinterpret_cast( - dlsym(handle, "nrn_get_symbol_ptr")); - nrn_set_section_length = reinterpret_cast( - dlsym(handle, "nrn_set_section_length")); - nrn_set_segment_diam = reinterpret_cast( - dlsym(handle, "nrn_set_segment_diam")); + nrn_method_symbol = reinterpret_cast( + dlsym(handle, "nrn_method_symbol")); + nrn_method_call = reinterpret_cast(dlsym(handle, "nrn_method_call")); + nrn_object_pop = reinterpret_cast(dlsym(handle, "nrn_object_pop")); + nrn_symbol_push = reinterpret_cast(dlsym(handle, "nrn_symbol_push")); + nrn_section_length_set = reinterpret_cast( + dlsym(handle, "nrn_section_length_set")); + nrn_segment_diam_set = reinterpret_cast( + dlsym(handle, "nrn_segment_diam_set")); } int main(void) { @@ -74,55 +71,52 @@ int main(void) { // load the stdrun library temp_str = new char[11]; strcpy(temp_str, "stdrun.hoc"); - nrn_push_str(&temp_str); - nrn_call_function(nrn_get_symbol("load_file"), 1); - nrn_pop_double(); + nrn_str_push(&temp_str); + nrn_function_call(nrn_symbol("load_file"), 1); + nrn_double_pop(); delete[] temp_str; // topology - soma = nrn_new_section("soma"); + soma = nrn_section_new("soma"); // define soma morphology with two 3d points nrn_push_section(soma); - nrn_set_section_length(soma, 10); - nrn_set_segment_diam(soma, 0.5, 3); + assert(soma); + assert(nrn_section_length_set); + nrn_section_length_set(soma, 10); + nrn_segment_diam_set(soma, 0.5, 3); // voltage clamp at soma(0.5) - nrn_push_double(0.5); - vclamp = nrn_new_object(nrn_get_symbol("VClamp"), 1); - auto vclamp_amp = nrn_get_pp_property_ptr(vclamp, "amp"); - auto vclamp_dur = nrn_get_pp_property_ptr(vclamp, "dur"); - + nrn_double_push(0.5); + vclamp = nrn_object_new(nrn_symbol("VClamp"), 1); // 0 mV for 1 ms; 10 mV for the next 2 ms; 5 mV for the next 3 ms - - vclamp_amp[0] = 0; - vclamp_amp[1] = 10; - vclamp_amp[2] = 5; - - vclamp_dur[0] = 1; - vclamp_dur[1] = 2; - vclamp_dur[2] = 3; + nrn_pp_property_array_set(vclamp, "amp", 0, 0); + nrn_pp_property_array_set(vclamp, "amp", 1, 10); + nrn_pp_property_array_set(vclamp, "amp", 2, 5); + nrn_pp_property_array_set(vclamp, "dur", 0, 1); + nrn_pp_property_array_set(vclamp, "dur", 1, 2); + nrn_pp_property_array_set(vclamp, "dur", 2, 3); // setup recording - v = nrn_new_object(nrn_get_symbol("Vector"), 0); - nrn_push_double_ptr(nrn_get_rangevar_ptr(soma, nrn_get_symbol("v"), 0.5)); - nrn_call_method(v, nrn_get_method_symbol(v, "record"), 1); - nrn_unref_object(nrn_pop_object()); // record returns the vector - t = nrn_new_object(nrn_get_symbol("Vector"), 0); - nrn_push_double_ptr(nrn_get_symbol_ptr(nrn_get_symbol("t"))); - nrn_call_method(t, nrn_get_method_symbol(t, "record"), 1); - nrn_unref_object(nrn_pop_object()); // record returns the vector + v = nrn_object_new(nrn_symbol("Vector"), 0); + nrn_rangevar_push(nrn_symbol("v"), soma, 0.5); + nrn_method_call(v, nrn_method_symbol(v, "record"), 1); + nrn_object_unref(nrn_object_pop()); // record returns the vector + t = nrn_object_new(nrn_symbol("Vector"), 0); + nrn_symbol_push(nrn_symbol("t")); + nrn_method_call(t, nrn_method_symbol(t, "record"), 1); + nrn_object_unref(nrn_object_pop()); // record returns the vector // finitialize(-65) - nrn_push_double(-65); - nrn_call_function(nrn_get_symbol("finitialize"), 1); - nrn_pop_double(); + nrn_double_push(-65); + nrn_function_call(nrn_symbol("finitialize"), 1); + nrn_double_pop(); // continuerun(6) - nrn_push_double(6); - nrn_call_function(nrn_get_symbol("continuerun"), 1); - nrn_pop_double(); + nrn_double_push(6); + nrn_function_call(nrn_symbol("continuerun"), 1); + nrn_double_pop(); double* tvec = nrn_vector_data_ptr(t); double* vvec = nrn_vector_data_ptr(v); From 8e758c6fa3286229d46fc583cfe559e167aa1dc1 Mon Sep 17 00:00:00 2001 From: "Robert A. McDougal" Date: Sun, 25 Jun 2023 17:08:03 -0400 Subject: [PATCH 36/65] netcon works, standardization of names --- src/nrniv/neuronapi.cpp | 58 +- src/nrniv/neuronapi.h | 40 +- test/api/hh_sim.cpp | 20 +- test/api/netcon.cpp | 116 +- test/api/ref/netcon.csv | 7904 +++++++++++++++++++-------------------- test/api/sections.c | 29 +- test/api/vclamp.cpp | 13 +- 7 files changed, 4104 insertions(+), 4076 deletions(-) diff --git a/src/nrniv/neuronapi.cpp b/src/nrniv/neuronapi.cpp index aeb45b94fa..ce9561fac0 100644 --- a/src/nrniv/neuronapi.cpp +++ b/src/nrniv/neuronapi.cpp @@ -124,15 +124,15 @@ void nrn_section_length_set(Section* sec, double length) { sec->recalc_area_ = 1; } -double nrn_get_section_length(Section* sec) { +double nrn_section_length_get(Section* sec) { return section_length(sec); } -double nrn_get_section_Ra(Section* sec) { +double nrn_section_Ra_get(Section* sec) { return nrn_ra(sec); } -void nrn_set_section_Ra(Section* sec, double val) { +void nrn_section_Ra_set(Section* sec, double val) { // TODO: ensure val > 0 // TODO: is there a named constant so we don't have to use the magic number 7? sec->prop->dparam[7] = val; @@ -144,15 +144,15 @@ char const* nrn_secname(Section* sec) { return secname(sec); } -void nrn_push_section(Section* sec) { +void nrn_section_push(Section* sec) { nrn_pushsec(sec); } -void nrn_pop_section(void) { +void nrn_section_pop(void) { nrn_sec_pop(); } -void nrn_insert_mechanism(Section* sec, Symbol* mechanism) { +void nrn_mechanism_insert(Section* sec, Symbol* mechanism) { // TODO: throw exception if mechanism is not an insertable mechanism? mech_insert1(sec, mechanism->subtype); } @@ -195,11 +195,11 @@ void nrn_rangevar_push(Symbol* const sym, Section* const sec, double x) { hoc_push(nrn_rangepointer(sec, sym, x)); } -nrn_Item* nrn_get_allsec(void) { +nrn_Item* nrn_allsec(void) { return section_list; } -nrn_Item* nrn_sectionlist_data_get(Object* obj) { +nrn_Item* nrn_sectionlist_data(Object* obj) { // TODO: verify the obj is in fact a SectionList return (nrn_Item*) obj->u.this_pointer; } @@ -402,11 +402,11 @@ int SymbolTableIterator::done(void) { // copy semantics isn't great, but only two data items // and is cleaner to use in a for loop than having to free memory at the end -SectionListIterator* nrn_new_sectionlist_iterator(nrn_Item* my_sectionlist) { +SectionListIterator* nrn_sectionlist_iterator_new(nrn_Item* my_sectionlist) { return new SectionListIterator(my_sectionlist); } -void nrn_free_sectionlist_iterator(SectionListIterator* sl) { +void nrn_sectionlist_iterator_free(SectionListIterator* sl) { delete sl; } @@ -418,11 +418,11 @@ int nrn_sectionlist_iterator_done(SectionListIterator* sl) { return sl->done(); } -SymbolTableIterator* nrn_new_symbol_table_iterator(Symlist* my_symbol_table) { +SymbolTableIterator* nrn_symbol_table_iterator_new(Symlist* my_symbol_table) { return new SymbolTableIterator(my_symbol_table); } -void nrn_free_symbol_table_iterator(SymbolTableIterator* st) { +void nrn_symbol_table_iterator_free(SymbolTableIterator* st) { delete st; } @@ -439,7 +439,7 @@ int nrn_vector_capacity(Object* vec) { return vector_capacity((IvocVect*) vec->u.this_pointer); } -double* nrn_vector_data_ptr(Object* vec) { +double* nrn_vector_data(Object* vec) { // TODO: throw exception if vec is not a Vector return vector_vec((IvocVect*) vec->u.this_pointer); } @@ -474,7 +474,7 @@ void nrn_pp_property_array_push(Object* pp, const char* name, int i) { hoc_push(ob2pntproc_0(pp)->prop->param_handle(index, i)); } -double* nrn_get_steered_property_ptr(Object* obj, const char* name) { +double* _nrn_get_steered_property_ptr(Object* obj, const char* name) { assert(obj->ctemplate->steer); auto sym2 = hoc_table_lookup(name, obj->ctemplate->symtable); assert(sym2); @@ -484,17 +484,41 @@ double* nrn_get_steered_property_ptr(Object* obj, const char* name) { return hoc_pxpop(); } -char const* nrn_get_symbol_name(Symbol* sym) { +void nrn_steered_property_array_set(Object* obj, const char* name, int i, double value) { + _nrn_get_steered_property_ptr(obj, name)[i] = value; +} + +void nrn_steered_property_set(Object* obj, const char* name, double value) { + *_nrn_get_steered_property_ptr(obj, name) = value; +} + +double nrn_steered_property_array_get(Object* obj, const char* name, int i) { + return _nrn_get_steered_property_ptr(obj, name)[i]; +} + +double nrn_steered_property_get(Object* obj, const char* name) { + return *_nrn_get_steered_property_ptr(obj, name); +} + +void nrn_steered_property_array_push(Object* obj, const char* name, int i) { + hoc_pushpx(&_nrn_get_steered_property_ptr(obj, name)[i]); +} + +void nrn_steered_property_push(Object* obj, const char* name) { + hoc_pushpx(_nrn_get_steered_property_ptr(obj, name)); +} + +char const* nrn_symbol_name(Symbol* sym) { return sym->name; } -Symlist* nrn_get_symbol_table(Symbol* sym) { +Symlist* nrn_symbol_table(Symbol* sym) { // TODO: ensure sym is an object or class // NOTE: to use with an object, call nrn_get_symbol(nrn_get_class_name(obj)) return sym->u.ctemplate->symtable; } -Symlist* nrn_get_global_symbol_table(void) { +Symlist* nrn_global_symbol_table(void) { return hoc_built_in_symlist; } } \ No newline at end of file diff --git a/src/nrniv/neuronapi.h b/src/nrniv/neuronapi.h index 1ae431fa4f..d3b248ec88 100644 --- a/src/nrniv/neuronapi.h +++ b/src/nrniv/neuronapi.h @@ -38,15 +38,15 @@ void (*nrn_section_connect)(Section* child_sec, Section* parent_sec, double parent_x); void (*nrn_section_length_set)(Section* sec, double length); -double (*nrn_get_section_length)(Section* sec); -double (*nrn_get_section_Ra)(Section* sec); -void (*nrn_set_section_Ra)(Section* sec, double val); +double (*nrn_section_length_get)(Section* sec); +double (*nrn_section_Ra_get)(Section* sec); +void (*nrn_section_Ra_set)(Section* sec, double val); char const* (*nrn_secname)(Section* sec); -void (*nrn_push_section)(Section* sec); -void (*nrn_pop_section)(void); -void (*nrn_insert_mechanism)(Section* sec, Symbol* mechanism); -nrn_Item* (*nrn_get_allsec)(void); -nrn_Item* (*nrn_sectionlist_data_get)(Object* obj); +void (*nrn_section_push)(Section* sec); +void (*nrn_section_pop)(void); +void (*nrn_mechanism_insert)(Section* sec, Symbol* mechanism); +nrn_Item* (*nrn_allsec)(void); +nrn_Item* (*nrn_sectionlist_data)(Object* obj); /**************************************** * Segments @@ -91,26 +91,32 @@ char const* (*nrn_get_class_name)(Object* obj); /**************************************** * Miscellaneous ****************************************/ -int (*nrn_call_hoc)(char const* command); -SectionListIterator* (*nrn_new_sectionlist_iterator)(nrn_Item* my_sectionlist); -void (*nrn_free_sectionlist_iterator)(SectionListIterator* sl); +int (*nrn_hoc_call)(char const* command); +SectionListIterator* (*nrn_sectionlist_iterator_new)(nrn_Item* my_sectionlist); +void (*nrn_sectionlist_iterator_free)(SectionListIterator* sl); Section* (*nrn_sectionlist_iterator_next)(SectionListIterator* sl); int (*nrn_sectionlist_iterator_done)(SectionListIterator* sl); -SymbolTableIterator* (*nrn_new_symbol_table_iterator)(Symlist* my_symbol_table); -void (*nrn_free_symbol_table_iterator)(SymbolTableIterator* st); +SymbolTableIterator* (*nrn_symbol_table_iterator_new)(Symlist* my_symbol_table); +void (*nrn_symbol_table_iterator_free)(SymbolTableIterator* st); char const* (*nrn_symbol_table_iterator_next)(SymbolTableIterator* st); int (*nrn_symbol_table_iterator_done)(SymbolTableIterator* st); int (*nrn_vector_capacity)(Object* vec); -double* (*nrn_vector_data_ptr)(Object* vec); +double* (*nrn_vector_data)(Object* vec); double (*nrn_pp_property_get)(Object* pp, const char* name); double (*nrn_pp_property_array_get)(Object* pp, const char* name, int i); void (*nrn_pp_property_set)(Object* pp, const char* name, double value); void (*nrn_pp_property_array_set)(Object* pp, const char* name, int i, double value); void (*nrn_pp_property_push)(Object* pp, const char* name); void (*nrn_pp_property_array_push)(Object* pp, const char* name, int i); -char const* (*nrn_get_symbol_name)(Symbol* sym); -Symlist* (*nrn_get_symbol_table)(Symbol* sym); -Symlist* (*nrn_get_global_symbol_table)(void); +void (*nrn_steered_property_array_set)(Object* obj, const char* name, int i, double value); +void (*nrn_steered_property_set)(Object* obj, const char* name, double value); +double (*nrn_steered_property_array_get)(Object* obj, const char* name, int i); +double (*nrn_steered_property_get)(Object* obj, const char* name); +void (*nrn_steered_property_array_push)(Object* obj, const char* name, int i); +void (*nrn_steered_property_push)(Object* obj, const char* name); +char const* (*nrn_symbol_name)(Symbol * sym); +Symlist* (*nrn_symbol_table)(Symbol * sym); +Symlist* (*nrn_global_symbol_table)(void); // TODO: need shapeplot information extraction #ifdef __cplusplus diff --git a/test/api/hh_sim.cpp b/test/api/hh_sim.cpp index 373609da99..4014f7b683 100644 --- a/test/api/hh_sim.cpp +++ b/test/api/hh_sim.cpp @@ -31,12 +31,12 @@ void setup_neuron_api(void) { dlsym(handle, "nrn_function_call")); nrn_symbol = reinterpret_cast(dlsym(handle, "nrn_symbol")); nrn_double_pop = reinterpret_cast(dlsym(handle, "nrn_double_pop")); - nrn_push_section = reinterpret_cast( - dlsym(handle, "nrn_push_section")); + nrn_section_push = reinterpret_cast( + dlsym(handle, "nrn_section_push")); nrn_section_new = reinterpret_cast(dlsym(handle, "nrn_section_new")); nrn_nseg_set = reinterpret_cast(dlsym(handle, "nrn_nseg_set")); - nrn_insert_mechanism = reinterpret_cast( - dlsym(handle, "nrn_insert_mechanism")); + nrn_mechanism_insert = reinterpret_cast( + dlsym(handle, "nrn_mechanism_insert")); nrn_double_push = reinterpret_cast(dlsym(handle, "nrn_double_push")); nrn_object_new = reinterpret_cast(dlsym(handle, "nrn_object_new")); nrn_rangevar_push = reinterpret_cast( @@ -46,8 +46,7 @@ void setup_neuron_api(void) { dlsym(handle, "nrn_object_unref")); nrn_vector_capacity = reinterpret_cast( dlsym(handle, "nrn_vector_capacity")); - nrn_vector_data_ptr = reinterpret_cast( - dlsym(handle, "nrn_vector_data_ptr")); + nrn_vector_data = reinterpret_cast(dlsym(handle, "nrn_vector_data")); nrn_method_symbol = reinterpret_cast( dlsym(handle, "nrn_method_symbol")); nrn_method_call = reinterpret_cast(dlsym(handle, "nrn_method_call")); @@ -81,7 +80,7 @@ int main(void) { nrn_nseg_set(soma, 3); // define soma morphology with two 3d points - nrn_push_section(soma); + nrn_section_push(soma); // (0, 0, 0, 10) nrn_double_push(0); nrn_double_push(0); @@ -98,7 +97,7 @@ int main(void) { nrn_double_pop(); // pt3dadd returns a number // ion channels - nrn_insert_mechanism(soma, nrn_symbol("hh")); + nrn_mechanism_insert(soma, nrn_symbol("hh")); // current clamp at soma(0.5) nrn_double_push(0.5); @@ -113,7 +112,6 @@ int main(void) { nrn_method_call(v, nrn_method_symbol(v, "record"), 1); nrn_object_unref(nrn_object_pop()); // record returns the vector t = nrn_object_new(nrn_symbol("Vector"), 0); - assert(nrn_symbol_push); nrn_symbol_push(nrn_symbol("t")); nrn_method_call(t, nrn_method_symbol(t, "record"), 1); nrn_object_unref(nrn_object_pop()); // record returns the vector @@ -128,8 +126,8 @@ int main(void) { nrn_function_call(nrn_symbol("continuerun"), 1); nrn_double_pop(); - double* tvec = nrn_vector_data_ptr(t); - double* vvec = nrn_vector_data_ptr(v); + double* tvec = nrn_vector_data(t); + double* vvec = nrn_vector_data(v); ofstream out_file; out_file.open("hh_sim.csv"); for (auto i = 0; i < nrn_vector_capacity(t); i++) { diff --git a/test/api/netcon.cpp b/test/api/netcon.cpp index dc142b35de..9ee2043890 100644 --- a/test/api/netcon.cpp +++ b/test/api/netcon.cpp @@ -18,26 +18,28 @@ typedef struct Symlist Symlist; extern "C" { int nrn_init(int argc, const char** argv); -void nrn_push_str(char** str); -void nrn_call_function(Symbol* sym, int narg); -double nrn_pop_double(void); -Section* nrn_new_section(char const* const name); -Symbol* nrn_get_symbol(char const* const name); -void nrn_insert_mechanism(Section* sec, Symbol* mechanism); -Object* nrn_new_object(Symbol* sym, int narg); -void nrn_call_method(Object* obj, Symbol* method_sym, int narg); -double* nrn_get_pp_property_ptr(Object* pp, const char* name); -void nrn_push_double(double val); -void nrn_push_object(Object* obj); -Symbol* nrn_get_method_symbol(Object* obj, char const* const name); -Object* nrn_pop_object(void); -void nrn_unref_object(Object* obj); -double* nrn_vector_data_ptr(Object* vec); +void nrn_str_push(char** str); +void nrn_function_call(Symbol* sym, int narg); +double nrn_double_pop(void); +Section* nrn_section_new(char const* const name); +Symbol* nrn_symbol(char const* const name); +void nrn_mechanism_insert(Section* sec, Symbol* mechanism); +Object* nrn_object_new(Symbol* sym, int narg); +void nrn_method_call(Object* obj, Symbol* method_sym, int narg); +void nrn_pp_property_set(Object* pp, const char* name, double value); +void nrn_double_push(double val); +void nrn_object_push(Object* obj); +Symbol* nrn_method_symbol(Object* obj, char const* const name); +Object* nrn_object_pop(void); +void nrn_object_unref(Object* obj); +double* nrn_vector_data(Object* vec); int nrn_vector_capacity(Object* vec); -double* nrn_get_steered_property_ptr(Object* obj, const char* name); -double* nrn_get_rangevar_ptr(Section* const sec, Symbol* const sym, double const x); -void nrn_push_double_ptr(double* addr); -double* nrn_get_symbol_ptr(Symbol* sym); +void nrn_steered_property_array_set(Object* obj, const char* name, int i, double value); +void nrn_steered_property_set(Object* obj, const char* name, double value); +void nrn_double_ptr_push(double* addr); +double* nrn_symbol_ptr(Symbol* sym); +void nrn_rangevar_push(Symbol* const sym, Section* const sec, double x); +void nrn_symbol_push(Symbol* sym); } static const char* argv[] = {"netcon", "-nogui", "-nopython", nullptr}; @@ -64,67 +66,67 @@ int main(void) { // load the stdrun library temp_str = new char[11]; strcpy(temp_str, "stdrun.hoc"); - nrn_push_str(&temp_str); - nrn_call_function(nrn_get_symbol("load_file"), 1); - nrn_pop_double(); + nrn_str_push(&temp_str); + nrn_function_call(nrn_symbol("load_file"), 1); + nrn_double_pop(); delete[] temp_str; // topology - auto soma = nrn_new_section("soma"); + auto soma = nrn_section_new("soma"); // ion channels - nrn_insert_mechanism(soma, nrn_get_symbol("hh")); + nrn_mechanism_insert(soma, nrn_symbol("hh")); // NetStim - auto ns = nrn_new_object(nrn_get_symbol("NetStim"), 0); - *nrn_get_pp_property_ptr(ns, "start") = 5; - *nrn_get_pp_property_ptr(ns, "noise") = 1; - *nrn_get_pp_property_ptr(ns, "interval") = 5; - *nrn_get_pp_property_ptr(ns, "number") = 10; + auto ns = nrn_object_new(nrn_symbol("NetStim"), 0); + nrn_pp_property_set(ns, "start", 5); + nrn_pp_property_set(ns, "noise", 1); + nrn_pp_property_set(ns, "interval", 5); + nrn_pp_property_set(ns, "number", 10); // syn = h.ExpSyn(soma(0.5)) - nrn_push_double(0.5); - auto syn = nrn_new_object(nrn_get_symbol("ExpSyn"), 1); - *nrn_get_pp_property_ptr(syn, "tau") = 3; // 3 ms timeconstant - *nrn_get_pp_property_ptr(syn, "e") = 0; // 0 mV reversal potential (excitatory synapse) + nrn_double_push(0.5); + auto syn = nrn_object_new(nrn_symbol("ExpSyn"), 1); + nrn_pp_property_set(syn, "tau", 3); // 3 ms timeconstant + nrn_pp_property_set(syn, "e", 0); // 0 mV reversal potential (excitatory synapse) // nc = h.NetCon(ns, syn) - nrn_push_object(ns); - nrn_push_object(syn); - auto nc = nrn_new_object(nrn_get_symbol("NetCon"), 2); - nrn_get_steered_property_ptr(nc, "weight")[0] = 0.5; - *nrn_get_steered_property_ptr(nc, "delay") = 0; + nrn_object_push(ns); + nrn_object_push(syn); + auto nc = nrn_object_new(nrn_symbol("NetCon"), 2); + nrn_steered_property_array_set(nc, "weight", 0, 0.5); + nrn_steered_property_set(nc, "delay", 0); - auto vec = nrn_new_object(nrn_get_symbol("Vector"), 0); + auto vec = nrn_object_new(nrn_symbol("Vector"), 0); // nc.record(vec) - nrn_push_object(vec); - nrn_call_method(nc, nrn_get_method_symbol(nc, "record"), 1); + nrn_object_push(vec); + nrn_method_call(nc, nrn_method_symbol(nc, "record"), 1); // TODO: record probably put something on the stack that should be removed // setup recording - v = nrn_new_object(nrn_get_symbol("Vector"), 0); - nrn_push_double_ptr(nrn_get_rangevar_ptr(soma, nrn_get_symbol("v"), 0.5)); - nrn_call_method(v, nrn_get_method_symbol(v, "record"), 1); - nrn_unref_object(nrn_pop_object()); // record returns the vector - t = nrn_new_object(nrn_get_symbol("Vector"), 0); - nrn_push_double_ptr(nrn_get_symbol_ptr(nrn_get_symbol("t"))); - nrn_call_method(t, nrn_get_method_symbol(t, "record"), 1); - nrn_unref_object(nrn_pop_object()); // record returns the vector + v = nrn_object_new(nrn_symbol("Vector"), 0); + nrn_rangevar_push(nrn_symbol("v"), soma, 0.5); + nrn_method_call(v, nrn_method_symbol(v, "record"), 1); + nrn_object_unref(nrn_object_pop()); // record returns the vector + t = nrn_object_new(nrn_symbol("Vector"), 0); + nrn_symbol_push(nrn_symbol("t")); + nrn_method_call(t, nrn_method_symbol(t, "record"), 1); + nrn_object_unref(nrn_object_pop()); // record returns the vector // finitialize(-65) - nrn_push_double(-65); - nrn_call_function(nrn_get_symbol("finitialize"), 1); - nrn_pop_double(); + nrn_double_push(-65); + nrn_function_call(nrn_symbol("finitialize"), 1); + nrn_double_pop(); // continuerun(100) - nrn_push_double(100); - nrn_call_function(nrn_get_symbol("continuerun"), 1); - nrn_pop_double(); + nrn_double_push(100); + nrn_function_call(nrn_symbol("continuerun"), 1); + nrn_double_pop(); - double* tvec = nrn_vector_data_ptr(t); - double* vvec = nrn_vector_data_ptr(v); + double* tvec = nrn_vector_data(t); + double* vvec = nrn_vector_data(v); ofstream out_file; out_file.open("netcon.csv"); for (auto i = 0; i < nrn_vector_capacity(t); i++) { diff --git a/test/api/ref/netcon.csv b/test/api/ref/netcon.csv index dfd7643c0e..39459313cd 100644 --- a/test/api/ref/netcon.csv +++ b/test/api/ref/netcon.csv @@ -7,7 +7,7 @@ 0.15,-64.9957 0.175,-64.995 0.2,-64.9943 -0.225,-64.9937 +0.225,-64.9936 0.25,-64.993 0.275,-64.9923 0.3,-64.9917 @@ -23,2785 +23,2785 @@ 0.55,-64.9855 0.575,-64.9849 0.6,-64.9843 -0.625,-64.9838 -0.65,-64.9832 +0.625,-64.9837 +0.65,-64.9831 0.675,-64.9826 -0.7,-64.9821 -0.725,-64.9815 -0.75,-64.981 -0.775,-64.9804 -0.8,-64.9799 -0.825,-64.9793 -0.85,-64.9788 -0.875,-64.9783 -0.9,-64.9778 -0.925,-64.9772 -0.95,-64.9767 -0.975,-64.9762 -1,-64.9757 -1.025,-64.9752 -1.05,-64.9747 -1.075,-64.9742 -1.1,-64.9738 -1.125,-64.9733 -1.15,-64.9728 -1.175,-64.9723 -1.2,-64.9719 -1.225,-64.9714 -1.25,-64.971 -1.275,-64.9705 -1.3,-64.9701 -1.325,-64.9696 -1.35,-64.9692 -1.375,-64.9688 -1.4,-64.9683 -1.425,-64.9679 -1.45,-64.9675 -1.475,-64.9671 -1.5,-64.9667 -1.525,-64.9663 -1.55,-64.9659 -1.575,-64.9655 -1.6,-64.9651 -1.625,-64.9647 -1.65,-64.9644 -1.675,-64.964 -1.7,-64.9636 -1.725,-64.9633 -1.75,-64.9629 -1.775,-64.9625 -1.8,-64.9622 -1.825,-64.9619 -1.85,-64.9615 -1.875,-64.9612 -1.9,-64.9609 -1.925,-64.9605 -1.95,-64.9602 -1.975,-64.9599 -2,-64.9596 -2.025,-64.9593 -2.05,-64.959 -2.075,-64.9587 -2.1,-64.9584 -2.125,-64.9581 -2.15,-64.9578 -2.175,-64.9576 -2.2,-64.9573 -2.225,-64.957 -2.25,-64.9568 -2.275,-64.9565 -2.3,-64.9562 -2.325,-64.956 -2.35,-64.9558 -2.375,-64.9555 -2.4,-64.9553 -2.425,-64.9551 -2.45,-64.9548 -2.475,-64.9546 -2.5,-64.9544 -2.525,-64.9542 -2.55,-64.954 -2.575,-64.9538 -2.6,-64.9536 -2.625,-64.9534 -2.65,-64.9532 -2.675,-64.953 -2.7,-64.9528 -2.725,-64.9526 -2.75,-64.9525 -2.775,-64.9523 -2.8,-64.9521 -2.825,-64.952 -2.85,-64.9518 -2.875,-64.9516 -2.9,-64.9515 -2.925,-64.9514 -2.95,-64.9512 -2.975,-64.9511 -3,-64.9509 -3.025,-64.9508 -3.05,-64.9507 -3.075,-64.9506 -3.1,-64.9505 -3.125,-64.9503 -3.15,-64.9502 -3.175,-64.9501 -3.2,-64.95 -3.225,-64.9499 -3.25,-64.9498 -3.275,-64.9497 -3.3,-64.9497 -3.325,-64.9496 -3.35,-64.9495 -3.375,-64.9494 -3.4,-64.9493 -3.425,-64.9493 -3.45,-64.9492 -3.475,-64.9492 -3.5,-64.9491 -3.525,-64.949 -3.55,-64.949 -3.575,-64.9489 -3.6,-64.9489 -3.625,-64.9489 -3.65,-64.9488 -3.675,-64.9488 -3.7,-64.9488 -3.725,-64.9487 -3.75,-64.9487 -3.775,-64.9487 -3.8,-64.9487 -3.825,-64.9486 -3.85,-64.9486 -3.875,-64.9486 -3.9,-64.9486 -3.925,-64.9486 -3.95,-64.9486 -3.975,-64.9486 -4,-64.9486 -4.025,-64.9486 -4.05,-64.9486 -4.075,-64.9487 -4.1,-64.9487 -4.125,-64.9487 -4.15,-64.9487 -4.175,-64.9487 -4.2,-64.9488 -4.225,-64.9488 -4.25,-64.9488 -4.275,-64.9489 -4.3,-64.9489 -4.325,-64.9489 -4.35,-64.949 -4.375,-64.949 -4.4,-64.9491 -4.425,-64.9491 -4.45,-64.9492 -4.475,-64.9492 -4.5,-64.9493 -4.525,-64.9494 -4.55,-64.9494 -4.575,-64.9495 -4.6,-64.9496 -4.625,-64.9496 -4.65,-64.9497 -4.675,-64.9498 -4.7,-64.9498 -4.725,-64.9499 -4.75,-64.95 -4.775,-64.9501 -4.8,-64.9502 -4.825,-64.9502 -4.85,-64.9503 -4.875,-64.9504 -4.9,-64.9505 -4.925,-64.9506 -4.95,-64.9507 -4.975,-64.9508 -5,-64.9509 -5.025,-64.951 -5.05,-64.9511 -5.075,-64.9512 -5.1,-64.9513 -5.125,-64.9514 -5.15,-64.9515 -5.175,-64.9516 -5.2,-64.9517 -5.225,-64.9518 -5.25,-64.952 -5.275,-64.9521 -5.3,-64.9522 -5.325,-64.9523 -5.35,-64.9524 -5.375,-64.9526 -5.4,-64.9527 -5.425,-64.9528 -5.45,-64.9529 -5.475,-64.953 -5.5,-64.9532 -5.525,-64.9533 -5.55,-64.9534 -5.575,-64.9536 -5.6,-64.9537 -5.625,-64.9538 -5.65,-64.954 -5.675,-64.9541 -5.7,-64.9542 -5.725,-64.9544 -5.75,-64.9545 -5.775,-64.9546 -5.8,-64.9548 -5.825,-64.9549 -5.85,-64.9551 -5.875,-64.9552 -5.9,-64.9553 -5.925,-64.9555 -5.95,-64.9556 -5.975,-64.9558 -6,-64.9559 -6.025,-64.9561 -6.05,-64.9562 -6.075,-64.9564 -6.1,-64.9565 -6.125,-64.9567 -6.15,-64.9568 -6.175,-64.9569 -6.2,-64.9571 -6.225,-64.9572 -6.25,-64.9574 -6.275,-64.9575 -6.3,-64.9577 -6.325,-64.9579 -6.35,-64.958 -6.375,-64.9582 -6.4,-64.9583 -6.425,-64.9585 -6.45,-64.9586 -6.475,-64.9588 -6.5,-64.9589 -6.525,-64.9591 -6.55,-64.9592 -6.575,-64.9594 -6.6,-64.9595 -6.625,-64.9597 -6.65,-64.9598 -6.675,-64.96 -6.7,-64.9602 -6.725,-64.9603 -6.75,-64.9605 -6.775,-64.9606 -6.8,-64.9608 -6.825,-64.9609 -6.85,-64.9611 -6.875,-64.9612 -6.9,-64.9614 -6.925,-64.9616 -6.95,-64.9617 -6.975,-64.9619 -7,-64.962 -7.025,-64.9622 -7.05,-64.9623 -7.075,-64.9625 -7.1,-64.9626 -7.125,-64.9628 -7.15,-64.9629 -7.175,-64.9631 -7.2,-64.9632 -7.225,-64.9634 -7.25,-64.9636 -7.275,-64.9637 -7.3,-64.9639 -7.325,-64.964 -7.35,-64.9642 -7.375,-64.9643 -7.4,-64.9645 -7.425,-64.9646 -7.45,-64.9648 -7.475,-64.9649 -7.5,-64.9651 -7.525,-64.4608 -7.55,-63.9725 -7.575,-63.4992 -7.6,-63.04 -7.625,-62.5942 -7.65,-62.161 -7.675,-61.7397 -7.7,-60.8568 -7.725,-60.0055 -7.75,-59.1835 -7.775,-58.3885 -7.8,-57.618 -7.825,-56.8694 -7.85,-56.1402 -7.875,-55.4275 -7.9,-54.7283 -7.925,-54.0392 -7.95,-53.3566 -7.975,-52.6767 -8,-51.9952 -8.025,-51.3073 -8.05,-50.6077 -8.075,-49.8906 -8.1,-49.1493 -8.125,-48.3762 -8.15,-47.563 -8.175,-46.6995 -8.2,-45.7744 -8.225,-44.7741 -8.25,-43.6827 -8.275,-42.4811 -8.3,-41.1466 -8.325,-39.6515 -8.35,-37.9624 -8.375,-36.0386 -8.4,-33.8309 -8.425,-31.2801 -8.45,-28.3166 -8.475,-24.8606 -8.5,-20.827 -8.525,-16.1355 -8.55,-10.7316 -8.575,-4.62164 -8.6,2.08138 -8.625,9.1196 -8.65,16.0937 -8.675,22.537 -8.7,28.0444 -8.725,32.3864 -8.75,35.5435 -8.775,37.6563 -8.8,38.9389 -8.825,39.6072 -8.85,39.8397 -8.875,39.7679 -8.9,39.4819 -8.925,39.0405 -8.95,38.4814 -8.975,37.8289 -9,37.099 -9.025,36.3026 -9.05,35.4477 -9.075,34.5405 -9.1,33.5861 -9.125,32.5888 -9.15,31.5527 -9.175,30.4812 -9.2,29.3779 -9.225,28.246 -9.25,27.0884 -9.275,25.908 -9.3,24.7077 -9.325,23.4899 -9.35,22.2572 -9.375,21.0117 -9.4,19.7558 -9.425,18.4914 -9.45,17.2203 -9.475,15.9444 -9.5,14.6652 -9.525,13.3842 -9.55,12.1028 -9.575,10.8222 -9.6,9.5435 -9.625,8.26776 -9.65,6.99587 -9.675,5.72861 -9.7,4.46672 -9.725,3.2108 -9.75,1.96141 -9.775,0.718992 -9.8,-0.516048 -9.825,-1.74339 -9.85,-2.96277 -9.875,-4.174 -9.9,-5.37691 -9.925,-6.57142 -9.95,-7.75747 -9.975,-8.93505 -10,-10.1042 -10.025,-11.265 -10.05,-12.4176 -10.075,-13.5621 -10.1,-14.6988 -10.125,-15.8278 -10.15,-16.9495 -10.175,-18.0642 -10.2,-19.1722 -10.225,-20.2741 -10.25,-21.3703 -10.275,-22.4615 -10.3,-23.5482 -10.325,-24.6312 -10.35,-25.7113 -10.375,-26.7895 -10.4,-27.8669 -10.425,-28.9446 -10.45,-30.0239 -10.475,-31.1064 -10.5,-32.1936 -10.525,-33.2872 -10.55,-34.3894 -10.575,-35.5021 -10.6,-36.6277 -10.625,-37.7686 -10.65,-38.9274 -10.675,-40.1068 -10.7,-41.3097 -10.725,-42.5389 -10.75,-43.7971 -10.775,-45.087 -10.8,-46.4108 -10.825,-47.7705 -10.85,-49.1671 -10.875,-50.6007 -10.9,-52.07 -10.925,-53.5721 -10.95,-55.1018 -10.975,-56.6516 -11,-58.2112 -11.025,-59.7676 -11.05,-61.305 -11.075,-62.8058 -11.1,-64.2511 -11.125,-65.6225 -11.15,-66.9028 -11.175,-68.0783 -11.2,-69.1393 -11.225,-70.081 -11.25,-70.9035 -11.275,-71.6112 -11.3,-72.2119 -11.325,-72.7155 -11.35,-73.1333 -11.375,-73.4766 -11.4,-73.7564 -11.425,-73.9829 -11.45,-74.1649 -11.475,-74.3104 -11.5,-74.4258 -11.525,-74.5167 -11.55,-74.5878 -11.575,-74.6428 +0.7,-64.982 +0.725,-64.9814 +0.75,-64.9809 +0.775,-64.9803 +0.8,-64.9798 +0.825,-64.9792 +0.85,-64.9787 +0.875,-64.9782 +0.9,-64.9776 +0.925,-64.9771 +0.95,-64.9766 +0.975,-64.9761 +1,-64.9755 +1.025,-64.975 +1.05,-64.9745 +1.075,-64.974 +1.1,-64.9735 +1.125,-64.9731 +1.15,-64.9726 +1.175,-64.9721 +1.2,-64.9716 +1.225,-64.9712 +1.25,-64.9707 +1.275,-64.9702 +1.3,-64.9698 +1.325,-64.9693 +1.35,-64.9689 +1.375,-64.9684 +1.4,-64.968 +1.425,-64.9676 +1.45,-64.9671 +1.475,-64.9667 +1.5,-64.9663 +1.525,-64.9659 +1.55,-64.9655 +1.575,-64.9651 +1.6,-64.9647 +1.625,-64.9643 +1.65,-64.9639 +1.675,-64.9635 +1.7,-64.9631 +1.725,-64.9628 +1.75,-64.9624 +1.775,-64.962 +1.8,-64.9617 +1.825,-64.9613 +1.85,-64.961 +1.875,-64.9606 +1.9,-64.9603 +1.925,-64.9599 +1.95,-64.9596 +1.975,-64.9593 +2,-64.959 +2.025,-64.9586 +2.05,-64.9583 +2.075,-64.958 +2.1,-64.9577 +2.125,-64.9574 +2.15,-64.9571 +2.175,-64.9568 +2.2,-64.9565 +2.225,-64.9563 +2.25,-64.956 +2.275,-64.9557 +2.3,-64.9555 +2.325,-64.9552 +2.35,-64.9549 +2.375,-64.9547 +2.4,-64.9544 +2.425,-64.9542 +2.45,-64.9539 +2.475,-64.9537 +2.5,-64.9535 +2.525,-64.9533 +2.55,-64.953 +2.575,-64.9528 +2.6,-64.9526 +2.625,-64.9524 +2.65,-64.9522 +2.675,-64.952 +2.7,-64.9518 +2.725,-64.9516 +2.75,-64.9514 +2.775,-64.9512 +2.8,-64.9511 +2.825,-64.9509 +2.85,-64.9507 +2.875,-64.9505 +2.9,-64.9504 +2.925,-64.9502 +2.95,-64.9501 +2.975,-64.9499 +3,-64.9498 +3.025,-64.9496 +3.05,-64.9495 +3.075,-64.9494 +3.1,-64.9492 +3.125,-64.9491 +3.15,-64.949 +3.175,-64.9489 +3.2,-64.9488 +3.225,-64.9487 +3.25,-64.9486 +3.275,-64.9485 +3.3,-64.9484 +3.325,-64.9483 +3.35,-64.9482 +3.375,-64.9481 +3.4,-64.948 +3.425,-64.9479 +3.45,-64.9478 +3.475,-64.9478 +3.5,-64.9477 +3.525,-64.9476 +3.55,-64.9476 +3.575,-64.9475 +3.6,-64.9475 +3.625,-64.9474 +3.65,-64.9474 +3.675,-64.9473 +3.7,-64.9473 +3.725,-64.9473 +3.75,-64.9472 +3.775,-64.9472 +3.8,-64.9472 +3.825,-64.9471 +3.85,-64.9471 +3.875,-64.9471 +3.9,-64.9471 +3.925,-64.9471 +3.95,-64.9471 +3.975,-64.9471 +4,-64.9471 +4.025,-64.9471 +4.05,-64.9471 +4.075,-64.9471 +4.1,-64.9471 +4.125,-64.9471 +4.15,-64.9471 +4.175,-64.9471 +4.2,-64.9472 +4.225,-64.9472 +4.25,-64.9472 +4.275,-64.9472 +4.3,-64.9473 +4.325,-64.9473 +4.35,-64.9473 +4.375,-64.9474 +4.4,-64.9474 +4.425,-64.9475 +4.45,-64.9475 +4.475,-64.9476 +4.5,-64.9476 +4.525,-64.9477 +4.55,-64.9477 +4.575,-64.9478 +4.6,-64.9479 +4.625,-64.9479 +4.65,-64.948 +4.675,-64.9481 +4.7,-64.9481 +4.725,-64.9482 +4.75,-64.9483 +4.775,-64.9484 +4.8,-64.9485 +4.825,-64.9485 +4.85,-64.9486 +4.875,-64.9487 +4.9,-64.9488 +4.925,-64.9489 +4.95,-64.949 +4.975,-64.9491 +5,-64.9492 +5.025,-64.9493 +5.05,-64.9494 +5.075,-64.9495 +5.1,-64.9496 +5.125,-64.9497 +5.15,-64.9498 +5.175,-64.9499 +5.2,-64.95 +5.225,-64.9501 +5.25,-64.9503 +5.275,-64.9504 +5.3,-64.9505 +5.325,-64.9506 +5.35,-64.9507 +5.375,-64.9508 +5.4,-64.951 +5.425,-64.9511 +5.45,-64.9512 +5.475,-64.9513 +5.5,-64.9515 +5.525,-64.9516 +5.55,-64.9517 +5.575,-64.9519 +5.6,-64.952 +5.625,-64.9521 +5.65,-64.9523 +5.675,-64.9524 +5.7,-64.9526 +5.725,-64.9527 +5.75,-64.9528 +5.775,-64.953 +5.8,-64.9531 +5.825,-64.9533 +5.85,-64.9534 +5.875,-64.9536 +5.9,-64.9537 +5.925,-64.9539 +5.95,-64.954 +5.975,-64.9541 +6,-64.9543 +6.025,-64.9544 +6.05,-64.9546 +6.075,-64.9548 +6.1,-64.9549 +6.125,-64.9551 +6.15,-64.9552 +6.175,-64.9554 +6.2,-64.9555 +6.225,-64.9557 +6.25,-64.9558 +6.275,-64.956 +6.3,-64.9562 +6.325,-64.9563 +6.35,-64.9565 +6.375,-64.9566 +6.4,-64.9568 +6.425,-64.957 +6.45,-64.9571 +6.475,-64.9573 +6.5,-64.9574 +6.525,-64.9576 +6.55,-64.9578 +6.575,-64.9579 +6.6,-64.9581 +6.625,-64.9582 +6.65,-64.9584 +6.675,-64.9586 +6.7,-64.9587 +6.725,-64.9589 +6.75,-64.9591 +6.775,-64.9592 +6.8,-64.9594 +6.825,-64.9596 +6.85,-64.9597 +6.875,-64.9599 +6.9,-64.96 +6.925,-64.9602 +6.95,-64.9604 +6.975,-64.9605 +7,-64.9607 +7.025,-64.9609 +7.05,-64.961 +7.075,-64.9612 +7.1,-64.9614 +7.125,-64.9615 +7.15,-64.9617 +7.175,-64.9618 +7.2,-64.962 +7.225,-64.9622 +7.25,-64.9623 +7.275,-64.9625 +7.3,-64.9627 +7.325,-64.9628 +7.35,-64.963 +7.375,-64.9631 +7.4,-64.9633 +7.425,-64.9635 +7.45,-64.9636 +7.475,-64.9638 +7.5,-64.9639 +7.525,-64.4597 +7.55,-63.9714 +7.575,-63.4981 +7.6,-63.0389 +7.625,-62.5931 +7.65,-62.1599 +7.675,-61.7385 +7.7,-60.8556 +7.725,-60.0044 +7.75,-59.1823 +7.775,-58.3873 +7.8,-57.6167 +7.825,-56.868 +7.85,-56.1387 +7.875,-55.4259 +7.9,-54.7265 +7.925,-54.0371 +7.95,-53.3543 +7.975,-52.6742 +8,-51.9923 +8.025,-51.3039 +8.05,-50.6039 +8.075,-49.8862 +8.1,-49.1442 +8.125,-48.3705 +8.15,-47.5563 +8.175,-46.6918 +8.2,-45.7654 +8.225,-44.7636 +8.25,-43.6705 +8.275,-42.467 +8.3,-41.1301 +8.325,-39.6322 +8.35,-37.9398 +8.375,-36.0121 +8.4,-33.7999 +8.425,-31.2437 +8.45,-28.2739 +8.475,-24.8105 +8.5,-20.7685 +8.525,-16.0677 +8.55,-10.654 +8.575,-4.53526 +8.6,2.17409 +8.625,9.21424 +8.65,16.1843 +8.675,22.6176 +8.7,28.1106 +8.725,32.4367 +8.75,35.5788 +8.775,37.6791 +8.8,38.9523 +8.825,39.6137 +8.85,39.8415 +8.875,39.7664 +8.9,39.4781 +8.925,39.035 +8.95,38.4745 +8.975,37.821 +9,37.0902 +9.025,36.2931 +9.05,35.4375 +9.075,34.5298 +9.1,33.5749 +9.125,32.5772 +9.15,31.5406 +9.175,30.4688 +9.2,29.3652 +9.225,28.2329 +9.25,27.0751 +9.275,25.8946 +9.3,24.694 +9.325,23.4761 +9.35,22.2432 +9.375,20.9977 +9.4,19.7417 +9.425,18.4772 +9.45,17.2061 +9.475,15.9302 +9.5,14.651 +9.525,13.3701 +9.55,12.0887 +9.575,10.8081 +9.6,9.52952 +9.625,8.25384 +9.65,6.98202 +9.675,5.71486 +9.7,4.45305 +9.725,3.19721 +9.75,1.94791 +9.775,0.705603 +9.8,-0.529342 +9.825,-1.7566 +9.85,-2.9759 +9.875,-4.18701 +9.9,-5.38982 +9.925,-6.58425 +9.95,-7.77024 +9.975,-8.94776 +10,-10.1168 +10.025,-11.2775 +10.05,-12.43 +10.075,-13.5745 +10.1,-14.7112 +10.125,-15.8402 +10.15,-16.9618 +10.175,-18.0764 +10.2,-19.1844 +10.225,-20.2863 +10.25,-21.3825 +10.275,-22.4737 +10.3,-23.5604 +10.325,-24.6436 +10.35,-25.7238 +10.375,-26.8022 +10.4,-27.8797 +10.425,-28.9575 +10.45,-30.0368 +10.475,-31.1193 +10.5,-32.2065 +10.525,-33.3003 +10.55,-34.4026 +10.575,-35.5156 +10.6,-36.6414 +10.625,-37.7826 +10.65,-38.9418 +10.675,-40.1215 +10.7,-41.3247 +10.725,-42.5542 +10.75,-43.8127 +10.775,-45.1029 +10.8,-46.4271 +10.825,-47.7871 +10.85,-49.184 +10.875,-50.6178 +10.9,-52.0872 +10.925,-53.5894 +10.95,-55.119 +10.975,-56.6686 +11,-58.2279 +11.025,-59.7837 +11.05,-61.3205 +11.075,-62.8204 +11.1,-64.2648 +11.125,-65.6349 +11.15,-66.914 +11.175,-68.0882 +11.2,-69.1479 +11.225,-70.0884 +11.25,-70.9098 +11.275,-71.6164 +11.3,-72.2162 +11.325,-72.719 +11.35,-73.136 +11.375,-73.4787 +11.4,-73.7581 +11.425,-73.9841 +11.45,-74.1659 +11.475,-74.311 +11.5,-74.4262 +11.525,-74.517 +11.55,-74.588 +11.575,-74.6429 11.6,-74.6848 -11.625,-74.7162 -11.65,-74.7391 -11.675,-74.7551 -11.7,-74.7655 -11.725,-74.7714 -11.75,-74.7735 -11.775,-74.7727 -11.8,-74.7695 -11.825,-74.7642 -11.85,-74.7573 -11.875,-74.749 -11.9,-74.7396 -11.925,-74.7292 -11.95,-74.7181 -11.975,-74.7063 -12,-74.694 -12.025,-74.6812 -12.05,-74.668 -12.075,-74.6545 -12.1,-74.6407 -12.125,-74.6266 -12.15,-74.6123 -12.175,-74.5977 -12.2,-74.583 -12.225,-74.5682 -12.25,-74.5532 -12.275,-74.538 -12.3,-74.5228 -12.325,-74.5074 -12.35,-74.4919 -12.375,-74.4763 -12.4,-74.4606 -12.425,-74.4448 -12.45,-74.4289 -12.475,-74.4129 -12.5,-74.3968 -12.525,-74.3807 -12.55,-74.3645 -12.575,-74.3481 -12.6,-74.3318 -12.625,-74.3153 -12.65,-74.2987 -12.675,-74.2821 -12.7,-74.2654 -12.725,-74.2486 -12.75,-74.2318 -12.775,-74.2149 -12.8,-74.1979 -12.825,-74.1808 -12.85,-74.1637 -12.875,-74.1465 -12.9,-74.1292 -12.925,-74.1118 -12.95,-74.0944 -12.975,-74.0769 -13,-74.0594 -13.025,-74.0417 -13.05,-74.024 -13.075,-74.0062 -13.1,-73.9884 -13.125,-73.9705 -13.15,-73.9525 -13.175,-73.9345 -13.2,-73.9164 -13.225,-73.8982 -13.25,-73.8799 -13.275,-73.8616 -13.3,-73.8432 -13.325,-73.8248 -13.35,-73.2783 -13.375,-72.7885 -13.4,-72.349 -13.425,-71.954 -13.45,-71.5983 -13.475,-71.2777 -13.5,-70.9882 -13.525,-70.7264 -13.55,-70.4893 -13.575,-70.2743 -13.6,-70.0789 -13.625,-69.9011 -13.65,-69.739 -13.675,-69.5911 -13.7,-69.4559 -13.725,-69.332 -13.75,-69.2183 -13.775,-69.1139 -13.8,-69.0177 -13.825,-68.9291 -13.85,-68.8472 -13.875,-68.7713 -13.9,-68.7011 -13.925,-68.6358 -13.95,-68.575 -13.975,-68.5184 -14,-68.4655 -14.025,-68.416 -14.05,-68.3697 -14.075,-68.3261 -14.1,-68.2851 -14.125,-68.2465 -14.15,-68.2101 -14.175,-68.1756 -14.2,-68.1429 -14.225,-68.1119 -14.25,-68.0824 -14.275,-68.0543 -14.3,-68.0275 -14.325,-68.0019 -14.35,-67.9774 -14.375,-67.9539 -14.4,-67.9314 -14.425,-67.9097 -14.45,-67.8889 -14.475,-67.8688 -14.5,-67.8494 -14.525,-67.8306 -14.55,-67.8125 -14.575,-67.7949 -14.6,-67.7779 -14.625,-67.7613 -14.65,-67.7453 -14.675,-67.7296 -14.7,-67.7144 -14.725,-67.6996 -14.75,-67.6851 -14.775,-67.671 -14.8,-67.6572 -14.825,-67.6438 -14.85,-67.6306 -14.875,-67.6177 -14.9,-67.605 -14.925,-67.5927 -14.95,-67.5805 -14.975,-67.5686 -15,-67.5569 -15.025,-67.5454 -15.05,-67.5341 -15.075,-67.5231 -15.1,-67.5122 -15.125,-67.5014 -15.15,-67.4909 -15.175,-67.4805 -15.2,-67.4703 -15.225,-67.4602 -15.25,-67.4503 -15.275,-67.4405 -15.3,-67.4308 -15.325,-67.4213 -15.35,-67.412 -15.375,-67.4027 -15.4,-66.8912 -15.425,-66.4152 -15.45,-65.9722 -15.475,-65.5597 -15.5,-65.1756 -15.525,-64.8177 -15.55,-64.4842 -15.575,-64.1734 -15.6,-63.8835 -15.625,-63.6133 -15.65,-63.3612 -15.675,-63.1261 -15.7,-62.9067 -15.725,-62.7019 -15.75,-62.5107 -15.775,-62.3323 -15.8,-62.1657 -15.825,-62.01 -15.85,-61.8647 -15.875,-61.7289 -15.9,-61.6021 -15.925,-61.4836 -15.95,-61.373 -15.975,-61.2696 -16,-61.173 -16.025,-61.0829 -16.05,-60.9987 -16.075,-60.9202 -16.1,-60.847 -16.125,-60.7787 -16.15,-60.7151 -16.175,-60.656 -16.2,-60.601 -16.225,-60.55 -16.25,-60.5027 -16.275,-60.4589 -16.3,-60.4185 -16.325,-60.3814 -16.35,-60.3472 -16.375,-60.316 -16.4,-60.2876 -16.425,-60.2618 -16.45,-60.2386 -16.475,-60.2178 -16.5,-60.1994 -16.525,-60.1833 -16.55,-60.1693 -16.575,-60.1574 -16.6,-60.1476 -16.625,-60.1397 -16.65,-60.1337 -16.675,-60.1296 -16.7,-60.1272 -16.725,-60.1266 -16.75,-60.1276 -16.775,-60.1303 -16.8,-60.1346 -16.825,-60.1404 -16.85,-60.1477 -16.875,-60.1565 -16.9,-60.1667 -16.925,-60.1783 -16.95,-60.1912 -16.975,-60.2054 -17,-60.221 -17.025,-60.2377 -17.05,-60.2557 -17.075,-60.2749 -17.1,-60.2953 -17.125,-60.3167 -17.15,-60.3393 -17.175,-60.3629 -17.2,-60.3875 -17.225,-60.4132 -17.25,-60.4398 -17.275,-60.4674 -17.3,-60.4959 -17.325,-60.5254 -17.35,-60.5556 -17.375,-60.5868 -17.4,-60.6187 -17.425,-60.6514 -17.45,-60.6849 -17.475,-60.7192 -17.5,-60.7541 -17.525,-60.7897 -17.55,-60.826 -17.575,-60.8629 -17.6,-60.9004 -17.625,-60.9385 -17.65,-60.9772 -17.675,-61.0163 -17.7,-61.056 -17.725,-61.0962 -17.75,-61.1368 -17.775,-61.1778 -17.8,-60.758 -17.825,-60.3656 -17.85,-59.9983 -17.875,-59.6541 -17.9,-59.3309 -17.925,-59.0273 -17.95,-58.7414 -17.975,-58.4721 -18,-58.2178 -18.025,-57.9774 -18.05,-57.7497 -18.075,-57.5337 -18.1,-57.3284 -18.125,-57.1329 -18.15,-56.9463 -18.175,-56.7679 -18.2,-56.5968 -18.225,-56.4325 -18.25,-56.2743 -18.275,-56.1215 -18.3,-55.9737 -18.325,-55.4122 -18.35,-54.8822 -18.375,-54.3799 -18.4,-53.9018 -18.425,-53.4446 -18.45,-53.0052 -18.475,-52.5806 -18.5,-52.1678 -18.525,-51.7641 -18.55,-51.3669 -18.575,-50.9733 -18.6,-50.5808 -18.625,-50.1867 -18.65,-49.7883 -18.675,-49.383 -18.7,-48.968 -18.725,-48.5403 -18.75,-48.097 -18.775,-47.6349 -18.8,-47.1503 -18.825,-46.6396 -18.85,-46.0986 -18.875,-45.5227 -18.9,-44.9068 -18.925,-44.245 -18.95,-43.5307 -18.975,-42.7565 -19,-41.9139 -19.025,-40.9928 -19.05,-39.9821 -19.075,-38.8686 -19.1,-37.6374 -19.125,-36.2714 -19.15,-34.7509 -19.175,-33.0541 -19.2,-31.1568 -19.225,-29.0327 -19.25,-26.6549 -19.275,-23.9974 -19.3,-21.0379 -19.325,-17.7626 -19.35,-14.1722 -19.375,-10.2891 -19.4,-6.16524 -19.425,-1.88703 -19.45,2.42539 -19.475,6.62737 -19.5,10.5677 -19.525,14.1108 -19.55,17.157 -19.575,19.653 -19.6,21.5922 -19.625,23.0049 -19.65,23.9455 -19.675,24.4786 -19.7,24.6701 -19.725,24.5799 -19.75,24.2601 -19.775,23.7537 -19.8,23.0957 -19.825,22.3141 -19.85,21.4312 -19.875,20.465 -19.9,19.4301 -19.925,18.3381 -19.95,17.1992 -19.975,16.0214 -20,14.8118 -20.025,13.5764 -20.05,12.3205 -20.075,11.0484 -20.1,9.76415 -20.125,8.47113 -20.15,7.17233 -20.175,5.87036 -20.2,4.56748 -20.225,3.26566 -20.25,1.96661 -20.275,0.671801 -20.3,-0.617521 -20.325,-1.90029 -20.35,-3.17561 -20.375,-4.44275 -20.4,-5.70109 -20.425,-6.95016 -20.45,-8.18958 -20.475,-9.41909 -20.5,-10.6385 -20.525,-11.8477 -20.55,-13.0467 -20.575,-14.2355 -20.6,-15.4143 -20.625,-16.5831 -20.65,-17.7424 -20.675,-18.8923 -20.7,-20.0333 -20.725,-21.1658 -20.75,-22.2903 -20.775,-23.4075 -20.8,-24.5181 -20.825,-25.6228 -20.85,-26.7225 -20.875,-27.8184 -20.9,-28.9114 -20.925,-30.0028 -20.95,-31.0941 -20.975,-32.1867 -21,-33.2824 -21.025,-34.3829 -21.05,-35.4902 -21.075,-36.6063 -21.1,-37.7336 -21.125,-38.8743 -21.15,-40.0308 -21.175,-41.2057 -21.2,-42.4013 -21.225,-43.62 -21.25,-44.8641 -21.275,-46.1355 -21.3,-47.4357 -21.325,-48.7656 -21.35,-50.1251 -21.375,-51.5133 -21.4,-52.9276 -21.425,-54.3641 -21.45,-55.8168 -21.475,-57.2775 -21.5,-58.7361 -21.525,-60.1803 -21.55,-61.5961 -21.575,-62.9684 -21.6,-64.282 -21.625,-65.5224 -21.65,-66.6768 -21.675,-67.7355 -21.7,-68.6923 -21.725,-69.5444 -21.75,-70.2929 -21.775,-70.9422 -21.8,-71.4987 -21.825,-71.9708 -21.85,-72.3675 -21.875,-72.6982 -21.9,-72.9718 -21.925,-73.1968 -21.95,-72.9078 -21.975,-72.6753 -22,-72.4866 -22.025,-72.3321 -22.05,-72.2044 -22.075,-72.0979 -22.1,-72.0081 -22.125,-71.9316 -22.15,-71.8658 -22.175,-71.8084 -22.2,-71.7579 -22.225,-71.7129 -22.25,-71.6723 -22.275,-71.6353 -22.3,-71.6012 -22.325,-71.5695 -22.35,-71.5397 -22.375,-71.5115 -22.4,-71.4846 -22.425,-71.4588 -22.45,-71.4338 -22.475,-71.4095 -22.5,-71.3859 -22.525,-71.3627 -22.55,-71.34 -22.575,-71.3176 -22.6,-71.2954 -22.625,-71.2736 -22.65,-71.2519 -22.675,-71.2304 -22.7,-71.2091 -22.725,-71.1879 -22.75,-71.1668 -22.775,-71.1458 -22.8,-71.125 -22.825,-71.1041 -22.85,-71.0834 -22.875,-71.0627 -22.9,-71.0421 -22.925,-71.0215 -22.95,-71.001 -22.975,-70.9805 -23,-70.9601 -23.025,-70.9397 -23.05,-70.9194 -23.075,-70.8991 -23.1,-70.8788 -23.125,-70.8586 -23.15,-70.8385 -23.175,-70.8183 -23.2,-70.7982 -23.225,-70.7782 -23.25,-70.7582 -23.275,-70.7382 -23.3,-70.7183 -23.325,-70.6984 -23.35,-70.6785 -23.375,-70.6587 -23.4,-70.6389 -23.425,-70.6192 -23.45,-70.5995 -23.475,-70.5798 -23.5,-70.5602 -23.525,-70.5407 -23.55,-70.5211 -23.575,-70.5017 -23.6,-70.4822 -23.625,-70.4628 -23.65,-70.4435 -23.675,-70.4242 -23.7,-70.4049 -23.725,-70.3857 -23.75,-70.3666 -23.775,-70.3475 -23.8,-70.3284 -23.825,-70.3094 -23.85,-70.2904 -23.875,-70.2715 -23.9,-70.2526 -23.925,-70.2338 -23.95,-70.215 -23.975,-70.1963 -24,-70.1776 -24.025,-70.159 -24.05,-70.1404 -24.075,-70.1219 -24.1,-70.1034 -24.125,-70.085 -24.15,-70.0667 -24.175,-70.0484 -24.2,-70.0301 -24.225,-70.0119 -24.25,-69.9938 -24.275,-69.9757 -24.3,-69.9576 -24.325,-69.9396 -24.35,-69.9217 -24.375,-69.9038 -24.4,-69.886 -24.425,-69.8683 -24.45,-69.8505 -24.475,-69.8329 -24.5,-69.8153 -24.525,-69.7978 -24.55,-69.7803 -24.575,-69.7629 -24.6,-69.7455 -24.625,-69.7282 -24.65,-69.7109 -24.675,-69.6938 -24.7,-69.6766 -24.725,-69.6595 -24.75,-69.6425 -24.775,-69.6256 -24.8,-69.6087 -24.825,-69.5918 -24.85,-69.575 -24.875,-69.5583 -24.9,-69.5417 -24.925,-69.5251 -24.95,-69.5085 -24.975,-69.492 -25,-69.4756 -25.025,-69.4592 -25.05,-69.4429 -25.075,-69.4267 -25.1,-69.4105 -25.125,-69.3944 -25.15,-69.3783 -25.175,-69.3623 -25.2,-69.3463 -25.225,-69.3304 -25.25,-69.3146 -25.275,-69.2988 -25.3,-69.2831 -25.325,-69.2675 -25.35,-69.2519 -25.375,-69.2364 -25.4,-69.2209 -25.425,-69.2055 -25.45,-69.1901 -25.475,-69.1749 -25.5,-69.1596 -25.525,-69.1445 -25.55,-69.1293 -25.575,-69.1143 -25.6,-69.0993 -25.625,-69.0844 -25.65,-69.0695 -25.675,-69.0547 -25.7,-69.0399 -25.725,-69.0252 -25.75,-69.0106 -25.775,-68.996 -25.8,-68.9815 -25.825,-68.967 -25.85,-68.9526 -25.875,-68.9383 -25.9,-68.924 -25.925,-68.9098 -25.95,-68.8956 -25.975,-68.8815 -26,-68.8674 -26.025,-68.8534 -26.05,-68.8395 -26.075,-68.8256 -26.1,-68.8118 -26.125,-68.798 -26.15,-68.7843 -26.175,-68.7706 -26.2,-68.757 -26.225,-68.7435 -26.25,-68.73 -26.275,-68.7166 -26.3,-68.7032 -26.325,-68.6899 -26.35,-68.6766 -26.375,-68.6634 -26.4,-68.6502 -26.425,-68.6371 -26.45,-68.6241 -26.475,-68.6111 -26.5,-68.5981 -26.525,-68.5853 -26.55,-68.5724 -26.575,-68.5596 -26.6,-68.5469 -26.625,-68.5342 -26.65,-68.5216 -26.675,-68.509 -26.7,-68.4965 -26.725,-68.484 -26.75,-68.4716 -26.775,-68.4593 -26.8,-68.4469 -26.825,-68.4347 -26.85,-68.4225 -26.875,-68.4103 -26.9,-68.3982 -26.925,-68.3861 -26.95,-68.3741 -26.975,-68.3621 -27,-68.3502 -27.025,-68.3383 -27.05,-68.3265 -27.075,-68.3147 -27.1,-68.303 -27.125,-68.2913 -27.15,-68.2797 -27.175,-68.2681 -27.2,-68.2565 -27.225,-68.245 -27.25,-68.2336 -27.275,-68.2222 -27.3,-68.2108 -27.325,-68.1995 -27.35,-68.1883 -27.375,-68.177 -27.4,-68.1658 -27.425,-68.1547 -27.45,-68.1436 -27.475,-68.1326 -27.5,-68.1216 -27.525,-68.1106 -27.55,-68.0997 -27.575,-68.0888 -27.6,-68.0779 -27.625,-68.0671 -27.65,-68.0564 -27.675,-68.0457 -27.7,-68.035 -27.725,-68.0244 -27.75,-68.0138 -27.775,-68.0032 -27.8,-67.9927 -27.825,-67.9822 -27.85,-67.9718 -27.875,-67.9614 -27.9,-67.951 -27.925,-67.9407 -27.95,-67.9304 -27.975,-67.9201 -28,-67.9099 -28.025,-67.8998 -28.05,-67.8896 -28.075,-67.8795 -28.1,-67.8694 -28.125,-67.8594 -28.15,-67.8494 -28.175,-67.8395 -28.2,-67.8295 -28.225,-67.8196 -28.25,-67.8098 -28.275,-67.8 -28.3,-67.7902 -28.325,-67.7804 -28.35,-67.7707 -28.375,-67.761 -28.4,-67.7513 -28.425,-67.7417 -28.45,-67.7321 -28.475,-67.7225 -28.5,-67.713 -28.525,-67.7035 -28.55,-67.694 -28.575,-67.6846 -28.6,-67.6752 -28.625,-67.6658 -28.65,-67.6565 -28.675,-67.6471 -28.7,-67.6379 -28.725,-67.6286 -28.75,-67.6194 -28.775,-67.6101 -28.8,-67.601 -28.825,-67.5918 -28.85,-67.5827 -28.875,-67.5736 -28.9,-67.5645 -28.925,-67.5555 -28.95,-67.5465 -28.975,-67.5375 -29,-67.5285 -29.025,-67.5196 -29.05,-67.5107 -29.075,-67.5018 -29.1,-67.493 -29.125,-67.4841 -29.15,-67.4753 -29.175,-67.4665 -29.2,-67.4578 -29.225,-67.449 -29.25,-67.4403 -29.275,-67.4316 -29.3,-67.423 -29.325,-67.4143 -29.35,-67.4057 -29.375,-67.3971 -29.4,-67.3886 -29.425,-67.38 -29.45,-67.3715 -29.475,-67.363 -29.5,-67.3545 -29.525,-67.346 -29.55,-67.3376 -29.575,-67.3292 -29.6,-67.3208 -29.625,-67.3124 -29.65,-67.304 -29.675,-67.2957 -29.7,-67.2874 -29.725,-67.2791 -29.75,-67.2708 -29.775,-67.2626 -29.8,-67.2543 -29.825,-67.2461 -29.85,-67.2379 -29.875,-67.2297 -29.9,-67.2216 -29.925,-67.2134 -29.95,-67.2053 -29.975,-67.1972 -30,-67.1891 -30.025,-67.181 -30.05,-67.173 -30.075,-67.1649 -30.1,-67.1569 -30.125,-67.1489 -30.15,-67.1409 -30.175,-67.133 -30.2,-67.125 -30.225,-67.1171 -30.25,-67.1092 -30.275,-67.1013 -30.3,-67.0934 -30.325,-67.0855 -30.35,-67.0777 -30.375,-67.0698 -30.4,-67.062 -30.425,-67.0542 -30.45,-67.0464 -30.475,-67.0387 -30.5,-67.0309 -30.525,-67.0232 -30.55,-67.0154 -30.575,-67.0077 -30.6,-67 -30.625,-66.9923 -30.65,-66.9847 -30.675,-66.977 -30.7,-66.9694 -30.725,-66.9617 -30.75,-66.9541 -30.775,-66.9465 -30.8,-66.9389 -30.825,-66.9314 -30.85,-66.9238 -30.875,-66.9163 -30.9,-66.9087 -30.925,-66.9012 -30.95,-66.8937 -30.975,-66.8862 -31,-66.8788 -31.025,-66.8713 -31.05,-66.8638 -31.075,-66.8564 -31.1,-66.849 -31.125,-66.8416 -31.15,-66.8342 -31.175,-66.8268 -31.2,-66.8194 -31.225,-66.812 -31.25,-66.8047 -31.275,-66.7974 -31.3,-66.79 -31.325,-66.7827 -31.35,-66.7754 -31.375,-66.7681 -31.4,-66.7609 -31.425,-66.7536 -31.45,-66.7463 -31.475,-66.7391 -31.5,-66.7319 -31.525,-66.7247 -31.55,-66.7174 -31.575,-66.7103 -31.6,-66.7031 -31.625,-66.6959 -31.65,-66.6887 -31.675,-66.6816 -31.7,-66.6745 -31.725,-66.6673 -31.75,-66.6602 -31.775,-66.6531 -31.8,-66.646 -31.825,-66.6389 -31.85,-66.6319 -31.875,-66.6248 -31.9,-66.6178 -31.925,-66.6107 -31.95,-66.6037 -31.975,-66.5967 -32,-66.5897 -32.025,-66.5827 -32.05,-66.5757 -32.075,-66.5687 -32.1,-66.5618 -32.125,-66.5548 -32.15,-66.5479 -32.175,-66.541 -32.2,-66.5341 -32.225,-66.5272 -32.25,-66.5203 -32.275,-66.5134 -32.3,-66.5065 -32.325,-66.4997 -32.35,-66.4928 -32.375,-66.486 -32.4,-66.4791 -32.425,-66.4723 -32.45,-66.4655 -32.475,-66.4587 -32.5,-66.4519 -32.525,-66.4452 -32.55,-66.4384 -32.575,-66.4316 -32.6,-66.4249 -32.625,-66.4182 -32.65,-66.4115 -32.675,-66.4047 -32.7,-66.398 -32.725,-66.3914 -32.75,-66.3847 -32.775,-66.378 -32.8,-66.3714 -32.825,-66.3647 -32.85,-66.3581 -32.875,-66.3515 -32.9,-66.3449 -32.925,-66.3383 -32.95,-66.3317 -32.975,-66.3251 -33,-66.3185 -33.025,-66.312 -33.05,-66.3054 -33.075,-66.2989 -33.1,-66.2924 -33.125,-66.2859 -33.15,-66.2794 -33.175,-66.2729 -33.2,-66.2664 -33.225,-66.26 -33.25,-66.2535 -33.275,-66.2471 -33.3,-66.2406 -33.325,-66.2342 -33.35,-66.2278 -33.375,-66.2214 -33.4,-66.215 -33.425,-66.2087 -33.45,-66.2023 -33.475,-66.1959 -33.5,-66.1896 -33.525,-66.1833 -33.55,-66.177 -33.575,-66.1707 -33.6,-66.1644 -33.625,-66.1581 -33.65,-66.1518 -33.675,-66.1456 -33.7,-66.1393 -33.725,-66.1331 -33.75,-66.1269 -33.775,-66.1207 -33.8,-66.1145 -33.825,-66.1083 -33.85,-66.1021 -33.875,-66.096 -33.9,-66.0898 -33.925,-66.0837 -33.95,-66.0776 -33.975,-66.0715 -34,-66.0654 -34.025,-66.0593 -34.05,-66.0532 -34.075,-66.0472 -34.1,-66.0411 -34.125,-66.0351 -34.15,-66.0291 -34.175,-66.0231 -34.2,-66.0171 -34.225,-66.0111 -34.25,-66.0052 -34.275,-65.9992 -34.3,-65.9933 -34.325,-65.9873 -34.35,-65.9814 -34.375,-65.9755 -34.4,-65.9696 -34.425,-65.9638 -34.45,-65.9579 -34.475,-65.9521 -34.5,-65.9462 -34.525,-65.9404 -34.55,-65.9346 -34.575,-65.9288 -34.6,-65.923 -34.625,-65.9173 -34.65,-65.9115 -34.675,-65.9058 -34.7,-65.9001 -34.725,-65.8944 -34.75,-65.8887 -34.775,-65.883 -34.8,-65.8773 -34.825,-65.8717 -34.85,-65.866 -34.875,-65.8604 -34.9,-65.8548 -34.925,-65.8492 -34.95,-65.8436 -34.975,-65.8381 -35,-65.8325 -35.025,-65.827 -35.05,-65.8215 -35.075,-65.816 -35.1,-65.8105 -35.125,-65.805 -35.15,-65.7995 -35.175,-65.7941 -35.2,-65.7887 -35.225,-65.273 -35.25,-64.774 -35.275,-64.291 -35.3,-63.8231 -35.325,-63.3695 -35.35,-62.9297 -35.375,-62.5029 -35.4,-62.0884 -35.425,-61.6855 -35.45,-61.2935 -35.475,-60.9119 -35.5,-60.5399 -35.525,-60.1768 -35.55,-59.8219 -35.575,-59.4746 -35.6,-59.1342 -35.625,-58.7999 -35.65,-58.471 -35.675,-58.1467 -35.7,-57.8263 -35.725,-57.509 -35.75,-57.194 -35.775,-56.8804 -35.8,-56.5674 -35.825,-56.254 -35.85,-55.9393 -35.875,-55.6223 -35.9,-55.302 -35.925,-54.9771 -35.95,-54.6466 -35.975,-54.3092 -36,-53.9633 -36.025,-53.6077 -36.05,-53.2405 -36.075,-52.86 -36.1,-52.4641 -36.125,-52.0508 -36.15,-51.6173 -36.175,-51.161 -36.2,-50.6786 -36.225,-50.1665 -36.25,-49.6205 -36.275,-49.0357 -36.3,-48.4066 -36.325,-47.7266 -36.35,-46.988 -36.375,-46.1817 -36.4,-45.297 -36.425,-44.3209 -36.45,-43.2382 -36.475,-42.0303 -36.5,-40.6747 -36.525,-39.1444 -36.55,-37.4065 -36.575,-35.4216 -36.6,-33.1421 -36.625,-30.5119 -36.65,-27.4664 -36.675,-23.9341 -36.7,-19.8426 -36.725,-15.1298 -36.75,-9.76516 -36.775,-3.78132 -36.8,2.68946 -36.825,9.39073 -36.85,15.9569 -36.875,21.9832 -36.9,27.1304 -36.925,31.2105 -36.95,34.2083 -36.975,36.2408 -37,37.4896 -37.025,38.1422 -37.05,38.3592 -37.075,38.2631 -37.1,37.9411 -37.125,37.4526 -37.15,36.8372 -37.175,36.1213 -37.2,35.3229 -37.225,34.4546 -37.25,33.5257 -37.275,32.5434 -37.3,31.5138 -37.325,30.4418 -37.35,29.3321 -37.375,28.1887 -37.4,27.0155 -37.425,25.8159 -37.45,24.5933 -37.475,23.3508 -37.5,22.0913 -37.525,20.8174 -37.55,19.5317 -37.575,18.2365 -37.6,16.9341 -37.625,15.6263 -37.65,14.315 -37.675,13.002 -37.7,11.6887 -37.725,10.3765 -37.75,9.0667 -37.775,7.76036 -37.8,6.45848 -37.825,5.16194 -37.85,3.8715 -37.875,2.58784 -37.9,1.31151 -37.925,0.0430043 -37.95,-1.21729 -37.975,-2.46904 -38,-3.712 -38.025,-4.94598 -38.05,-6.17085 -38.075,-7.38653 -38.1,-8.59302 -38.125,-9.79034 -38.15,-10.9786 -38.175,-12.1578 -38.2,-13.3283 -38.225,-14.4901 -38.25,-15.6436 -38.275,-16.7891 -38.3,-17.9269 -38.325,-19.0574 -38.35,-20.1812 -38.375,-21.2987 -38.4,-22.4105 -38.425,-23.5174 -38.45,-24.6201 -38.475,-25.7195 -38.5,-26.8166 -38.525,-27.9125 -38.55,-29.0085 -38.575,-30.106 -38.6,-31.2064 -38.625,-32.3116 -38.65,-33.4234 -38.675,-34.5438 -38.7,-35.6752 -38.725,-36.8199 -38.75,-37.9805 -38.775,-39.1597 -38.8,-40.3606 -38.825,-41.5859 -38.85,-42.8388 -38.875,-44.1222 -38.9,-45.4388 -38.925,-46.7911 -38.95,-48.1811 -38.975,-49.6097 -39,-51.077 -39.025,-52.5816 -39.05,-54.1201 -39.075,-55.6869 -39.1,-57.2737 -39.125,-58.8693 -39.15,-60.4595 -39.175,-62.0274 -39.2,-63.5544 -39.225,-65.0205 -39.25,-66.4066 -39.275,-67.6955 -39.3,-68.8738 -39.325,-69.9325 -39.35,-70.8681 -39.375,-71.6819 -39.4,-72.3796 -39.425,-72.9701 -39.45,-73.4641 -39.475,-73.8735 -39.5,-74.2099 -39.525,-74.4843 -39.55,-74.707 -39.575,-74.8865 -39.6,-75.0307 -39.625,-75.1459 -39.65,-75.2374 -39.675,-75.3097 -39.7,-75.3663 -39.725,-75.4103 -39.75,-75.444 -39.775,-75.4693 -39.8,-75.4879 +11.625,-74.7161 +11.65,-74.739 +11.675,-74.7549 +11.7,-74.7653 +11.725,-74.7711 +11.75,-74.7733 +11.775,-74.7724 +11.8,-74.7692 +11.825,-74.7639 +11.85,-74.7569 +11.875,-74.7486 +11.9,-74.7392 +11.925,-74.7289 +11.95,-74.7178 +11.975,-74.706 +12,-74.6936 +12.025,-74.6809 +12.05,-74.6677 +12.075,-74.6541 +12.1,-74.6403 +12.125,-74.6262 +12.15,-74.6119 +12.175,-74.5974 +12.2,-74.5827 +12.225,-74.5678 +12.25,-74.5528 +12.275,-74.5377 +12.3,-74.5224 +12.325,-74.507 +12.35,-74.4915 +12.375,-74.4759 +12.4,-74.4602 +12.425,-74.4444 +12.45,-74.4285 +12.475,-74.4125 +12.5,-74.3965 +12.525,-74.3803 +12.55,-74.3641 +12.575,-74.3478 +12.6,-74.3314 +12.625,-74.3149 +12.65,-74.2984 +12.675,-74.2817 +12.7,-74.265 +12.725,-74.2483 +12.75,-74.2314 +12.775,-74.2145 +12.8,-74.1975 +12.825,-74.1804 +12.85,-74.1633 +12.875,-74.1461 +12.9,-74.1288 +12.925,-74.1115 +12.95,-74.094 +12.975,-74.0765 +13,-74.059 +13.025,-74.0413 +13.05,-74.0236 +13.075,-74.0059 +13.1,-73.988 +13.125,-73.9701 +13.15,-73.9521 +13.175,-73.9341 +13.2,-73.916 +13.225,-73.8978 +13.25,-73.8795 +13.275,-73.8612 +13.3,-73.8428 +13.325,-73.8244 +13.35,-73.2779 +13.375,-72.7881 +13.4,-72.3486 +13.425,-71.9535 +13.45,-71.5979 +13.475,-71.2772 +13.5,-70.9877 +13.525,-70.7259 +13.55,-70.4888 +13.575,-70.2737 +13.6,-70.0783 +13.625,-69.9005 +13.65,-69.7384 +13.675,-69.5905 +13.7,-69.4552 +13.725,-69.3313 +13.75,-69.2176 +13.775,-69.1132 +13.8,-69.017 +13.825,-68.9283 +13.85,-68.8464 +13.875,-68.7706 +13.9,-68.7003 +13.925,-68.635 +13.95,-68.5743 +13.975,-68.5176 +14,-68.4647 +14.025,-68.4152 +14.05,-68.3688 +14.075,-68.3253 +14.1,-68.2843 +14.125,-68.2457 +14.15,-68.2092 +14.175,-68.1747 +14.2,-68.142 +14.225,-68.111 +14.25,-68.0815 +14.275,-68.0534 +14.3,-68.0266 +14.325,-68.001 +14.35,-67.9765 +14.375,-67.953 +14.4,-67.9305 +14.425,-67.9088 +14.45,-67.888 +14.475,-67.8679 +14.5,-67.8485 +14.525,-67.8297 +14.55,-67.8116 +14.575,-67.794 +14.6,-67.777 +14.625,-67.7605 +14.65,-67.7444 +14.675,-67.7288 +14.7,-67.7135 +14.725,-67.6987 +14.75,-67.6843 +14.775,-67.6701 +14.8,-67.6563 +14.825,-67.6429 +14.85,-67.6297 +14.875,-67.6168 +14.9,-67.6041 +14.925,-67.5917 +14.95,-67.5796 +14.975,-67.5677 +15,-67.556 +15.025,-67.5445 +15.05,-67.5332 +15.075,-67.5221 +15.1,-67.5112 +15.125,-67.5005 +15.15,-67.4899 +15.175,-67.4795 +15.2,-67.4693 +15.225,-67.4592 +15.25,-67.4493 +15.275,-67.4395 +15.3,-67.4298 +15.325,-67.4203 +15.35,-67.411 +15.375,-67.4017 +15.4,-66.8901 +15.425,-66.4142 +15.45,-65.9712 +15.475,-65.5587 +15.5,-65.1746 +15.525,-64.8167 +15.55,-64.4832 +15.575,-64.1723 +15.6,-63.8825 +15.625,-63.6123 +15.65,-63.3602 +15.675,-63.125 +15.7,-62.9056 +15.725,-62.7008 +15.75,-62.5096 +15.775,-62.3311 +15.8,-62.1645 +15.825,-62.0088 +15.85,-61.8634 +15.875,-61.7276 +15.9,-61.6008 +15.925,-61.4822 +15.95,-61.3715 +15.975,-61.2681 +16,-61.1715 +16.025,-61.0813 +16.05,-60.997 +16.075,-60.9185 +16.1,-60.8452 +16.125,-60.7769 +16.15,-60.7132 +16.175,-60.654 +16.2,-60.599 +16.225,-60.5478 +16.25,-60.5005 +16.275,-60.4566 +16.3,-60.4161 +16.325,-60.3789 +16.35,-60.3446 +16.375,-60.3133 +16.4,-60.2847 +16.425,-60.2589 +16.45,-60.2355 +16.475,-60.2146 +16.5,-60.1961 +16.525,-60.1798 +16.55,-60.1658 +16.575,-60.1538 +16.6,-60.1439 +16.625,-60.1359 +16.65,-60.1298 +16.675,-60.1256 +16.7,-60.1232 +16.725,-60.1225 +16.75,-60.1235 +16.775,-60.1261 +16.8,-60.1303 +16.825,-60.1361 +16.85,-60.1434 +16.875,-60.1521 +16.9,-60.1622 +16.925,-60.1738 +16.95,-60.1867 +16.975,-60.2009 +17,-60.2163 +17.025,-60.2331 +17.05,-60.251 +17.075,-60.2701 +17.1,-60.2904 +17.125,-60.3118 +17.15,-60.3343 +17.175,-60.3578 +17.2,-60.3824 +17.225,-60.408 +17.25,-60.4345 +17.275,-60.462 +17.3,-60.4904 +17.325,-60.5198 +17.35,-60.55 +17.375,-60.581 +17.4,-60.6128 +17.425,-60.6455 +17.45,-60.6789 +17.475,-60.713 +17.5,-60.7479 +17.525,-60.7834 +17.55,-60.8196 +17.575,-60.8565 +17.6,-60.894 +17.625,-60.932 +17.65,-60.9707 +17.675,-61.0098 +17.7,-61.0495 +17.725,-61.0897 +17.75,-61.1304 +17.775,-61.1715 +17.8,-60.7517 +17.825,-60.3594 +17.85,-59.9922 +17.875,-59.6481 +17.9,-59.325 +17.925,-59.0214 +17.95,-58.7356 +17.975,-58.4663 +18,-58.212 +18.025,-57.9716 +18.05,-57.7439 +18.075,-57.5279 +18.1,-57.3226 +18.125,-57.127 +18.15,-56.9403 +18.175,-56.7618 +18.2,-56.5906 +18.225,-56.4261 +18.25,-56.2677 +18.275,-56.1148 +18.3,-55.9667 +18.325,-55.4051 +18.35,-54.8749 +18.375,-54.3724 +18.4,-53.8941 +18.425,-53.4366 +18.45,-52.9969 +18.475,-52.5719 +18.5,-52.1588 +18.525,-51.7547 +18.55,-51.3569 +18.575,-50.9627 +18.6,-50.5696 +18.625,-50.1747 +18.65,-49.7756 +18.675,-49.3693 +18.7,-48.9533 +18.725,-48.5245 +18.75,-48.0799 +18.775,-47.6164 +18.8,-47.1303 +18.825,-46.6178 +18.85,-46.0749 +18.875,-45.4968 +18.9,-44.8784 +18.925,-44.2138 +18.95,-43.4964 +18.975,-42.7187 +19,-41.872 +19.025,-40.9464 +19.05,-39.9306 +19.075,-38.8113 +19.1,-37.5736 +19.125,-36.2 +19.15,-34.6709 +19.175,-32.9644 +19.2,-31.056 +19.225,-28.9196 +19.25,-26.528 +19.275,-23.8555 +19.3,-20.8801 +19.325,-17.5885 +19.35,-13.9824 +19.375,-10.0853 +19.4,-5.95077 +19.425,-1.66708 +19.45,2.64394 +19.475,6.83684 +19.5,10.7606 +19.525,14.2812 +19.55,17.3009 +19.575,19.7689 +19.6,21.6807 +19.625,23.0683 +19.65,23.9868 +19.675,24.5013 +19.7,24.6771 +19.725,24.5743 +19.75,24.2441 +19.775,23.7294 +19.8,23.0646 +19.825,22.2775 +19.85,21.3901 +19.875,20.4202 +19.9,19.3822 +19.925,18.2877 +19.95,17.1467 +19.975,15.9673 +20,14.7564 +20.025,13.5199 +20.05,12.2631 +20.075,10.9904 +20.1,9.70572 +20.125,8.4124 +20.15,7.11343 +20.175,5.81141 +20.2,4.50858 +20.225,3.20689 +20.25,1.90805 +20.275,0.613519 +20.3,-0.675485 +20.325,-1.9579 +20.35,-3.23281 +20.375,-4.49951 +20.4,-5.75742 +20.425,-7.00604 +20.45,-8.24496 +20.475,-9.47398 +20.5,-10.6929 +20.525,-11.9017 +20.55,-13.1002 +20.575,-14.2885 +20.6,-15.4668 +20.625,-16.6353 +20.65,-17.7941 +20.675,-18.9437 +20.7,-20.0843 +20.725,-21.2164 +20.75,-22.3406 +20.775,-23.4575 +20.8,-24.5679 +20.825,-25.6725 +20.85,-26.7721 +20.875,-27.8679 +20.9,-28.9609 +20.925,-30.0523 +20.95,-31.1436 +20.975,-32.2363 +21,-33.3321 +21.025,-34.4329 +21.05,-35.5407 +21.075,-36.6574 +21.1,-37.7853 +21.125,-38.9267 +21.15,-40.084 +21.175,-41.2598 +21.2,-42.4563 +21.225,-43.6761 +21.25,-44.9214 +21.275,-46.1939 +21.3,-47.4953 +21.325,-48.8263 +21.35,-50.187 +21.375,-51.5761 +21.4,-52.9913 +21.425,-54.4284 +21.45,-55.8813 +21.475,-57.3418 +21.5,-58.7997 +21.525,-60.2426 +21.55,-61.6565 +21.575,-63.0262 +21.6,-64.3366 +21.625,-65.5732 +21.65,-66.7234 +21.675,-67.7777 +21.7,-68.7297 +21.725,-69.5772 +21.75,-70.3214 +21.775,-70.9664 +21.8,-71.5192 +21.825,-71.9879 +21.85,-72.3817 +21.875,-72.7098 +21.9,-72.9812 +21.925,-73.2043 +21.95,-72.9137 +21.975,-72.6798 +22,-72.49 +22.025,-72.3345 +22.05,-72.206 +22.075,-72.0988 +22.1,-72.0084 +22.125,-71.9315 +22.15,-71.8653 +22.175,-71.8076 +22.2,-71.7568 +22.225,-71.7115 +22.25,-71.6708 +22.275,-71.6336 +22.3,-71.5994 +22.325,-71.5676 +22.35,-71.5377 +22.375,-71.5094 +22.4,-71.4824 +22.425,-71.4565 +22.45,-71.4315 +22.475,-71.4072 +22.5,-71.3835 +22.525,-71.3603 +22.55,-71.3375 +22.575,-71.3151 +22.6,-71.293 +22.625,-71.2711 +22.65,-71.2494 +22.675,-71.2279 +22.7,-71.2066 +22.725,-71.1854 +22.75,-71.1643 +22.775,-71.1433 +22.8,-71.1224 +22.825,-71.1016 +22.85,-71.0809 +22.875,-71.0602 +22.9,-71.0395 +22.925,-71.019 +22.95,-70.9985 +22.975,-70.978 +23,-70.9576 +23.025,-70.9372 +23.05,-70.9169 +23.075,-70.8966 +23.1,-70.8763 +23.125,-70.8561 +23.15,-70.8359 +23.175,-70.8158 +23.2,-70.7957 +23.225,-70.7757 +23.25,-70.7556 +23.275,-70.7357 +23.3,-70.7157 +23.325,-70.6958 +23.35,-70.676 +23.375,-70.6562 +23.4,-70.6364 +23.425,-70.6167 +23.45,-70.597 +23.475,-70.5773 +23.5,-70.5577 +23.525,-70.5382 +23.55,-70.5186 +23.575,-70.4992 +23.6,-70.4797 +23.625,-70.4603 +23.65,-70.441 +23.675,-70.4217 +23.7,-70.4025 +23.725,-70.3833 +23.75,-70.3641 +23.775,-70.345 +23.8,-70.3259 +23.825,-70.3069 +23.85,-70.2879 +23.875,-70.269 +23.9,-70.2502 +23.925,-70.2313 +23.95,-70.2126 +23.975,-70.1938 +24,-70.1752 +24.025,-70.1566 +24.05,-70.138 +24.075,-70.1195 +24.1,-70.101 +24.125,-70.0826 +24.15,-70.0643 +24.175,-70.046 +24.2,-70.0277 +24.225,-70.0095 +24.25,-69.9914 +24.275,-69.9733 +24.3,-69.9553 +24.325,-69.9373 +24.35,-69.9194 +24.375,-69.9015 +24.4,-69.8837 +24.425,-69.8659 +24.45,-69.8482 +24.475,-69.8306 +24.5,-69.813 +24.525,-69.7955 +24.55,-69.778 +24.575,-69.7606 +24.6,-69.7432 +24.625,-69.7259 +24.65,-69.7087 +24.675,-69.6915 +24.7,-69.6744 +24.725,-69.6573 +24.75,-69.6403 +24.775,-69.6233 +24.8,-69.6064 +24.825,-69.5896 +24.85,-69.5728 +24.875,-69.5561 +24.9,-69.5394 +24.925,-69.5228 +24.95,-69.5063 +24.975,-69.4898 +25,-69.4734 +25.025,-69.457 +25.05,-69.4407 +25.075,-69.4245 +25.1,-69.4083 +25.125,-69.3922 +25.15,-69.3761 +25.175,-69.3601 +25.2,-69.3442 +25.225,-69.3283 +25.25,-69.3124 +25.275,-69.2967 +25.3,-69.281 +25.325,-69.2653 +25.35,-69.2498 +25.375,-69.2342 +25.4,-69.2188 +25.425,-69.2034 +25.45,-69.188 +25.475,-69.1727 +25.5,-69.1575 +25.525,-69.1424 +25.55,-69.1273 +25.575,-69.1122 +25.6,-69.0972 +25.625,-69.0823 +25.65,-69.0674 +25.675,-69.0526 +25.7,-69.0379 +25.725,-69.0232 +25.75,-69.0086 +25.775,-68.994 +25.8,-68.9795 +25.825,-68.9651 +25.85,-68.9507 +25.875,-68.9364 +25.9,-68.9221 +25.925,-68.9079 +25.95,-68.8937 +25.975,-68.8796 +26,-68.8656 +26.025,-68.8516 +26.05,-68.8376 +26.075,-68.8238 +26.1,-68.8099 +26.125,-68.7962 +26.15,-68.7825 +26.175,-68.7688 +26.2,-68.7552 +26.225,-68.7417 +26.25,-68.7282 +26.275,-68.7148 +26.3,-68.7014 +26.325,-68.6881 +26.35,-68.6748 +26.375,-68.6616 +26.4,-68.6485 +26.425,-68.6354 +26.45,-68.6223 +26.475,-68.6093 +26.5,-68.5964 +26.525,-68.5835 +26.55,-68.5706 +26.575,-68.5579 +26.6,-68.5451 +26.625,-68.5325 +26.65,-68.5198 +26.675,-68.5073 +26.7,-68.4947 +26.725,-68.4823 +26.75,-68.4698 +26.775,-68.4575 +26.8,-68.4452 +26.825,-68.4329 +26.85,-68.4207 +26.875,-68.4085 +26.9,-68.3964 +26.925,-68.3843 +26.95,-68.3723 +26.975,-68.3604 +27,-68.3484 +27.025,-68.3366 +27.05,-68.3247 +27.075,-68.313 +27.1,-68.3012 +27.125,-68.2896 +27.15,-68.2779 +27.175,-68.2664 +27.2,-68.2548 +27.225,-68.2433 +27.25,-68.2319 +27.275,-68.2205 +27.3,-68.2091 +27.325,-68.1978 +27.35,-68.1866 +27.375,-68.1753 +27.4,-68.1642 +27.425,-68.153 +27.45,-68.142 +27.475,-68.1309 +27.5,-68.1199 +27.525,-68.109 +27.55,-68.0981 +27.575,-68.0872 +27.6,-68.0764 +27.625,-68.0656 +27.65,-68.0548 +27.675,-68.0441 +27.7,-68.0335 +27.725,-68.0228 +27.75,-68.0123 +27.775,-68.0017 +27.8,-67.9912 +27.825,-67.9808 +27.85,-67.9704 +27.875,-67.96 +27.9,-67.9496 +27.925,-67.9393 +27.95,-67.9291 +27.975,-67.9188 +28,-67.9086 +28.025,-67.8985 +28.05,-67.8883 +28.075,-67.8782 +28.1,-67.8682 +28.125,-67.8582 +28.15,-67.8482 +28.175,-67.8382 +28.2,-67.8283 +28.225,-67.8184 +28.25,-67.8086 +28.275,-67.7988 +28.3,-67.789 +28.325,-67.7792 +28.35,-67.7695 +28.375,-67.7598 +28.4,-67.7501 +28.425,-67.7405 +28.45,-67.7309 +28.475,-67.7214 +28.5,-67.7118 +28.525,-67.7023 +28.55,-67.6928 +28.575,-67.6834 +28.6,-67.674 +28.625,-67.6646 +28.65,-67.6552 +28.675,-67.6459 +28.7,-67.6366 +28.725,-67.6273 +28.75,-67.6181 +28.775,-67.6089 +28.8,-67.5997 +28.825,-67.5905 +28.85,-67.5814 +28.875,-67.5723 +28.9,-67.5632 +28.925,-67.5542 +28.95,-67.5452 +28.975,-67.5362 +29,-67.5272 +29.025,-67.5183 +29.05,-67.5093 +29.075,-67.5004 +29.1,-67.4916 +29.125,-67.4827 +29.15,-67.4739 +29.175,-67.4651 +29.2,-67.4564 +29.225,-67.4476 +29.25,-67.4389 +29.275,-67.4302 +29.3,-67.4215 +29.325,-67.4129 +29.35,-67.4043 +29.375,-67.3957 +29.4,-67.3871 +29.425,-67.3785 +29.45,-67.37 +29.475,-67.3615 +29.5,-67.353 +29.525,-67.3445 +29.55,-67.3361 +29.575,-67.3276 +29.6,-67.3192 +29.625,-67.3109 +29.65,-67.3025 +29.675,-67.2942 +29.7,-67.2858 +29.725,-67.2775 +29.75,-67.2693 +29.775,-67.261 +29.8,-67.2528 +29.825,-67.2446 +29.85,-67.2364 +29.875,-67.2282 +29.9,-67.22 +29.925,-67.2119 +29.95,-67.2038 +29.975,-67.1957 +30,-67.1876 +30.025,-67.1795 +30.05,-67.1715 +30.075,-67.1634 +30.1,-67.1554 +30.125,-67.1474 +30.15,-67.1395 +30.175,-67.1315 +30.2,-67.1236 +30.225,-67.1156 +30.25,-67.1077 +30.275,-67.0999 +30.3,-67.092 +30.325,-67.0841 +30.35,-67.0763 +30.375,-67.0685 +30.4,-67.0607 +30.425,-67.0529 +30.45,-67.0451 +30.475,-67.0374 +30.5,-67.0296 +30.525,-67.0219 +30.55,-67.0142 +30.575,-67.0065 +30.6,-66.9988 +30.625,-66.9912 +30.65,-66.9835 +30.675,-66.9759 +30.7,-66.9683 +30.725,-66.9607 +30.75,-66.9531 +30.775,-66.9455 +30.8,-66.938 +30.825,-66.9304 +30.85,-66.9229 +30.875,-66.9154 +30.9,-66.9079 +30.925,-66.9004 +30.95,-66.8929 +30.975,-66.8854 +31,-66.8779 +31.025,-66.8705 +31.05,-66.8631 +31.075,-66.8556 +31.1,-66.8482 +31.125,-66.8408 +31.15,-66.8334 +31.175,-66.826 +31.2,-66.8187 +31.225,-66.8113 +31.25,-66.8039 +31.275,-66.7966 +31.3,-66.7893 +31.325,-66.782 +31.35,-66.7747 +31.375,-66.7674 +31.4,-66.7601 +31.425,-66.7528 +31.45,-66.7456 +31.475,-66.7383 +31.5,-66.7311 +31.525,-66.7238 +31.55,-66.7166 +31.575,-66.7094 +31.6,-66.7022 +31.625,-66.695 +31.65,-66.6878 +31.675,-66.6807 +31.7,-66.6735 +31.725,-66.6664 +31.75,-66.6592 +31.775,-66.6521 +31.8,-66.645 +31.825,-66.6379 +31.85,-66.6308 +31.875,-66.6237 +31.9,-66.6167 +31.925,-66.6096 +31.95,-66.6026 +31.975,-66.5955 +32,-66.5885 +32.025,-66.5815 +32.05,-66.5745 +32.075,-66.5675 +32.1,-66.5605 +32.125,-66.5535 +32.15,-66.5466 +32.175,-66.5396 +32.2,-66.5327 +32.225,-66.5258 +32.25,-66.5188 +32.275,-66.5119 +32.3,-66.505 +32.325,-66.4981 +32.35,-66.4913 +32.375,-66.4844 +32.4,-66.4776 +32.425,-66.4707 +32.45,-66.4639 +32.475,-66.4571 +32.5,-66.4503 +32.525,-66.4435 +32.55,-66.4367 +32.575,-66.4299 +32.6,-66.4231 +32.625,-66.4164 +32.65,-66.4096 +32.675,-66.4029 +32.7,-66.3962 +32.725,-66.3895 +32.75,-66.3828 +32.775,-66.3761 +32.8,-66.3694 +32.825,-66.3628 +32.85,-66.3561 +32.875,-66.3495 +32.9,-66.3429 +32.925,-66.3362 +32.95,-66.3296 +32.975,-66.323 +33,-66.3165 +33.025,-66.3099 +33.05,-66.3033 +33.075,-66.2968 +33.1,-66.2903 +33.125,-66.2837 +33.15,-66.2772 +33.175,-66.2707 +33.2,-66.2643 +33.225,-66.2578 +33.25,-66.2513 +33.275,-66.2449 +33.3,-66.2384 +33.325,-66.232 +33.35,-66.2256 +33.375,-66.2192 +33.4,-66.2128 +33.425,-66.2065 +33.45,-66.2001 +33.475,-66.1937 +33.5,-66.1874 +33.525,-66.1811 +33.55,-66.1748 +33.575,-66.1685 +33.6,-66.1622 +33.625,-66.1559 +33.65,-66.1497 +33.675,-66.1434 +33.7,-66.1372 +33.725,-66.131 +33.75,-66.1248 +33.775,-66.1186 +33.8,-66.1124 +33.825,-66.1062 +33.85,-66.1001 +33.875,-66.0939 +33.9,-66.0878 +33.925,-66.0817 +33.95,-66.0756 +33.975,-66.0695 +34,-66.0634 +34.025,-66.0574 +34.05,-66.0513 +34.075,-66.0453 +34.1,-66.0393 +34.125,-66.0333 +34.15,-66.0273 +34.175,-66.0213 +34.2,-66.0154 +34.225,-66.0094 +34.25,-66.0035 +34.275,-65.9976 +34.3,-65.9917 +34.325,-65.9858 +34.35,-65.9799 +34.375,-65.9741 +34.4,-65.9682 +34.425,-65.9624 +34.45,-65.9566 +34.475,-65.9508 +34.5,-65.945 +34.525,-65.9392 +34.55,-65.9334 +34.575,-65.9277 +34.6,-65.9219 +34.625,-65.9162 +34.65,-65.9105 +34.675,-65.9048 +34.7,-65.8991 +34.725,-65.8934 +34.75,-65.8877 +34.775,-65.882 +34.8,-65.8764 +34.825,-65.8708 +34.85,-65.8651 +34.875,-65.8595 +34.9,-65.8539 +34.925,-65.8483 +34.95,-65.8428 +34.975,-65.8372 +35,-65.8317 +35.025,-65.8261 +35.05,-65.8206 +35.075,-65.8151 +35.1,-65.8096 +35.125,-65.8041 +35.15,-65.7987 +35.175,-65.7932 +35.2,-65.7878 +35.225,-65.2721 +35.25,-64.7731 +35.275,-64.2901 +35.3,-63.8222 +35.325,-63.3686 +35.35,-62.9288 +35.375,-62.5019 +35.4,-62.0874 +35.425,-61.6845 +35.45,-61.2925 +35.475,-60.9108 +35.5,-60.5387 +35.525,-60.1756 +35.55,-59.8207 +35.575,-59.4733 +35.6,-59.1328 +35.625,-58.7984 +35.65,-58.4693 +35.675,-58.1449 +35.7,-57.8243 +35.725,-57.5069 +35.75,-57.1916 +35.775,-56.8778 +35.8,-56.5645 +35.825,-56.2509 +35.85,-55.9358 +35.875,-55.6185 +35.9,-55.2978 +35.925,-54.9725 +35.95,-54.6416 +35.975,-54.3036 +36,-53.9573 +36.025,-53.601 +36.05,-53.2331 +36.075,-52.8519 +36.1,-52.4553 +36.125,-52.041 +36.15,-51.6066 +36.175,-51.1492 +36.2,-50.6655 +36.225,-50.152 +36.25,-49.6044 +36.275,-49.0179 +36.3,-48.3868 +36.325,-47.7045 +36.35,-46.9633 +36.375,-46.1541 +36.4,-45.266 +36.425,-44.2861 +36.45,-43.1988 +36.475,-41.9855 +36.5,-40.6237 +36.525,-39.0861 +36.55,-37.3397 +36.575,-35.3445 +36.6,-33.0529 +36.625,-30.4084 +36.65,-27.3461 +36.675,-23.7944 +36.7,-19.681 +36.725,-14.9446 +36.75,-9.55619 +36.775,-3.55149 +36.8,2.93297 +36.825,9.6364 +36.85,16.19 +36.875,22.1897 +36.9,27.3004 +36.925,31.3404 +36.95,34.3003 +36.975,36.3009 +37,37.5248 +37.025,38.1589 +37.05,38.3625 +37.075,38.2569 +37.1,37.928 +37.125,37.4343 +37.15,36.8149 +37.175,36.0959 +37.2,35.2948 +37.225,34.4242 +37.25,33.4934 +37.275,32.5094 +37.3,31.4782 +37.325,30.4049 +37.35,29.294 +37.375,28.1496 +37.4,26.9754 +37.425,25.775 +37.45,24.5518 +37.475,23.3087 +37.5,22.0486 +37.525,20.7744 +37.55,19.4884 +37.575,18.1929 +37.6,16.8903 +37.625,15.5824 +37.65,14.2711 +37.675,12.9581 +37.7,11.6449 +37.725,10.3328 +37.75,9.02311 +37.775,7.71695 +37.8,6.41527 +37.825,5.11895 +37.85,3.82876 +37.875,2.54537 +37.9,1.26931 +37.925,0.00108842 +37.95,-1.25888 +37.975,-2.51033 +38,-3.75299 +38.025,-4.98667 +38.05,-6.2112 +38.075,-7.42657 +38.1,-8.63278 +38.125,-9.82982 +38.15,-11.0178 +38.175,-12.1967 +38.2,-13.3669 +38.225,-14.5285 +38.25,-15.6818 +38.275,-16.8271 +38.3,-17.9647 +38.325,-19.095 +38.35,-20.2185 +38.375,-21.3358 +38.4,-22.4475 +38.425,-23.5544 +38.45,-24.6571 +38.475,-25.7566 +38.5,-26.8538 +38.525,-27.9498 +38.55,-29.0458 +38.575,-30.1433 +38.6,-31.2439 +38.625,-32.3494 +38.65,-33.4615 +38.675,-34.5824 +38.7,-35.7143 +38.725,-36.8596 +38.75,-38.0208 +38.775,-39.2008 +38.8,-40.4024 +38.825,-41.6287 +38.85,-42.8826 +38.875,-44.167 +38.9,-45.4848 +38.925,-46.8382 +38.95,-48.2293 +38.975,-49.6591 +39,-51.1275 +39.025,-52.633 +39.05,-54.1723 +39.075,-55.7395 +39.1,-57.3264 +39.125,-58.9216 +39.15,-60.511 +39.175,-62.0776 +39.2,-63.6025 +39.225,-65.066 +39.25,-66.449 +39.275,-67.7343 +39.3,-68.9086 +39.325,-69.9633 +39.35,-70.8949 +39.375,-71.7049 +39.4,-72.3991 +39.425,-72.9863 +39.45,-73.4775 +39.475,-73.8844 +39.5,-74.2188 +39.525,-74.4915 +39.55,-74.7127 +39.575,-74.8911 +39.6,-75.0343 +39.625,-75.1486 +39.65,-75.2395 +39.675,-75.3113 +39.7,-75.3675 +39.725,-75.4112 +39.75,-75.4446 +39.775,-75.4697 +39.8,-75.4881 39.825,-75.501 39.85,-75.5095 -39.875,-75.5144 -39.9,-75.5163 -39.925,-75.5157 -39.95,-75.5131 -39.975,-75.5088 -40,-75.5031 -40.025,-75.4962 -40.05,-75.4884 -40.075,-75.4797 -40.1,-75.4704 -40.125,-75.4605 -40.15,-75.45 -40.175,-75.4392 -40.2,-75.4279 -40.225,-75.4164 -40.25,-75.4045 -40.275,-75.3924 -40.3,-75.3801 -40.325,-75.3675 -40.35,-75.3548 -40.375,-75.3419 -40.4,-75.3288 -40.425,-75.3156 -40.45,-75.3022 -40.475,-75.2887 -40.5,-75.2751 -40.525,-75.2614 -40.55,-75.2475 -40.575,-75.2335 -40.6,-75.2194 -40.625,-75.2052 -40.65,-75.1909 -40.675,-75.1765 -40.7,-75.162 -40.725,-75.1474 -40.75,-75.1327 -40.775,-75.1179 -40.8,-75.1029 -40.825,-75.0879 -40.85,-75.0728 -40.875,-75.0576 -40.9,-75.0423 -40.925,-75.0269 -40.95,-75.0114 -40.975,-74.9958 -41,-74.9801 -41.025,-74.9643 -41.05,-74.9484 -41.075,-74.9324 -41.1,-74.9163 -41.125,-74.9001 -41.15,-74.8839 -41.175,-74.8675 -41.2,-74.851 -41.225,-74.8345 -41.25,-74.8178 -41.275,-74.8011 -41.3,-74.7842 -41.325,-74.7673 -41.35,-74.7503 -41.375,-74.7331 -41.4,-74.7159 -41.425,-74.6986 -41.45,-74.6812 -41.475,-74.6637 -41.5,-74.6461 -41.525,-74.6284 -41.55,-74.6106 -41.575,-74.5927 -41.6,-74.5747 -41.625,-74.5566 -41.65,-74.5385 -41.675,-74.5202 -41.7,-74.5019 -41.725,-74.4834 -41.75,-74.4649 -41.775,-74.4462 -41.8,-74.4275 -41.825,-74.4087 -41.85,-74.3898 -41.875,-74.3708 -41.9,-74.3517 -41.925,-74.3325 -41.95,-74.3132 -41.975,-74.2939 -42,-74.2744 -42.025,-74.2549 -42.05,-74.2353 -42.075,-74.2155 -42.1,-74.1957 -42.125,-74.1758 -42.15,-74.1558 -42.175,-74.1357 -42.2,-74.1156 -42.225,-74.0953 -42.25,-74.075 -42.275,-74.0546 -42.3,-74.034 -42.325,-74.0135 -42.35,-73.9928 -42.375,-73.972 -42.4,-73.9511 -42.425,-73.9302 -42.45,-73.9092 -42.475,-73.8881 -42.5,-73.8669 -42.525,-73.8456 -42.55,-73.8243 -42.575,-73.8028 -42.6,-73.7813 -42.625,-73.7597 -42.65,-73.738 -42.675,-73.7163 -42.7,-73.6945 -42.725,-73.6725 -42.75,-73.6506 -42.775,-73.6285 -42.8,-73.6063 -42.825,-73.5841 -42.85,-73.5618 -42.875,-73.5395 -42.9,-72.9675 -42.925,-72.4329 -42.95,-71.933 -42.975,-71.4652 -43,-71.0273 -43.025,-70.617 -43.05,-70.2325 -43.075,-69.8718 -43.1,-69.5335 -43.125,-69.2159 -43.15,-68.9176 -43.175,-68.6374 -43.2,-68.374 -43.225,-67.6179 -43.25,-66.9138 -43.275,-66.2579 -43.3,-65.6467 -43.325,-65.0769 -43.35,-64.5457 -43.375,-64.0504 -43.4,-63.5884 -43.425,-63.1573 -43.45,-62.7549 -43.475,-62.3794 -43.5,-62.0286 -43.525,-61.701 -43.55,-61.3948 -43.575,-61.1085 -43.6,-60.8406 -43.625,-60.5899 -43.65,-60.3551 -43.675,-60.1349 -43.7,-59.9285 -43.725,-59.7346 -43.75,-59.5525 -43.775,-59.3812 -43.8,-59.2199 -43.825,-59.068 -43.85,-58.9246 -43.875,-58.7893 -43.9,-58.6613 -43.925,-58.5402 -43.95,-58.4255 -43.975,-58.3167 -44,-58.2134 -44.025,-58.1153 -44.05,-58.0219 -44.075,-57.933 -44.1,-57.8484 -44.125,-57.7676 -44.15,-57.6906 -44.175,-57.617 -44.2,-57.5468 -44.225,-57.4796 -44.25,-57.4155 -44.275,-57.3541 -44.3,-57.2954 -44.325,-57.2394 -44.35,-57.1857 -44.375,-57.1345 -44.4,-57.0856 -44.425,-57.0389 -44.45,-56.9943 -44.475,-56.9519 -44.5,-56.9115 -44.525,-56.8731 -44.55,-56.8367 -44.575,-56.8022 -44.6,-56.7696 -44.625,-56.7389 -44.65,-56.7101 -44.675,-56.6831 -44.7,-56.6579 -44.725,-56.6346 -44.75,-56.613 -44.775,-56.5933 -44.8,-56.5753 -44.825,-56.5592 -44.85,-56.5449 -44.875,-56.5324 -44.9,-56.5217 -44.925,-56.5128 -44.95,-56.5058 -44.975,-56.5005 -45,-56.4972 -45.025,-56.4957 -45.05,-56.4961 -45.075,-56.4983 -45.1,-56.5025 -45.125,-56.5086 -45.15,-56.5167 -45.175,-56.5267 -45.2,-56.5386 -45.225,-56.5526 -45.25,-56.5686 -45.275,-56.5866 -45.3,-56.6066 -45.325,-56.6287 -45.35,-56.6529 -45.375,-56.6792 -45.4,-56.7076 -45.425,-56.7381 -45.45,-56.7708 -45.475,-56.8056 -45.5,-56.8426 -45.525,-56.8818 -45.55,-56.9231 -45.575,-56.9667 -45.6,-57.0125 -45.625,-57.0605 -45.65,-57.1107 -45.675,-57.1631 -45.7,-57.2177 -45.725,-57.2746 -45.75,-57.3336 -45.775,-57.3948 -45.8,-57.4582 -45.825,-57.5238 -45.85,-57.5915 -45.875,-57.6613 -45.9,-57.7332 -45.925,-57.8072 -45.95,-57.8832 -45.975,-57.9612 -46,-58.0412 -46.025,-58.1231 -46.05,-58.2068 -46.075,-58.2923 -46.1,-58.3796 -46.125,-58.4687 -46.15,-58.5593 -46.175,-58.6515 -46.2,-58.7452 -46.225,-58.8404 -46.25,-58.9369 -46.275,-59.0347 -46.3,-59.1336 -46.325,-59.2337 -46.35,-59.3349 -46.375,-59.4369 -46.4,-59.5399 -46.425,-59.6435 -46.45,-59.7479 -46.475,-59.8528 -46.5,-59.9582 -46.525,-60.064 -46.55,-60.1701 -46.575,-60.2764 -46.6,-60.3828 -46.625,-60.4893 -46.65,-60.5956 -46.675,-60.7018 -46.7,-60.8078 -46.725,-60.9134 -46.75,-61.0185 -46.775,-61.1232 -46.8,-61.2273 -46.825,-61.3308 -46.85,-61.4335 -46.875,-61.5354 -46.9,-61.6365 -46.925,-61.7366 -46.95,-61.8358 -46.975,-61.9339 -47,-62.0309 -47.025,-62.1267 -47.05,-62.2214 -47.075,-62.3149 -47.1,-62.407 -47.125,-62.4979 -47.15,-62.5875 -47.175,-62.6756 -47.2,-62.7624 -47.225,-62.8478 -47.25,-62.9318 -47.275,-63.0143 -47.3,-63.0954 -47.325,-63.175 -47.35,-63.2532 -47.375,-63.3299 -47.4,-63.4051 -47.425,-63.4789 -47.45,-63.5512 -47.475,-63.622 -47.5,-63.6914 -47.525,-63.7593 -47.55,-63.8258 -47.575,-63.8909 -47.6,-63.9546 -47.625,-64.0169 -47.65,-64.0778 -47.675,-64.1373 -47.7,-64.1955 -47.725,-64.2524 -47.75,-64.308 -47.775,-64.3623 -47.8,-64.4153 -47.825,-64.4671 -47.85,-64.5177 -47.875,-64.567 -47.9,-64.6152 -47.925,-64.6623 -47.95,-64.7082 -47.975,-64.753 -48,-64.7967 -48.025,-64.8393 -48.05,-64.8809 -48.075,-64.9215 -48.1,-64.9611 -48.125,-64.9997 -48.15,-65.0373 -48.175,-65.074 -48.2,-65.1098 -48.225,-65.1447 -48.25,-65.1788 -48.275,-65.212 -48.3,-65.2443 -48.325,-65.2759 -48.35,-65.3066 -48.375,-65.3366 -48.4,-65.3659 -48.425,-65.3944 -48.45,-65.4222 -48.475,-65.4493 -48.5,-65.4757 -48.525,-65.5014 -48.55,-65.5265 -48.575,-65.551 -48.6,-65.5748 -48.625,-65.5981 -48.65,-65.6207 -48.675,-65.6428 -48.7,-65.6644 -48.725,-65.6854 -48.75,-65.7059 -48.775,-65.7258 -48.8,-65.7453 -48.825,-65.7642 -48.85,-65.7827 -48.875,-65.8008 -48.9,-65.8183 -48.925,-65.8355 -48.95,-65.8522 -48.975,-65.8685 -49,-65.8844 -49.025,-65.8999 -49.05,-65.915 -49.075,-65.9297 -49.1,-65.944 -49.125,-65.958 -49.15,-65.9717 -49.175,-65.985 -49.2,-65.9979 -49.225,-66.0106 -49.25,-66.0229 -49.275,-66.0349 -49.3,-66.0466 -49.325,-66.058 -49.35,-66.0692 -49.375,-66.08 -49.4,-66.0906 -49.425,-66.1009 -49.45,-66.1109 -49.475,-66.1207 -49.5,-66.1303 -49.525,-66.1396 -49.55,-66.1487 -49.575,-66.1575 -49.6,-66.1661 -49.625,-66.1745 -49.65,-66.1827 -49.675,-66.1906 -49.7,-66.1984 -49.725,-66.206 -49.75,-66.2133 -49.775,-66.2205 -49.8,-66.2275 -49.825,-66.2343 -49.85,-66.2409 -49.875,-66.2473 -49.9,-66.2536 -49.925,-66.2597 -49.95,-66.2656 -49.975,-66.2714 -50,-66.277 -50.025,-66.2825 -50.05,-66.2878 -50.075,-66.2929 -50.1,-66.298 -50.125,-66.3028 -50.15,-66.3076 -50.175,-66.3122 -50.2,-66.3166 -50.225,-66.321 -50.25,-66.3252 -50.275,-66.3293 -50.3,-66.3332 -50.325,-66.337 -50.35,-66.3408 -50.375,-66.3444 -50.4,-66.3478 -50.425,-66.3512 -50.45,-66.3545 -50.475,-66.3576 -50.5,-66.3607 -50.525,-66.3636 -50.55,-66.3665 -50.575,-66.3692 -50.6,-66.3719 -50.625,-66.3744 -50.65,-66.3769 -50.675,-66.3792 -50.7,-66.3815 -50.725,-66.3837 -50.75,-66.3858 -50.775,-66.3878 -50.8,-66.3897 -50.825,-66.3915 -50.85,-66.3933 -50.875,-66.3949 -50.9,-66.3965 -50.925,-66.398 -50.95,-66.3995 -50.975,-66.4008 -51,-66.4021 -51.025,-66.4033 -51.05,-66.4044 -51.075,-66.4055 -51.1,-66.4065 -51.125,-66.4074 -51.15,-66.4082 -51.175,-66.409 -51.2,-66.4097 -51.225,-66.4104 -51.25,-66.4109 -51.275,-66.4115 -51.3,-66.4119 -51.325,-66.4123 -51.35,-66.4126 -51.375,-66.4129 -51.4,-66.4131 -51.425,-66.4133 -51.45,-66.4134 -51.475,-66.4134 -51.5,-66.4134 -51.525,-66.4133 -51.55,-66.4132 -51.575,-66.413 -51.6,-66.4127 -51.625,-66.4124 -51.65,-66.4121 -51.675,-66.4117 -51.7,-66.4112 -51.725,-66.4107 -51.75,-66.4102 -51.775,-66.4096 -51.8,-66.4089 -51.825,-66.4083 -51.85,-66.4075 -51.875,-66.4067 -51.9,-66.4059 -51.925,-66.405 -51.95,-66.4041 -51.975,-66.4031 -52,-66.4021 -52.025,-66.401 -52.05,-66.3999 -52.075,-66.3988 -52.1,-66.3976 -52.125,-66.3964 -52.15,-66.3951 -52.175,-66.3938 -52.2,-66.3924 -52.225,-66.391 -52.25,-66.3896 -52.275,-66.3881 -52.3,-66.3866 -52.325,-66.3851 -52.35,-66.3835 -52.375,-66.3818 -52.4,-66.3802 -52.425,-66.3785 -52.45,-66.3767 -52.475,-66.375 -52.5,-66.3732 -52.525,-66.3713 -52.55,-66.3694 -52.575,-66.3675 -52.6,-66.3656 -52.625,-66.3636 -52.65,-66.3616 -52.675,-66.3596 -52.7,-66.3575 -52.725,-66.3554 -52.75,-66.3532 -52.775,-66.351 -52.8,-66.3488 -52.825,-66.3466 -52.85,-66.3443 -52.875,-66.342 -52.9,-66.3397 -52.925,-66.3373 -52.95,-66.335 -52.975,-66.3325 -53,-66.3301 -53.025,-66.3276 -53.05,-66.3251 -53.075,-66.3226 -53.1,-66.32 -53.125,-66.3174 -53.15,-66.3148 -53.175,-66.3122 -53.2,-66.3095 -53.225,-66.3068 -53.25,-66.3041 -53.275,-66.3014 -53.3,-66.2986 -53.325,-66.2958 -53.35,-66.293 -53.375,-66.2901 -53.4,-66.2873 -53.425,-66.2844 -53.45,-66.2815 -53.475,-66.2785 -53.5,-66.2755 -53.525,-66.2726 -53.55,-66.2695 -53.575,-66.2665 -53.6,-66.2635 -53.625,-66.2604 -53.65,-66.2573 -53.675,-66.2541 -53.7,-66.251 -53.725,-66.2478 -53.75,-66.2447 -53.775,-66.2414 -53.8,-66.2382 -53.825,-66.235 -53.85,-66.2317 -53.875,-66.2284 -53.9,-66.2251 -53.925,-66.2218 -53.95,-66.2184 -53.975,-66.2151 -54,-66.2117 -54.025,-66.2083 -54.05,-66.2049 -54.075,-66.2014 -54.1,-66.198 -54.125,-66.1945 -54.15,-66.191 -54.175,-66.1875 -54.2,-66.184 -54.225,-66.1804 -54.25,-66.1769 -54.275,-66.1733 -54.3,-66.1697 -54.325,-66.1661 -54.35,-66.1625 -54.375,-66.1588 -54.4,-66.1552 -54.425,-66.1515 -54.45,-66.1478 -54.475,-66.1441 -54.5,-66.1404 -54.525,-66.1367 -54.55,-66.1329 -54.575,-66.1292 -54.6,-66.1254 -54.625,-66.1216 -54.65,-66.1179 -54.675,-66.114 -54.7,-66.1102 -54.725,-66.1064 -54.75,-66.1025 -54.775,-66.0987 -54.8,-66.0948 -54.825,-66.0909 -54.85,-66.087 -54.875,-66.0831 -54.9,-66.0792 -54.925,-66.0753 -54.95,-66.0714 -54.975,-66.0674 -55,-66.0635 -55.025,-66.0595 -55.05,-66.0555 -55.075,-66.0515 -55.1,-66.0475 -55.125,-66.0435 -55.15,-66.0395 -55.175,-66.0355 -55.2,-66.0314 -55.225,-66.0274 -55.25,-66.0233 -55.275,-66.0193 -55.3,-66.0152 -55.325,-66.0111 -55.35,-66.007 -55.375,-66.003 -55.4,-65.9989 -55.425,-65.9948 -55.45,-65.9906 -55.475,-65.9865 -55.5,-65.9824 -55.525,-65.9783 -55.55,-65.9741 -55.575,-65.97 -55.6,-65.9658 -55.625,-65.9617 -55.65,-65.9575 -55.675,-65.9533 -55.7,-65.9491 -55.725,-65.945 -55.75,-65.9408 -55.775,-65.9366 -55.8,-65.9324 -55.825,-65.9282 -55.85,-65.924 -55.875,-65.9198 -55.9,-65.9156 -55.925,-65.9114 -55.95,-65.9071 -55.975,-65.9029 -56,-65.8987 -56.025,-65.8945 -56.05,-65.8902 -56.075,-65.886 -56.1,-65.8818 -56.125,-65.8775 -56.15,-65.8733 -56.175,-65.869 -56.2,-65.8648 -56.225,-65.8605 -56.25,-65.8563 -56.275,-65.852 -56.3,-65.8478 -56.325,-65.8435 -56.35,-65.8393 -56.375,-65.835 -56.4,-65.8308 -56.425,-65.8265 -56.45,-65.8223 -56.475,-65.818 -56.5,-65.8137 -56.525,-65.8095 -56.55,-65.8052 -56.575,-65.801 -56.6,-65.7967 -56.625,-65.7925 -56.65,-65.7882 -56.675,-65.784 -56.7,-65.7797 -56.725,-65.7755 -56.75,-65.7712 -56.775,-65.767 -56.8,-65.7627 -56.825,-65.7585 -56.85,-65.7542 -56.875,-65.75 +39.875,-75.5143 +39.9,-75.5161 +39.925,-75.5154 +39.95,-75.5127 +39.975,-75.5084 +40,-75.5026 +40.025,-75.4957 +40.05,-75.4879 +40.075,-75.4792 +40.1,-75.4698 +40.125,-75.4599 +40.15,-75.4495 +40.175,-75.4386 +40.2,-75.4273 +40.225,-75.4158 +40.25,-75.4039 +40.275,-75.3918 +40.3,-75.3794 +40.325,-75.3669 +40.35,-75.3541 +40.375,-75.3412 +40.4,-75.3282 +40.425,-75.3149 +40.45,-75.3016 +40.475,-75.2881 +40.5,-75.2744 +40.525,-75.2607 +40.55,-75.2468 +40.575,-75.2328 +40.6,-75.2188 +40.625,-75.2046 +40.65,-75.1902 +40.675,-75.1758 +40.7,-75.1613 +40.725,-75.1467 +40.75,-75.132 +40.775,-75.1171 +40.8,-75.1022 +40.825,-75.0872 +40.85,-75.0721 +40.875,-75.0569 +40.9,-75.0416 +40.925,-75.0261 +40.95,-75.0106 +40.975,-74.995 +41,-74.9793 +41.025,-74.9635 +41.05,-74.9476 +41.075,-74.9317 +41.1,-74.9156 +41.125,-74.8994 +41.15,-74.8831 +41.175,-74.8667 +41.2,-74.8503 +41.225,-74.8337 +41.25,-74.8171 +41.275,-74.8003 +41.3,-74.7835 +41.325,-74.7665 +41.35,-74.7495 +41.375,-74.7323 +41.4,-74.7151 +41.425,-74.6978 +41.45,-74.6804 +41.475,-74.6629 +41.5,-74.6453 +41.525,-74.6276 +41.55,-74.6098 +41.575,-74.5919 +41.6,-74.5739 +41.625,-74.5558 +41.65,-74.5376 +41.675,-74.5194 +41.7,-74.501 +41.725,-74.4826 +41.75,-74.464 +41.775,-74.4454 +41.8,-74.4267 +41.825,-74.4079 +41.85,-74.3889 +41.875,-74.3699 +41.9,-74.3508 +41.925,-74.3317 +41.95,-74.3124 +41.975,-74.293 +42,-74.2736 +42.025,-74.254 +42.05,-74.2344 +42.075,-74.2147 +42.1,-74.1948 +42.125,-74.1749 +42.15,-74.1549 +42.175,-74.1349 +42.2,-74.1147 +42.225,-74.0944 +42.25,-74.0741 +42.275,-74.0537 +42.3,-74.0332 +42.325,-74.0126 +42.35,-73.9919 +42.375,-73.9711 +42.4,-73.9503 +42.425,-73.9293 +42.45,-73.9083 +42.475,-73.8872 +42.5,-73.866 +42.525,-73.8447 +42.55,-73.8234 +42.575,-73.8019 +42.6,-73.7804 +42.625,-73.7588 +42.65,-73.7371 +42.675,-73.7154 +42.7,-73.6936 +42.725,-73.6716 +42.75,-73.6496 +42.775,-73.6276 +42.8,-73.6054 +42.825,-73.5832 +42.85,-73.5609 +42.875,-73.5385 +42.9,-72.9665 +42.925,-72.432 +42.95,-71.9321 +42.975,-71.4643 +43,-71.0263 +43.025,-70.616 +43.05,-70.2314 +43.075,-69.8707 +43.1,-69.5324 +43.125,-69.2147 +43.15,-68.9164 +43.175,-68.6361 +43.2,-68.3727 +43.225,-67.6166 +43.25,-66.9125 +43.275,-66.2565 +43.3,-65.6452 +43.325,-65.0754 +43.35,-64.5442 +43.375,-64.0487 +43.4,-63.5866 +43.425,-63.1555 +43.45,-62.7531 +43.475,-62.3774 +43.5,-62.0266 +43.525,-61.6989 +43.55,-61.3926 +43.575,-61.1062 +43.6,-60.8382 +43.625,-60.5874 +43.65,-60.3525 +43.675,-60.1322 +43.7,-59.9256 +43.725,-59.7317 +43.75,-59.5494 +43.775,-59.3779 +43.8,-59.2165 +43.825,-59.0644 +43.85,-58.9209 +43.875,-58.7854 +43.9,-58.6573 +43.925,-58.536 +43.95,-58.4211 +43.975,-58.3121 +44,-58.2086 +44.025,-58.1102 +44.05,-58.0167 +44.075,-57.9276 +44.1,-57.8427 +44.125,-57.7618 +44.15,-57.6845 +44.175,-57.6107 +44.2,-57.5402 +44.225,-57.4728 +44.25,-57.4083 +44.275,-57.3466 +44.3,-57.2876 +44.325,-57.2312 +44.35,-57.1772 +44.375,-57.1257 +44.4,-57.0764 +44.425,-57.0293 +44.45,-56.9845 +44.475,-56.9417 +44.5,-56.9011 +44.525,-56.8624 +44.55,-56.8257 +44.575,-56.7909 +44.6,-56.758 +44.625,-56.7269 +44.65,-56.6977 +44.675,-56.6703 +44.7,-56.6448 +44.725,-56.621 +44.75,-56.599 +44.775,-56.5788 +44.8,-56.5603 +44.825,-56.5437 +44.85,-56.5288 +44.875,-56.5157 +44.9,-56.5044 +44.925,-56.495 +44.95,-56.4873 +44.975,-56.4814 +45,-56.4774 +45.025,-56.4753 +45.05,-56.475 +45.075,-56.4766 +45.1,-56.48 +45.125,-56.4854 +45.15,-56.4927 +45.175,-56.502 +45.2,-56.5132 +45.225,-56.5264 +45.25,-56.5416 +45.275,-56.5589 +45.3,-56.5781 +45.325,-56.5995 +45.35,-56.6229 +45.375,-56.6484 +45.4,-56.676 +45.425,-56.7057 +45.45,-56.7376 +45.475,-56.7717 +45.5,-56.8079 +45.525,-56.8464 +45.55,-56.8871 +45.575,-56.93 +45.6,-56.9751 +45.625,-57.0225 +45.65,-57.0722 +45.675,-57.1241 +45.7,-57.1782 +45.725,-57.2345 +45.75,-57.2931 +45.775,-57.3538 +45.8,-57.4168 +45.825,-57.4819 +45.85,-57.5491 +45.875,-57.6184 +45.9,-57.6899 +45.925,-57.7635 +45.95,-57.8391 +45.975,-57.9167 +46,-57.9964 +46.025,-58.078 +46.05,-58.1616 +46.075,-58.247 +46.1,-58.3342 +46.125,-58.4231 +46.15,-58.5137 +46.175,-58.6059 +46.2,-58.6996 +46.225,-58.7947 +46.25,-58.8913 +46.275,-58.9892 +46.3,-59.0884 +46.325,-59.1887 +46.35,-59.2901 +46.375,-59.3925 +46.4,-59.4958 +46.425,-59.5998 +46.45,-59.7046 +46.475,-59.81 +46.5,-59.9159 +46.525,-60.0222 +46.55,-60.1289 +46.575,-60.2358 +46.6,-60.3429 +46.625,-60.45 +46.65,-60.5571 +46.675,-60.664 +46.7,-60.7707 +46.725,-60.8771 +46.75,-60.9831 +46.775,-61.0886 +46.8,-61.1936 +46.825,-61.298 +46.85,-61.4016 +46.875,-61.5044 +46.9,-61.6064 +46.925,-61.7075 +46.95,-61.8075 +46.975,-61.9066 +47,-62.0045 +47.025,-62.1014 +47.05,-62.197 +47.075,-62.2914 +47.1,-62.3846 +47.125,-62.4764 +47.15,-62.5669 +47.175,-62.656 +47.2,-62.7437 +47.225,-62.83 +47.25,-62.9149 +47.275,-62.9983 +47.3,-63.0803 +47.325,-63.1608 +47.35,-63.2399 +47.375,-63.3174 +47.4,-63.3935 +47.425,-63.4681 +47.45,-63.5411 +47.475,-63.6128 +47.5,-63.6829 +47.525,-63.7516 +47.55,-63.8188 +47.575,-63.8846 +47.6,-63.9489 +47.625,-64.0119 +47.65,-64.0735 +47.675,-64.1337 +47.7,-64.1925 +47.725,-64.25 +47.75,-64.3062 +47.775,-64.361 +47.8,-64.4146 +47.825,-64.4669 +47.85,-64.518 +47.875,-64.5678 +47.9,-64.6165 +47.925,-64.664 +47.95,-64.7103 +47.975,-64.7555 +48,-64.7996 +48.025,-64.8426 +48.05,-64.8846 +48.075,-64.9256 +48.1,-64.9655 +48.125,-65.0044 +48.15,-65.0424 +48.175,-65.0794 +48.2,-65.1156 +48.225,-65.1508 +48.25,-65.1851 +48.275,-65.2186 +48.3,-65.2512 +48.325,-65.283 +48.35,-65.314 +48.375,-65.3442 +48.4,-65.3736 +48.425,-65.4023 +48.45,-65.4303 +48.475,-65.4575 +48.5,-65.4841 +48.525,-65.51 +48.55,-65.5352 +48.575,-65.5598 +48.6,-65.5838 +48.625,-65.6071 +48.65,-65.6299 +48.675,-65.6521 +48.7,-65.6737 +48.725,-65.6948 +48.75,-65.7154 +48.775,-65.7354 +48.8,-65.7549 +48.825,-65.7739 +48.85,-65.7925 +48.875,-65.8106 +48.9,-65.8282 +48.925,-65.8454 +48.95,-65.8621 +48.975,-65.8785 +49,-65.8944 +49.025,-65.9099 +49.05,-65.925 +49.075,-65.9398 +49.1,-65.9542 +49.125,-65.9682 +49.15,-65.9819 +49.175,-65.9952 +49.2,-66.0082 +49.225,-66.0208 +49.25,-66.0332 +49.275,-66.0452 +49.3,-66.057 +49.325,-66.0684 +49.35,-66.0795 +49.375,-66.0904 +49.4,-66.101 +49.425,-66.1113 +49.45,-66.1213 +49.475,-66.1311 +49.5,-66.1407 +49.525,-66.15 +49.55,-66.159 +49.575,-66.1678 +49.6,-66.1764 +49.625,-66.1848 +49.65,-66.1929 +49.675,-66.2009 +49.7,-66.2086 +49.725,-66.2161 +49.75,-66.2234 +49.775,-66.2305 +49.8,-66.2375 +49.825,-66.2442 +49.85,-66.2508 +49.875,-66.2572 +49.9,-66.2634 +49.925,-66.2694 +49.95,-66.2753 +49.975,-66.281 +50,-66.2866 +50.025,-66.292 +50.05,-66.2972 +50.075,-66.3023 +50.1,-66.3073 +50.125,-66.3121 +50.15,-66.3168 +50.175,-66.3213 +50.2,-66.3257 +50.225,-66.3299 +50.25,-66.3341 +50.275,-66.3381 +50.3,-66.342 +50.325,-66.3457 +50.35,-66.3494 +50.375,-66.3529 +50.4,-66.3563 +50.425,-66.3596 +50.45,-66.3628 +50.475,-66.3659 +50.5,-66.3689 +50.525,-66.3717 +50.55,-66.3745 +50.575,-66.3772 +50.6,-66.3797 +50.625,-66.3822 +50.65,-66.3846 +50.675,-66.3869 +50.7,-66.3891 +50.725,-66.3912 +50.75,-66.3932 +50.775,-66.3951 +50.8,-66.3969 +50.825,-66.3987 +50.85,-66.4004 +50.875,-66.402 +50.9,-66.4035 +50.925,-66.4049 +50.95,-66.4063 +50.975,-66.4075 +51,-66.4087 +51.025,-66.4099 +51.05,-66.4109 +51.075,-66.4119 +51.1,-66.4128 +51.125,-66.4137 +51.15,-66.4144 +51.175,-66.4151 +51.2,-66.4158 +51.225,-66.4164 +51.25,-66.4169 +51.275,-66.4173 +51.3,-66.4177 +51.325,-66.418 +51.35,-66.4183 +51.375,-66.4185 +51.4,-66.4186 +51.425,-66.4187 +51.45,-66.4187 +51.475,-66.4187 +51.5,-66.4186 +51.525,-66.4185 +51.55,-66.4183 +51.575,-66.418 +51.6,-66.4177 +51.625,-66.4174 +51.65,-66.417 +51.675,-66.4165 +51.7,-66.416 +51.725,-66.4154 +51.75,-66.4148 +51.775,-66.4141 +51.8,-66.4134 +51.825,-66.4127 +51.85,-66.4119 +51.875,-66.411 +51.9,-66.4101 +51.925,-66.4092 +51.95,-66.4082 +51.975,-66.4072 +52,-66.4061 +52.025,-66.405 +52.05,-66.4038 +52.075,-66.4026 +52.1,-66.4014 +52.125,-66.4001 +52.15,-66.3987 +52.175,-66.3974 +52.2,-66.396 +52.225,-66.3945 +52.25,-66.393 +52.275,-66.3915 +52.3,-66.3899 +52.325,-66.3883 +52.35,-66.3867 +52.375,-66.385 +52.4,-66.3833 +52.425,-66.3816 +52.45,-66.3798 +52.475,-66.378 +52.5,-66.3761 +52.525,-66.3742 +52.55,-66.3723 +52.575,-66.3703 +52.6,-66.3683 +52.625,-66.3663 +52.65,-66.3642 +52.675,-66.3621 +52.7,-66.36 +52.725,-66.3579 +52.75,-66.3557 +52.775,-66.3535 +52.8,-66.3512 +52.825,-66.3489 +52.85,-66.3466 +52.875,-66.3443 +52.9,-66.3419 +52.925,-66.3395 +52.95,-66.3371 +52.975,-66.3346 +53,-66.3321 +53.025,-66.3296 +53.05,-66.3271 +53.075,-66.3245 +53.1,-66.3219 +53.125,-66.3193 +53.15,-66.3166 +53.175,-66.3139 +53.2,-66.3112 +53.225,-66.3085 +53.25,-66.3058 +53.275,-66.303 +53.3,-66.3002 +53.325,-66.2973 +53.35,-66.2945 +53.375,-66.2916 +53.4,-66.2887 +53.425,-66.2858 +53.45,-66.2828 +53.475,-66.2798 +53.5,-66.2768 +53.525,-66.2738 +53.55,-66.2708 +53.575,-66.2677 +53.6,-66.2646 +53.625,-66.2615 +53.65,-66.2584 +53.675,-66.2552 +53.7,-66.2521 +53.725,-66.2489 +53.75,-66.2457 +53.775,-66.2424 +53.8,-66.2392 +53.825,-66.2359 +53.85,-66.2326 +53.875,-66.2293 +53.9,-66.226 +53.925,-66.2226 +53.95,-66.2192 +53.975,-66.2159 +54,-66.2125 +54.025,-66.209 +54.05,-66.2056 +54.075,-66.2021 +54.1,-66.1987 +54.125,-66.1952 +54.15,-66.1917 +54.175,-66.1881 +54.2,-66.1846 +54.225,-66.181 +54.25,-66.1775 +54.275,-66.1739 +54.3,-66.1703 +54.325,-66.1666 +54.35,-66.163 +54.375,-66.1594 +54.4,-66.1557 +54.425,-66.152 +54.45,-66.1483 +54.475,-66.1446 +54.5,-66.1409 +54.525,-66.1371 +54.55,-66.1334 +54.575,-66.1296 +54.6,-66.1259 +54.625,-66.1221 +54.65,-66.1183 +54.675,-66.1145 +54.7,-66.1106 +54.725,-66.1068 +54.75,-66.103 +54.775,-66.0991 +54.8,-66.0952 +54.825,-66.0913 +54.85,-66.0874 +54.875,-66.0835 +54.9,-66.0796 +54.925,-66.0757 +54.95,-66.0718 +54.975,-66.0678 +55,-66.0639 +55.025,-66.0599 +55.05,-66.0559 +55.075,-66.052 +55.1,-66.048 +55.125,-66.044 +55.15,-66.04 +55.175,-66.0359 +55.2,-66.0319 +55.225,-66.0279 +55.25,-66.0238 +55.275,-66.0198 +55.3,-66.0157 +55.325,-66.0117 +55.35,-66.0076 +55.375,-66.0035 +55.4,-65.9995 +55.425,-65.9954 +55.45,-65.9913 +55.475,-65.9872 +55.5,-65.9831 +55.525,-65.9789 +55.55,-65.9748 +55.575,-65.9707 +55.6,-65.9666 +55.625,-65.9624 +55.65,-65.9583 +55.675,-65.9541 +55.7,-65.9499 +55.725,-65.9458 +55.75,-65.9416 +55.775,-65.9374 +55.8,-65.9332 +55.825,-65.929 +55.85,-65.9248 +55.875,-65.9206 +55.9,-65.9164 +55.925,-65.9122 +55.95,-65.908 +55.975,-65.9038 +56,-65.8996 +56.025,-65.8953 +56.05,-65.8911 +56.075,-65.8868 +56.1,-65.8826 +56.125,-65.8784 +56.15,-65.8741 +56.175,-65.8698 +56.2,-65.8656 +56.225,-65.8613 +56.25,-65.8571 +56.275,-65.8528 +56.3,-65.8485 +56.325,-65.8443 +56.35,-65.84 +56.375,-65.8357 +56.4,-65.8314 +56.425,-65.8272 +56.45,-65.8229 +56.475,-65.8186 +56.5,-65.8143 +56.525,-65.81 +56.55,-65.8057 +56.575,-65.8015 +56.6,-65.7972 +56.625,-65.7929 +56.65,-65.7886 +56.675,-65.7843 +56.7,-65.78 +56.725,-65.7757 +56.75,-65.7715 +56.775,-65.7672 +56.8,-65.7629 +56.825,-65.7586 +56.85,-65.7543 +56.875,-65.7501 56.9,-65.7458 56.925,-65.7415 -56.95,-65.7373 -56.975,-65.7331 -57,-65.7288 -57.025,-65.7246 -57.05,-65.7204 -57.075,-65.7162 -57.1,-65.712 -57.125,-65.7078 -57.15,-65.7036 -57.175,-65.6994 -57.2,-65.6952 -57.225,-65.691 -57.25,-65.6868 -57.275,-65.6826 -57.3,-65.6784 -57.325,-65.6742 -57.35,-65.6701 -57.375,-65.6659 -57.4,-65.6617 -57.425,-65.6576 -57.45,-65.6534 -57.475,-65.6493 -57.5,-65.6451 -57.525,-65.641 -57.55,-65.6369 -57.575,-65.6328 -57.6,-65.6286 -57.625,-65.6245 -57.65,-65.6204 -57.675,-65.6163 -57.7,-65.6122 -57.725,-65.6082 -57.75,-65.6041 -57.775,-65.6 -57.8,-65.596 -57.825,-65.5919 -57.85,-65.5879 -57.875,-65.5838 -57.9,-65.5798 -57.925,-65.5758 -57.95,-65.5717 -57.975,-65.5677 -58,-65.5637 -58.025,-65.5597 -58.05,-65.5558 -58.075,-65.5518 -58.1,-65.5478 -58.125,-65.5438 -58.15,-65.5399 -58.175,-65.536 -58.2,-65.532 -58.225,-65.5281 -58.25,-65.5242 -58.275,-65.5203 -58.3,-65.5164 -58.325,-65.5125 -58.35,-65.5086 -58.375,-65.5047 -58.4,-65.5009 -58.425,-65.497 -58.45,-65.4932 -58.475,-65.4894 -58.5,-65.4855 -58.525,-65.4817 -58.55,-65.4779 -58.575,-65.4742 -58.6,-65.4704 -58.625,-65.4666 -58.65,-65.4628 -58.675,-65.4591 -58.7,-65.4554 -58.725,-65.4516 -58.75,-65.4479 -58.775,-65.4442 -58.8,-65.4405 -58.825,-65.4369 -58.85,-65.4332 -58.875,-65.4295 -58.9,-65.4259 -58.925,-65.4223 -58.95,-65.4186 -58.975,-65.415 -59,-65.4114 -59.025,-65.4078 -59.05,-65.4043 -59.075,-65.4007 -59.1,-65.3971 -59.125,-65.3936 -59.15,-65.3901 -59.175,-65.3866 -59.2,-65.3831 -59.225,-65.3796 -59.25,-65.3761 -59.275,-65.3726 -59.3,-65.3692 -59.325,-65.3658 -59.35,-65.3623 -59.375,-65.3589 -59.4,-65.3555 -59.425,-65.3521 -59.45,-65.3488 -59.475,-65.3454 -59.5,-65.3421 -59.525,-65.3387 -59.55,-65.3354 -59.575,-65.3321 -59.6,-65.3288 -59.625,-65.3255 -59.65,-65.3223 -59.675,-65.319 -59.7,-65.3158 -59.725,-65.3125 -59.75,-65.3093 -59.775,-65.3061 -59.8,-65.303 -59.825,-65.2998 -59.85,-65.2966 -59.875,-65.2935 -59.9,-65.2904 -59.925,-65.2873 -59.95,-65.2842 -59.975,-65.2811 -60,-65.278 -60.025,-65.275 -60.05,-65.2719 -60.075,-65.2689 -60.1,-65.2659 -60.125,-65.2629 -60.15,-65.2599 -60.175,-65.2569 -60.2,-65.254 -60.225,-65.251 -60.25,-65.2481 -60.275,-65.2452 -60.3,-65.2423 -60.325,-65.2394 -60.35,-65.2366 -60.375,-65.2337 -60.4,-65.2309 -60.425,-65.2281 -60.45,-65.2253 -60.475,-65.2225 -60.5,-65.2197 -60.525,-65.2169 -60.55,-65.2142 -60.575,-65.2115 -60.6,-65.2088 -60.625,-65.2061 -60.65,-65.2034 -60.675,-65.2007 -60.7,-65.1981 -60.725,-65.1954 -60.75,-65.1928 -60.775,-65.1902 -60.8,-65.1876 -60.825,-65.185 -60.85,-65.1825 -60.875,-65.1799 -60.9,-65.1774 -60.925,-65.1749 -60.95,-65.1724 -60.975,-65.1699 -61,-65.1674 -61.025,-65.165 -61.05,-65.1625 -61.075,-65.1601 -61.1,-65.1577 -61.125,-65.1553 -61.15,-65.153 -61.175,-65.1506 -61.2,-65.1482 -61.225,-65.1459 -61.25,-65.1436 -61.275,-65.1413 -61.3,-65.139 -61.325,-65.1368 -61.35,-65.1345 -61.375,-65.1323 -61.4,-65.1301 -61.425,-65.1279 -61.45,-65.1257 -61.475,-65.1235 -61.5,-65.1213 -61.525,-65.1192 -61.55,-65.1171 -61.575,-65.115 -61.6,-65.1129 -61.625,-65.1108 -61.65,-65.1087 -61.675,-65.1067 -61.7,-65.1046 -61.725,-65.1026 -61.75,-65.1006 -61.775,-65.0986 -61.8,-65.0967 -61.825,-65.0947 -61.85,-65.0928 -61.875,-65.0908 -61.9,-65.0889 -61.925,-65.087 -61.95,-65.0851 -61.975,-65.0833 -62,-65.0814 -62.025,-65.0796 -62.05,-65.0778 -62.075,-65.076 -62.1,-65.0742 -62.125,-65.0724 -62.15,-65.0706 -62.175,-65.0689 -62.2,-65.0672 -62.225,-65.0655 -62.25,-65.0638 -62.275,-65.0621 -62.3,-65.0604 -62.325,-65.0588 -62.35,-65.0571 -62.375,-65.0555 -62.4,-65.0539 -62.425,-65.0523 -62.45,-65.0507 -62.475,-65.0491 -62.5,-65.0476 -62.525,-65.0461 -62.55,-65.0445 -62.575,-65.043 -62.6,-65.0415 -62.625,-65.0401 -62.65,-65.0386 -62.675,-65.0371 -62.7,-65.0357 -62.725,-65.0343 -62.75,-65.0329 -62.775,-65.0315 -62.8,-65.0301 -62.825,-65.0288 -62.85,-65.0274 -62.875,-65.0261 -62.9,-65.0248 -62.925,-65.0234 -62.95,-65.0222 -62.975,-65.0209 -63,-65.0196 -63.025,-65.0184 -63.05,-65.0171 -63.075,-65.0159 -63.1,-65.0147 -63.125,-65.0135 -63.15,-65.0123 -63.175,-65.0111 -63.2,-65.01 -63.225,-65.0088 -63.25,-65.0077 -63.275,-65.0066 +56.95,-65.7372 +56.975,-65.733 +57,-65.7287 +57.025,-65.7244 +57.05,-65.7202 +57.075,-65.7159 +57.1,-65.7117 +57.125,-65.7074 +57.15,-65.7032 +57.175,-65.6989 +57.2,-65.6947 +57.225,-65.6904 +57.25,-65.6862 +57.275,-65.682 +57.3,-65.6777 +57.325,-65.6735 +57.35,-65.6693 +57.375,-65.6651 +57.4,-65.6609 +57.425,-65.6567 +57.45,-65.6525 +57.475,-65.6483 +57.5,-65.6441 +57.525,-65.6399 +57.55,-65.6357 +57.575,-65.6316 +57.6,-65.6274 +57.625,-65.6232 +57.65,-65.6191 +57.675,-65.6149 +57.7,-65.6108 +57.725,-65.6067 +57.75,-65.6025 +57.775,-65.5984 +57.8,-65.5943 +57.825,-65.5902 +57.85,-65.5861 +57.875,-65.582 +57.9,-65.5779 +57.925,-65.5739 +57.95,-65.5698 +57.975,-65.5657 +58,-65.5617 +58.025,-65.5576 +58.05,-65.5536 +58.075,-65.5496 +58.1,-65.5456 +58.125,-65.5415 +58.15,-65.5375 +58.175,-65.5336 +58.2,-65.5296 +58.225,-65.5256 +58.25,-65.5216 +58.275,-65.5177 +58.3,-65.5137 +58.325,-65.5098 +58.35,-65.5059 +58.375,-65.502 +58.4,-65.4981 +58.425,-65.4942 +58.45,-65.4903 +58.475,-65.4864 +58.5,-65.4826 +58.525,-65.4787 +58.55,-65.4749 +58.575,-65.471 +58.6,-65.4672 +58.625,-65.4634 +58.65,-65.4596 +58.675,-65.4558 +58.7,-65.452 +58.725,-65.4483 +58.75,-65.4445 +58.775,-65.4408 +58.8,-65.4371 +58.825,-65.4333 +58.85,-65.4296 +58.875,-65.4259 +58.9,-65.4223 +58.925,-65.4186 +58.95,-65.4149 +58.975,-65.4113 +59,-65.4077 +59.025,-65.404 +59.05,-65.4004 +59.075,-65.3968 +59.1,-65.3932 +59.125,-65.3897 +59.15,-65.3861 +59.175,-65.3826 +59.2,-65.379 +59.225,-65.3755 +59.25,-65.372 +59.275,-65.3685 +59.3,-65.3651 +59.325,-65.3616 +59.35,-65.3581 +59.375,-65.3547 +59.4,-65.3513 +59.425,-65.3479 +59.45,-65.3445 +59.475,-65.3411 +59.5,-65.3377 +59.525,-65.3344 +59.55,-65.331 +59.575,-65.3277 +59.6,-65.3244 +59.625,-65.3211 +59.65,-65.3178 +59.675,-65.3146 +59.7,-65.3113 +59.725,-65.3081 +59.75,-65.3049 +59.775,-65.3016 +59.8,-65.2985 +59.825,-65.2953 +59.85,-65.2921 +59.875,-65.289 +59.9,-65.2858 +59.925,-65.2827 +59.95,-65.2796 +59.975,-65.2765 +60,-65.2734 +60.025,-65.2704 +60.05,-65.2673 +60.075,-65.2643 +60.1,-65.2613 +60.125,-65.2583 +60.15,-65.2553 +60.175,-65.2523 +60.2,-65.2494 +60.225,-65.2464 +60.25,-65.2435 +60.275,-65.2406 +60.3,-65.2377 +60.325,-65.2349 +60.35,-65.232 +60.375,-65.2292 +60.4,-65.2263 +60.425,-65.2235 +60.45,-65.2207 +60.475,-65.2179 +60.5,-65.2152 +60.525,-65.2124 +60.55,-65.2097 +60.575,-65.207 +60.6,-65.2043 +60.625,-65.2016 +60.65,-65.1989 +60.675,-65.1963 +60.7,-65.1936 +60.725,-65.191 +60.75,-65.1884 +60.775,-65.1858 +60.8,-65.1832 +60.825,-65.1807 +60.85,-65.1781 +60.875,-65.1756 +60.9,-65.1731 +60.925,-65.1706 +60.95,-65.1681 +60.975,-65.1657 +61,-65.1632 +61.025,-65.1608 +61.05,-65.1584 +61.075,-65.156 +61.1,-65.1536 +61.125,-65.1513 +61.15,-65.1489 +61.175,-65.1466 +61.2,-65.1443 +61.225,-65.142 +61.25,-65.1397 +61.275,-65.1374 +61.3,-65.1352 +61.325,-65.1329 +61.35,-65.1307 +61.375,-65.1285 +61.4,-65.1263 +61.425,-65.1242 +61.45,-65.122 +61.475,-65.1199 +61.5,-65.1178 +61.525,-65.1156 +61.55,-65.1136 +61.575,-65.1115 +61.6,-65.1094 +61.625,-65.1074 +61.65,-65.1054 +61.675,-65.1034 +61.7,-65.1014 +61.725,-65.0994 +61.75,-65.0974 +61.775,-65.0955 +61.8,-65.0935 +61.825,-65.0916 +61.85,-65.0897 +61.875,-65.0879 +61.9,-65.086 +61.925,-65.0841 +61.95,-65.0823 +61.975,-65.0805 +62,-65.0787 +62.025,-65.0769 +62.05,-65.0751 +62.075,-65.0734 +62.1,-65.0716 +62.125,-65.0699 +62.15,-65.0682 +62.175,-65.0665 +62.2,-65.0648 +62.225,-65.0631 +62.25,-65.0615 +62.275,-65.0599 +62.3,-65.0582 +62.325,-65.0566 +62.35,-65.0551 +62.375,-65.0535 +62.4,-65.0519 +62.425,-65.0504 +62.45,-65.0489 +62.475,-65.0473 +62.5,-65.0458 +62.525,-65.0444 +62.55,-65.0429 +62.575,-65.0414 +62.6,-65.04 +62.625,-65.0386 +62.65,-65.0372 +62.675,-65.0358 +62.7,-65.0344 +62.725,-65.033 +62.75,-65.0317 +62.775,-65.0303 +62.8,-65.029 +62.825,-65.0277 +62.85,-65.0264 +62.875,-65.0251 +62.9,-65.0239 +62.925,-65.0226 +62.95,-65.0214 +62.975,-65.0201 +63,-65.0189 +63.025,-65.0177 +63.05,-65.0166 +63.075,-65.0154 +63.1,-65.0142 +63.125,-65.0131 +63.15,-65.012 +63.175,-65.0109 +63.2,-65.0098 +63.225,-65.0087 +63.25,-65.0076 +63.275,-65.0065 63.3,-65.0055 63.325,-65.0044 -63.35,-65.0033 -63.375,-65.0023 -63.4,-65.0012 -63.425,-65.0002 -63.45,-64.9991 -63.475,-64.9981 -63.5,-64.9971 -63.525,-64.9961 -63.55,-64.9952 -63.575,-64.9942 -63.6,-64.9933 -63.625,-64.9923 -63.65,-64.9914 -63.675,-64.9905 -63.7,-64.9896 -63.725,-64.9887 -63.75,-64.9878 -63.775,-64.987 -63.8,-64.9861 -63.825,-64.9853 -63.85,-64.9845 -63.875,-64.9836 -63.9,-64.9828 -63.925,-64.9821 -63.95,-64.9813 -63.975,-64.9805 -64,-64.9798 -64.025,-64.979 -64.05,-64.9783 -64.075,-64.9776 -64.1,-64.9768 -64.125,-64.9761 -64.15,-64.9755 -64.175,-64.9748 -64.2,-64.9741 -64.225,-64.9735 -64.25,-64.9728 -64.275,-64.9722 -64.3,-64.9716 -64.325,-64.971 -64.35,-64.9704 -64.375,-64.9698 -64.4,-64.9692 -64.425,-64.9686 -64.45,-64.9681 -64.475,-64.9675 -64.5,-64.967 -64.525,-64.9664 -64.55,-64.9659 -64.575,-64.9654 -64.6,-64.9649 -64.625,-64.9644 -64.65,-64.964 -64.675,-64.9635 -64.7,-64.963 -64.725,-64.9626 -64.75,-64.9621 -64.775,-64.9617 -64.8,-64.9613 -64.825,-64.9609 -64.85,-64.9605 -64.875,-64.9601 -64.9,-64.9597 -64.925,-64.9593 -64.95,-64.959 -64.975,-64.9586 -65,-64.9583 -65.025,-64.9579 -65.05,-64.9576 -65.075,-64.9573 -65.1,-64.9569 -65.125,-64.9566 -65.15,-64.9563 -65.175,-64.9561 -65.2,-64.9558 -65.225,-64.9555 -65.25,-64.9552 -65.275,-64.955 -65.3,-64.9547 -65.325,-64.9545 -65.35,-64.9543 -65.375,-64.954 -65.4,-64.9538 -65.425,-64.9536 -65.45,-64.9534 -65.475,-64.9532 -65.5,-64.953 -65.525,-64.9528 -65.55,-64.9527 -65.575,-64.9525 -65.6,-64.9523 -65.625,-64.9522 -65.65,-64.952 -65.675,-64.9519 -65.7,-64.9518 -65.725,-64.9516 -65.75,-64.9515 -65.775,-64.9514 -65.8,-64.9513 -65.825,-64.9512 -65.85,-64.9511 -65.875,-64.951 -65.9,-64.951 -65.925,-64.9509 -65.95,-64.9508 -65.975,-64.9508 -66,-64.9507 -66.025,-64.9506 -66.05,-64.9506 -66.075,-64.9506 -66.1,-64.9505 -66.125,-64.9505 -66.15,-64.9505 -66.175,-64.9505 -66.2,-64.9505 -66.225,-64.9504 -66.25,-64.9504 -66.275,-64.9505 -66.3,-64.9505 -66.325,-64.9505 -66.35,-64.9505 -66.375,-64.9505 -66.4,-64.9505 -66.425,-64.9506 -66.45,-64.9506 -66.475,-64.9507 -66.5,-64.9507 -66.525,-64.9508 -66.55,-64.9508 -66.575,-64.9509 -66.6,-64.9509 -66.625,-64.951 -66.65,-64.9511 -66.675,-64.9512 -66.7,-64.9512 -66.725,-64.9513 -66.75,-64.9514 -66.775,-64.9515 -66.8,-64.9516 -66.825,-64.9517 -66.85,-64.9518 -66.875,-64.9519 -66.9,-64.952 -66.925,-64.9522 -66.95,-64.9523 -66.975,-64.9524 -67,-64.9525 -67.025,-64.9526 -67.05,-64.9528 -67.075,-64.9529 -67.1,-64.9531 -67.125,-64.9532 -67.15,-64.9533 -67.175,-64.9535 -67.2,-64.9536 -67.225,-64.9538 -67.25,-64.9539 -67.275,-64.9541 -67.3,-64.9543 -67.325,-64.9544 -67.35,-64.9546 -67.375,-64.9548 -67.4,-64.9549 -67.425,-64.9551 -67.45,-64.9553 -67.475,-64.9554 -67.5,-64.9556 -67.525,-64.9558 -67.55,-64.956 -67.575,-64.9562 -67.6,-64.9564 -67.625,-64.9565 -67.65,-64.9567 -67.675,-64.9569 -67.7,-64.9571 -67.725,-64.9573 -67.75,-64.9575 -67.775,-64.9577 -67.8,-64.9579 -67.825,-64.9581 -67.85,-64.9583 -67.875,-64.9585 -67.9,-64.9587 -67.925,-64.9589 -67.95,-64.9591 -67.975,-64.9593 -68,-64.9596 -68.025,-64.9598 -68.05,-64.96 -68.075,-64.9602 -68.1,-64.9604 -68.125,-64.9606 -68.15,-64.9608 -68.175,-64.9611 -68.2,-64.9613 -68.225,-64.9615 -68.25,-64.9617 -68.275,-64.9619 -68.3,-64.9622 -68.325,-64.9624 -68.35,-64.9626 -68.375,-64.9628 -68.4,-64.963 -68.425,-64.9633 -68.45,-64.9635 -68.475,-64.9637 -68.5,-64.9639 -68.525,-64.9642 -68.55,-64.9644 -68.575,-64.9646 -68.6,-64.9648 -68.625,-64.9651 -68.65,-64.9653 -68.675,-64.9655 -68.7,-64.9657 -68.725,-64.966 -68.75,-64.9662 -68.775,-64.9664 -68.8,-64.9666 -68.825,-64.9669 -68.85,-64.9671 -68.875,-64.9673 -68.9,-64.9675 -68.925,-64.9678 -68.95,-64.968 -68.975,-64.9682 -69,-64.9684 -69.025,-64.9687 -69.05,-64.9689 -69.075,-64.9691 -69.1,-64.9693 -69.125,-64.9695 -69.15,-64.9698 -69.175,-64.97 -69.2,-64.9702 -69.225,-64.9704 -69.25,-64.9706 -69.275,-64.9709 -69.3,-64.9711 -69.325,-64.9713 -69.35,-64.9715 -69.375,-64.9717 -69.4,-64.9719 -69.425,-64.9722 -69.45,-64.9724 -69.475,-64.9726 -69.5,-64.9728 -69.525,-64.973 -69.55,-64.9732 -69.575,-64.9734 -69.6,-64.9736 -69.625,-64.9738 -69.65,-64.974 -69.675,-64.9742 -69.7,-64.9744 -69.725,-64.9746 -69.75,-64.9748 -69.775,-64.975 -69.8,-64.9752 -69.825,-64.9754 -69.85,-64.9756 -69.875,-64.9758 -69.9,-64.976 -69.925,-64.9762 -69.95,-64.9764 +63.35,-65.0034 +63.375,-65.0024 +63.4,-65.0014 +63.425,-65.0004 +63.45,-64.9995 +63.475,-64.9985 +63.5,-64.9976 +63.525,-64.9966 +63.55,-64.9957 +63.575,-64.9948 +63.6,-64.9939 +63.625,-64.993 +63.65,-64.9922 +63.675,-64.9913 +63.7,-64.9904 +63.725,-64.9896 +63.75,-64.9888 +63.775,-64.988 +63.8,-64.9872 +63.825,-64.9864 +63.85,-64.9856 +63.875,-64.9848 +63.9,-64.9841 +63.925,-64.9833 +63.95,-64.9826 +63.975,-64.9819 +64,-64.9811 +64.025,-64.9804 +64.05,-64.9797 +64.075,-64.9791 +64.1,-64.9784 +64.125,-64.9777 +64.15,-64.9771 +64.175,-64.9764 +64.2,-64.9758 +64.225,-64.9752 +64.25,-64.9745 +64.275,-64.9739 +64.3,-64.9734 +64.325,-64.9728 +64.35,-64.9722 +64.375,-64.9716 +64.4,-64.9711 +64.425,-64.9705 +64.45,-64.97 +64.475,-64.9695 +64.5,-64.969 +64.525,-64.9685 +64.55,-64.968 +64.575,-64.9675 +64.6,-64.967 +64.625,-64.9665 +64.65,-64.9661 +64.675,-64.9656 +64.7,-64.9652 +64.725,-64.9647 +64.75,-64.9643 +64.775,-64.9639 +64.8,-64.9635 +64.825,-64.9631 +64.85,-64.9627 +64.875,-64.9623 +64.9,-64.9619 +64.925,-64.9616 +64.95,-64.9612 +64.975,-64.9609 +65,-64.9605 +65.025,-64.9602 +65.05,-64.9599 +65.075,-64.9596 +65.1,-64.9592 +65.125,-64.9589 +65.15,-64.9587 +65.175,-64.9584 +65.2,-64.9581 +65.225,-64.9578 +65.25,-64.9576 +65.275,-64.9573 +65.3,-64.9571 +65.325,-64.9568 +65.35,-64.9566 +65.375,-64.9564 +65.4,-64.9561 +65.425,-64.9559 +65.45,-64.9557 +65.475,-64.9555 +65.5,-64.9553 +65.525,-64.9552 +65.55,-64.955 +65.575,-64.9548 +65.6,-64.9547 +65.625,-64.9545 +65.65,-64.9544 +65.675,-64.9542 +65.7,-64.9541 +65.725,-64.9539 +65.75,-64.9538 +65.775,-64.9537 +65.8,-64.9536 +65.825,-64.9535 +65.85,-64.9534 +65.875,-64.9533 +65.9,-64.9532 +65.925,-64.9531 +65.95,-64.953 +65.975,-64.953 +66,-64.9529 +66.025,-64.9528 +66.05,-64.9528 +66.075,-64.9527 +66.1,-64.9527 +66.125,-64.9527 +66.15,-64.9526 +66.175,-64.9526 +66.2,-64.9526 +66.225,-64.9526 +66.25,-64.9525 +66.275,-64.9525 +66.3,-64.9525 +66.325,-64.9525 +66.35,-64.9525 +66.375,-64.9526 +66.4,-64.9526 +66.425,-64.9526 +66.45,-64.9526 +66.475,-64.9526 +66.5,-64.9527 +66.525,-64.9527 +66.55,-64.9528 +66.575,-64.9528 +66.6,-64.9529 +66.625,-64.9529 +66.65,-64.953 +66.675,-64.953 +66.7,-64.9531 +66.725,-64.9532 +66.75,-64.9532 +66.775,-64.9533 +66.8,-64.9534 +66.825,-64.9535 +66.85,-64.9536 +66.875,-64.9537 +66.9,-64.9538 +66.925,-64.9539 +66.95,-64.954 +66.975,-64.9541 +67,-64.9542 +67.025,-64.9543 +67.05,-64.9544 +67.075,-64.9545 +67.1,-64.9547 +67.125,-64.9548 +67.15,-64.9549 +67.175,-64.955 +67.2,-64.9552 +67.225,-64.9553 +67.25,-64.9554 +67.275,-64.9556 +67.3,-64.9557 +67.325,-64.9559 +67.35,-64.956 +67.375,-64.9562 +67.4,-64.9563 +67.425,-64.9565 +67.45,-64.9566 +67.475,-64.9568 +67.5,-64.957 +67.525,-64.9571 +67.55,-64.9573 +67.575,-64.9574 +67.6,-64.9576 +67.625,-64.9578 +67.65,-64.958 +67.675,-64.9581 +67.7,-64.9583 +67.725,-64.9585 +67.75,-64.9587 +67.775,-64.9589 +67.8,-64.959 +67.825,-64.9592 +67.85,-64.9594 +67.875,-64.9596 +67.9,-64.9598 +67.925,-64.96 +67.95,-64.9602 +67.975,-64.9604 +68,-64.9606 +68.025,-64.9608 +68.05,-64.961 +68.075,-64.9611 +68.1,-64.9613 +68.125,-64.9615 +68.15,-64.9617 +68.175,-64.962 +68.2,-64.9622 +68.225,-64.9624 +68.25,-64.9626 +68.275,-64.9628 +68.3,-64.963 +68.325,-64.9632 +68.35,-64.9634 +68.375,-64.9636 +68.4,-64.9638 +68.425,-64.964 +68.45,-64.9642 +68.475,-64.9644 +68.5,-64.9646 +68.525,-64.9648 +68.55,-64.9651 +68.575,-64.9653 +68.6,-64.9655 +68.625,-64.9657 +68.65,-64.9659 +68.675,-64.9661 +68.7,-64.9663 +68.725,-64.9665 +68.75,-64.9668 +68.775,-64.967 +68.8,-64.9672 +68.825,-64.9674 +68.85,-64.9676 +68.875,-64.9678 +68.9,-64.968 +68.925,-64.9682 +68.95,-64.9684 +68.975,-64.9687 +69,-64.9689 +69.025,-64.9691 +69.05,-64.9693 +69.075,-64.9695 +69.1,-64.9697 +69.125,-64.9699 +69.15,-64.9701 +69.175,-64.9703 +69.2,-64.9705 +69.225,-64.9708 +69.25,-64.971 +69.275,-64.9712 +69.3,-64.9714 +69.325,-64.9716 +69.35,-64.9718 +69.375,-64.972 +69.4,-64.9722 +69.425,-64.9724 +69.45,-64.9726 +69.475,-64.9728 +69.5,-64.973 +69.525,-64.9732 +69.55,-64.9734 +69.575,-64.9736 +69.6,-64.9738 +69.625,-64.974 +69.65,-64.9742 +69.675,-64.9744 +69.7,-64.9746 +69.725,-64.9748 +69.75,-64.975 +69.775,-64.9752 +69.8,-64.9753 +69.825,-64.9755 +69.85,-64.9757 +69.875,-64.9759 +69.9,-64.9761 +69.925,-64.9763 +69.95,-64.9765 69.975,-64.9766 70,-64.9768 70.025,-64.977 -70.05,-64.9771 -70.075,-64.9773 +70.05,-64.9772 +70.075,-64.9774 70.1,-64.9775 70.125,-64.9777 70.15,-64.9779 @@ -2809,1193 +2809,1193 @@ 70.2,-64.9782 70.225,-64.9784 70.25,-64.9786 -70.275,-64.9788 +70.275,-64.9787 70.3,-64.9789 70.325,-64.9791 -70.35,-64.9793 +70.35,-64.9792 70.375,-64.9794 70.4,-64.9796 -70.425,-64.9798 +70.425,-64.9797 70.45,-64.9799 -70.475,-64.9801 -70.5,-64.9803 -70.525,-64.9804 -70.55,-64.9806 +70.475,-64.98 +70.5,-64.9802 +70.525,-64.9803 +70.55,-64.9805 70.575,-64.9807 -70.6,-64.9809 +70.6,-64.9808 70.625,-64.981 -70.65,-64.9812 -70.675,-64.9813 -70.7,-64.9815 -70.725,-64.9816 -70.75,-64.9818 -70.775,-64.9819 -70.8,-64.9821 -70.825,-64.9822 -70.85,-64.9824 -70.875,-64.9825 -70.9,-64.9826 -70.925,-64.9828 -70.95,-64.9829 -70.975,-64.983 -71,-64.9832 -71.025,-64.9833 -71.05,-64.9834 -71.075,-64.9835 -71.1,-64.9837 -71.125,-64.9838 -71.15,-64.9839 -71.175,-64.984 -71.2,-64.9841 -71.225,-64.9843 -71.25,-64.9844 -71.275,-64.9845 -71.3,-64.9846 -71.325,-64.9847 -71.35,-64.9848 -71.375,-64.9849 -71.4,-64.985 -71.425,-64.9851 -71.45,-64.9852 -71.475,-64.9853 -71.5,-64.9854 -71.525,-64.9855 -71.55,-64.9856 -71.575,-64.9857 -71.6,-64.9858 -71.625,-64.9859 -71.65,-64.986 -71.675,-64.9861 -71.7,-64.9861 -71.725,-64.9862 -71.75,-64.9863 -71.775,-64.9864 -71.8,-64.9865 -71.825,-64.9865 -71.85,-64.9866 -71.875,-64.9867 -71.9,-64.9868 -71.925,-64.9868 -71.95,-64.9869 -71.975,-64.987 -72,-64.987 -72.025,-64.9871 -72.05,-64.9872 -72.075,-64.9872 -72.1,-64.9873 -72.125,-64.9873 -72.15,-64.9874 -72.175,-64.9875 -72.2,-64.9875 -72.225,-64.9876 -72.25,-64.9876 -72.275,-64.9877 -72.3,-64.9877 -72.325,-64.9878 -72.35,-64.9878 -72.375,-64.9878 -72.4,-64.9879 -72.425,-64.9879 -72.45,-64.988 -72.475,-64.988 -72.5,-64.988 -72.525,-64.9881 -72.55,-64.9881 -72.575,-64.9881 -72.6,-64.9882 -72.625,-64.9882 -72.65,-64.9882 -72.675,-64.9883 -72.7,-64.9883 -72.725,-64.9883 -72.75,-64.9883 -72.775,-64.9883 -72.8,-64.9884 -72.825,-64.9884 -72.85,-64.9884 -72.875,-64.9884 -72.9,-64.9884 -72.925,-64.9884 -72.95,-64.9885 -72.975,-64.9885 -73,-64.9885 -73.025,-64.9885 -73.05,-64.9885 -73.075,-64.9885 -73.1,-64.9885 -73.125,-64.9885 -73.15,-64.9885 -73.175,-64.9885 -73.2,-64.9885 -73.225,-64.9885 -73.25,-64.9885 -73.275,-64.9885 -73.3,-64.9885 -73.325,-64.9885 -73.35,-64.9885 -73.375,-64.9885 -73.4,-64.9885 -73.425,-64.9884 -73.45,-64.9884 -73.475,-64.9884 -73.5,-64.9884 -73.525,-64.9884 -73.55,-64.9884 -73.575,-64.9884 -73.6,-64.9883 -73.625,-64.9883 -73.65,-64.9883 -73.675,-64.9883 -73.7,-64.9883 -73.725,-64.9882 -73.75,-64.9882 -73.775,-64.9882 -73.8,-64.9882 -73.825,-64.9881 -73.85,-64.9881 -73.875,-64.9881 -73.9,-64.988 -73.925,-64.988 -73.95,-64.988 -73.975,-64.988 -74,-64.9879 -74.025,-64.9879 -74.05,-64.9879 -74.075,-64.9878 -74.1,-64.9878 -74.125,-64.9877 -74.15,-64.9877 -74.175,-64.9877 -74.2,-64.9876 -74.225,-64.9876 -74.25,-64.9875 -74.275,-64.9875 -74.3,-64.9875 -74.325,-64.9874 -74.35,-64.9874 -74.375,-64.9873 -74.4,-64.9873 -74.425,-64.9872 -74.45,-64.9872 -74.475,-64.9871 -74.5,-64.9871 -74.525,-64.9871 -74.55,-64.987 -74.575,-64.987 -74.6,-64.9869 -74.625,-64.9869 -74.65,-64.9868 -74.675,-64.9867 -74.7,-64.9867 -74.725,-64.9866 -74.75,-64.9866 -74.775,-64.9865 -74.8,-64.9865 -74.825,-64.9864 -74.85,-64.9864 -74.875,-64.9863 -74.9,-64.9863 -74.925,-64.9862 -74.95,-64.9861 -74.975,-64.9861 -75,-64.986 -75.025,-64.986 -75.05,-64.9859 -75.075,-64.9858 -75.1,-64.9858 -75.125,-64.9857 -75.15,-64.9857 -75.175,-64.9856 -75.2,-64.9855 -75.225,-64.9855 -75.25,-64.9854 -75.275,-64.9853 -75.3,-64.9853 -75.325,-64.9852 -75.35,-64.9852 -75.375,-64.9851 -75.4,-64.985 -75.425,-64.985 -75.45,-64.9849 -75.475,-64.9848 -75.5,-64.9848 -75.525,-64.9847 -75.55,-64.9846 -75.575,-64.9846 -75.6,-64.9845 -75.625,-64.9844 -75.65,-64.9844 -75.675,-64.9843 -75.7,-64.9842 -75.725,-64.9842 -75.75,-64.9841 -75.775,-64.984 -75.8,-64.984 -75.825,-64.9839 -75.85,-64.9838 -75.875,-64.9838 -75.9,-64.9837 -75.925,-64.9836 -75.95,-64.9836 -75.975,-64.9835 -76,-64.9834 -76.025,-64.9833 -76.05,-64.9833 -76.075,-64.9832 -76.1,-64.9831 -76.125,-64.9831 -76.15,-64.983 -76.175,-64.9829 -76.2,-64.9829 -76.225,-64.9828 -76.25,-64.9827 -76.275,-64.9827 -76.3,-64.9826 -76.325,-64.9825 -76.35,-64.9824 -76.375,-64.9824 -76.4,-64.9823 -76.425,-64.9822 -76.45,-64.9822 -76.475,-64.9821 -76.5,-64.982 -76.525,-64.982 -76.55,-64.9819 -76.575,-64.9818 -76.6,-64.9818 -76.625,-64.9817 -76.65,-64.9816 -76.675,-64.9815 -76.7,-64.9815 -76.725,-64.9814 -76.75,-64.9813 -76.775,-64.9813 -76.8,-64.9812 -76.825,-64.9811 -76.85,-64.9811 -76.875,-64.981 -76.9,-64.9809 -76.925,-64.9809 -76.95,-64.9808 -76.975,-64.9807 -77,-64.9807 -77.025,-64.9806 -77.05,-64.9805 -77.075,-64.9805 -77.1,-64.9804 -77.125,-64.9803 -77.15,-64.9803 -77.175,-64.9802 -77.2,-64.9801 -77.225,-64.9801 -77.25,-64.98 -77.275,-64.9799 -77.3,-64.9799 -77.325,-64.9798 -77.35,-64.9797 -77.375,-64.9797 -77.4,-64.9796 -77.425,-64.9796 -77.45,-64.9795 -77.475,-64.9794 -77.5,-64.9794 -77.525,-64.9793 -77.55,-64.9792 -77.575,-64.9792 -77.6,-64.9791 -77.625,-64.9791 -77.65,-64.979 -77.675,-64.9789 -77.7,-64.9789 -77.725,-64.9788 -77.75,-64.9787 -77.775,-64.9787 -77.8,-64.9786 -77.825,-64.9786 -77.85,-64.9785 -77.875,-64.9785 -77.9,-64.9784 -77.925,-64.9783 -77.95,-64.9783 -77.975,-64.9782 -78,-64.9782 -78.025,-64.9781 -78.05,-64.9781 -78.075,-64.978 -78.1,-64.9779 -78.125,-64.9779 -78.15,-64.9778 -78.175,-64.9778 -78.2,-64.9777 -78.225,-64.9777 -78.25,-64.9776 -78.275,-64.9776 -78.3,-64.9775 -78.325,-64.9775 -78.35,-64.9774 -78.375,-64.9774 -78.4,-64.9773 -78.425,-64.9772 -78.45,-64.9772 -78.475,-64.9771 -78.5,-64.9771 -78.525,-64.977 -78.55,-64.977 -78.575,-64.9769 -78.6,-64.9769 -78.625,-64.9769 -78.65,-64.9768 -78.675,-64.9768 -78.7,-64.9767 -78.725,-64.9767 -78.75,-64.9766 -78.775,-64.9766 -78.8,-64.9765 -78.825,-64.9765 -78.85,-64.9764 -78.875,-64.9764 -78.9,-64.9763 -78.925,-64.9763 -78.95,-64.9763 -78.975,-64.9762 -79,-64.9762 -79.025,-64.9761 -79.05,-64.9761 -79.075,-64.976 -79.1,-64.976 -79.125,-64.976 -79.15,-64.9759 -79.175,-64.9759 -79.2,-64.9758 -79.225,-64.9758 -79.25,-64.9758 -79.275,-64.9757 -79.3,-64.9757 -79.325,-64.9756 -79.35,-64.9756 -79.375,-64.9756 -79.4,-64.9755 -79.425,-64.9755 -79.45,-64.9755 -79.475,-64.9754 -79.5,-64.9754 -79.525,-64.9754 -79.55,-64.9753 -79.575,-64.9753 -79.6,-64.9753 -79.625,-64.9752 -79.65,-64.9752 -79.675,-64.9752 -79.7,-64.9751 -79.725,-64.9751 -79.75,-64.9751 -79.775,-64.975 -79.8,-64.975 -79.825,-64.975 -79.85,-64.9749 -79.875,-64.9749 -79.9,-64.9749 -79.925,-64.9749 -79.95,-64.9748 -79.975,-64.9748 -80,-64.9748 -80.025,-64.9747 -80.05,-64.9747 -80.075,-64.9747 -80.1,-64.9747 -80.125,-64.9746 -80.15,-64.9746 -80.175,-64.9746 -80.2,-64.9746 -80.225,-64.9745 -80.25,-64.9745 -80.275,-64.9745 -80.3,-64.9745 -80.325,-64.9744 -80.35,-64.9744 -80.375,-64.9744 -80.4,-64.9744 -80.425,-64.9744 -80.45,-64.9743 -80.475,-64.9743 -80.5,-64.9743 -80.525,-64.9743 -80.55,-64.9743 -80.575,-64.9742 -80.6,-64.9742 -80.625,-64.9742 -80.65,-64.9742 -80.675,-64.9742 -80.7,-64.9741 -80.725,-64.9741 -80.75,-64.9741 -80.775,-64.9741 -80.8,-64.9741 -80.825,-64.9741 -80.85,-64.974 -80.875,-64.974 -80.9,-64.974 -80.925,-64.974 -80.95,-64.974 -80.975,-64.974 -81,-64.9739 -81.025,-64.9739 -81.05,-64.9739 -81.075,-64.9739 -81.1,-64.9739 -81.125,-64.9739 -81.15,-64.9739 -81.175,-64.9739 -81.2,-64.9738 -81.225,-64.9738 -81.25,-64.9738 -81.275,-64.9738 -81.3,-64.9738 -81.325,-64.9738 -81.35,-64.9738 -81.375,-64.9738 -81.4,-64.9738 -81.425,-64.9737 -81.45,-64.9737 -81.475,-64.9737 -81.5,-64.9737 -81.525,-64.9737 -81.55,-64.9737 -81.575,-64.9737 -81.6,-64.9737 -81.625,-64.9737 -81.65,-64.9737 -81.675,-64.9737 -81.7,-64.9737 -81.725,-64.9737 -81.75,-64.9737 -81.775,-64.9736 -81.8,-64.9736 -81.825,-64.9736 -81.85,-64.9736 -81.875,-64.9736 -81.9,-64.9736 -81.925,-64.9736 -81.95,-64.9736 -81.975,-64.9736 -82,-64.9736 -82.025,-64.9736 -82.05,-64.9736 -82.075,-64.9736 -82.1,-64.9736 -82.125,-64.9736 -82.15,-64.9736 -82.175,-64.9736 -82.2,-64.9736 -82.225,-64.9736 -82.25,-64.9736 -82.275,-64.9736 -82.3,-64.9736 -82.325,-64.9736 -82.35,-64.9736 -82.375,-64.9736 -82.4,-64.9736 -82.425,-64.9736 -82.45,-64.9736 -82.475,-64.9736 -82.5,-64.9736 -82.525,-64.9736 -82.55,-64.9736 -82.575,-64.9736 -82.6,-64.9736 -82.625,-64.9736 -82.65,-64.9736 -82.675,-64.9736 -82.7,-64.9736 -82.725,-64.9736 -82.75,-64.9736 -82.775,-64.9736 -82.8,-64.9736 -82.825,-64.9736 -82.85,-64.9736 -82.875,-64.9736 -82.9,-64.9736 -82.925,-64.9736 -82.95,-64.9736 -82.975,-64.9736 -83,-64.9736 -83.025,-64.9736 -83.05,-64.9736 -83.075,-64.9736 -83.1,-64.9736 -83.125,-64.9736 -83.15,-64.9736 -83.175,-64.9736 -83.2,-64.9736 -83.225,-64.9736 -83.25,-64.9736 -83.275,-64.9737 -83.3,-64.9737 -83.325,-64.9737 -83.35,-64.9737 -83.375,-64.9737 -83.4,-64.9737 -83.425,-64.9737 -83.45,-64.9737 -83.475,-64.9737 -83.5,-64.9737 -83.525,-64.9737 -83.55,-64.9737 -83.575,-64.9737 -83.6,-64.9737 -83.625,-64.9737 -83.65,-64.9737 -83.675,-64.9737 -83.7,-64.9737 -83.725,-64.9738 -83.75,-64.9738 -83.775,-64.9738 -83.8,-64.9738 -83.825,-64.9738 -83.85,-64.9738 -83.875,-64.9738 -83.9,-64.9738 -83.925,-64.9738 -83.95,-64.9738 -83.975,-64.9738 -84,-64.9738 -84.025,-64.9738 -84.05,-64.9738 -84.075,-64.9738 -84.1,-64.9739 -84.125,-64.9739 -84.15,-64.9739 -84.175,-64.9739 -84.2,-64.9739 -84.225,-64.9739 -84.25,-64.9739 -84.275,-64.9739 -84.3,-64.9739 -84.325,-64.9739 -84.35,-64.9739 -84.375,-64.9739 -84.4,-64.9739 -84.425,-64.974 -84.45,-64.974 -84.475,-64.974 -84.5,-64.974 -84.525,-64.974 -84.55,-64.974 -84.575,-64.974 -84.6,-64.974 -84.625,-64.974 -84.65,-64.974 -84.675,-64.974 -84.7,-64.974 -84.725,-64.974 -84.75,-64.9741 -84.775,-64.9741 -84.8,-64.9741 -84.825,-64.9741 -84.85,-64.9741 -84.875,-64.9741 -84.9,-64.9741 -84.925,-64.9741 -84.95,-64.9741 -84.975,-64.9741 -85,-64.9741 -85.025,-64.9741 -85.05,-64.9741 -85.075,-64.9742 -85.1,-64.9742 -85.125,-64.9742 -85.15,-64.9742 -85.175,-64.9742 -85.2,-64.9742 -85.225,-64.9742 -85.25,-64.9742 -85.275,-64.9742 -85.3,-64.9742 -85.325,-64.9742 -85.35,-64.9742 -85.375,-64.9743 -85.4,-64.9743 -85.425,-64.9743 -85.45,-64.9743 -85.475,-64.9743 -85.5,-64.9743 -85.525,-64.9743 -85.55,-64.9743 -85.575,-64.9743 -85.6,-64.9743 -85.625,-64.9743 -85.65,-64.9743 -85.675,-64.9743 -85.7,-64.9744 -85.725,-64.9744 -85.75,-64.9744 -85.775,-64.9744 -85.8,-64.9744 -85.825,-64.9744 -85.85,-64.9744 -85.875,-64.9744 -85.9,-64.9744 -85.925,-64.9744 -85.95,-64.9744 -85.975,-64.9744 -86,-64.9744 -86.025,-64.9744 -86.05,-64.9745 -86.075,-64.9745 -86.1,-64.9745 -86.125,-64.9745 -86.15,-64.9745 -86.175,-64.9745 -86.2,-64.9745 -86.225,-64.9745 -86.25,-64.9745 -86.275,-64.9745 -86.3,-64.9745 -86.325,-64.9745 -86.35,-64.9745 -86.375,-64.9745 -86.4,-64.9745 -86.425,-64.9746 -86.45,-64.9746 -86.475,-64.9746 -86.5,-64.9746 -86.525,-64.9746 -86.55,-64.9746 -86.575,-64.9746 -86.6,-64.9746 -86.625,-64.9746 -86.65,-64.9746 -86.675,-64.9746 -86.7,-64.9746 -86.725,-64.9746 -86.75,-64.9746 -86.775,-64.9746 -86.8,-64.9746 -86.825,-64.9746 -86.85,-64.9747 -86.875,-64.9747 -86.9,-64.9747 -86.925,-64.9747 -86.95,-64.9747 -86.975,-64.9747 -87,-64.9747 -87.025,-64.9747 -87.05,-64.9747 -87.075,-64.9747 -87.1,-64.9747 -87.125,-64.9747 -87.15,-64.9747 -87.175,-64.9747 -87.2,-64.9747 -87.225,-64.9747 -87.25,-64.9747 -87.275,-64.9747 -87.3,-64.9747 -87.325,-64.9747 -87.35,-64.9747 -87.375,-64.9748 -87.4,-64.9748 -87.425,-64.9748 -87.45,-64.9748 -87.475,-64.9748 -87.5,-64.9748 -87.525,-64.9748 -87.55,-64.9748 -87.575,-64.9748 -87.6,-64.9748 -87.625,-64.9748 -87.65,-64.9748 -87.675,-64.9748 -87.7,-64.9748 -87.725,-64.9748 -87.75,-64.9748 -87.775,-64.9748 -87.8,-64.9748 -87.825,-64.9748 -87.85,-64.9748 -87.875,-64.9748 -87.9,-64.9748 -87.925,-64.9748 -87.95,-64.9748 -87.975,-64.9748 -88,-64.9748 -88.025,-64.9748 -88.05,-64.9748 -88.075,-64.9748 -88.1,-64.9748 -88.125,-64.9749 -88.15,-64.9749 -88.175,-64.9749 -88.2,-64.9749 -88.225,-64.9749 -88.25,-64.9749 -88.275,-64.9749 -88.3,-64.9749 -88.325,-64.9749 -88.35,-64.9749 -88.375,-64.9749 -88.4,-64.9749 -88.425,-64.9749 -88.45,-64.9749 -88.475,-64.9749 -88.5,-64.9749 -88.525,-64.9749 -88.55,-64.9749 -88.575,-64.9749 -88.6,-64.9749 -88.625,-64.9749 -88.65,-64.9749 -88.675,-64.9749 -88.7,-64.9749 -88.725,-64.9749 -88.75,-64.9749 -88.775,-64.9749 -88.8,-64.9749 -88.825,-64.9749 -88.85,-64.9749 -88.875,-64.9749 -88.9,-64.9749 -88.925,-64.9749 -88.95,-64.9749 -88.975,-64.9749 -89,-64.9749 -89.025,-64.9749 -89.05,-64.9749 -89.075,-64.9749 -89.1,-64.9749 -89.125,-64.9749 -89.15,-64.9749 -89.175,-64.9749 -89.2,-64.9749 -89.225,-64.9749 -89.25,-64.9749 -89.275,-64.9749 -89.3,-64.9749 -89.325,-64.9749 -89.35,-64.9749 -89.375,-64.9749 -89.4,-64.9749 -89.425,-64.9749 -89.45,-64.9749 -89.475,-64.9749 -89.5,-64.9749 -89.525,-64.9749 -89.55,-64.9749 -89.575,-64.9749 -89.6,-64.9749 -89.625,-64.9749 -89.65,-64.9749 -89.675,-64.9749 -89.7,-64.9749 -89.725,-64.9749 -89.75,-64.9749 -89.775,-64.9749 -89.8,-64.9749 -89.825,-64.9749 -89.85,-64.9749 -89.875,-64.9749 -89.9,-64.9749 -89.925,-64.9749 -89.95,-64.9749 -89.975,-64.9749 -90,-64.9749 -90.025,-64.9749 -90.05,-64.9749 -90.075,-64.9749 -90.1,-64.9749 -90.125,-64.9749 -90.15,-64.9749 -90.175,-64.9749 -90.2,-64.9749 -90.225,-64.9749 -90.25,-64.9749 -90.275,-64.9749 -90.3,-64.9749 -90.325,-64.9749 -90.35,-64.9749 -90.375,-64.9749 -90.4,-64.9749 -90.425,-64.9749 -90.45,-64.9749 -90.475,-64.9749 -90.5,-64.9748 -90.525,-64.9748 -90.55,-64.9748 -90.575,-64.9748 -90.6,-64.9748 -90.625,-64.9748 -90.65,-64.9748 -90.675,-64.9748 -90.7,-64.9748 -90.725,-64.9748 -90.75,-64.9748 -90.775,-64.9748 -90.8,-64.9748 -90.825,-64.9748 -90.85,-64.9748 -90.875,-64.9748 -90.9,-64.9748 -90.925,-64.9748 -90.95,-64.9748 -90.975,-64.9748 -91,-64.9748 -91.025,-64.9748 -91.05,-64.9748 -91.075,-64.9748 -91.1,-64.9748 -91.125,-64.9748 -91.15,-64.9748 -91.175,-64.9748 -91.2,-64.9748 -91.225,-64.9748 -91.25,-64.9748 -91.275,-64.9748 -91.3,-64.9748 -91.325,-64.9748 -91.35,-64.9748 -91.375,-64.9748 -91.4,-64.9748 -91.425,-64.9748 -91.45,-64.9748 -91.475,-64.9748 -91.5,-64.9747 -91.525,-64.9747 -91.55,-64.9747 -91.575,-64.9747 -91.6,-64.9747 -91.625,-64.9747 -91.65,-64.9747 -91.675,-64.9747 -91.7,-64.9747 -91.725,-64.9747 -91.75,-64.9747 -91.775,-64.9747 -91.8,-64.9747 -91.825,-64.9747 -91.85,-64.9747 -91.875,-64.9747 -91.9,-64.9747 -91.925,-64.9747 -91.95,-64.9747 -91.975,-64.9747 -92,-64.9747 -92.025,-64.9747 -92.05,-64.9747 -92.075,-64.9747 -92.1,-64.9747 -92.125,-64.9747 -92.15,-64.9747 -92.175,-64.9747 -92.2,-64.9747 -92.225,-64.9747 -92.25,-64.9747 -92.275,-64.9747 -92.3,-64.9747 -92.325,-64.9746 -92.35,-64.9746 -92.375,-64.9746 -92.4,-64.9746 -92.425,-64.9746 -92.45,-64.9746 -92.475,-64.9746 -92.5,-64.9746 -92.525,-64.9746 -92.55,-64.9746 -92.575,-64.9746 -92.6,-64.9746 -92.625,-64.9746 -92.65,-64.9746 -92.675,-64.9746 -92.7,-64.9746 -92.725,-64.9746 -92.75,-64.9746 -92.775,-64.9746 -92.8,-64.9746 -92.825,-64.9746 -92.85,-64.9746 -92.875,-64.9746 -92.9,-64.9746 -92.925,-64.9746 -92.95,-64.9746 -92.975,-64.9746 -93,-64.9746 -93.025,-64.9746 -93.05,-64.9746 -93.075,-64.9746 -93.1,-64.9746 -93.125,-64.9745 -93.15,-64.9745 -93.175,-64.9745 -93.2,-64.9745 -93.225,-64.9745 -93.25,-64.9745 -93.275,-64.9745 -93.3,-64.9745 -93.325,-64.9745 -93.35,-64.9745 -93.375,-64.9745 -93.4,-64.9745 -93.425,-64.9745 -93.45,-64.9745 -93.475,-64.9745 -93.5,-64.9745 -93.525,-64.9745 -93.55,-64.9745 -93.575,-64.9745 -93.6,-64.9745 -93.625,-64.9745 -93.65,-64.9745 -93.675,-64.9745 -93.7,-64.9745 -93.725,-64.9745 -93.75,-64.9745 -93.775,-64.9745 -93.8,-64.9745 -93.825,-64.9745 -93.85,-64.9745 -93.875,-64.9745 -93.9,-64.9745 -93.925,-64.9745 -93.95,-64.9745 -93.975,-64.9744 -94,-64.9744 -94.025,-64.9744 -94.05,-64.9744 -94.075,-64.9744 -94.1,-64.9744 -94.125,-64.9744 -94.15,-64.9744 -94.175,-64.9744 -94.2,-64.9744 -94.225,-64.9744 -94.25,-64.9744 -94.275,-64.9744 -94.3,-64.9744 -94.325,-64.9744 -94.35,-64.9744 -94.375,-64.9744 -94.4,-64.9744 -94.425,-64.9744 -94.45,-64.9744 -94.475,-64.9744 -94.5,-64.9744 -94.525,-64.9744 -94.55,-64.9744 -94.575,-64.9744 -94.6,-64.9744 -94.625,-64.9744 -94.65,-64.9744 -94.675,-64.9744 -94.7,-64.9744 -94.725,-64.9744 -94.75,-64.9744 -94.775,-64.9744 -94.8,-64.9744 -94.825,-64.9744 -94.85,-64.9744 -94.875,-64.9744 -94.9,-64.9744 -94.925,-64.9743 -94.95,-64.9743 -94.975,-64.9743 -95,-64.9743 -95.025,-64.9743 -95.05,-64.9743 -95.075,-64.9743 -95.1,-64.9743 -95.125,-64.9743 -95.15,-64.9743 -95.175,-64.9743 -95.2,-64.9743 -95.225,-64.9743 -95.25,-64.9743 -95.275,-64.9743 -95.3,-64.9743 -95.325,-64.9743 -95.35,-64.9743 -95.375,-64.9743 -95.4,-64.9743 -95.425,-64.9743 -95.45,-64.9743 -95.475,-64.9743 -95.5,-64.9743 -95.525,-64.9743 -95.55,-64.9743 -95.575,-64.9743 -95.6,-64.9743 -95.625,-64.9743 -95.65,-64.9743 -95.675,-64.9743 -95.7,-64.9743 -95.725,-64.9743 -95.75,-64.9743 -95.775,-64.9743 -95.8,-64.9743 -95.825,-64.9743 -95.85,-64.9743 -95.875,-64.9743 -95.9,-64.9743 -95.925,-64.9743 -95.95,-64.9743 -95.975,-64.9743 -96,-64.9743 -96.025,-64.9743 -96.05,-64.9743 -96.075,-64.9743 -96.1,-64.9743 -96.125,-64.9743 -96.15,-64.9743 -96.175,-64.9743 -96.2,-64.9742 -96.225,-64.9742 -96.25,-64.9742 -96.275,-64.9742 -96.3,-64.9742 -96.325,-64.9742 -96.35,-64.9742 -96.375,-64.9742 -96.4,-64.9742 -96.425,-64.9742 -96.45,-64.9742 -96.475,-64.9742 -96.5,-64.9742 -96.525,-64.9742 -96.55,-64.9742 -96.575,-64.9742 -96.6,-64.9742 -96.625,-64.9742 -96.65,-64.9742 -96.675,-64.9742 -96.7,-64.9742 -96.725,-64.9742 -96.75,-64.9742 -96.775,-64.9742 -96.8,-64.9742 -96.825,-64.9742 -96.85,-64.9742 -96.875,-64.9742 -96.9,-64.9742 -96.925,-64.9742 -96.95,-64.9742 -96.975,-64.9742 -97,-64.9742 -97.025,-64.9742 -97.05,-64.9742 -97.075,-64.9742 -97.1,-64.9742 -97.125,-64.9742 -97.15,-64.9742 -97.175,-64.9742 -97.2,-64.9742 -97.225,-64.9742 -97.25,-64.9742 -97.275,-64.9742 -97.3,-64.9742 -97.325,-64.9742 -97.35,-64.9742 -97.375,-64.9742 -97.4,-64.9742 -97.425,-64.9742 -97.45,-64.9742 -97.475,-64.9742 -97.5,-64.9742 -97.525,-64.9742 -97.55,-64.9742 -97.575,-64.9742 -97.6,-64.9742 -97.625,-64.9742 -97.65,-64.9742 -97.675,-64.9742 -97.7,-64.9742 -97.725,-64.9742 -97.75,-64.9742 -97.775,-64.9742 -97.8,-64.9742 -97.825,-64.9742 -97.85,-64.9742 -97.875,-64.9742 -97.9,-64.9742 -97.925,-64.9742 -97.95,-64.9742 -97.975,-64.9742 -98,-64.9742 -98.025,-64.9742 -98.05,-64.9742 -98.075,-64.9742 -98.1,-64.9742 -98.125,-64.9742 -98.15,-64.9742 -98.175,-64.9742 -98.2,-64.9742 -98.225,-64.9742 -98.25,-64.9742 -98.275,-64.9742 -98.3,-64.9742 -98.325,-64.9742 -98.35,-64.9742 -98.375,-64.9742 -98.4,-64.9742 -98.425,-64.9742 -98.45,-64.9742 -98.475,-64.9742 -98.5,-64.9742 -98.525,-64.9742 -98.55,-64.9742 -98.575,-64.9742 -98.6,-64.9742 -98.625,-64.9742 -98.65,-64.9742 -98.675,-64.9742 -98.7,-64.9742 -98.725,-64.9742 -98.75,-64.9742 -98.775,-64.9742 -98.8,-64.9742 -98.825,-64.9742 -98.85,-64.9742 -98.875,-64.9742 -98.9,-64.9742 -98.925,-64.9742 -98.95,-64.9742 -98.975,-64.9742 -99,-64.9742 -99.025,-64.9742 -99.05,-64.9742 -99.075,-64.9742 -99.1,-64.9742 -99.125,-64.9742 -99.15,-64.9742 -99.175,-64.9741 -99.2,-64.9741 -99.225,-64.9741 -99.25,-64.9741 -99.275,-64.9741 -99.3,-64.9741 -99.325,-64.9741 -99.35,-64.9741 -99.375,-64.9741 -99.4,-64.9741 -99.425,-64.9741 -99.45,-64.9741 -99.475,-64.9741 -99.5,-64.9741 -99.525,-64.9741 -99.55,-64.9741 -99.575,-64.9741 -99.6,-64.9741 -99.625,-64.9741 -99.65,-64.9741 -99.675,-64.9741 -99.7,-64.9741 -99.725,-64.9741 -99.75,-64.9741 -99.775,-64.9741 -99.8,-64.9741 -99.825,-64.9741 -99.85,-64.9741 -99.875,-64.9741 -99.9,-64.9741 -99.925,-64.9741 -99.95,-64.9741 -99.975,-64.9741 -100,-64.9741 +70.65,-64.9811 +70.675,-64.9812 +70.7,-64.9814 +70.725,-64.9815 +70.75,-64.9817 +70.775,-64.9818 +70.8,-64.982 +70.825,-64.9821 +70.85,-64.9822 +70.875,-64.9824 +70.9,-64.9825 +70.925,-64.9826 +70.95,-64.9828 +70.975,-64.9829 +71,-64.983 +71.025,-64.9831 +71.05,-64.9833 +71.075,-64.9834 +71.1,-64.9835 +71.125,-64.9836 +71.15,-64.9837 +71.175,-64.9839 +71.2,-64.984 +71.225,-64.9841 +71.25,-64.9842 +71.275,-64.9843 +71.3,-64.9844 +71.325,-64.9845 +71.35,-64.9846 +71.375,-64.9847 +71.4,-64.9848 +71.425,-64.9849 +71.45,-64.985 +71.475,-64.9851 +71.5,-64.9852 +71.525,-64.9853 +71.55,-64.9854 +71.575,-64.9855 +71.6,-64.9856 +71.625,-64.9857 +71.65,-64.9858 +71.675,-64.9859 +71.7,-64.9859 +71.725,-64.986 +71.75,-64.9861 +71.775,-64.9862 +71.8,-64.9863 +71.825,-64.9863 +71.85,-64.9864 +71.875,-64.9865 +71.9,-64.9866 +71.925,-64.9866 +71.95,-64.9867 +71.975,-64.9868 +72,-64.9868 +72.025,-64.9869 +72.05,-64.987 +72.075,-64.987 +72.1,-64.9871 +72.125,-64.9871 +72.15,-64.9872 +72.175,-64.9873 +72.2,-64.9873 +72.225,-64.9874 +72.25,-64.9874 +72.275,-64.9875 +72.3,-64.9875 +72.325,-64.9876 +72.35,-64.9876 +72.375,-64.9876 +72.4,-64.9877 +72.425,-64.9877 +72.45,-64.9878 +72.475,-64.9878 +72.5,-64.9878 +72.525,-64.9879 +72.55,-64.9879 +72.575,-64.9879 +72.6,-64.988 +72.625,-64.988 +72.65,-64.988 +72.675,-64.9881 +72.7,-64.9881 +72.725,-64.9881 +72.75,-64.9881 +72.775,-64.9882 +72.8,-64.9882 +72.825,-64.9882 +72.85,-64.9882 +72.875,-64.9882 +72.9,-64.9882 +72.925,-64.9883 +72.95,-64.9883 +72.975,-64.9883 +73,-64.9883 +73.025,-64.9883 +73.05,-64.9883 +73.075,-64.9883 +73.1,-64.9883 +73.125,-64.9883 +73.15,-64.9883 +73.175,-64.9883 +73.2,-64.9883 +73.225,-64.9883 +73.25,-64.9883 +73.275,-64.9883 +73.3,-64.9883 +73.325,-64.9883 +73.35,-64.9883 +73.375,-64.9883 +73.4,-64.9883 +73.425,-64.9883 +73.45,-64.9883 +73.475,-64.9883 +73.5,-64.9882 +73.525,-64.9882 +73.55,-64.9882 +73.575,-64.9882 +73.6,-64.9882 +73.625,-64.9882 +73.65,-64.9881 +73.675,-64.9881 +73.7,-64.9881 +73.725,-64.9881 +73.75,-64.988 +73.775,-64.988 +73.8,-64.988 +73.825,-64.988 +73.85,-64.9879 +73.875,-64.9879 +73.9,-64.9879 +73.925,-64.9879 +73.95,-64.9878 +73.975,-64.9878 +74,-64.9878 +74.025,-64.9877 +74.05,-64.9877 +74.075,-64.9877 +74.1,-64.9876 +74.125,-64.9876 +74.15,-64.9875 +74.175,-64.9875 +74.2,-64.9875 +74.225,-64.9874 +74.25,-64.9874 +74.275,-64.9873 +74.3,-64.9873 +74.325,-64.9873 +74.35,-64.9872 +74.375,-64.9872 +74.4,-64.9871 +74.425,-64.9871 +74.45,-64.987 +74.475,-64.987 +74.5,-64.9869 +74.525,-64.9869 +74.55,-64.9868 +74.575,-64.9868 +74.6,-64.9867 +74.625,-64.9867 +74.65,-64.9866 +74.675,-64.9866 +74.7,-64.9865 +74.725,-64.9865 +74.75,-64.9864 +74.775,-64.9864 +74.8,-64.9863 +74.825,-64.9863 +74.85,-64.9862 +74.875,-64.9862 +74.9,-64.9861 +74.925,-64.986 +74.95,-64.986 +74.975,-64.9859 +75,-64.9859 +75.025,-64.9858 +75.05,-64.9857 +75.075,-64.9857 +75.1,-64.9856 +75.125,-64.9856 +75.15,-64.9855 +75.175,-64.9854 +75.2,-64.9854 +75.225,-64.9853 +75.25,-64.9852 +75.275,-64.9852 +75.3,-64.9851 +75.325,-64.9851 +75.35,-64.985 +75.375,-64.9849 +75.4,-64.9849 +75.425,-64.9848 +75.45,-64.9847 +75.475,-64.9847 +75.5,-64.9846 +75.525,-64.9845 +75.55,-64.9845 +75.575,-64.9844 +75.6,-64.9843 +75.625,-64.9843 +75.65,-64.9842 +75.675,-64.9841 +75.7,-64.9841 +75.725,-64.984 +75.75,-64.9839 +75.775,-64.9838 +75.8,-64.9838 +75.825,-64.9837 +75.85,-64.9836 +75.875,-64.9836 +75.9,-64.9835 +75.925,-64.9834 +75.95,-64.9834 +75.975,-64.9833 +76,-64.9832 +76.025,-64.9831 +76.05,-64.9831 +76.075,-64.983 +76.1,-64.9829 +76.125,-64.9829 +76.15,-64.9828 +76.175,-64.9827 +76.2,-64.9826 +76.225,-64.9826 +76.25,-64.9825 +76.275,-64.9824 +76.3,-64.9824 +76.325,-64.9823 +76.35,-64.9822 +76.375,-64.9821 +76.4,-64.9821 +76.425,-64.982 +76.45,-64.9819 +76.475,-64.9819 +76.5,-64.9818 +76.525,-64.9817 +76.55,-64.9817 +76.575,-64.9816 +76.6,-64.9815 +76.625,-64.9814 +76.65,-64.9814 +76.675,-64.9813 +76.7,-64.9812 +76.725,-64.9812 +76.75,-64.9811 +76.775,-64.981 +76.8,-64.9809 +76.825,-64.9809 +76.85,-64.9808 +76.875,-64.9807 +76.9,-64.9807 +76.925,-64.9806 +76.95,-64.9805 +76.975,-64.9805 +77,-64.9804 +77.025,-64.9803 +77.05,-64.9802 +77.075,-64.9802 +77.1,-64.9801 +77.125,-64.98 +77.15,-64.98 +77.175,-64.9799 +77.2,-64.9798 +77.225,-64.9798 +77.25,-64.9797 +77.275,-64.9796 +77.3,-64.9796 +77.325,-64.9795 +77.35,-64.9794 +77.375,-64.9794 +77.4,-64.9793 +77.425,-64.9792 +77.45,-64.9792 +77.475,-64.9791 +77.5,-64.979 +77.525,-64.979 +77.55,-64.9789 +77.575,-64.9788 +77.6,-64.9788 +77.625,-64.9787 +77.65,-64.9787 +77.675,-64.9786 +77.7,-64.9785 +77.725,-64.9785 +77.75,-64.9784 +77.775,-64.9783 +77.8,-64.9783 +77.825,-64.9782 +77.85,-64.9782 +77.875,-64.9781 +77.9,-64.978 +77.925,-64.978 +77.95,-64.9779 +77.975,-64.9779 +78,-64.9778 +78.025,-64.9777 +78.05,-64.9777 +78.075,-64.9776 +78.1,-64.9776 +78.125,-64.9775 +78.15,-64.9774 +78.175,-64.9774 +78.2,-64.9773 +78.225,-64.9773 +78.25,-64.9772 +78.275,-64.9772 +78.3,-64.9771 +78.325,-64.9771 +78.35,-64.977 +78.375,-64.9769 +78.4,-64.9769 +78.425,-64.9768 +78.45,-64.9768 +78.475,-64.9767 +78.5,-64.9767 +78.525,-64.9766 +78.55,-64.9766 +78.575,-64.9765 +78.6,-64.9765 +78.625,-64.9764 +78.65,-64.9764 +78.675,-64.9763 +78.7,-64.9763 +78.725,-64.9762 +78.75,-64.9762 +78.775,-64.9761 +78.8,-64.9761 +78.825,-64.976 +78.85,-64.976 +78.875,-64.9759 +78.9,-64.9759 +78.925,-64.9758 +78.95,-64.9758 +78.975,-64.9758 +79,-64.9757 +79.025,-64.9757 +79.05,-64.9756 +79.075,-64.9756 +79.1,-64.9755 +79.125,-64.9755 +79.15,-64.9754 +79.175,-64.9754 +79.2,-64.9754 +79.225,-64.9753 +79.25,-64.9753 +79.275,-64.9752 +79.3,-64.9752 +79.325,-64.9752 +79.35,-64.9751 +79.375,-64.9751 +79.4,-64.975 +79.425,-64.975 +79.45,-64.975 +79.475,-64.9749 +79.5,-64.9749 +79.525,-64.9749 +79.55,-64.9748 +79.575,-64.9748 +79.6,-64.9747 +79.625,-64.9747 +79.65,-64.9747 +79.675,-64.9746 +79.7,-64.9746 +79.725,-64.9746 +79.75,-64.9745 +79.775,-64.9745 +79.8,-64.9745 +79.825,-64.9744 +79.85,-64.9744 +79.875,-64.9744 +79.9,-64.9744 +79.925,-64.9743 +79.95,-64.9743 +79.975,-64.9743 +80,-64.9742 +80.025,-64.9742 +80.05,-64.9742 +80.075,-64.9741 +80.1,-64.9741 +80.125,-64.9741 +80.15,-64.9741 +80.175,-64.974 +80.2,-64.974 +80.225,-64.974 +80.25,-64.974 +80.275,-64.9739 +80.3,-64.9739 +80.325,-64.9739 +80.35,-64.9739 +80.375,-64.9738 +80.4,-64.9738 +80.425,-64.9738 +80.45,-64.9738 +80.475,-64.9738 +80.5,-64.9737 +80.525,-64.9737 +80.55,-64.9737 +80.575,-64.9737 +80.6,-64.9736 +80.625,-64.9736 +80.65,-64.9736 +80.675,-64.9736 +80.7,-64.9736 +80.725,-64.9735 +80.75,-64.9735 +80.775,-64.9735 +80.8,-64.9735 +80.825,-64.9735 +80.85,-64.9735 +80.875,-64.9734 +80.9,-64.9734 +80.925,-64.9734 +80.95,-64.9734 +80.975,-64.9734 +81,-64.9734 +81.025,-64.9734 +81.05,-64.9733 +81.075,-64.9733 +81.1,-64.9733 +81.125,-64.9733 +81.15,-64.9733 +81.175,-64.9733 +81.2,-64.9733 +81.225,-64.9732 +81.25,-64.9732 +81.275,-64.9732 +81.3,-64.9732 +81.325,-64.9732 +81.35,-64.9732 +81.375,-64.9732 +81.4,-64.9732 +81.425,-64.9732 +81.45,-64.9732 +81.475,-64.9731 +81.5,-64.9731 +81.525,-64.9731 +81.55,-64.9731 +81.575,-64.9731 +81.6,-64.9731 +81.625,-64.9731 +81.65,-64.9731 +81.675,-64.9731 +81.7,-64.9731 +81.725,-64.9731 +81.75,-64.9731 +81.775,-64.9731 +81.8,-64.973 +81.825,-64.973 +81.85,-64.973 +81.875,-64.973 +81.9,-64.973 +81.925,-64.973 +81.95,-64.973 +81.975,-64.973 +82,-64.973 +82.025,-64.973 +82.05,-64.973 +82.075,-64.973 +82.1,-64.973 +82.125,-64.973 +82.15,-64.973 +82.175,-64.973 +82.2,-64.973 +82.225,-64.973 +82.25,-64.973 +82.275,-64.973 +82.3,-64.973 +82.325,-64.973 +82.35,-64.973 +82.375,-64.973 +82.4,-64.973 +82.425,-64.973 +82.45,-64.973 +82.475,-64.973 +82.5,-64.973 +82.525,-64.973 +82.55,-64.973 +82.575,-64.973 +82.6,-64.973 +82.625,-64.973 +82.65,-64.973 +82.675,-64.973 +82.7,-64.973 +82.725,-64.973 +82.75,-64.973 +82.775,-64.973 +82.8,-64.973 +82.825,-64.973 +82.85,-64.973 +82.875,-64.973 +82.9,-64.973 +82.925,-64.973 +82.95,-64.973 +82.975,-64.973 +83,-64.973 +83.025,-64.973 +83.05,-64.973 +83.075,-64.9731 +83.1,-64.9731 +83.125,-64.9731 +83.15,-64.9731 +83.175,-64.9731 +83.2,-64.9731 +83.225,-64.9731 +83.25,-64.9731 +83.275,-64.9731 +83.3,-64.9731 +83.325,-64.9731 +83.35,-64.9731 +83.375,-64.9731 +83.4,-64.9731 +83.425,-64.9731 +83.45,-64.9731 +83.475,-64.9731 +83.5,-64.9732 +83.525,-64.9732 +83.55,-64.9732 +83.575,-64.9732 +83.6,-64.9732 +83.625,-64.9732 +83.65,-64.9732 +83.675,-64.9732 +83.7,-64.9732 +83.725,-64.9732 +83.75,-64.9732 +83.775,-64.9732 +83.8,-64.9732 +83.825,-64.9732 +83.85,-64.9733 +83.875,-64.9733 +83.9,-64.9733 +83.925,-64.9733 +83.95,-64.9733 +83.975,-64.9733 +84,-64.9733 +84.025,-64.9733 +84.05,-64.9733 +84.075,-64.9733 +84.1,-64.9733 +84.125,-64.9733 +84.15,-64.9734 +84.175,-64.9734 +84.2,-64.9734 +84.225,-64.9734 +84.25,-64.9734 +84.275,-64.9734 +84.3,-64.9734 +84.325,-64.9734 +84.35,-64.9734 +84.375,-64.9734 +84.4,-64.9734 +84.425,-64.9735 +84.45,-64.9735 +84.475,-64.9735 +84.5,-64.9735 +84.525,-64.9735 +84.55,-64.9735 +84.575,-64.9735 +84.6,-64.9735 +84.625,-64.9735 +84.65,-64.9735 +84.675,-64.9735 +84.7,-64.9736 +84.725,-64.9736 +84.75,-64.9736 +84.775,-64.9736 +84.8,-64.9736 +84.825,-64.9736 +84.85,-64.9736 +84.875,-64.9736 +84.9,-64.9736 +84.925,-64.9736 +84.95,-64.9736 +84.975,-64.9737 +85,-64.9737 +85.025,-64.9737 +85.05,-64.9737 +85.075,-64.9737 +85.1,-64.9737 +85.125,-64.9737 +85.15,-64.9737 +85.175,-64.9737 +85.2,-64.9737 +85.225,-64.9738 +85.25,-64.9738 +85.275,-64.9738 +85.3,-64.9738 +85.325,-64.9738 +85.35,-64.9738 +85.375,-64.9738 +85.4,-64.9738 +85.425,-64.9738 +85.45,-64.9738 +85.475,-64.9738 +85.5,-64.9739 +85.525,-64.9739 +85.55,-64.9739 +85.575,-64.9739 +85.6,-64.9739 +85.625,-64.9739 +85.65,-64.9739 +85.675,-64.9739 +85.7,-64.9739 +85.725,-64.9739 +85.75,-64.9739 +85.775,-64.974 +85.8,-64.974 +85.825,-64.974 +85.85,-64.974 +85.875,-64.974 +85.9,-64.974 +85.925,-64.974 +85.95,-64.974 +85.975,-64.974 +86,-64.974 +86.025,-64.974 +86.05,-64.974 +86.075,-64.9741 +86.1,-64.9741 +86.125,-64.9741 +86.15,-64.9741 +86.175,-64.9741 +86.2,-64.9741 +86.225,-64.9741 +86.25,-64.9741 +86.275,-64.9741 +86.3,-64.9741 +86.325,-64.9741 +86.35,-64.9741 +86.375,-64.9742 +86.4,-64.9742 +86.425,-64.9742 +86.45,-64.9742 +86.475,-64.9742 +86.5,-64.9742 +86.525,-64.9742 +86.55,-64.9742 +86.575,-64.9742 +86.6,-64.9742 +86.625,-64.9742 +86.65,-64.9742 +86.675,-64.9742 +86.7,-64.9742 +86.725,-64.9743 +86.75,-64.9743 +86.775,-64.9743 +86.8,-64.9743 +86.825,-64.9743 +86.85,-64.9743 +86.875,-64.9743 +86.9,-64.9743 +86.925,-64.9743 +86.95,-64.9743 +86.975,-64.9743 +87,-64.9743 +87.025,-64.9743 +87.05,-64.9743 +87.075,-64.9743 +87.1,-64.9743 +87.125,-64.9744 +87.15,-64.9744 +87.175,-64.9744 +87.2,-64.9744 +87.225,-64.9744 +87.25,-64.9744 +87.275,-64.9744 +87.3,-64.9744 +87.325,-64.9744 +87.35,-64.9744 +87.375,-64.9744 +87.4,-64.9744 +87.425,-64.9744 +87.45,-64.9744 +87.475,-64.9744 +87.5,-64.9744 +87.525,-64.9744 +87.55,-64.9744 +87.575,-64.9744 +87.6,-64.9745 +87.625,-64.9745 +87.65,-64.9745 +87.675,-64.9745 +87.7,-64.9745 +87.725,-64.9745 +87.75,-64.9745 +87.775,-64.9745 +87.8,-64.9745 +87.825,-64.9745 +87.85,-64.9745 +87.875,-64.9745 +87.9,-64.9745 +87.925,-64.9745 +87.95,-64.9745 +87.975,-64.9745 +88,-64.9745 +88.025,-64.9745 +88.05,-64.9745 +88.075,-64.9745 +88.1,-64.9745 +88.125,-64.9745 +88.15,-64.9745 +88.175,-64.9745 +88.2,-64.9745 +88.225,-64.9745 +88.25,-64.9745 +88.275,-64.9746 +88.3,-64.9746 +88.325,-64.9746 +88.35,-64.9746 +88.375,-64.9746 +88.4,-64.9746 +88.425,-64.9746 +88.45,-64.9746 +88.475,-64.9746 +88.5,-64.9746 +88.525,-64.9746 +88.55,-64.9746 +88.575,-64.9746 +88.6,-64.9746 +88.625,-64.9746 +88.65,-64.9746 +88.675,-64.9746 +88.7,-64.9746 +88.725,-64.9746 +88.75,-64.9746 +88.775,-64.9746 +88.8,-64.9746 +88.825,-64.9746 +88.85,-64.9746 +88.875,-64.9746 +88.9,-64.9746 +88.925,-64.9746 +88.95,-64.9746 +88.975,-64.9746 +89,-64.9746 +89.025,-64.9746 +89.05,-64.9746 +89.075,-64.9746 +89.1,-64.9746 +89.125,-64.9746 +89.15,-64.9746 +89.175,-64.9746 +89.2,-64.9746 +89.225,-64.9746 +89.25,-64.9746 +89.275,-64.9746 +89.3,-64.9746 +89.325,-64.9746 +89.35,-64.9746 +89.375,-64.9746 +89.4,-64.9746 +89.425,-64.9746 +89.45,-64.9746 +89.475,-64.9746 +89.5,-64.9746 +89.525,-64.9746 +89.55,-64.9746 +89.575,-64.9746 +89.6,-64.9746 +89.625,-64.9746 +89.65,-64.9746 +89.675,-64.9746 +89.7,-64.9746 +89.725,-64.9746 +89.75,-64.9746 +89.775,-64.9746 +89.8,-64.9746 +89.825,-64.9746 +89.85,-64.9746 +89.875,-64.9746 +89.9,-64.9746 +89.925,-64.9746 +89.95,-64.9746 +89.975,-64.9746 +90,-64.9746 +90.025,-64.9746 +90.05,-64.9746 +90.075,-64.9746 +90.1,-64.9746 +90.125,-64.9746 +90.15,-64.9746 +90.175,-64.9746 +90.2,-64.9746 +90.225,-64.9746 +90.25,-64.9746 +90.275,-64.9746 +90.3,-64.9746 +90.325,-64.9746 +90.35,-64.9746 +90.375,-64.9746 +90.4,-64.9746 +90.425,-64.9746 +90.45,-64.9746 +90.475,-64.9746 +90.5,-64.9746 +90.525,-64.9745 +90.55,-64.9745 +90.575,-64.9745 +90.6,-64.9745 +90.625,-64.9745 +90.65,-64.9745 +90.675,-64.9745 +90.7,-64.9745 +90.725,-64.9745 +90.75,-64.9745 +90.775,-64.9745 +90.8,-64.9745 +90.825,-64.9745 +90.85,-64.9745 +90.875,-64.9745 +90.9,-64.9745 +90.925,-64.9745 +90.95,-64.9745 +90.975,-64.9745 +91,-64.9745 +91.025,-64.9745 +91.05,-64.9745 +91.075,-64.9745 +91.1,-64.9745 +91.125,-64.9745 +91.15,-64.9745 +91.175,-64.9745 +91.2,-64.9745 +91.225,-64.9745 +91.25,-64.9745 +91.275,-64.9745 +91.3,-64.9745 +91.325,-64.9745 +91.35,-64.9745 +91.375,-64.9745 +91.4,-64.9745 +91.425,-64.9745 +91.45,-64.9744 +91.475,-64.9744 +91.5,-64.9744 +91.525,-64.9744 +91.55,-64.9744 +91.575,-64.9744 +91.6,-64.9744 +91.625,-64.9744 +91.65,-64.9744 +91.675,-64.9744 +91.7,-64.9744 +91.725,-64.9744 +91.75,-64.9744 +91.775,-64.9744 +91.8,-64.9744 +91.825,-64.9744 +91.85,-64.9744 +91.875,-64.9744 +91.9,-64.9744 +91.925,-64.9744 +91.95,-64.9744 +91.975,-64.9744 +92,-64.9744 +92.025,-64.9744 +92.05,-64.9744 +92.075,-64.9744 +92.1,-64.9744 +92.125,-64.9744 +92.15,-64.9744 +92.175,-64.9743 +92.2,-64.9743 +92.225,-64.9743 +92.25,-64.9743 +92.275,-64.9743 +92.3,-64.9743 +92.325,-64.9743 +92.35,-64.9743 +92.375,-64.9743 +92.4,-64.9743 +92.425,-64.9743 +92.45,-64.9743 +92.475,-64.9743 +92.5,-64.9743 +92.525,-64.9743 +92.55,-64.9743 +92.575,-64.9743 +92.6,-64.9743 +92.625,-64.9743 +92.65,-64.9743 +92.675,-64.9743 +92.7,-64.9743 +92.725,-64.9743 +92.75,-64.9743 +92.775,-64.9743 +92.8,-64.9743 +92.825,-64.9743 +92.85,-64.9743 +92.875,-64.9742 +92.9,-64.9742 +92.925,-64.9742 +92.95,-64.9742 +92.975,-64.9742 +93,-64.9742 +93.025,-64.9742 +93.05,-64.9742 +93.075,-64.9742 +93.1,-64.9742 +93.125,-64.9742 +93.15,-64.9742 +93.175,-64.9742 +93.2,-64.9742 +93.225,-64.9742 +93.25,-64.9742 +93.275,-64.9742 +93.3,-64.9742 +93.325,-64.9742 +93.35,-64.9742 +93.375,-64.9742 +93.4,-64.9742 +93.425,-64.9742 +93.45,-64.9742 +93.475,-64.9742 +93.5,-64.9742 +93.525,-64.9742 +93.55,-64.9742 +93.575,-64.9741 +93.6,-64.9741 +93.625,-64.9741 +93.65,-64.9741 +93.675,-64.9741 +93.7,-64.9741 +93.725,-64.9741 +93.75,-64.9741 +93.775,-64.9741 +93.8,-64.9741 +93.825,-64.9741 +93.85,-64.9741 +93.875,-64.9741 +93.9,-64.9741 +93.925,-64.9741 +93.95,-64.9741 +93.975,-64.9741 +94,-64.9741 +94.025,-64.9741 +94.05,-64.9741 +94.075,-64.9741 +94.1,-64.9741 +94.125,-64.9741 +94.15,-64.9741 +94.175,-64.9741 +94.2,-64.9741 +94.225,-64.9741 +94.25,-64.9741 +94.275,-64.9741 +94.3,-64.9741 +94.325,-64.974 +94.35,-64.974 +94.375,-64.974 +94.4,-64.974 +94.425,-64.974 +94.45,-64.974 +94.475,-64.974 +94.5,-64.974 +94.525,-64.974 +94.55,-64.974 +94.575,-64.974 +94.6,-64.974 +94.625,-64.974 +94.65,-64.974 +94.675,-64.974 +94.7,-64.974 +94.725,-64.974 +94.75,-64.974 +94.775,-64.974 +94.8,-64.974 +94.825,-64.974 +94.85,-64.974 +94.875,-64.974 +94.9,-64.974 +94.925,-64.974 +94.95,-64.974 +94.975,-64.974 +95,-64.974 +95.025,-64.974 +95.05,-64.974 +95.075,-64.974 +95.1,-64.974 +95.125,-64.974 +95.15,-64.974 +95.175,-64.974 +95.2,-64.9739 +95.225,-64.9739 +95.25,-64.9739 +95.275,-64.9739 +95.3,-64.9739 +95.325,-64.9739 +95.35,-64.9739 +95.375,-64.9739 +95.4,-64.9739 +95.425,-64.9739 +95.45,-64.9739 +95.475,-64.9739 +95.5,-64.9739 +95.525,-64.9739 +95.55,-64.9739 +95.575,-64.9739 +95.6,-64.9739 +95.625,-64.9739 +95.65,-64.9739 +95.675,-64.9739 +95.7,-64.9739 +95.725,-64.9739 +95.75,-64.9739 +95.775,-64.9739 +95.8,-64.9739 +95.825,-64.9739 +95.85,-64.9739 +95.875,-64.9739 +95.9,-64.9739 +95.925,-64.9739 +95.95,-64.9739 +95.975,-64.9739 +96,-64.9739 +96.025,-64.9739 +96.05,-64.9739 +96.075,-64.9739 +96.1,-64.9739 +96.125,-64.9739 +96.15,-64.9739 +96.175,-64.9739 +96.2,-64.9739 +96.225,-64.9739 +96.25,-64.9739 +96.275,-64.9739 +96.3,-64.9739 +96.325,-64.9739 +96.35,-64.9739 +96.375,-64.9738 +96.4,-64.9738 +96.425,-64.9738 +96.45,-64.9738 +96.475,-64.9738 +96.5,-64.9738 +96.525,-64.9738 +96.55,-64.9738 +96.575,-64.9738 +96.6,-64.9738 +96.625,-64.9738 +96.65,-64.9738 +96.675,-64.9738 +96.7,-64.9738 +96.725,-64.9738 +96.75,-64.9738 +96.775,-64.9738 +96.8,-64.9738 +96.825,-64.9738 +96.85,-64.9738 +96.875,-64.9738 +96.9,-64.9738 +96.925,-64.9738 +96.95,-64.9738 +96.975,-64.9738 +97,-64.9738 +97.025,-64.9738 +97.05,-64.9738 +97.075,-64.9738 +97.1,-64.9738 +97.125,-64.9738 +97.15,-64.9738 +97.175,-64.9738 +97.2,-64.9738 +97.225,-64.9738 +97.25,-64.9738 +97.275,-64.9738 +97.3,-64.9738 +97.325,-64.9738 +97.35,-64.9738 +97.375,-64.9738 +97.4,-64.9738 +97.425,-64.9738 +97.45,-64.9738 +97.475,-64.9738 +97.5,-64.9738 +97.525,-64.9738 +97.55,-64.9738 +97.575,-64.9738 +97.6,-64.9738 +97.625,-64.9738 +97.65,-64.9738 +97.675,-64.9738 +97.7,-64.9738 +97.725,-64.9738 +97.75,-64.9738 +97.775,-64.9738 +97.8,-64.9738 +97.825,-64.9738 +97.85,-64.9738 +97.875,-64.9738 +97.9,-64.9738 +97.925,-64.9738 +97.95,-64.9738 +97.975,-64.9738 +98,-64.9738 +98.025,-64.9738 +98.05,-64.9738 +98.075,-64.9738 +98.1,-64.9738 +98.125,-64.9738 +98.15,-64.9738 +98.175,-64.9738 +98.2,-64.9738 +98.225,-64.9738 +98.25,-64.9738 +98.275,-64.9738 +98.3,-64.9738 +98.325,-64.9738 +98.35,-64.9738 +98.375,-64.9738 +98.4,-64.9738 +98.425,-64.9738 +98.45,-64.9738 +98.475,-64.9738 +98.5,-64.9738 +98.525,-64.9738 +98.55,-64.9738 +98.575,-64.9738 +98.6,-64.9738 +98.625,-64.9738 +98.65,-64.9738 +98.675,-64.9738 +98.7,-64.9738 +98.725,-64.9738 +98.75,-64.9738 +98.775,-64.9738 +98.8,-64.9738 +98.825,-64.9738 +98.85,-64.9738 +98.875,-64.9738 +98.9,-64.9738 +98.925,-64.9738 +98.95,-64.9738 +98.975,-64.9738 +99,-64.9738 +99.025,-64.9738 +99.05,-64.9738 +99.075,-64.9738 +99.1,-64.9738 +99.125,-64.9738 +99.15,-64.9738 +99.175,-64.9738 +99.2,-64.9738 +99.225,-64.9738 +99.25,-64.9738 +99.275,-64.9738 +99.3,-64.9738 +99.325,-64.9738 +99.35,-64.9738 +99.375,-64.9738 +99.4,-64.9738 +99.425,-64.9738 +99.45,-64.9738 +99.475,-64.9738 +99.5,-64.9738 +99.525,-64.9738 +99.55,-64.9738 +99.575,-64.9738 +99.6,-64.9738 +99.625,-64.9738 +99.65,-64.9738 +99.675,-64.9738 +99.7,-64.9738 +99.725,-64.9738 +99.75,-64.9738 +99.775,-64.9738 +99.8,-64.9738 +99.825,-64.9738 +99.85,-64.9738 +99.875,-64.9738 +99.9,-64.9738 +99.925,-64.9738 +99.95,-64.9738 +99.975,-64.9738 +100,-64.9738 diff --git a/test/api/sections.c b/test/api/sections.c index 13a67208b6..b148101dd8 100644 --- a/test/api/sections.c +++ b/test/api/sections.c @@ -28,22 +28,21 @@ void setup_neuron_api(void) { nrn_function_call = (void (*)(Symbol*, int))(dlsym(handle, "nrn_function_call")); nrn_symbol = (Symbol * (*) (char const*) )(dlsym(handle, "nrn_symbol")); nrn_object_new = (Object * (*) (Symbol*, int) )(dlsym(handle, "nrn_object_new")); - nrn_push_section = (void (*)(Section*))(dlsym(handle, "nrn_push_section")); - nrn_pop_section = (void (*)(void))(dlsym(handle, "nrn_pop_section")); + nrn_section_push = (void (*)(Section*))(dlsym(handle, "nrn_section_push")); + nrn_section_pop = (void (*)(void))(dlsym(handle, "nrn_section_pop")); nrn_method_symbol = (Symbol * (*) (Object*, char const*) )(dlsym(handle, "nrn_method_symbol")); nrn_method_call = (void (*)(Object*, Symbol*, int))(dlsym(handle, "nrn_method_call")); - nrn_new_sectionlist_iterator = (SectionListIterator * (*) (nrn_Item*) )( - dlsym(handle, "nrn_new_sectionlist_iterator")); - nrn_get_allsec = (nrn_Item * (*) (void) )(dlsym(handle, "nrn_get_allsec")); + nrn_sectionlist_iterator_new = (SectionListIterator * (*) (nrn_Item*) )( + dlsym(handle, "nrn_sectionlist_iterator_new")); + nrn_allsec = (nrn_Item * (*) (void) )(dlsym(handle, "nrn_allsec")); nrn_sectionlist_iterator_done = (int (*)(SectionListIterator*))( dlsym(handle, "nrn_sectionlist_iterator_done")); nrn_sectionlist_iterator_next = (Section * (*) (SectionListIterator*) )( dlsym(handle, "nrn_sectionlist_iterator_next")); - nrn_free_sectionlist_iterator = (void (*)(SectionListIterator*))( - dlsym(handle, "nrn_free_sectionlist_iterator")); + nrn_sectionlist_iterator_free = (void (*)(SectionListIterator*))( + dlsym(handle, "nrn_sectionlist_iterator_free")); nrn_secname = (char const* (*) (Section*) )(dlsym(handle, "nrn_secname")); - nrn_sectionlist_data_get = (nrn_Item * - (*) (Object*) )(dlsym(handle, "nrn_sectionlist_data_get")); + nrn_sectionlist_data = (nrn_Item * (*) (Object*) )(dlsym(handle, "nrn_sectionlist_data")); } int main(void) { @@ -67,24 +66,24 @@ int main(void) { /* create a SectionList that is dend1 and its children */ Object* seclist = nrn_object_new(nrn_symbol("SectionList"), 0); - nrn_push_section(dend1); + nrn_section_push(dend1); nrn_method_call(seclist, nrn_method_symbol(seclist, "subtree"), 0); - nrn_pop_section(); + nrn_section_pop(); /* loop over allsec, print out */ printf("allsec:\n"); - SectionListIterator* sli = nrn_new_sectionlist_iterator(nrn_get_allsec()); + SectionListIterator* sli = nrn_sectionlist_iterator_new(nrn_allsec()); for (; !nrn_sectionlist_iterator_done(sli);) { Section* sec = nrn_sectionlist_iterator_next(sli); printf(" %s\n", nrn_secname(sec)); } - nrn_free_sectionlist_iterator(sli); + nrn_sectionlist_iterator_free(sli); printf("\ndend1's subtree:\n"); - sli = nrn_new_sectionlist_iterator(nrn_sectionlist_data_get(seclist)); + sli = nrn_sectionlist_iterator_new(nrn_sectionlist_data(seclist)); for (; !nrn_sectionlist_iterator_done(sli);) { Section* sec = nrn_sectionlist_iterator_next(sli); printf(" %s\n", nrn_secname(sec)); } - nrn_free_sectionlist_iterator(sli); + nrn_sectionlist_iterator_free(sli); } \ No newline at end of file diff --git a/test/api/vclamp.cpp b/test/api/vclamp.cpp index d35196671d..989fc1e6cd 100644 --- a/test/api/vclamp.cpp +++ b/test/api/vclamp.cpp @@ -31,8 +31,8 @@ void setup_neuron_api(void) { dlsym(handle, "nrn_function_call")); nrn_symbol = reinterpret_cast(dlsym(handle, "nrn_symbol")); nrn_double_pop = reinterpret_cast(dlsym(handle, "nrn_double_pop")); - nrn_push_section = reinterpret_cast( - dlsym(handle, "nrn_push_section")); + nrn_section_push = reinterpret_cast( + dlsym(handle, "nrn_section_push")); nrn_section_new = reinterpret_cast(dlsym(handle, "nrn_section_new")); nrn_double_push = reinterpret_cast(dlsym(handle, "nrn_double_push")); nrn_object_new = reinterpret_cast(dlsym(handle, "nrn_object_new")); @@ -45,8 +45,7 @@ void setup_neuron_api(void) { dlsym(handle, "nrn_object_unref")); nrn_vector_capacity = reinterpret_cast( dlsym(handle, "nrn_vector_capacity")); - nrn_vector_data_ptr = reinterpret_cast( - dlsym(handle, "nrn_vector_data_ptr")); + nrn_vector_data = reinterpret_cast(dlsym(handle, "nrn_vector_data")); nrn_method_symbol = reinterpret_cast( dlsym(handle, "nrn_method_symbol")); nrn_method_call = reinterpret_cast(dlsym(handle, "nrn_method_call")); @@ -81,7 +80,7 @@ int main(void) { soma = nrn_section_new("soma"); // define soma morphology with two 3d points - nrn_push_section(soma); + nrn_section_push(soma); assert(soma); assert(nrn_section_length_set); nrn_section_length_set(soma, 10); @@ -118,8 +117,8 @@ int main(void) { nrn_function_call(nrn_symbol("continuerun"), 1); nrn_double_pop(); - double* tvec = nrn_vector_data_ptr(t); - double* vvec = nrn_vector_data_ptr(v); + double* tvec = nrn_vector_data(t); + double* vvec = nrn_vector_data(v); ofstream out_file; out_file.open("vclamp.csv"); for (auto i = 0; i < nrn_vector_capacity(t); i++) { From 963bd75e7e1c080c46730fbc3acb03419fd2447b Mon Sep 17 00:00:00 2001 From: "Robert A. McDougal" Date: Sun, 25 Jun 2023 17:10:32 -0400 Subject: [PATCH 37/65] name adjustments to end with verb --- src/nrniv/neuronapi.cpp | 6 +++--- src/nrniv/neuronapi.h | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/nrniv/neuronapi.cpp b/src/nrniv/neuronapi.cpp index ce9561fac0..9ac0a37626 100644 --- a/src/nrniv/neuronapi.cpp +++ b/src/nrniv/neuronapi.cpp @@ -79,7 +79,7 @@ int nrn_init(int argc, const char** argv) { return exit_status; } -void nrn_redirect_stdout(int (*myprint)(int, char*)) { +void nrn_stdout_redirect(int (*myprint)(int, char*)) { // the first argument of myprint is an integer indicating the output stream // if the int is 1, then stdout, else stderr // the char* is the message to display @@ -342,7 +342,7 @@ void nrn_object_unref(Object* obj) { hoc_obj_unref(obj); } -char const* nrn_get_class_name(Object* obj) { +char const* nrn_class_name(Object* obj) { return obj->ctemplate->sym->name; } @@ -514,7 +514,7 @@ char const* nrn_symbol_name(Symbol* sym) { Symlist* nrn_symbol_table(Symbol* sym) { // TODO: ensure sym is an object or class - // NOTE: to use with an object, call nrn_get_symbol(nrn_get_class_name(obj)) + // NOTE: to use with an object, call nrn_get_symbol(nrn_class_name(obj)) return sym->u.ctemplate->symtable; } diff --git a/src/nrniv/neuronapi.h b/src/nrniv/neuronapi.h index d3b248ec88..b161d2c3c1 100644 --- a/src/nrniv/neuronapi.h +++ b/src/nrniv/neuronapi.h @@ -27,7 +27,7 @@ typedef enum { * Initialization ****************************************/ int (*nrn_init)(int argc, const char** argv); -void (*nrn_redirect_stdout)(int (*myprint)(int, char*)); +void (*nrn_stdout_redirect)(int (*myprint)(int, char*)); /**************************************** * Sections @@ -84,9 +84,9 @@ Symbol* (*nrn_method_symbol)(Object* obj, char const* name); // classic behavior of OcJump) void (*nrn_method_call)(Object* obj, Symbol* method_sym, int narg); void (*nrn_function_call)(Symbol* sym, int narg); -void (*nrn_ref_object)(Object* obj); +void (*nrn_object_ref)(Object* obj); void (*nrn_object_unref)(Object* obj); -char const* (*nrn_get_class_name)(Object* obj); +char const* (*nrn_class_name)(Object* obj); /**************************************** * Miscellaneous From 9638da3505b7e54886c69c1a99ee9676ba956a6d Mon Sep 17 00:00:00 2001 From: "Robert A. McDougal" Date: Sun, 25 Jun 2023 17:13:32 -0400 Subject: [PATCH 38/65] name fixes --- src/nrniv/neuronapi.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/nrniv/neuronapi.h b/src/nrniv/neuronapi.h index b161d2c3c1..d34f17093e 100644 --- a/src/nrniv/neuronapi.h +++ b/src/nrniv/neuronapi.h @@ -63,17 +63,17 @@ void (*nrn_rangevar_set)(Symbol* const sym, Section* const sec, double x, double ****************************************/ Symbol* (*nrn_symbol)(char const* name); void (*nrn_symbol_push)(Symbol* sym); -int (*nrn_get_symbol_type)(Symbol* sym); -double* (*nrn_get_symbol_ptr)(Symbol* sym); +int (*nrn_symbol_type)(Symbol* sym); +//double* (*nrn_get_symbol_ptr)(Symbol* sym); void (*nrn_double_push)(double val); double (*nrn_double_pop)(void); void (*nrn_double_ptr_push)(double* addr); double* (*nrn_double_ptr_pop)(void); void (*nrn_str_push)(char** str); char** (*nrn_pop_str)(void); -void (*nrn_push_int)(int i); -int (*nrn_pop_int)(void); -void (*nrn_push_object)(Object* obj); +void (*nrn_int_push)(int i); +int (*nrn_int_pop)(void); +void (*nrn_object_push)(Object* obj); Object* (*nrn_object_pop)(void); nrn_stack_types_t (*nrn_stack_type)(void); char const* const (*nrn_stack_type_name)(nrn_stack_types_t id); From 0173e0212f2b8136e8f9c4d2f54b9c50b95eef59 Mon Sep 17 00:00:00 2001 From: "Robert A. McDougal" Date: Sun, 25 Jun 2023 17:51:45 -0400 Subject: [PATCH 39/65] replace param_handle with param --- src/nrniv/neuronapi.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/nrniv/neuronapi.cpp b/src/nrniv/neuronapi.cpp index 9ac0a37626..2d1c32b78b 100644 --- a/src/nrniv/neuronapi.cpp +++ b/src/nrniv/neuronapi.cpp @@ -446,22 +446,22 @@ double* nrn_vector_data(Object* vec) { double nrn_pp_property_get(Object* pp, const char* name) { int index = hoc_table_lookup(name, pp->ctemplate->symtable)->u.rng.index; - return *ob2pntproc_0(pp)->prop->param_handle(index); + return ob2pntproc_0(pp)->prop->param(index); } double nrn_pp_property_array_get(Object* pp, const char* name, int i) { int index = hoc_table_lookup(name, pp->ctemplate->symtable)->u.rng.index; - return *ob2pntproc_0(pp)->prop->param_handle(index, i); + return ob2pntproc_0(pp)->prop->param(index, i); } void nrn_pp_property_set(Object* pp, const char* name, double value) { int index = hoc_table_lookup(name, pp->ctemplate->symtable)->u.rng.index; - *ob2pntproc_0(pp)->prop->param_handle(index) = value; + ob2pntproc_0(pp)->prop->param(index) = value; } void nrn_pp_property_array_set(Object* pp, const char* name, int i, double value) { int index = hoc_table_lookup(name, pp->ctemplate->symtable)->u.rng.index; - *ob2pntproc_0(pp)->prop->param_handle(index, i) = value; + ob2pntproc_0(pp)->prop->param(index, i) = value; } void nrn_pp_property_push(Object* pp, const char* name) { From 244b2fdee05a7b075e9e65bd202fa0299ff5a6d2 Mon Sep 17 00:00:00 2001 From: "Robert A. McDougal" Date: Mon, 26 Jun 2023 21:54:44 -0400 Subject: [PATCH 40/65] working vclamp --- src/nrniv/neuronapi.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/nrniv/neuronapi.cpp b/src/nrniv/neuronapi.cpp index 2d1c32b78b..84c99e6c09 100644 --- a/src/nrniv/neuronapi.cpp +++ b/src/nrniv/neuronapi.cpp @@ -446,32 +446,32 @@ double* nrn_vector_data(Object* vec) { double nrn_pp_property_get(Object* pp, const char* name) { int index = hoc_table_lookup(name, pp->ctemplate->symtable)->u.rng.index; - return ob2pntproc_0(pp)->prop->param(index); + return ob2pntproc_0(pp)->prop->param_legacy(index); } double nrn_pp_property_array_get(Object* pp, const char* name, int i) { int index = hoc_table_lookup(name, pp->ctemplate->symtable)->u.rng.index; - return ob2pntproc_0(pp)->prop->param(index, i); + return ob2pntproc_0(pp)->prop->param_legacy(index + i); } void nrn_pp_property_set(Object* pp, const char* name, double value) { int index = hoc_table_lookup(name, pp->ctemplate->symtable)->u.rng.index; - ob2pntproc_0(pp)->prop->param(index) = value; + ob2pntproc_0(pp)->prop->param_legacy(index) = value; } void nrn_pp_property_array_set(Object* pp, const char* name, int i, double value) { int index = hoc_table_lookup(name, pp->ctemplate->symtable)->u.rng.index; - ob2pntproc_0(pp)->prop->param(index, i) = value; + ob2pntproc_0(pp)->prop->param_legacy(index + i) = value; } void nrn_pp_property_push(Object* pp, const char* name) { int index = hoc_table_lookup(name, pp->ctemplate->symtable)->u.rng.index; - hoc_push(ob2pntproc_0(pp)->prop->param_handle(index)); + hoc_push(ob2pntproc_0(pp)->prop->param_handle_legacy(index)); } void nrn_pp_property_array_push(Object* pp, const char* name, int i) { int index = hoc_table_lookup(name, pp->ctemplate->symtable)->u.rng.index; - hoc_push(ob2pntproc_0(pp)->prop->param_handle(index, i)); + hoc_push(ob2pntproc_0(pp)->prop->param_handle_legacy(index + i)); } double* _nrn_get_steered_property_ptr(Object* obj, const char* name) { From 3a1b3e33ece1b285c59515f4ae700269fe557e82 Mon Sep 17 00:00:00 2001 From: "Robert A. McDougal" Date: Mon, 26 Jun 2023 22:35:45 -0400 Subject: [PATCH 41/65] unified API property functions --- src/nrniv/neuronapi.cpp | 117 +++++++++++++++++++++++----------------- src/nrniv/neuronapi.h | 24 ++++----- test/api/hh_sim.cpp | 10 ++-- test/api/netcon.cpp | 22 ++++---- test/api/vclamp.cpp | 16 +++--- 5 files changed, 99 insertions(+), 90 deletions(-) diff --git a/src/nrniv/neuronapi.cpp b/src/nrniv/neuronapi.cpp index 84c99e6c09..2a0b262a1d 100644 --- a/src/nrniv/neuronapi.cpp +++ b/src/nrniv/neuronapi.cpp @@ -10,7 +10,6 @@ #include "hocdec.h" #include "section.h" - // we define these here to allow the API to be independent of internal details typedef enum { STACK_IS_STR = 1, @@ -444,68 +443,86 @@ double* nrn_vector_data(Object* vec) { return vector_vec((IvocVect*) vec->u.this_pointer); } -double nrn_pp_property_get(Object* pp, const char* name) { - int index = hoc_table_lookup(name, pp->ctemplate->symtable)->u.rng.index; - return ob2pntproc_0(pp)->prop->param_legacy(index); -} - -double nrn_pp_property_array_get(Object* pp, const char* name, int i) { - int index = hoc_table_lookup(name, pp->ctemplate->symtable)->u.rng.index; - return ob2pntproc_0(pp)->prop->param_legacy(index + i); +double nrn_property_get(Object* obj, const char* name) { + auto sym = hoc_table_lookup(name, obj->ctemplate->symtable); + if (!obj->ctemplate->is_point_) { + hoc_pushs(sym); + // put the pointer for the memory location on the stack + obj->ctemplate->steer(obj->u.this_pointer); + return *hoc_pxpop(); + } else { + int index = sym->u.rng.index; + return ob2pntproc_0(obj)->prop->param_legacy(index); + } } -void nrn_pp_property_set(Object* pp, const char* name, double value) { - int index = hoc_table_lookup(name, pp->ctemplate->symtable)->u.rng.index; - ob2pntproc_0(pp)->prop->param_legacy(index) = value; +double nrn_property_array_get(Object* obj, const char* name, int i) { + auto sym = hoc_table_lookup(name, obj->ctemplate->symtable); + if (!obj->ctemplate->is_point_) { + hoc_pushs(sym); + // put the pointer for the memory location on the stack + obj->ctemplate->steer(obj->u.this_pointer); + return hoc_pxpop()[i]; + } else { + int index = sym->u.rng.index; + return ob2pntproc_0(obj)->prop->param_legacy(index + i); + } } -void nrn_pp_property_array_set(Object* pp, const char* name, int i, double value) { - int index = hoc_table_lookup(name, pp->ctemplate->symtable)->u.rng.index; - ob2pntproc_0(pp)->prop->param_legacy(index + i) = value; +void nrn_property_set(Object* obj, const char* name, double value) { + auto sym = hoc_table_lookup(name, obj->ctemplate->symtable); + if (!obj->ctemplate->is_point_) { + hoc_pushs(sym); + // put the pointer for the memory location on the stack + obj->ctemplate->steer(obj->u.this_pointer); + *hoc_pxpop() = value; + } else { + int index = sym->u.rng.index; + ob2pntproc_0(obj)->prop->param_legacy(index) = value; + } } -void nrn_pp_property_push(Object* pp, const char* name) { - int index = hoc_table_lookup(name, pp->ctemplate->symtable)->u.rng.index; - hoc_push(ob2pntproc_0(pp)->prop->param_handle_legacy(index)); +void nrn_property_array_set(Object* obj, const char* name, int i, double value) { + auto sym = hoc_table_lookup(name, obj->ctemplate->symtable); + if (!obj->ctemplate->is_point_) { + hoc_pushs(sym); + // put the pointer for the memory location on the stack + obj->ctemplate->steer(obj->u.this_pointer); + hoc_pxpop()[i] = value; + } else { + int index = sym->u.rng.index; + ob2pntproc_0(obj)->prop->param_legacy(index + i) = value; + } } -void nrn_pp_property_array_push(Object* pp, const char* name, int i) { +void nrn_pp_property_array_set(Object* pp, const char* name, int i, double value) { int index = hoc_table_lookup(name, pp->ctemplate->symtable)->u.rng.index; - hoc_push(ob2pntproc_0(pp)->prop->param_handle_legacy(index + i)); -} - -double* _nrn_get_steered_property_ptr(Object* obj, const char* name) { - assert(obj->ctemplate->steer); - auto sym2 = hoc_table_lookup(name, obj->ctemplate->symtable); - assert(sym2); - hoc_pushs(sym2); - // put the pointer for the memory location on the stack - obj->ctemplate->steer(obj->u.this_pointer); - return hoc_pxpop(); -} - -void nrn_steered_property_array_set(Object* obj, const char* name, int i, double value) { - _nrn_get_steered_property_ptr(obj, name)[i] = value; -} - -void nrn_steered_property_set(Object* obj, const char* name, double value) { - *_nrn_get_steered_property_ptr(obj, name) = value; -} - -double nrn_steered_property_array_get(Object* obj, const char* name, int i) { - return _nrn_get_steered_property_ptr(obj, name)[i]; -} - -double nrn_steered_property_get(Object* obj, const char* name) { - return *_nrn_get_steered_property_ptr(obj, name); + ob2pntproc_0(pp)->prop->param_legacy(index + i) = value; } -void nrn_steered_property_array_push(Object* obj, const char* name, int i) { - hoc_pushpx(&_nrn_get_steered_property_ptr(obj, name)[i]); +void nrn_property_push(Object* obj, const char* name, double value) { + auto sym = hoc_table_lookup(name, obj->ctemplate->symtable); + if (!obj->ctemplate->is_point_) { + hoc_pushs(sym); + // put the pointer for the memory location on the stack + obj->ctemplate->steer(obj->u.this_pointer); + } else { + int index = sym->u.rng.index; + hoc_push(ob2pntproc_0(obj)->prop->param_handle_legacy(index)); + } } -void nrn_steered_property_push(Object* obj, const char* name) { - hoc_pushpx(_nrn_get_steered_property_ptr(obj, name)); +void nrn_property_array_push(Object* obj, const char* name, int i, double value) { + auto sym = hoc_table_lookup(name, obj->ctemplate->symtable); + if (!obj->ctemplate->is_point_) { + hoc_pushs(sym); + // put the pointer for the memory location on the stack + obj->ctemplate->steer(obj->u.this_pointer); + hoc_pushpx(hoc_pxpop() + i); + } else { + int index = sym->u.rng.index; + hoc_push(ob2pntproc_0(obj)->prop->param_handle_legacy(index + i)); + } } char const* nrn_symbol_name(Symbol* sym) { diff --git a/src/nrniv/neuronapi.h b/src/nrniv/neuronapi.h index d34f17093e..31f2ed61c1 100644 --- a/src/nrniv/neuronapi.h +++ b/src/nrniv/neuronapi.h @@ -64,7 +64,7 @@ void (*nrn_rangevar_set)(Symbol* const sym, Section* const sec, double x, double Symbol* (*nrn_symbol)(char const* name); void (*nrn_symbol_push)(Symbol* sym); int (*nrn_symbol_type)(Symbol* sym); -//double* (*nrn_get_symbol_ptr)(Symbol* sym); +// double* (*nrn_get_symbol_ptr)(Symbol* sym); void (*nrn_double_push)(double val); double (*nrn_double_pop)(void); void (*nrn_double_ptr_push)(double* addr); @@ -102,20 +102,14 @@ char const* (*nrn_symbol_table_iterator_next)(SymbolTableIterator* st); int (*nrn_symbol_table_iterator_done)(SymbolTableIterator* st); int (*nrn_vector_capacity)(Object* vec); double* (*nrn_vector_data)(Object* vec); -double (*nrn_pp_property_get)(Object* pp, const char* name); -double (*nrn_pp_property_array_get)(Object* pp, const char* name, int i); -void (*nrn_pp_property_set)(Object* pp, const char* name, double value); -void (*nrn_pp_property_array_set)(Object* pp, const char* name, int i, double value); -void (*nrn_pp_property_push)(Object* pp, const char* name); -void (*nrn_pp_property_array_push)(Object* pp, const char* name, int i); -void (*nrn_steered_property_array_set)(Object* obj, const char* name, int i, double value); -void (*nrn_steered_property_set)(Object* obj, const char* name, double value); -double (*nrn_steered_property_array_get)(Object* obj, const char* name, int i); -double (*nrn_steered_property_get)(Object* obj, const char* name); -void (*nrn_steered_property_array_push)(Object* obj, const char* name, int i); -void (*nrn_steered_property_push)(Object* obj, const char* name); -char const* (*nrn_symbol_name)(Symbol * sym); -Symlist* (*nrn_symbol_table)(Symbol * sym); +double (*nrn_property_get)(Object* obj, const char* name); +double (*nrn_property_array_get)(Object* obj, const char* name, int i); +void (*nrn_property_set)(Object* obj, const char* name, double value); +void (*nrn_property_array_set)(Object* obj, const char* name, int i, double value); +void (*nrn_property_push)(Object* obj, const char* name); +void (*nrn_property_array_push)(Object* obj, const char* name, int i); +char const* (*nrn_symbol_name)(Symbol* sym); +Symlist* (*nrn_symbol_table)(Symbol* sym); Symlist* (*nrn_global_symbol_table)(void); // TODO: need shapeplot information extraction diff --git a/test/api/hh_sim.cpp b/test/api/hh_sim.cpp index 4014f7b683..92a6a359ac 100644 --- a/test/api/hh_sim.cpp +++ b/test/api/hh_sim.cpp @@ -52,8 +52,8 @@ void setup_neuron_api(void) { nrn_method_call = reinterpret_cast(dlsym(handle, "nrn_method_call")); nrn_object_pop = reinterpret_cast(dlsym(handle, "nrn_object_pop")); nrn_symbol_push = reinterpret_cast(dlsym(handle, "nrn_symbol_push")); - nrn_pp_property_set = reinterpret_cast( - dlsym(handle, "nrn_pp_property_set")); + nrn_property_set = reinterpret_cast( + dlsym(handle, "nrn_property_set")); } int main(void) { @@ -102,9 +102,9 @@ int main(void) { // current clamp at soma(0.5) nrn_double_push(0.5); iclamp = nrn_object_new(nrn_symbol("IClamp"), 1); - nrn_pp_property_set(iclamp, "amp", 0.3); - nrn_pp_property_set(iclamp, "del", 1); - nrn_pp_property_set(iclamp, "dur", 0.1); + nrn_property_set(iclamp, "amp", 0.3); + nrn_property_set(iclamp, "del", 1); + nrn_property_set(iclamp, "dur", 0.1); // setup recording v = nrn_object_new(nrn_symbol("Vector"), 0); diff --git a/test/api/netcon.cpp b/test/api/netcon.cpp index 9ee2043890..04bcf49d70 100644 --- a/test/api/netcon.cpp +++ b/test/api/netcon.cpp @@ -26,7 +26,8 @@ Symbol* nrn_symbol(char const* const name); void nrn_mechanism_insert(Section* sec, Symbol* mechanism); Object* nrn_object_new(Symbol* sym, int narg); void nrn_method_call(Object* obj, Symbol* method_sym, int narg); -void nrn_pp_property_set(Object* pp, const char* name, double value); +void nrn_property_set(Object* obj, const char* name, double value); +void nrn_property_array_set(Object* obj, const char* name, int i, double value); void nrn_double_push(double val); void nrn_object_push(Object* obj); Symbol* nrn_method_symbol(Object* obj, char const* const name); @@ -34,9 +35,6 @@ Object* nrn_object_pop(void); void nrn_object_unref(Object* obj); double* nrn_vector_data(Object* vec); int nrn_vector_capacity(Object* vec); -void nrn_steered_property_array_set(Object* obj, const char* name, int i, double value); -void nrn_steered_property_set(Object* obj, const char* name, double value); -void nrn_double_ptr_push(double* addr); double* nrn_symbol_ptr(Symbol* sym); void nrn_rangevar_push(Symbol* const sym, Section* const sec, double x); void nrn_symbol_push(Symbol* sym); @@ -80,23 +78,23 @@ int main(void) { // NetStim auto ns = nrn_object_new(nrn_symbol("NetStim"), 0); - nrn_pp_property_set(ns, "start", 5); - nrn_pp_property_set(ns, "noise", 1); - nrn_pp_property_set(ns, "interval", 5); - nrn_pp_property_set(ns, "number", 10); + nrn_property_set(ns, "start", 5); + nrn_property_set(ns, "noise", 1); + nrn_property_set(ns, "interval", 5); + nrn_property_set(ns, "number", 10); // syn = h.ExpSyn(soma(0.5)) nrn_double_push(0.5); auto syn = nrn_object_new(nrn_symbol("ExpSyn"), 1); - nrn_pp_property_set(syn, "tau", 3); // 3 ms timeconstant - nrn_pp_property_set(syn, "e", 0); // 0 mV reversal potential (excitatory synapse) + nrn_property_set(syn, "tau", 3); // 3 ms timeconstant + nrn_property_set(syn, "e", 0); // 0 mV reversal potential (excitatory synapse) // nc = h.NetCon(ns, syn) nrn_object_push(ns); nrn_object_push(syn); auto nc = nrn_object_new(nrn_symbol("NetCon"), 2); - nrn_steered_property_array_set(nc, "weight", 0, 0.5); - nrn_steered_property_set(nc, "delay", 0); + nrn_property_array_set(nc, "weight", 0, 0.5); + nrn_property_set(nc, "delay", 0); auto vec = nrn_object_new(nrn_symbol("Vector"), 0); diff --git a/test/api/vclamp.cpp b/test/api/vclamp.cpp index 989fc1e6cd..1cb82c304f 100644 --- a/test/api/vclamp.cpp +++ b/test/api/vclamp.cpp @@ -36,8 +36,8 @@ void setup_neuron_api(void) { nrn_section_new = reinterpret_cast(dlsym(handle, "nrn_section_new")); nrn_double_push = reinterpret_cast(dlsym(handle, "nrn_double_push")); nrn_object_new = reinterpret_cast(dlsym(handle, "nrn_object_new")); - nrn_pp_property_array_set = reinterpret_cast( - dlsym(handle, "nrn_pp_property_array_set")); + nrn_property_array_set = reinterpret_cast( + dlsym(handle, "nrn_property_array_set")); nrn_rangevar_push = reinterpret_cast( dlsym(handle, "nrn_rangevar_push")); nrn_method_call = reinterpret_cast(dlsym(handle, "nrn_method_call")); @@ -90,12 +90,12 @@ int main(void) { nrn_double_push(0.5); vclamp = nrn_object_new(nrn_symbol("VClamp"), 1); // 0 mV for 1 ms; 10 mV for the next 2 ms; 5 mV for the next 3 ms - nrn_pp_property_array_set(vclamp, "amp", 0, 0); - nrn_pp_property_array_set(vclamp, "amp", 1, 10); - nrn_pp_property_array_set(vclamp, "amp", 2, 5); - nrn_pp_property_array_set(vclamp, "dur", 0, 1); - nrn_pp_property_array_set(vclamp, "dur", 1, 2); - nrn_pp_property_array_set(vclamp, "dur", 2, 3); + nrn_property_array_set(vclamp, "amp", 0, 0); + nrn_property_array_set(vclamp, "amp", 1, 10); + nrn_property_array_set(vclamp, "amp", 2, 5); + nrn_property_array_set(vclamp, "dur", 0, 1); + nrn_property_array_set(vclamp, "dur", 1, 2); + nrn_property_array_set(vclamp, "dur", 2, 3); // setup recording v = nrn_object_new(nrn_symbol("Vector"), 0); From 2fd9e342e0290b33b69cd5a6a7c70c948dc06a8b Mon Sep 17 00:00:00 2001 From: "Robert A. McDougal" Date: Mon, 26 Jun 2023 22:56:05 -0400 Subject: [PATCH 42/65] getters use const args --- src/nrniv/neuronapi.cpp | 26 +++++++++++++------------- src/nrniv/neuronapi.h | 20 ++++++++++---------- 2 files changed, 23 insertions(+), 23 deletions(-) diff --git a/src/nrniv/neuronapi.cpp b/src/nrniv/neuronapi.cpp index 2a0b262a1d..745651a0e6 100644 --- a/src/nrniv/neuronapi.cpp +++ b/src/nrniv/neuronapi.cpp @@ -112,7 +112,7 @@ void nrn_section_connect(Section* child_sec, double child_x, Section* parent_sec simpleconnectsection(); } -void nrn_section_length_set(Section* sec, double length) { +void nrn_section_length_set(Section* sec, double const length) { // TODO: call can_change_morph(sec) to check pt3dconst_; how should we handle // that? // TODO: is there a named constant so we don't have to use the magic number 2? @@ -123,15 +123,15 @@ void nrn_section_length_set(Section* sec, double length) { sec->recalc_area_ = 1; } -double nrn_section_length_get(Section* sec) { - return section_length(sec); +double nrn_section_length_get(Section const* sec) { + return section_length(const_cast(sec)); } -double nrn_section_Ra_get(Section* sec) { - return nrn_ra(sec); +double nrn_section_Ra_get(Section const* sec) { + return nrn_ra(const_cast(sec)); } -void nrn_section_Ra_set(Section* sec, double val) { +void nrn_section_Ra_set(Section* sec, double const val) { // TODO: ensure val > 0 // TODO: is there a named constant so we don't have to use the magic number 7? sec->prop->dparam[7] = val; @@ -182,8 +182,8 @@ void nrn_segment_diam_set(Section* const sec, const double x, const double diam) } } -double nrn_rangevar_get(Symbol* const sym, Section* const sec, double x) { - return *nrn_rangepointer(sec, sym, x); +double nrn_rangevar_get(Symbol* const sym, Section const* const sec, double x) { + return *nrn_rangepointer(const_cast(sec), const_cast(sym), x); } void nrn_rangevar_set(Symbol* const sym, Section* const sec, double x, double value) { @@ -211,7 +211,7 @@ Symbol* nrn_symbol(char const* const name) { return hoc_lookup(name); } -int nrn_symbol_type(Symbol* sym) { +int nrn_symbol_type(Symbol const* sym) { // TODO: these types are in parse.hpp and are not the same between versions, // so we really should wrap return sym->type; @@ -443,7 +443,7 @@ double* nrn_vector_data(Object* vec) { return vector_vec((IvocVect*) vec->u.this_pointer); } -double nrn_property_get(Object* obj, const char* name) { +double nrn_property_get(Object const* obj, const char* name) { auto sym = hoc_table_lookup(name, obj->ctemplate->symtable); if (!obj->ctemplate->is_point_) { hoc_pushs(sym); @@ -452,11 +452,11 @@ double nrn_property_get(Object* obj, const char* name) { return *hoc_pxpop(); } else { int index = sym->u.rng.index; - return ob2pntproc_0(obj)->prop->param_legacy(index); + return ob2pntproc_0(const_cast(obj))->prop->param_legacy(index); } } -double nrn_property_array_get(Object* obj, const char* name, int i) { +double nrn_property_array_get(Object const* obj, const char* name, int i) { auto sym = hoc_table_lookup(name, obj->ctemplate->symtable); if (!obj->ctemplate->is_point_) { hoc_pushs(sym); @@ -465,7 +465,7 @@ double nrn_property_array_get(Object* obj, const char* name, int i) { return hoc_pxpop()[i]; } else { int index = sym->u.rng.index; - return ob2pntproc_0(obj)->prop->param_legacy(index + i); + return ob2pntproc_0(const_cast(obj))->prop->param_legacy(index + i); } } diff --git a/src/nrniv/neuronapi.h b/src/nrniv/neuronapi.h index 31f2ed61c1..5bd71a3dbe 100644 --- a/src/nrniv/neuronapi.h +++ b/src/nrniv/neuronapi.h @@ -38,8 +38,8 @@ void (*nrn_section_connect)(Section* child_sec, Section* parent_sec, double parent_x); void (*nrn_section_length_set)(Section* sec, double length); -double (*nrn_section_length_get)(Section* sec); -double (*nrn_section_Ra_get)(Section* sec); +double (*nrn_section_length_get)(Section const* sec); +double (*nrn_section_Ra_get)(Section const* sec); void (*nrn_section_Ra_set)(Section* sec, double val); char const* (*nrn_secname)(Section* sec); void (*nrn_section_push)(Section* sec); @@ -55,8 +55,8 @@ int (*nrn_nseg_get)(Section const* sec); void (*nrn_nseg_set)(Section* sec, int nseg); void (*nrn_segment_diam_set)(Section* sec, double x, double diam); void (*nrn_rangevar_push)(Symbol* const sym, Section* const sec, double x); -double (*nrn_rangevar_get)(Symbol* const sym, Section* const sec, double x); -void (*nrn_rangevar_set)(Symbol* const sym, Section* const sec, double x, double value); +double (*nrn_rangevar_get)(Symbol const* sym, Section const* sec, double x); +void (*nrn_rangevar_set)(Symbol const* sym, Section* sec, double x, double value); /**************************************** * Functions, objects, and the stack @@ -82,11 +82,11 @@ Symbol* (*nrn_method_symbol)(Object* obj, char const* name); // TODO: the next two functions throw exceptions in C++; need a version that // returns a bool success indicator instead (this is actually the // classic behavior of OcJump) -void (*nrn_method_call)(Object* obj, Symbol* method_sym, int narg); -void (*nrn_function_call)(Symbol* sym, int narg); +void (*nrn_method_call)(Object* obj, Symbol const* method_sym, int narg); +void (*nrn_function_call)(Symbol const* sym, int narg); void (*nrn_object_ref)(Object* obj); void (*nrn_object_unref)(Object* obj); -char const* (*nrn_class_name)(Object* obj); +char const* (*nrn_class_name)(Object const* obj); /**************************************** * Miscellaneous @@ -102,13 +102,13 @@ char const* (*nrn_symbol_table_iterator_next)(SymbolTableIterator* st); int (*nrn_symbol_table_iterator_done)(SymbolTableIterator* st); int (*nrn_vector_capacity)(Object* vec); double* (*nrn_vector_data)(Object* vec); -double (*nrn_property_get)(Object* obj, const char* name); -double (*nrn_property_array_get)(Object* obj, const char* name, int i); +double (*nrn_property_get)(Object const* obj, const char* name); +double (*nrn_property_array_get)(Object const* obj, const char* name, int i); void (*nrn_property_set)(Object* obj, const char* name, double value); void (*nrn_property_array_set)(Object* obj, const char* name, int i, double value); void (*nrn_property_push)(Object* obj, const char* name); void (*nrn_property_array_push)(Object* obj, const char* name, int i); -char const* (*nrn_symbol_name)(Symbol* sym); +char const* (*nrn_symbol_name)(Symbol const* sym); Symlist* (*nrn_symbol_table)(Symbol* sym); Symlist* (*nrn_global_symbol_table)(void); // TODO: need shapeplot information extraction From 30214f8aeffaef507ec244b2de544e2a8181b9ec Mon Sep 17 00:00:00 2001 From: "Robert A. McDougal" Date: Mon, 26 Jun 2023 22:57:13 -0400 Subject: [PATCH 43/65] forgot to commit sections --- test/api/sections.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/api/sections.c b/test/api/sections.c index b148101dd8..1ad6d5a837 100644 --- a/test/api/sections.c +++ b/test/api/sections.c @@ -25,13 +25,13 @@ void setup_neuron_api(void) { nrn_section_connect = (void (*)(Section*, double, Section*, double))( dlsym(handle, "nrn_section_connect")); nrn_nseg_set = (void (*)(Section*, int))(dlsym(handle, "nrn_nseg_set")); - nrn_function_call = (void (*)(Symbol*, int))(dlsym(handle, "nrn_function_call")); + nrn_function_call = (void (*)(Symbol const*, int))(dlsym(handle, "nrn_function_call")); nrn_symbol = (Symbol * (*) (char const*) )(dlsym(handle, "nrn_symbol")); nrn_object_new = (Object * (*) (Symbol*, int) )(dlsym(handle, "nrn_object_new")); nrn_section_push = (void (*)(Section*))(dlsym(handle, "nrn_section_push")); nrn_section_pop = (void (*)(void))(dlsym(handle, "nrn_section_pop")); nrn_method_symbol = (Symbol * (*) (Object*, char const*) )(dlsym(handle, "nrn_method_symbol")); - nrn_method_call = (void (*)(Object*, Symbol*, int))(dlsym(handle, "nrn_method_call")); + nrn_method_call = (void (*)(Object*, Symbol const*, int))(dlsym(handle, "nrn_method_call")); nrn_sectionlist_iterator_new = (SectionListIterator * (*) (nrn_Item*) )( dlsym(handle, "nrn_sectionlist_iterator_new")); nrn_allsec = (nrn_Item * (*) (void) )(dlsym(handle, "nrn_allsec")); From 4de562db693c75ce1eedd8aec9f5f9566061fc30 Mon Sep 17 00:00:00 2001 From: "Robert A. McDougal" Date: Mon, 26 Jun 2023 23:05:43 -0400 Subject: [PATCH 44/65] vector_capacity now on const obj --- src/nrniv/neuronapi.cpp | 2 +- src/nrniv/neuronapi.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/nrniv/neuronapi.cpp b/src/nrniv/neuronapi.cpp index 745651a0e6..4ab4a0c9be 100644 --- a/src/nrniv/neuronapi.cpp +++ b/src/nrniv/neuronapi.cpp @@ -433,7 +433,7 @@ int nrn_symbol_table_iterator_done(SymbolTableIterator* st) { return st->done(); } -int nrn_vector_capacity(Object* vec) { +int nrn_vector_capacity(Object const* vec) { // TODO: throw exception if vec is not a Vector return vector_capacity((IvocVect*) vec->u.this_pointer); } diff --git a/src/nrniv/neuronapi.h b/src/nrniv/neuronapi.h index 5bd71a3dbe..abd72440e3 100644 --- a/src/nrniv/neuronapi.h +++ b/src/nrniv/neuronapi.h @@ -100,7 +100,7 @@ SymbolTableIterator* (*nrn_symbol_table_iterator_new)(Symlist* my_symbol_table); void (*nrn_symbol_table_iterator_free)(SymbolTableIterator* st); char const* (*nrn_symbol_table_iterator_next)(SymbolTableIterator* st); int (*nrn_symbol_table_iterator_done)(SymbolTableIterator* st); -int (*nrn_vector_capacity)(Object* vec); +int (*nrn_vector_capacity)(Object const* vec); double* (*nrn_vector_data)(Object* vec); double (*nrn_property_get)(Object const* obj, const char* name); double (*nrn_property_array_get)(Object const* obj, const char* name, int i); From 219df3b65c10bd8bfc53cd0852141ad73eabaabb Mon Sep 17 00:00:00 2001 From: Fernando Pereira Date: Tue, 26 Sep 2023 23:52:56 -0400 Subject: [PATCH 45/65] Several improvements - C/C++ api header included in implementation - signatures made compatible - public nrn_Item defined as inheriting from hoc_Item - dropped overlapping definitions. types are both fw declarations and opaque types --- src/nrniv/neuronapi.cpp | 53 ++++++---------- src/nrniv/neuronapi.h | 131 ++++++++++++++++++++-------------------- 2 files changed, 85 insertions(+), 99 deletions(-) diff --git a/src/nrniv/neuronapi.cpp b/src/nrniv/neuronapi.cpp index 4ab4a0c9be..80b8497552 100644 --- a/src/nrniv/neuronapi.cpp +++ b/src/nrniv/neuronapi.cpp @@ -1,44 +1,29 @@ +#include "neuronapi.h" + #include "../../nrnconf.h" +#include "hocdec.h" #include "nrniv_mf.h" #include "nrnmpi.h" #include "nrnmpiuse.h" #include "ocfunc.h" #include "ocjump.h" - #include "parse.hpp" - -#include "hocdec.h" #include "section.h" -// we define these here to allow the API to be independent of internal details -typedef enum { - STACK_IS_STR = 1, - STACK_IS_VAR = 2, - STACK_IS_NUM = 3, - STACK_IS_OBJVAR = 4, - STACK_IS_OBJTMP = 5, - STACK_IS_USERINT = 6, - STACK_IS_SYM = 7, - STACK_IS_OBJUNREF = 8, - STACK_UNKNOWN = -1 -} nrn_stack_types_t; - -typedef hoc_Item nrn_Item; - +/// A public face of hoc_Item +struct nrn_Item : public hoc_Item {}; -class SectionListIterator { - public: +struct SectionListIterator { SectionListIterator(nrn_Item*); Section* next(void); int done(void); private: - nrn_Item* initial; - nrn_Item* current; + hoc_Item* initial; + hoc_Item* current; }; -class SymbolTableIterator { - public: +struct SymbolTableIterator { SymbolTableIterator(Symlist*); char const* next(void); int done(void); @@ -92,7 +77,7 @@ void nrn_stdout_redirect(int (*myprint)(int, char*)) { Section* nrn_section_new(char const* const name) { // TODO: check for memory leaks; should we free the symbol, pitm, etc? Symbol* symbol = new Symbol; - auto pitm = new nrn_Item*; + auto pitm = new hoc_Item*; char* name_ptr = new char[strlen(name) + 1]; strcpy(name_ptr, name); symbol->name = name_ptr; @@ -112,7 +97,7 @@ void nrn_section_connect(Section* child_sec, double child_x, Section* parent_sec simpleconnectsection(); } -void nrn_section_length_set(Section* sec, double const length) { +void nrn_section_length_set(Section* sec, const double length) { // TODO: call can_change_morph(sec) to check pt3dconst_; how should we handle // that? // TODO: is there a named constant so we don't have to use the magic number 2? @@ -182,20 +167,20 @@ void nrn_segment_diam_set(Section* const sec, const double x, const double diam) } } -double nrn_rangevar_get(Symbol* const sym, Section const* const sec, double x) { +double nrn_rangevar_get(const Symbol* sym, const Section *const sec, double x) { return *nrn_rangepointer(const_cast(sec), const_cast(sym), x); } -void nrn_rangevar_set(Symbol* const sym, Section* const sec, double x, double value) { +void nrn_rangevar_set(Symbol* sym, Section *const sec, double x, double value) { *nrn_rangepointer(sec, sym, x) = value; } -void nrn_rangevar_push(Symbol* const sym, Section* const sec, double x) { +void nrn_rangevar_push(Symbol* sym, Section *const sec, double x) { hoc_push(nrn_rangepointer(sec, sym, x)); } nrn_Item* nrn_allsec(void) { - return section_list; + return static_cast(section_list); } nrn_Item* nrn_sectionlist_data(Object* obj) { @@ -341,7 +326,7 @@ void nrn_object_unref(Object* obj) { hoc_obj_unref(obj); } -char const* nrn_class_name(Object* obj) { +char const* nrn_class_name(const Object* obj) { return obj->ctemplate->sym->name; } @@ -500,7 +485,7 @@ void nrn_pp_property_array_set(Object* pp, const char* name, int i, double value ob2pntproc_0(pp)->prop->param_legacy(index + i) = value; } -void nrn_property_push(Object* obj, const char* name, double value) { +void nrn_property_push(Object* obj, const char* name) { auto sym = hoc_table_lookup(name, obj->ctemplate->symtable); if (!obj->ctemplate->is_point_) { hoc_pushs(sym); @@ -512,7 +497,7 @@ void nrn_property_push(Object* obj, const char* name, double value) { } } -void nrn_property_array_push(Object* obj, const char* name, int i, double value) { +void nrn_property_array_push(Object* obj, const char* name, int i) { auto sym = hoc_table_lookup(name, obj->ctemplate->symtable); if (!obj->ctemplate->is_point_) { hoc_pushs(sym); @@ -525,7 +510,7 @@ void nrn_property_array_push(Object* obj, const char* name, int i, double value) } } -char const* nrn_symbol_name(Symbol* sym) { +char const* nrn_symbol_name(const Symbol* sym) { return sym->name; } diff --git a/src/nrniv/neuronapi.h b/src/nrniv/neuronapi.h index abd72440e3..2068560a30 100644 --- a/src/nrniv/neuronapi.h +++ b/src/nrniv/neuronapi.h @@ -3,6 +3,8 @@ #ifdef __cplusplus extern "C" { #endif + +// forward declarations (c++) and opaque c types typedef struct Symbol Symbol; typedef struct Object Object; typedef struct Section Section; @@ -26,91 +28,90 @@ typedef enum { /**************************************** * Initialization ****************************************/ -int (*nrn_init)(int argc, const char** argv); -void (*nrn_stdout_redirect)(int (*myprint)(int, char*)); +int nrn_init(int argc, const char** argv); +void nrn_stdout_redirect(int (*myprint)(int, char*)); /**************************************** * Sections ****************************************/ -Section* (*nrn_section_new)(char const* name); -void (*nrn_section_connect)(Section* child_sec, - double child_x, - Section* parent_sec, - double parent_x); -void (*nrn_section_length_set)(Section* sec, double length); -double (*nrn_section_length_get)(Section const* sec); -double (*nrn_section_Ra_get)(Section const* sec); -void (*nrn_section_Ra_set)(Section* sec, double val); -char const* (*nrn_secname)(Section* sec); -void (*nrn_section_push)(Section* sec); -void (*nrn_section_pop)(void); -void (*nrn_mechanism_insert)(Section* sec, Symbol* mechanism); -nrn_Item* (*nrn_allsec)(void); -nrn_Item* (*nrn_sectionlist_data)(Object* obj); +Section* nrn_section_new(char const* name); +void nrn_section_connect(Section* child_sec, + double child_x, + Section* parent_sec, + double parent_x); +void nrn_section_length_set(Section* sec, double length); +double nrn_section_length_get(Section const* sec); +void nrn_section_Ra_set(Section* sec, double val); +char const* nrn_secname(Section* sec); +void nrn_section_push(Section* sec); +void nrn_section_pop(void); +void nrn_mechanism_insert(Section *sec, Symbol *mechanism); +nrn_Item* nrn_allsec(void); +nrn_Item* nrn_sectionlist_data(Object* obj); /**************************************** * Segments ****************************************/ -int (*nrn_nseg_get)(Section const* sec); -void (*nrn_nseg_set)(Section* sec, int nseg); -void (*nrn_segment_diam_set)(Section* sec, double x, double diam); -void (*nrn_rangevar_push)(Symbol* const sym, Section* const sec, double x); -double (*nrn_rangevar_get)(Symbol const* sym, Section const* sec, double x); -void (*nrn_rangevar_set)(Symbol const* sym, Section* sec, double x, double value); +int nrn_nseg_get(Section const* sec); +void nrn_nseg_set(Section * sec, int nseg); +void nrn_segment_diam_set(Section* sec, double x, double diam); +void nrn_rangevar_push(Symbol *sym, Section *sec, double x); +double nrn_rangevar_get(const Symbol *sym, const Section *sec, double x); +void nrn_rangevar_set(Symbol *sym, Section *sec, double x, double value); /**************************************** * Functions, objects, and the stack ****************************************/ -Symbol* (*nrn_symbol)(char const* name); -void (*nrn_symbol_push)(Symbol* sym); -int (*nrn_symbol_type)(Symbol* sym); +Symbol* nrn_symbol(char const* name); +void nrn_symbol_push(Symbol* sym); +int nrn_symbol_type(const Symbol* sym); // double* (*nrn_get_symbol_ptr)(Symbol* sym); -void (*nrn_double_push)(double val); -double (*nrn_double_pop)(void); -void (*nrn_double_ptr_push)(double* addr); -double* (*nrn_double_ptr_pop)(void); -void (*nrn_str_push)(char** str); -char** (*nrn_pop_str)(void); -void (*nrn_int_push)(int i); -int (*nrn_int_pop)(void); -void (*nrn_object_push)(Object* obj); -Object* (*nrn_object_pop)(void); -nrn_stack_types_t (*nrn_stack_type)(void); -char const* const (*nrn_stack_type_name)(nrn_stack_types_t id); -Object* (*nrn_object_new)(Symbol* sym, int narg); -Symbol* (*nrn_method_symbol)(Object* obj, char const* name); +void nrn_double_push(double val); +double nrn_double_pop(void); +void nrn_double_ptr_push(double* addr); +double* nrn_double_ptr_pop(void); +void nrn_str_push(char** str); +char** nrn_pop_str(void); +void nrn_int_push(int i); +int nrn_int_pop(void); +void nrn_object_push(Object* obj); +Object* nrn_object_pop(void); +nrn_stack_types_t nrn_stack_type(void); +char const* const nrn_stack_type_name(nrn_stack_types_t id); +Object* nrn_object_new(Symbol* sym, int narg); +Symbol* nrn_method_symbol(Object* obj, char const* name); // TODO: the next two functions throw exceptions in C++; need a version that // returns a bool success indicator instead (this is actually the // classic behavior of OcJump) -void (*nrn_method_call)(Object* obj, Symbol const* method_sym, int narg); -void (*nrn_function_call)(Symbol const* sym, int narg); -void (*nrn_object_ref)(Object* obj); -void (*nrn_object_unref)(Object* obj); -char const* (*nrn_class_name)(Object const* obj); +void nrn_method_call(Object* obj, Symbol* method_sym, int narg); +void nrn_function_call(Symbol* sym, int narg); +void nrn_object_ref(Object* obj); +void nrn_object_unref(Object* obj); +char const* nrn_class_name(Object const* obj); /**************************************** * Miscellaneous ****************************************/ -int (*nrn_hoc_call)(char const* command); -SectionListIterator* (*nrn_sectionlist_iterator_new)(nrn_Item* my_sectionlist); -void (*nrn_sectionlist_iterator_free)(SectionListIterator* sl); -Section* (*nrn_sectionlist_iterator_next)(SectionListIterator* sl); -int (*nrn_sectionlist_iterator_done)(SectionListIterator* sl); -SymbolTableIterator* (*nrn_symbol_table_iterator_new)(Symlist* my_symbol_table); -void (*nrn_symbol_table_iterator_free)(SymbolTableIterator* st); -char const* (*nrn_symbol_table_iterator_next)(SymbolTableIterator* st); -int (*nrn_symbol_table_iterator_done)(SymbolTableIterator* st); -int (*nrn_vector_capacity)(Object const* vec); -double* (*nrn_vector_data)(Object* vec); -double (*nrn_property_get)(Object const* obj, const char* name); -double (*nrn_property_array_get)(Object const* obj, const char* name, int i); -void (*nrn_property_set)(Object* obj, const char* name, double value); -void (*nrn_property_array_set)(Object* obj, const char* name, int i, double value); -void (*nrn_property_push)(Object* obj, const char* name); -void (*nrn_property_array_push)(Object* obj, const char* name, int i); -char const* (*nrn_symbol_name)(Symbol const* sym); -Symlist* (*nrn_symbol_table)(Symbol* sym); -Symlist* (*nrn_global_symbol_table)(void); +int nrn_hoc_call(char const* command); +SectionListIterator* nrn_sectionlist_iterator_new(nrn_Item* my_sectionlist); +void nrn_sectionlist_iterator_free(SectionListIterator* sl); +Section* nrn_sectionlist_iterator_next(SectionListIterator* sl); +int nrn_sectionlist_iterator_done(SectionListIterator* sl); +SymbolTableIterator* nrn_symbol_table_iterator_new(Symlist* my_symbol_table); +void nrn_symbol_table_iterator_free(SymbolTableIterator* st); +char const* nrn_symbol_table_iterator_next(SymbolTableIterator* st); +int nrn_symbol_table_iterator_done(SymbolTableIterator* st); +int nrn_vector_capacity(const Object* vec); +double* nrn_vector_data(Object* vec); +double nrn_property_get(const Object* obj, const char *name); +double nrn_property_array_get(const Object* obj, const char *name, int i); +void nrn_property_set(Object* obj, const char *name, double value); +void nrn_property_array_set(Object *obj, const char* name, int i, double value); +void nrn_property_push(Object* obj, const char* name); +void nrn_property_array_push(Object* obj, const char* name, int i); +char const* nrn_symbol_name(const Symbol* sym); +Symlist* nrn_symbol_table(Symbol* sym); +Symlist* nrn_global_symbol_table(void); // TODO: need shapeplot information extraction #ifdef __cplusplus From 8f9eff023b30c1a388482abad5f41883e21dd9a9 Mon Sep 17 00:00:00 2001 From: Fernando Pereira Date: Wed, 13 Dec 2023 22:15:03 +0100 Subject: [PATCH 46/65] Make tests link against nrniv_lib, no dlopen --- src/nrniv/neuronapi.cpp | 8 ++++---- src/nrniv/neuronapi.h | 23 ++++++++++------------ test/api/CMakeLists.txt | 16 +-------------- test/api/hh_sim.cpp | 42 ---------------------------------------- test/api/netcon.cpp | 34 ++------------------------------ test/api/sections.c | 37 ----------------------------------- test/api/vclamp.cpp | 43 ----------------------------------------- 7 files changed, 17 insertions(+), 186 deletions(-) diff --git a/src/nrniv/neuronapi.cpp b/src/nrniv/neuronapi.cpp index 80b8497552..33b10fce01 100644 --- a/src/nrniv/neuronapi.cpp +++ b/src/nrniv/neuronapi.cpp @@ -11,7 +11,7 @@ #include "section.h" /// A public face of hoc_Item -struct nrn_Item : public hoc_Item {}; +struct nrn_Item: public hoc_Item {}; struct SectionListIterator { SectionListIterator(nrn_Item*); @@ -167,15 +167,15 @@ void nrn_segment_diam_set(Section* const sec, const double x, const double diam) } } -double nrn_rangevar_get(const Symbol* sym, const Section *const sec, double x) { +double nrn_rangevar_get(const Symbol* sym, const Section* const sec, double x) { return *nrn_rangepointer(const_cast(sec), const_cast(sym), x); } -void nrn_rangevar_set(Symbol* sym, Section *const sec, double x, double value) { +void nrn_rangevar_set(Symbol* sym, Section* const sec, double x, double value) { *nrn_rangepointer(sec, sym, x) = value; } -void nrn_rangevar_push(Symbol* sym, Section *const sec, double x) { +void nrn_rangevar_push(Symbol* sym, Section* const sec, double x) { hoc_push(nrn_rangepointer(sec, sym, x)); } diff --git a/src/nrniv/neuronapi.h b/src/nrniv/neuronapi.h index 2068560a30..82d6157753 100644 --- a/src/nrniv/neuronapi.h +++ b/src/nrniv/neuronapi.h @@ -35,17 +35,14 @@ void nrn_stdout_redirect(int (*myprint)(int, char*)); * Sections ****************************************/ Section* nrn_section_new(char const* name); -void nrn_section_connect(Section* child_sec, - double child_x, - Section* parent_sec, - double parent_x); +void nrn_section_connect(Section* child_sec, double child_x, Section* parent_sec, double parent_x); void nrn_section_length_set(Section* sec, double length); double nrn_section_length_get(Section const* sec); void nrn_section_Ra_set(Section* sec, double val); char const* nrn_secname(Section* sec); void nrn_section_push(Section* sec); void nrn_section_pop(void); -void nrn_mechanism_insert(Section *sec, Symbol *mechanism); +void nrn_mechanism_insert(Section* sec, Symbol* mechanism); nrn_Item* nrn_allsec(void); nrn_Item* nrn_sectionlist_data(Object* obj); @@ -53,11 +50,11 @@ nrn_Item* nrn_sectionlist_data(Object* obj); * Segments ****************************************/ int nrn_nseg_get(Section const* sec); -void nrn_nseg_set(Section * sec, int nseg); +void nrn_nseg_set(Section* sec, int nseg); void nrn_segment_diam_set(Section* sec, double x, double diam); -void nrn_rangevar_push(Symbol *sym, Section *sec, double x); -double nrn_rangevar_get(const Symbol *sym, const Section *sec, double x); -void nrn_rangevar_set(Symbol *sym, Section *sec, double x, double value); +void nrn_rangevar_push(Symbol* sym, Section* sec, double x); +double nrn_rangevar_get(const Symbol* sym, const Section* sec, double x); +void nrn_rangevar_set(Symbol* sym, Section* sec, double x, double value); /**************************************** * Functions, objects, and the stack @@ -103,10 +100,10 @@ char const* nrn_symbol_table_iterator_next(SymbolTableIterator* st); int nrn_symbol_table_iterator_done(SymbolTableIterator* st); int nrn_vector_capacity(const Object* vec); double* nrn_vector_data(Object* vec); -double nrn_property_get(const Object* obj, const char *name); -double nrn_property_array_get(const Object* obj, const char *name, int i); -void nrn_property_set(Object* obj, const char *name, double value); -void nrn_property_array_set(Object *obj, const char* name, int i, double value); +double nrn_property_get(const Object* obj, const char* name); +double nrn_property_array_get(const Object* obj, const char* name, int i); +void nrn_property_set(Object* obj, const char* name, double value); +void nrn_property_array_set(Object* obj, const char* name, int i, double value); void nrn_property_push(Object* obj, const char* name); void nrn_property_array_push(Object* obj, const char* name, int i); char const* nrn_symbol_name(const Symbol* sym); diff --git a/test/api/CMakeLists.txt b/test/api/CMakeLists.txt index a5c843450c..b6ab8c0e13 100644 --- a/test/api/CMakeLists.txt +++ b/test/api/CMakeLists.txt @@ -7,6 +7,7 @@ foreach(api_test_file hh_sim.cpp netcon.cpp sections.c vclamp.cpp) add_executable(${api_test_name} ${api_test_file}) cpp_cc_configure_sanitizers(TARGET ${api_test_name}) target_link_libraries(${api_test_name} ${CMAKE_DL_LIBS}) + target_link_libraries(${api_test_name} nrniv_lib) target_link_options(${api_test_name} PRIVATE -rdynamic) set(test_name "api::${api_test_name}") add_test(NAME "${test_name}" COMMAND ${api_test_name}) @@ -18,18 +19,3 @@ foreach(api_test_file hh_sim.cpp netcon.cpp sections.c vclamp.cpp) set_tests_properties("${test_name}::comparison" PROPERTIES DEPENDS "${test_name}") endif() endforeach() - -# The netcon.cpp file is a test of doing: -# ~~~ -# extern "C" void foo(); // no definition of this is linked -# int main() { -# ... = dlopen("libnrniv...", ...); // loads definition of foo() -# foo(); -# } -# ~~~ -# which requires special options to allow an executable with undefined symbols to be linked. -if(APPLE) - target_link_options(netcon_cpp PRIVATE -undefined dynamic_lookup) -else() - target_link_options(netcon_cpp PRIVATE -Wl,--unresolved-symbols=ignore-all) -endif() diff --git a/test/api/hh_sim.cpp b/test/api/hh_sim.cpp index 92a6a359ac..0f98141318 100644 --- a/test/api/hh_sim.cpp +++ b/test/api/hh_sim.cpp @@ -15,47 +15,6 @@ static const char* argv[] = {"hh_sim", "-nogui", "-nopython", nullptr}; extern "C" void modl_reg(){}; -void setup_neuron_api(void) { - void* handle = dlopen("libnrniv.dylib", RTLD_NOW | RTLD_LOCAL); - if (!handle) { - handle = dlopen("libnrniv.so", RTLD_NOW | RTLD_LOCAL); - if (!handle) { - cout << "Couldn't open NEURON library." << endl << dlerror() << endl; - exit(-1); - } - } - nrn_init = reinterpret_cast(dlsym(handle, "nrn_init")); - assert(nrn_init); - nrn_str_push = reinterpret_cast(dlsym(handle, "nrn_str_push")); - nrn_function_call = reinterpret_cast( - dlsym(handle, "nrn_function_call")); - nrn_symbol = reinterpret_cast(dlsym(handle, "nrn_symbol")); - nrn_double_pop = reinterpret_cast(dlsym(handle, "nrn_double_pop")); - nrn_section_push = reinterpret_cast( - dlsym(handle, "nrn_section_push")); - nrn_section_new = reinterpret_cast(dlsym(handle, "nrn_section_new")); - nrn_nseg_set = reinterpret_cast(dlsym(handle, "nrn_nseg_set")); - nrn_mechanism_insert = reinterpret_cast( - dlsym(handle, "nrn_mechanism_insert")); - nrn_double_push = reinterpret_cast(dlsym(handle, "nrn_double_push")); - nrn_object_new = reinterpret_cast(dlsym(handle, "nrn_object_new")); - nrn_rangevar_push = reinterpret_cast( - dlsym(handle, "nrn_rangevar_push")); - nrn_method_call = reinterpret_cast(dlsym(handle, "nrn_method_call")); - nrn_object_unref = reinterpret_cast( - dlsym(handle, "nrn_object_unref")); - nrn_vector_capacity = reinterpret_cast( - dlsym(handle, "nrn_vector_capacity")); - nrn_vector_data = reinterpret_cast(dlsym(handle, "nrn_vector_data")); - nrn_method_symbol = reinterpret_cast( - dlsym(handle, "nrn_method_symbol")); - nrn_method_call = reinterpret_cast(dlsym(handle, "nrn_method_call")); - nrn_object_pop = reinterpret_cast(dlsym(handle, "nrn_object_pop")); - nrn_symbol_push = reinterpret_cast(dlsym(handle, "nrn_symbol_push")); - nrn_property_set = reinterpret_cast( - dlsym(handle, "nrn_property_set")); -} - int main(void) { Section* soma; Object* iclamp; @@ -63,7 +22,6 @@ int main(void) { Object* t; char* temp_str; - setup_neuron_api(); nrn_init(3, argv); // load the stdrun library diff --git a/test/api/netcon.cpp b/test/api/netcon.cpp index 04bcf49d70..5d11f87bd8 100644 --- a/test/api/netcon.cpp +++ b/test/api/netcon.cpp @@ -3,43 +3,13 @@ #include #include #include +#include "neuronapi.h" + using std::cout; using std::endl; using std::ofstream; -typedef struct Symbol Symbol; -typedef struct Object Object; -typedef struct Section Section; -typedef struct SectionListIterator SectionListIterator; -typedef struct nrn_Item nrn_Item; -typedef struct SymbolTableIterator SymbolTableIterator; -typedef struct Symlist Symlist; - -extern "C" { -int nrn_init(int argc, const char** argv); -void nrn_str_push(char** str); -void nrn_function_call(Symbol* sym, int narg); -double nrn_double_pop(void); -Section* nrn_section_new(char const* const name); -Symbol* nrn_symbol(char const* const name); -void nrn_mechanism_insert(Section* sec, Symbol* mechanism); -Object* nrn_object_new(Symbol* sym, int narg); -void nrn_method_call(Object* obj, Symbol* method_sym, int narg); -void nrn_property_set(Object* obj, const char* name, double value); -void nrn_property_array_set(Object* obj, const char* name, int i, double value); -void nrn_double_push(double val); -void nrn_object_push(Object* obj); -Symbol* nrn_method_symbol(Object* obj, char const* const name); -Object* nrn_object_pop(void); -void nrn_object_unref(Object* obj); -double* nrn_vector_data(Object* vec); -int nrn_vector_capacity(Object* vec); -double* nrn_symbol_ptr(Symbol* sym); -void nrn_rangevar_push(Symbol* const sym, Section* const sec, double x); -void nrn_symbol_push(Symbol* sym); -} - static const char* argv[] = {"netcon", "-nogui", "-nopython", nullptr}; extern "C" void modl_reg(){}; diff --git a/test/api/sections.c b/test/api/sections.c index 1ad6d5a837..27e230b53a 100644 --- a/test/api/sections.c +++ b/test/api/sections.c @@ -9,44 +9,7 @@ static const char* argv[] = {"sections", "-nogui", "-nopython", NULL}; void modl_reg(){}; -void setup_neuron_api(void) { - void* handle = dlopen("libnrniv.dylib", RTLD_NOW | RTLD_LOCAL); - if (!handle) { - handle = dlopen("libnrniv.so", RTLD_NOW | RTLD_LOCAL); - if (!handle) { - printf("Couldn't open NEURON library.\n%s\n", dlerror()); - exit(-1); - } - } - nrn_init = (int (*)(int, const char**))(dlsym(handle, "nrn_init")); - assert(nrn_init); /* NOTE: this function only exists in versions of NEURON with the API defined - */ - nrn_section_new = (Section * (*) (char const*) )(dlsym(handle, "nrn_section_new")); - nrn_section_connect = (void (*)(Section*, double, Section*, double))( - dlsym(handle, "nrn_section_connect")); - nrn_nseg_set = (void (*)(Section*, int))(dlsym(handle, "nrn_nseg_set")); - nrn_function_call = (void (*)(Symbol const*, int))(dlsym(handle, "nrn_function_call")); - nrn_symbol = (Symbol * (*) (char const*) )(dlsym(handle, "nrn_symbol")); - nrn_object_new = (Object * (*) (Symbol*, int) )(dlsym(handle, "nrn_object_new")); - nrn_section_push = (void (*)(Section*))(dlsym(handle, "nrn_section_push")); - nrn_section_pop = (void (*)(void))(dlsym(handle, "nrn_section_pop")); - nrn_method_symbol = (Symbol * (*) (Object*, char const*) )(dlsym(handle, "nrn_method_symbol")); - nrn_method_call = (void (*)(Object*, Symbol const*, int))(dlsym(handle, "nrn_method_call")); - nrn_sectionlist_iterator_new = (SectionListIterator * (*) (nrn_Item*) )( - dlsym(handle, "nrn_sectionlist_iterator_new")); - nrn_allsec = (nrn_Item * (*) (void) )(dlsym(handle, "nrn_allsec")); - nrn_sectionlist_iterator_done = (int (*)(SectionListIterator*))( - dlsym(handle, "nrn_sectionlist_iterator_done")); - nrn_sectionlist_iterator_next = (Section * (*) (SectionListIterator*) )( - dlsym(handle, "nrn_sectionlist_iterator_next")); - nrn_sectionlist_iterator_free = (void (*)(SectionListIterator*))( - dlsym(handle, "nrn_sectionlist_iterator_free")); - nrn_secname = (char const* (*) (Section*) )(dlsym(handle, "nrn_secname")); - nrn_sectionlist_data = (nrn_Item * (*) (Object*) )(dlsym(handle, "nrn_sectionlist_data")); -} - int main(void) { - setup_neuron_api(); nrn_init(3, argv); // topology diff --git a/test/api/vclamp.cpp b/test/api/vclamp.cpp index 1cb82c304f..617339b169 100644 --- a/test/api/vclamp.cpp +++ b/test/api/vclamp.cpp @@ -15,48 +15,6 @@ static const char* argv[] = {"vclamp", "-nogui", "-nopython", nullptr}; extern "C" void modl_reg(){}; -void setup_neuron_api(void) { - void* handle = dlopen("libnrniv.dylib", RTLD_NOW | RTLD_LOCAL); - if (!handle) { - handle = dlopen("libnrniv.so", RTLD_NOW | RTLD_LOCAL); - if (!handle) { - cout << "Couldn't open NEURON library." << endl << dlerror() << endl; - exit(-1); - } - } - nrn_init = reinterpret_cast(dlsym(handle, "nrn_init")); - assert(nrn_init); - nrn_str_push = reinterpret_cast(dlsym(handle, "nrn_str_push")); - nrn_function_call = reinterpret_cast( - dlsym(handle, "nrn_function_call")); - nrn_symbol = reinterpret_cast(dlsym(handle, "nrn_symbol")); - nrn_double_pop = reinterpret_cast(dlsym(handle, "nrn_double_pop")); - nrn_section_push = reinterpret_cast( - dlsym(handle, "nrn_section_push")); - nrn_section_new = reinterpret_cast(dlsym(handle, "nrn_section_new")); - nrn_double_push = reinterpret_cast(dlsym(handle, "nrn_double_push")); - nrn_object_new = reinterpret_cast(dlsym(handle, "nrn_object_new")); - nrn_property_array_set = reinterpret_cast( - dlsym(handle, "nrn_property_array_set")); - nrn_rangevar_push = reinterpret_cast( - dlsym(handle, "nrn_rangevar_push")); - nrn_method_call = reinterpret_cast(dlsym(handle, "nrn_method_call")); - nrn_object_unref = reinterpret_cast( - dlsym(handle, "nrn_object_unref")); - nrn_vector_capacity = reinterpret_cast( - dlsym(handle, "nrn_vector_capacity")); - nrn_vector_data = reinterpret_cast(dlsym(handle, "nrn_vector_data")); - nrn_method_symbol = reinterpret_cast( - dlsym(handle, "nrn_method_symbol")); - nrn_method_call = reinterpret_cast(dlsym(handle, "nrn_method_call")); - nrn_object_pop = reinterpret_cast(dlsym(handle, "nrn_object_pop")); - nrn_symbol_push = reinterpret_cast(dlsym(handle, "nrn_symbol_push")); - nrn_section_length_set = reinterpret_cast( - dlsym(handle, "nrn_section_length_set")); - nrn_segment_diam_set = reinterpret_cast( - dlsym(handle, "nrn_segment_diam_set")); -} - int main(void) { Section* soma; Object* vclamp; @@ -64,7 +22,6 @@ int main(void) { Object* t; char* temp_str; - setup_neuron_api(); nrn_init(3, argv); // load the stdrun library From f662ba17c0ba6f8906d35286c9f9730ab5623075 Mon Sep 17 00:00:00 2001 From: Fernando Pereira Date: Thu, 14 Dec 2023 14:56:05 +0100 Subject: [PATCH 47/65] Address sonar lint reservations --- src/nrniv/neuronapi.cpp | 4 +--- test/api/hh_sim.cpp | 20 +++++++------------- test/api/netcon.cpp | 16 +--------------- test/api/vclamp.cpp | 17 ++++++++--------- 4 files changed, 17 insertions(+), 40 deletions(-) diff --git a/src/nrniv/neuronapi.cpp b/src/nrniv/neuronapi.cpp index 33b10fce01..be627be76b 100644 --- a/src/nrniv/neuronapi.cpp +++ b/src/nrniv/neuronapi.cpp @@ -78,9 +78,7 @@ Section* nrn_section_new(char const* const name) { // TODO: check for memory leaks; should we free the symbol, pitm, etc? Symbol* symbol = new Symbol; auto pitm = new hoc_Item*; - char* name_ptr = new char[strlen(name) + 1]; - strcpy(name_ptr, name); - symbol->name = name_ptr; + symbol->name = strdup(name); symbol->type = 1; symbol->u.oboff = 0; symbol->arayinfo = 0; diff --git a/test/api/hh_sim.cpp b/test/api/hh_sim.cpp index 0f98141318..c54ccec104 100644 --- a/test/api/hh_sim.cpp +++ b/test/api/hh_sim.cpp @@ -25,32 +25,26 @@ int main(void) { nrn_init(3, argv); // load the stdrun library - temp_str = new char[11]; - strcpy(temp_str, "stdrun.hoc"); + temp_str = strdup("stdrun.hoc"); nrn_str_push(&temp_str); nrn_function_call(nrn_symbol("load_file"), 1); nrn_double_pop(); delete[] temp_str; - // topology soma = nrn_section_new("soma"); nrn_nseg_set(soma, 3); // define soma morphology with two 3d points nrn_section_push(soma); - // (0, 0, 0, 10) - nrn_double_push(0); - nrn_double_push(0); - nrn_double_push(0); - nrn_double_push(10); + for (double x: {0, 0, 0, 10}) { + nrn_double_push(x); + } nrn_function_call(nrn_symbol("pt3dadd"), 4); nrn_double_pop(); // pt3dadd returns a number - // (10, 0, 0, 10) - nrn_double_push(10); - nrn_double_push(0); - nrn_double_push(0); - nrn_double_push(10); + for (double x: {10, 0, 0, 10}) { + nrn_double_push(x); + } nrn_function_call(nrn_symbol("pt3dadd"), 4); nrn_double_pop(); // pt3dadd returns a number diff --git a/test/api/netcon.cpp b/test/api/netcon.cpp index 5d11f87bd8..c499294251 100644 --- a/test/api/netcon.cpp +++ b/test/api/netcon.cpp @@ -19,27 +19,15 @@ int main(void) { Object* t; char* temp_str; - // Note: cannot use RTLD_LOCAL here - void* handle = dlopen("libnrniv.dylib", RTLD_NOW); - if (!handle) { - handle = dlopen("libnrniv.so", RTLD_NOW); - if (!handle) { - cout << "Couldn't open NEURON library." << endl << dlerror() << endl; - exit(-1); - } - } - nrn_init(3, argv); // load the stdrun library - temp_str = new char[11]; - strcpy(temp_str, "stdrun.hoc"); + temp_str = strdup("stdrun.hoc"); nrn_str_push(&temp_str); nrn_function_call(nrn_symbol("load_file"), 1); nrn_double_pop(); delete[] temp_str; - // topology auto soma = nrn_section_new("soma"); @@ -102,6 +90,4 @@ int main(void) { } out_file.close(); cout << "Results saved to netcon.csv" << endl; - - dlclose(handle); } \ No newline at end of file diff --git a/test/api/vclamp.cpp b/test/api/vclamp.cpp index 617339b169..fe63c71a87 100644 --- a/test/api/vclamp.cpp +++ b/test/api/vclamp.cpp @@ -25,8 +25,8 @@ int main(void) { nrn_init(3, argv); // load the stdrun library - temp_str = new char[11]; - strcpy(temp_str, "stdrun.hoc"); + + temp_str = strdup("stdrun.hoc"); nrn_str_push(&temp_str); nrn_function_call(nrn_symbol("load_file"), 1); nrn_double_pop(); @@ -47,13 +47,12 @@ int main(void) { nrn_double_push(0.5); vclamp = nrn_object_new(nrn_symbol("VClamp"), 1); // 0 mV for 1 ms; 10 mV for the next 2 ms; 5 mV for the next 3 ms - nrn_property_array_set(vclamp, "amp", 0, 0); - nrn_property_array_set(vclamp, "amp", 1, 10); - nrn_property_array_set(vclamp, "amp", 2, 5); - nrn_property_array_set(vclamp, "dur", 0, 1); - nrn_property_array_set(vclamp, "dur", 1, 2); - nrn_property_array_set(vclamp, "dur", 2, 3); - + int i = 0; + for (auto& [amp, dur]: {std::pair{0, 1}, {10, 2}, {5, 3}}) { + nrn_property_array_set(vclamp, "amp", i, amp); + nrn_property_array_set(vclamp, "dur", i, dur); + ++i; + } // setup recording v = nrn_object_new(nrn_symbol("Vector"), 0); nrn_rangevar_push(nrn_symbol("v"), soma, 0.5); From a328651fbfa4dfbb54cde62de045b706a6b0a184 Mon Sep 17 00:00:00 2001 From: Fernando Pereira Date: Fri, 15 Dec 2023 19:50:43 +0100 Subject: [PATCH 48/65] Make comparisons be part of the test and account for fp innacuraciesa --- test/api/CMakeLists.txt | 10 ++------ test/api/hh_sim.cpp | 14 +++++------ test/api/netcon.cpp | 13 +++++----- test/api/test_common.h | 56 +++++++++++++++++++++++++++++++++++++++++ test/api/vclamp.cpp | 14 +++++------ 5 files changed, 76 insertions(+), 31 deletions(-) create mode 100644 test/api/test_common.h diff --git a/test/api/CMakeLists.txt b/test/api/CMakeLists.txt index b6ab8c0e13..f073f7f931 100644 --- a/test/api/CMakeLists.txt +++ b/test/api/CMakeLists.txt @@ -1,7 +1,6 @@ # These produce reference files called hh_sim.csv and so on -set(api_tests_with_reference_files hh_sim.cpp netcon.cpp vclamp.cpp) -set(api_tests_without_reference_files sections.c) set(api_tests ${api_tests_with_reference_files} ${api_tests_without_reference_files}) + foreach(api_test_file hh_sim.cpp netcon.cpp sections.c vclamp.cpp) string(REPLACE "." "_" api_test_name "${api_test_file}") add_executable(${api_test_name} ${api_test_file}) @@ -9,13 +8,8 @@ foreach(api_test_file hh_sim.cpp netcon.cpp sections.c vclamp.cpp) target_link_libraries(${api_test_name} ${CMAKE_DL_LIBS}) target_link_libraries(${api_test_name} nrniv_lib) target_link_options(${api_test_name} PRIVATE -rdynamic) + set(test_name "api::${api_test_name}") add_test(NAME "${test_name}" COMMAND ${api_test_name}) set_property(TEST "${test_name}" PROPERTY ENVIRONMENT "${NRN_RUN_FROM_BUILD_DIR_ENV}") - if(api_test_file IN_LIST api_tests_with_reference_files) - get_filename_component(basename "${api_test_file}" NAME_WLE) - add_test(NAME "${test_name}::comparison" - COMMAND diff ${basename}.csv ${CMAKE_CURRENT_SOURCE_DIR}/ref/${basename}.csv) - set_tests_properties("${test_name}::comparison" PROPERTIES DEPENDS "${test_name}") - endif() endforeach() diff --git a/test/api/hh_sim.cpp b/test/api/hh_sim.cpp index c54ccec104..e4ebd72766 100644 --- a/test/api/hh_sim.cpp +++ b/test/api/hh_sim.cpp @@ -7,6 +7,8 @@ #include #include +#include "./test_common.h" + using std::cout; using std::endl; using std::ofstream; @@ -78,13 +80,9 @@ int main(void) { nrn_function_call(nrn_symbol("continuerun"), 1); nrn_double_pop(); - double* tvec = nrn_vector_data(t); - double* vvec = nrn_vector_data(v); - ofstream out_file; - out_file.open("hh_sim.csv"); - for (auto i = 0; i < nrn_vector_capacity(t); i++) { - out_file << tvec[i] << "," << vvec[i] << endl; + long n_voltages = nrn_vector_capacity(t); + if (compare_spikes("hh_sim.csv", nrn_vector_data(t), nrn_vector_data(v), n_voltages)) { + return 0; } - out_file.close(); - cout << "Results saved to hh_sim.csv" << endl; + return 1; } \ No newline at end of file diff --git a/test/api/netcon.cpp b/test/api/netcon.cpp index c499294251..b572d8e325 100644 --- a/test/api/netcon.cpp +++ b/test/api/netcon.cpp @@ -4,7 +4,7 @@ #include #include #include "neuronapi.h" - +#include "./test_common.h" using std::cout; using std::endl; @@ -83,11 +83,10 @@ int main(void) { double* tvec = nrn_vector_data(t); double* vvec = nrn_vector_data(v); - ofstream out_file; - out_file.open("netcon.csv"); - for (auto i = 0; i < nrn_vector_capacity(t); i++) { - out_file << tvec[i] << "," << vvec[i] << endl; + + long n_voltages = nrn_vector_capacity(t); + if (compare_spikes("netcon.csv", nrn_vector_data(t), nrn_vector_data(v), n_voltages)) { + return 0; } - out_file.close(); - cout << "Results saved to netcon.csv" << endl; + return 1; } \ No newline at end of file diff --git a/test/api/test_common.h b/test/api/test_common.h new file mode 100644 index 0000000000..50d2f7d0bc --- /dev/null +++ b/test/api/test_common.h @@ -0,0 +1,56 @@ +#ifdef __cplusplus + +#include +#include +#include + +constexpr double EPSILON = 1.0 / 4096; + +bool almost_equal(double a, double b) { + return std::fabs(a - b) < EPSILON; +} + +/// @brief Compared volatges from a csv file against raw vectors of tvec and voltage +/// @param ref_csv +/// @param tvec +/// @param vvec +/// @param n_spikes +/// @return +bool compare_spikes(const char* ref_csv, double* tvec, double* vvec, long n_voltages) { + std::ifstream ref_file(ref_csv); + if (!ref_file.is_open()) { + std::cerr << "Bad ref file: " << ref_csv << std::endl; + return false; + } + + std::string line; + long cur_line = 0; + + while (std::getline(ref_file, line) && cur_line < n_voltages) { + size_t end; + auto tref = std::stod(line, &end); + auto vref = std::strtof(line.c_str() + end + 1, NULL); + // ref values have exponent around 0, so we compare absolute values + // and our epsilon is relatively large + if (!almost_equal(tvec[cur_line], tref)) { + std::cerr << "DIFF at line " << cur_line << ": " << tvec[cur_line] << "!=" << tref + << std::endl; + return false; + } + if (!almost_equal(vvec[cur_line], vref)) { + std::cerr << "DIFF at line " << cur_line << ": " << vvec[cur_line] << "!=" << vref + << std::endl; + return false; + } + ++cur_line; + } + + if (cur_line != n_voltages) { + std::cerr << "Unexpected array length: " << cur_line << " (Ref: " << cur_line << ')' + << std::endl; + return false; + } + + return true; +} +#endif \ No newline at end of file diff --git a/test/api/vclamp.cpp b/test/api/vclamp.cpp index fe63c71a87..581375854f 100644 --- a/test/api/vclamp.cpp +++ b/test/api/vclamp.cpp @@ -7,6 +7,8 @@ #include #include +#include "./test_common.h" + using std::cout; using std::endl; using std::ofstream; @@ -73,13 +75,9 @@ int main(void) { nrn_function_call(nrn_symbol("continuerun"), 1); nrn_double_pop(); - double* tvec = nrn_vector_data(t); - double* vvec = nrn_vector_data(v); - ofstream out_file; - out_file.open("vclamp.csv"); - for (auto i = 0; i < nrn_vector_capacity(t); i++) { - out_file << tvec[i] << "," << vvec[i] << endl; + long n_voltages = nrn_vector_capacity(t); + if (compare_spikes("vclamp.csv", nrn_vector_data(t), nrn_vector_data(v), n_voltages)) { + return 0; } - out_file.close(); - cout << "Results saved to vclamp.csv" << endl; + return 1; } \ No newline at end of file From 000178d4139274ed268d52e5806b07d11fc6cedd Mon Sep 17 00:00:00 2001 From: Fernando Pereira Date: Sat, 16 Dec 2023 20:14:53 +0100 Subject: [PATCH 49/65] Tests to find ref files --- test/api/CMakeLists.txt | 6 ++---- test/api/hh_sim.cpp | 3 ++- test/api/netcon.cpp | 6 ++---- test/api/test_common.h | 2 +- test/api/vclamp.cpp | 3 ++- 5 files changed, 9 insertions(+), 11 deletions(-) diff --git a/test/api/CMakeLists.txt b/test/api/CMakeLists.txt index f073f7f931..c21f5fd41a 100644 --- a/test/api/CMakeLists.txt +++ b/test/api/CMakeLists.txt @@ -1,6 +1,3 @@ -# These produce reference files called hh_sim.csv and so on -set(api_tests ${api_tests_with_reference_files} ${api_tests_without_reference_files}) - foreach(api_test_file hh_sim.cpp netcon.cpp sections.c vclamp.cpp) string(REPLACE "." "_" api_test_name "${api_test_file}") add_executable(${api_test_name} ${api_test_file}) @@ -11,5 +8,6 @@ foreach(api_test_file hh_sim.cpp netcon.cpp sections.c vclamp.cpp) set(test_name "api::${api_test_name}") add_test(NAME "${test_name}" COMMAND ${api_test_name}) - set_property(TEST "${test_name}" PROPERTY ENVIRONMENT "${NRN_RUN_FROM_BUILD_DIR_ENV}") + set_property(TEST "${test_name}" PROPERTY ENVIRONMENT "${NRN_RUN_FROM_BUILD_DIR_ENV}" + "CURRENT_SOURCE_DIR=${CMAKE_CURRENT_SOURCE_DIR}") endforeach() diff --git a/test/api/hh_sim.cpp b/test/api/hh_sim.cpp index e4ebd72766..954213bf58 100644 --- a/test/api/hh_sim.cpp +++ b/test/api/hh_sim.cpp @@ -81,7 +81,8 @@ int main(void) { nrn_double_pop(); long n_voltages = nrn_vector_capacity(t); - if (compare_spikes("hh_sim.csv", nrn_vector_data(t), nrn_vector_data(v), n_voltages)) { + auto ref_file = std::string(std::getenv("CURRENT_SOURCE_DIR")) + "/ref/hh_sim.csv"; + if (compare_spikes(ref_file.c_str(), nrn_vector_data(t), nrn_vector_data(v), n_voltages)) { return 0; } return 1; diff --git a/test/api/netcon.cpp b/test/api/netcon.cpp index b572d8e325..f33a7ad24c 100644 --- a/test/api/netcon.cpp +++ b/test/api/netcon.cpp @@ -81,11 +81,9 @@ int main(void) { nrn_function_call(nrn_symbol("continuerun"), 1); nrn_double_pop(); - double* tvec = nrn_vector_data(t); - double* vvec = nrn_vector_data(v); - long n_voltages = nrn_vector_capacity(t); - if (compare_spikes("netcon.csv", nrn_vector_data(t), nrn_vector_data(v), n_voltages)) { + auto ref_file = std::string(std::getenv("CURRENT_SOURCE_DIR")) + "/ref/netcon.csv"; + if (compare_spikes(ref_file.c_str(), nrn_vector_data(t), nrn_vector_data(v), n_voltages)) { return 0; } return 1; diff --git a/test/api/test_common.h b/test/api/test_common.h index 50d2f7d0bc..3b2b05a0c2 100644 --- a/test/api/test_common.h +++ b/test/api/test_common.h @@ -4,7 +4,7 @@ #include #include -constexpr double EPSILON = 1.0 / 4096; +constexpr double EPSILON = 1.0 / 1024; bool almost_equal(double a, double b) { return std::fabs(a - b) < EPSILON; diff --git a/test/api/vclamp.cpp b/test/api/vclamp.cpp index 581375854f..3cb2a2929f 100644 --- a/test/api/vclamp.cpp +++ b/test/api/vclamp.cpp @@ -76,7 +76,8 @@ int main(void) { nrn_double_pop(); long n_voltages = nrn_vector_capacity(t); - if (compare_spikes("vclamp.csv", nrn_vector_data(t), nrn_vector_data(v), n_voltages)) { + auto ref_file = std::string(std::getenv("CURRENT_SOURCE_DIR")) + "/ref/vclamp.csv"; + if (compare_spikes(ref_file.c_str(), nrn_vector_data(t), nrn_vector_data(v), n_voltages)) { return 0; } return 1; From ab1b15231fdfc3ea9d281a968f90679339bb9f8c Mon Sep 17 00:00:00 2001 From: Fernando Pereira Date: Tue, 19 Dec 2023 00:56:54 +0100 Subject: [PATCH 50/65] api: Make tests resilient to accumulated errors --- test/api/test_common.h | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/test/api/test_common.h b/test/api/test_common.h index 3b2b05a0c2..026a30fda1 100644 --- a/test/api/test_common.h +++ b/test/api/test_common.h @@ -6,16 +6,15 @@ constexpr double EPSILON = 1.0 / 1024; -bool almost_equal(double a, double b) { - return std::fabs(a - b) < EPSILON; +/// Compare two doubles. Mitigate accumulated errors by updating a drift +inline bool almost_equal(double a, double b, double* drift) { + double diff = b - a; + bool is_ok = std::fabs(diff - *drift) < EPSILON; + *drift = diff; + return is_ok; } /// @brief Compared volatges from a csv file against raw vectors of tvec and voltage -/// @param ref_csv -/// @param tvec -/// @param vvec -/// @param n_spikes -/// @return bool compare_spikes(const char* ref_csv, double* tvec, double* vvec, long n_voltages) { std::ifstream ref_file(ref_csv); if (!ref_file.is_open()) { @@ -25,6 +24,8 @@ bool compare_spikes(const char* ref_csv, double* tvec, double* vvec, long n_volt std::string line; long cur_line = 0; + double t_drift = 0.; + double v_drift = 0.; while (std::getline(ref_file, line) && cur_line < n_voltages) { size_t end; @@ -32,21 +33,21 @@ bool compare_spikes(const char* ref_csv, double* tvec, double* vvec, long n_volt auto vref = std::strtof(line.c_str() + end + 1, NULL); // ref values have exponent around 0, so we compare absolute values // and our epsilon is relatively large - if (!almost_equal(tvec[cur_line], tref)) { + if (!almost_equal(tvec[cur_line], tref, &t_drift)) { std::cerr << "DIFF at line " << cur_line << ": " << tvec[cur_line] << "!=" << tref << std::endl; return false; } - if (!almost_equal(vvec[cur_line], vref)) { + if (!almost_equal(vvec[cur_line], vref, &v_drift)) { std::cerr << "DIFF at line " << cur_line << ": " << vvec[cur_line] << "!=" << vref - << std::endl; + << " (Drift=" << v_drift << ')' << std::endl; return false; } ++cur_line; } if (cur_line != n_voltages) { - std::cerr << "Unexpected array length: " << cur_line << " (Ref: " << cur_line << ')' + std::cerr << "Unexpected array length: " << cur_line << " (Ref: " << n_voltages << ')' << std::endl; return false; } From 4bc12b0ecce42da608cf6a677179559b24b37476 Mon Sep 17 00:00:00 2001 From: Fernando Pereira Date: Fri, 22 Dec 2023 18:27:59 +0100 Subject: [PATCH 51/65] Use in-test ref result, depending on NRN_ENABLE_CORENEURON --- test/api/CMakeLists.txt | 3 + test/api/hh_sim.cpp | 29 +- test/api/netcon.cpp | 35 +- test/api/ref/hh_sim.csv | 401 ---- test/api/ref/netcon.csv | 4001 --------------------------------------- test/api/ref/vclamp.csv | 241 --- test/api/test_common.h | 23 +- test/api/vclamp.cpp | 27 +- 8 files changed, 83 insertions(+), 4677 deletions(-) delete mode 100644 test/api/ref/hh_sim.csv delete mode 100644 test/api/ref/netcon.csv delete mode 100644 test/api/ref/vclamp.csv diff --git a/test/api/CMakeLists.txt b/test/api/CMakeLists.txt index c21f5fd41a..2ebc7d9105 100644 --- a/test/api/CMakeLists.txt +++ b/test/api/CMakeLists.txt @@ -5,6 +5,9 @@ foreach(api_test_file hh_sim.cpp netcon.cpp sections.c vclamp.cpp) target_link_libraries(${api_test_name} ${CMAKE_DL_LIBS}) target_link_libraries(${api_test_name} nrniv_lib) target_link_options(${api_test_name} PRIVATE -rdynamic) + if(NRN_ENABLE_CORENEURON) + target_compile_definitions(${api_test_name} PUBLIC CORENEURON_ENABLED) + endif() set(test_name "api::${api_test_name}") add_test(NAME "${test_name}" COMMAND ${api_test_name}) diff --git a/test/api/hh_sim.cpp b/test/api/hh_sim.cpp index 954213bf58..641e37fcea 100644 --- a/test/api/hh_sim.cpp +++ b/test/api/hh_sim.cpp @@ -2,6 +2,7 @@ #include "neuronapi.h" #include +#include #include #include #include @@ -13,6 +14,18 @@ using std::cout; using std::endl; using std::ofstream; +constexpr std::array EXPECTED_V{ +#ifndef CORENEURON_ENABLED + -0x1.04p+6, + -0x1.b254ad82e20edp+5, + -0x1.24a52af1ab463p+6, +#else + -0x1.04p+6, + -0x1.b0c75635b5bdbp+5, + -0x1.24a84bedb7246p+6, +#endif +}; + static const char* argv[] = {"hh_sim", "-nogui", "-nopython", nullptr}; extern "C" void modl_reg(){}; @@ -63,11 +76,8 @@ int main(void) { // setup recording v = nrn_object_new(nrn_symbol("Vector"), 0); nrn_rangevar_push(nrn_symbol("v"), soma, 0.5); - nrn_method_call(v, nrn_method_symbol(v, "record"), 1); - nrn_object_unref(nrn_object_pop()); // record returns the vector - t = nrn_object_new(nrn_symbol("Vector"), 0); - nrn_symbol_push(nrn_symbol("t")); - nrn_method_call(t, nrn_method_symbol(t, "record"), 1); + nrn_double_push(5.); + nrn_method_call(v, nrn_method_symbol(v, "record"), 2); nrn_object_unref(nrn_object_pop()); // record returns the vector // finitialize(-65) @@ -76,14 +86,11 @@ int main(void) { nrn_double_pop(); // continuerun(10) - nrn_double_push(10); + nrn_double_push(10.5); nrn_function_call(nrn_symbol("continuerun"), 1); nrn_double_pop(); - long n_voltages = nrn_vector_capacity(t); - auto ref_file = std::string(std::getenv("CURRENT_SOURCE_DIR")) + "/ref/hh_sim.csv"; - if (compare_spikes(ref_file.c_str(), nrn_vector_data(t), nrn_vector_data(v), n_voltages)) { - return 0; + if (!approximate(EXPECTED_V, v)) { + return 1; } - return 1; } \ No newline at end of file diff --git a/test/api/netcon.cpp b/test/api/netcon.cpp index f33a7ad24c..0fa5a60751 100644 --- a/test/api/netcon.cpp +++ b/test/api/netcon.cpp @@ -12,6 +12,25 @@ using std::ofstream; static const char* argv[] = {"netcon", "-nogui", "-nopython", nullptr}; +constexpr std::array EXPECTED_V{ +#ifndef CORENEURON_ENABLED + -0x1.04p+6, + 0x1.d8340689fafcdp+3, + -0x1.2e02b18fab641p+6, + -0x1.0517fe92a58d9p+6, + -0x1.03e59d79732fcp+6, + -0x1.03e51f949532bp+6, +#else + -0x1.04p+6, + 0x1.d9fa4f205318p+3, + -0x1.2e0327138fc9p+6, + -0x1.051caef48c1p+6, + -0x1.03e62a34d83f2p+6, + -0x1.03e5860b6c0c1p+6, +#endif +}; + + extern "C" void modl_reg(){}; int main(void) { @@ -64,11 +83,8 @@ int main(void) { // setup recording v = nrn_object_new(nrn_symbol("Vector"), 0); nrn_rangevar_push(nrn_symbol("v"), soma, 0.5); - nrn_method_call(v, nrn_method_symbol(v, "record"), 1); - nrn_object_unref(nrn_object_pop()); // record returns the vector - t = nrn_object_new(nrn_symbol("Vector"), 0); - nrn_symbol_push(nrn_symbol("t")); - nrn_method_call(t, nrn_method_symbol(t, "record"), 1); + nrn_double_push(20); + nrn_method_call(v, nrn_method_symbol(v, "record"), 2); nrn_object_unref(nrn_object_pop()); // record returns the vector // finitialize(-65) @@ -77,14 +93,11 @@ int main(void) { nrn_double_pop(); // continuerun(100) - nrn_double_push(100); + nrn_double_push(100.5); nrn_function_call(nrn_symbol("continuerun"), 1); nrn_double_pop(); - long n_voltages = nrn_vector_capacity(t); - auto ref_file = std::string(std::getenv("CURRENT_SOURCE_DIR")) + "/ref/netcon.csv"; - if (compare_spikes(ref_file.c_str(), nrn_vector_data(t), nrn_vector_data(v), n_voltages)) { - return 0; + if (!approximate(EXPECTED_V, v)) { + return 1; } - return 1; } \ No newline at end of file diff --git a/test/api/ref/hh_sim.csv b/test/api/ref/hh_sim.csv deleted file mode 100644 index e5cbb3132e..0000000000 --- a/test/api/ref/hh_sim.csv +++ /dev/null @@ -1,401 +0,0 @@ -0,-65 -0.025,-64.9993 -0.05,-64.9985 -0.075,-64.9978 -0.1,-64.9971 -0.125,-64.9964 -0.15,-64.9957 -0.175,-64.995 -0.2,-64.9943 -0.225,-64.9936 -0.25,-64.993 -0.275,-64.9923 -0.3,-64.9917 -0.325,-64.991 -0.35,-64.9904 -0.375,-64.9898 -0.4,-64.9891 -0.425,-64.9885 -0.45,-64.9879 -0.475,-64.9873 -0.5,-64.9867 -0.525,-64.9861 -0.55,-64.9855 -0.575,-64.9849 -0.6,-64.9843 -0.625,-64.9837 -0.65,-64.9831 -0.675,-64.9826 -0.7,-64.982 -0.725,-64.9814 -0.75,-64.9809 -0.775,-64.9803 -0.8,-64.9798 -0.825,-64.9792 -0.85,-64.9787 -0.875,-64.9782 -0.9,-64.9776 -0.925,-64.9771 -0.95,-64.9766 -0.975,-64.9761 -1,-64.9755 -1.025,-62.6265 -1.05,-60.3153 -1.075,-58.0383 -1.1,-55.7924 -1.125,-55.921 -1.15,-56.034 -1.175,-56.132 -1.2,-56.2148 -1.225,-56.2824 -1.25,-56.3352 -1.275,-56.3733 -1.3,-56.3975 -1.325,-56.4081 -1.35,-56.4058 -1.375,-56.3913 -1.4,-56.365 -1.425,-56.3276 -1.45,-56.2796 -1.475,-56.2214 -1.5,-56.1535 -1.525,-56.0762 -1.55,-55.9898 -1.575,-55.8946 -1.6,-55.7907 -1.625,-55.6782 -1.65,-55.5571 -1.675,-55.4272 -1.7,-55.2886 -1.725,-55.1409 -1.75,-54.9841 -1.775,-54.8177 -1.8,-54.6413 -1.825,-54.4543 -1.85,-54.2562 -1.875,-54.0463 -1.9,-53.8237 -1.925,-53.5876 -1.95,-53.3368 -1.975,-53.07 -2,-52.786 -2.025,-52.4832 -2.05,-52.1595 -2.075,-51.813 -2.1,-51.4413 -2.125,-51.0416 -2.15,-50.6108 -2.175,-50.145 -2.2,-49.6401 -2.225,-49.0911 -2.25,-48.4921 -2.275,-47.8362 -2.3,-47.1153 -2.325,-46.3199 -2.35,-45.4384 -2.375,-44.4569 -2.4,-43.3591 -2.425,-42.1248 -2.45,-40.73 -2.475,-39.1452 -2.5,-37.3348 -2.525,-35.2558 -2.55,-32.8565 -2.575,-30.076 -2.6,-26.8444 -2.625,-23.086 -2.65,-18.7256 -2.675,-13.7049 -2.7,-8.00686 -2.725,-1.69371 -2.75,5.0543 -2.775,11.9232 -2.8,18.5003 -2.825,24.3692 -2.85,29.2241 -2.875,32.9401 -2.9,35.5682 -2.925,37.2717 -2.95,38.2532 -2.975,38.7018 -3,38.7692 -3.025,38.5657 -3.05,38.1671 -3.075,37.6238 -3.1,36.9689 -3.125,36.2242 -3.15,35.4047 -3.175,34.5208 -3.2,33.5807 -3.225,32.5906 -3.25,31.5559 -3.275,30.4811 -3.3,29.3705 -3.325,28.2278 -3.35,27.0567 -3.375,25.8604 -3.4,24.6422 -3.425,23.4048 -3.45,22.1512 -3.475,20.8838 -3.5,19.605 -3.525,18.3171 -3.55,17.0222 -3.575,15.7221 -3.6,14.4186 -3.625,13.1133 -3.65,11.8077 -3.675,10.503 -3.7,9.20059 -3.725,7.90141 -3.75,6.60645 -3.775,5.31652 -3.8,4.03238 -3.825,2.75468 -3.85,1.48395 -3.875,0.220652 -3.9,-1.03482 -3.925,-2.28213 -3.95,-3.52107 -3.975,-4.75147 -4,-5.97317 -4.025,-7.18608 -4.05,-8.39022 -4.075,-9.58564 -4.1,-10.7724 -4.125,-11.9506 -4.15,-13.1204 -4.175,-14.282 -4.2,-15.4357 -4.225,-16.5819 -4.25,-17.7208 -4.275,-18.8528 -4.3,-19.9784 -4.325,-21.0982 -4.35,-22.2127 -4.375,-23.3227 -4.4,-24.4289 -4.425,-25.5324 -4.45,-26.6341 -4.475,-27.735 -4.5,-28.8365 -4.525,-29.9399 -4.55,-31.0467 -4.575,-32.1588 -4.6,-33.2781 -4.625,-34.4069 -4.65,-35.5473 -4.675,-36.7019 -4.7,-37.8735 -4.725,-39.0647 -4.75,-40.2788 -4.775,-41.5189 -4.8,-42.7881 -4.825,-44.0898 -4.85,-45.4269 -4.875,-46.8021 -4.9,-48.2176 -4.925,-49.6749 -4.95,-51.1741 -4.975,-52.714 -5,-54.2913 -5.025,-55.9003 -5.05,-57.5323 -5.075,-59.1754 -5.1,-60.8146 -5.125,-62.4318 -5.15,-64.0066 -5.175,-65.5178 -5.2,-66.9443 -5.225,-68.268 -5.25,-69.4745 -5.275,-70.5547 -5.3,-71.5052 -5.325,-72.3283 -5.35,-73.0307 -5.375,-73.6223 -5.4,-74.1151 -5.425,-74.5218 -5.45,-74.8547 -5.475,-75.1255 -5.5,-75.3447 -5.525,-75.5212 -5.55,-75.6628 -5.575,-75.7759 -5.6,-75.8659 -5.625,-75.9373 -5.65,-75.9934 -5.675,-76.0374 -5.7,-76.0714 -5.725,-76.0974 -5.75,-76.1168 -5.775,-76.131 -5.8,-76.1409 -5.825,-76.1472 -5.85,-76.1507 -5.875,-76.1518 -5.9,-76.151 -5.925,-76.1486 -5.95,-76.1448 -5.975,-76.1399 -6,-76.1341 -6.025,-76.1275 -6.05,-76.1202 -6.075,-76.1124 -6.1,-76.1041 -6.125,-76.0953 -6.15,-76.0862 -6.175,-76.0768 -6.2,-76.067 -6.225,-76.0571 -6.25,-76.0468 -6.275,-76.0364 -6.3,-76.0258 -6.325,-76.015 -6.35,-76.004 -6.375,-75.9929 -6.4,-75.9816 -6.425,-75.9702 -6.45,-75.9586 -6.475,-75.9469 -6.5,-75.9351 -6.525,-75.9231 -6.55,-75.911 -6.575,-75.8988 -6.6,-75.8865 -6.625,-75.874 -6.65,-75.8615 -6.675,-75.8488 -6.7,-75.836 -6.725,-75.8231 -6.75,-75.81 -6.775,-75.7969 -6.8,-75.7836 -6.825,-75.7703 -6.85,-75.7568 -6.875,-75.7432 -6.9,-75.7294 -6.925,-75.7156 -6.95,-75.7017 -6.975,-75.6876 -7,-75.6734 -7.025,-75.6591 -7.05,-75.6447 -7.075,-75.6302 -7.1,-75.6156 -7.125,-75.6008 -7.15,-75.5859 -7.175,-75.571 -7.2,-75.5559 -7.225,-75.5406 -7.25,-75.5253 -7.275,-75.5099 -7.3,-75.4943 -7.325,-75.4786 -7.35,-75.4628 -7.375,-75.4469 -7.4,-75.4309 -7.425,-75.4147 -7.45,-75.3984 -7.475,-75.3821 -7.5,-75.3656 -7.525,-75.3489 -7.55,-75.3322 -7.575,-75.3154 -7.6,-75.2984 -7.625,-75.2813 -7.65,-75.2641 -7.675,-75.2468 -7.7,-75.2293 -7.725,-75.2118 -7.75,-75.1941 -7.775,-75.1763 -7.8,-75.1584 -7.825,-75.1404 -7.85,-75.1222 -7.875,-75.104 -7.9,-75.0856 -7.925,-75.0671 -7.95,-75.0485 -7.975,-75.0298 -8,-75.0109 -8.025,-74.992 -8.05,-74.9729 -8.075,-74.9537 -8.1,-74.9344 -8.125,-74.915 -8.15,-74.8954 -8.175,-74.8758 -8.2,-74.856 -8.225,-74.8361 -8.25,-74.8161 -8.275,-74.796 -8.3,-74.7758 -8.325,-74.7555 -8.35,-74.735 -8.375,-74.7144 -8.4,-74.6938 -8.425,-74.673 -8.45,-74.6521 -8.475,-74.6311 -8.5,-74.61 -8.525,-74.5887 -8.55,-74.5674 -8.575,-74.5459 -8.6,-74.5244 -8.625,-74.5027 -8.65,-74.4809 -8.675,-74.459 -8.7,-74.437 -8.725,-74.4149 -8.75,-74.3927 -8.775,-74.3704 -8.8,-74.348 -8.825,-74.3255 -8.85,-74.3028 -8.875,-74.2801 -8.9,-74.2573 -8.925,-74.2343 -8.95,-74.2113 -8.975,-74.1882 -9,-74.1649 -9.025,-74.1416 -9.05,-74.1182 -9.075,-74.0946 -9.1,-74.071 -9.125,-74.0473 -9.15,-74.0234 -9.175,-73.9995 -9.2,-73.9755 -9.225,-73.9514 -9.25,-73.9272 -9.275,-73.9029 -9.3,-73.8785 -9.325,-73.854 -9.35,-73.8294 -9.375,-73.8048 -9.4,-73.78 -9.425,-73.7552 -9.45,-73.7302 -9.475,-73.7052 -9.5,-73.6801 -9.525,-73.6549 -9.55,-73.6296 -9.575,-73.6043 -9.6,-73.5788 -9.625,-73.5533 -9.65,-73.5277 -9.675,-73.502 -9.7,-73.4763 -9.725,-73.4504 -9.75,-73.4245 -9.775,-73.3985 -9.8,-73.3725 -9.825,-73.3463 -9.85,-73.3201 -9.875,-73.2938 -9.9,-73.2674 -9.925,-73.241 -9.95,-73.2145 -9.975,-73.1879 -10,-73.1613 diff --git a/test/api/ref/netcon.csv b/test/api/ref/netcon.csv deleted file mode 100644 index 39459313cd..0000000000 --- a/test/api/ref/netcon.csv +++ /dev/null @@ -1,4001 +0,0 @@ -0,-65 -0.025,-64.9993 -0.05,-64.9985 -0.075,-64.9978 -0.1,-64.9971 -0.125,-64.9964 -0.15,-64.9957 -0.175,-64.995 -0.2,-64.9943 -0.225,-64.9936 -0.25,-64.993 -0.275,-64.9923 -0.3,-64.9917 -0.325,-64.991 -0.35,-64.9904 -0.375,-64.9898 -0.4,-64.9891 -0.425,-64.9885 -0.45,-64.9879 -0.475,-64.9873 -0.5,-64.9867 -0.525,-64.9861 -0.55,-64.9855 -0.575,-64.9849 -0.6,-64.9843 -0.625,-64.9837 -0.65,-64.9831 -0.675,-64.9826 -0.7,-64.982 -0.725,-64.9814 -0.75,-64.9809 -0.775,-64.9803 -0.8,-64.9798 -0.825,-64.9792 -0.85,-64.9787 -0.875,-64.9782 -0.9,-64.9776 -0.925,-64.9771 -0.95,-64.9766 -0.975,-64.9761 -1,-64.9755 -1.025,-64.975 -1.05,-64.9745 -1.075,-64.974 -1.1,-64.9735 -1.125,-64.9731 -1.15,-64.9726 -1.175,-64.9721 -1.2,-64.9716 -1.225,-64.9712 -1.25,-64.9707 -1.275,-64.9702 -1.3,-64.9698 -1.325,-64.9693 -1.35,-64.9689 -1.375,-64.9684 -1.4,-64.968 -1.425,-64.9676 -1.45,-64.9671 -1.475,-64.9667 -1.5,-64.9663 -1.525,-64.9659 -1.55,-64.9655 -1.575,-64.9651 -1.6,-64.9647 -1.625,-64.9643 -1.65,-64.9639 -1.675,-64.9635 -1.7,-64.9631 -1.725,-64.9628 -1.75,-64.9624 -1.775,-64.962 -1.8,-64.9617 -1.825,-64.9613 -1.85,-64.961 -1.875,-64.9606 -1.9,-64.9603 -1.925,-64.9599 -1.95,-64.9596 -1.975,-64.9593 -2,-64.959 -2.025,-64.9586 -2.05,-64.9583 -2.075,-64.958 -2.1,-64.9577 -2.125,-64.9574 -2.15,-64.9571 -2.175,-64.9568 -2.2,-64.9565 -2.225,-64.9563 -2.25,-64.956 -2.275,-64.9557 -2.3,-64.9555 -2.325,-64.9552 -2.35,-64.9549 -2.375,-64.9547 -2.4,-64.9544 -2.425,-64.9542 -2.45,-64.9539 -2.475,-64.9537 -2.5,-64.9535 -2.525,-64.9533 -2.55,-64.953 -2.575,-64.9528 -2.6,-64.9526 -2.625,-64.9524 -2.65,-64.9522 -2.675,-64.952 -2.7,-64.9518 -2.725,-64.9516 -2.75,-64.9514 -2.775,-64.9512 -2.8,-64.9511 -2.825,-64.9509 -2.85,-64.9507 -2.875,-64.9505 -2.9,-64.9504 -2.925,-64.9502 -2.95,-64.9501 -2.975,-64.9499 -3,-64.9498 -3.025,-64.9496 -3.05,-64.9495 -3.075,-64.9494 -3.1,-64.9492 -3.125,-64.9491 -3.15,-64.949 -3.175,-64.9489 -3.2,-64.9488 -3.225,-64.9487 -3.25,-64.9486 -3.275,-64.9485 -3.3,-64.9484 -3.325,-64.9483 -3.35,-64.9482 -3.375,-64.9481 -3.4,-64.948 -3.425,-64.9479 -3.45,-64.9478 -3.475,-64.9478 -3.5,-64.9477 -3.525,-64.9476 -3.55,-64.9476 -3.575,-64.9475 -3.6,-64.9475 -3.625,-64.9474 -3.65,-64.9474 -3.675,-64.9473 -3.7,-64.9473 -3.725,-64.9473 -3.75,-64.9472 -3.775,-64.9472 -3.8,-64.9472 -3.825,-64.9471 -3.85,-64.9471 -3.875,-64.9471 -3.9,-64.9471 -3.925,-64.9471 -3.95,-64.9471 -3.975,-64.9471 -4,-64.9471 -4.025,-64.9471 -4.05,-64.9471 -4.075,-64.9471 -4.1,-64.9471 -4.125,-64.9471 -4.15,-64.9471 -4.175,-64.9471 -4.2,-64.9472 -4.225,-64.9472 -4.25,-64.9472 -4.275,-64.9472 -4.3,-64.9473 -4.325,-64.9473 -4.35,-64.9473 -4.375,-64.9474 -4.4,-64.9474 -4.425,-64.9475 -4.45,-64.9475 -4.475,-64.9476 -4.5,-64.9476 -4.525,-64.9477 -4.55,-64.9477 -4.575,-64.9478 -4.6,-64.9479 -4.625,-64.9479 -4.65,-64.948 -4.675,-64.9481 -4.7,-64.9481 -4.725,-64.9482 -4.75,-64.9483 -4.775,-64.9484 -4.8,-64.9485 -4.825,-64.9485 -4.85,-64.9486 -4.875,-64.9487 -4.9,-64.9488 -4.925,-64.9489 -4.95,-64.949 -4.975,-64.9491 -5,-64.9492 -5.025,-64.9493 -5.05,-64.9494 -5.075,-64.9495 -5.1,-64.9496 -5.125,-64.9497 -5.15,-64.9498 -5.175,-64.9499 -5.2,-64.95 -5.225,-64.9501 -5.25,-64.9503 -5.275,-64.9504 -5.3,-64.9505 -5.325,-64.9506 -5.35,-64.9507 -5.375,-64.9508 -5.4,-64.951 -5.425,-64.9511 -5.45,-64.9512 -5.475,-64.9513 -5.5,-64.9515 -5.525,-64.9516 -5.55,-64.9517 -5.575,-64.9519 -5.6,-64.952 -5.625,-64.9521 -5.65,-64.9523 -5.675,-64.9524 -5.7,-64.9526 -5.725,-64.9527 -5.75,-64.9528 -5.775,-64.953 -5.8,-64.9531 -5.825,-64.9533 -5.85,-64.9534 -5.875,-64.9536 -5.9,-64.9537 -5.925,-64.9539 -5.95,-64.954 -5.975,-64.9541 -6,-64.9543 -6.025,-64.9544 -6.05,-64.9546 -6.075,-64.9548 -6.1,-64.9549 -6.125,-64.9551 -6.15,-64.9552 -6.175,-64.9554 -6.2,-64.9555 -6.225,-64.9557 -6.25,-64.9558 -6.275,-64.956 -6.3,-64.9562 -6.325,-64.9563 -6.35,-64.9565 -6.375,-64.9566 -6.4,-64.9568 -6.425,-64.957 -6.45,-64.9571 -6.475,-64.9573 -6.5,-64.9574 -6.525,-64.9576 -6.55,-64.9578 -6.575,-64.9579 -6.6,-64.9581 -6.625,-64.9582 -6.65,-64.9584 -6.675,-64.9586 -6.7,-64.9587 -6.725,-64.9589 -6.75,-64.9591 -6.775,-64.9592 -6.8,-64.9594 -6.825,-64.9596 -6.85,-64.9597 -6.875,-64.9599 -6.9,-64.96 -6.925,-64.9602 -6.95,-64.9604 -6.975,-64.9605 -7,-64.9607 -7.025,-64.9609 -7.05,-64.961 -7.075,-64.9612 -7.1,-64.9614 -7.125,-64.9615 -7.15,-64.9617 -7.175,-64.9618 -7.2,-64.962 -7.225,-64.9622 -7.25,-64.9623 -7.275,-64.9625 -7.3,-64.9627 -7.325,-64.9628 -7.35,-64.963 -7.375,-64.9631 -7.4,-64.9633 -7.425,-64.9635 -7.45,-64.9636 -7.475,-64.9638 -7.5,-64.9639 -7.525,-64.4597 -7.55,-63.9714 -7.575,-63.4981 -7.6,-63.0389 -7.625,-62.5931 -7.65,-62.1599 -7.675,-61.7385 -7.7,-60.8556 -7.725,-60.0044 -7.75,-59.1823 -7.775,-58.3873 -7.8,-57.6167 -7.825,-56.868 -7.85,-56.1387 -7.875,-55.4259 -7.9,-54.7265 -7.925,-54.0371 -7.95,-53.3543 -7.975,-52.6742 -8,-51.9923 -8.025,-51.3039 -8.05,-50.6039 -8.075,-49.8862 -8.1,-49.1442 -8.125,-48.3705 -8.15,-47.5563 -8.175,-46.6918 -8.2,-45.7654 -8.225,-44.7636 -8.25,-43.6705 -8.275,-42.467 -8.3,-41.1301 -8.325,-39.6322 -8.35,-37.9398 -8.375,-36.0121 -8.4,-33.7999 -8.425,-31.2437 -8.45,-28.2739 -8.475,-24.8105 -8.5,-20.7685 -8.525,-16.0677 -8.55,-10.654 -8.575,-4.53526 -8.6,2.17409 -8.625,9.21424 -8.65,16.1843 -8.675,22.6176 -8.7,28.1106 -8.725,32.4367 -8.75,35.5788 -8.775,37.6791 -8.8,38.9523 -8.825,39.6137 -8.85,39.8415 -8.875,39.7664 -8.9,39.4781 -8.925,39.035 -8.95,38.4745 -8.975,37.821 -9,37.0902 -9.025,36.2931 -9.05,35.4375 -9.075,34.5298 -9.1,33.5749 -9.125,32.5772 -9.15,31.5406 -9.175,30.4688 -9.2,29.3652 -9.225,28.2329 -9.25,27.0751 -9.275,25.8946 -9.3,24.694 -9.325,23.4761 -9.35,22.2432 -9.375,20.9977 -9.4,19.7417 -9.425,18.4772 -9.45,17.2061 -9.475,15.9302 -9.5,14.651 -9.525,13.3701 -9.55,12.0887 -9.575,10.8081 -9.6,9.52952 -9.625,8.25384 -9.65,6.98202 -9.675,5.71486 -9.7,4.45305 -9.725,3.19721 -9.75,1.94791 -9.775,0.705603 -9.8,-0.529342 -9.825,-1.7566 -9.85,-2.9759 -9.875,-4.18701 -9.9,-5.38982 -9.925,-6.58425 -9.95,-7.77024 -9.975,-8.94776 -10,-10.1168 -10.025,-11.2775 -10.05,-12.43 -10.075,-13.5745 -10.1,-14.7112 -10.125,-15.8402 -10.15,-16.9618 -10.175,-18.0764 -10.2,-19.1844 -10.225,-20.2863 -10.25,-21.3825 -10.275,-22.4737 -10.3,-23.5604 -10.325,-24.6436 -10.35,-25.7238 -10.375,-26.8022 -10.4,-27.8797 -10.425,-28.9575 -10.45,-30.0368 -10.475,-31.1193 -10.5,-32.2065 -10.525,-33.3003 -10.55,-34.4026 -10.575,-35.5156 -10.6,-36.6414 -10.625,-37.7826 -10.65,-38.9418 -10.675,-40.1215 -10.7,-41.3247 -10.725,-42.5542 -10.75,-43.8127 -10.775,-45.1029 -10.8,-46.4271 -10.825,-47.7871 -10.85,-49.184 -10.875,-50.6178 -10.9,-52.0872 -10.925,-53.5894 -10.95,-55.119 -10.975,-56.6686 -11,-58.2279 -11.025,-59.7837 -11.05,-61.3205 -11.075,-62.8204 -11.1,-64.2648 -11.125,-65.6349 -11.15,-66.914 -11.175,-68.0882 -11.2,-69.1479 -11.225,-70.0884 -11.25,-70.9098 -11.275,-71.6164 -11.3,-72.2162 -11.325,-72.719 -11.35,-73.136 -11.375,-73.4787 -11.4,-73.7581 -11.425,-73.9841 -11.45,-74.1659 -11.475,-74.311 -11.5,-74.4262 -11.525,-74.517 -11.55,-74.588 -11.575,-74.6429 -11.6,-74.6848 -11.625,-74.7161 -11.65,-74.739 -11.675,-74.7549 -11.7,-74.7653 -11.725,-74.7711 -11.75,-74.7733 -11.775,-74.7724 -11.8,-74.7692 -11.825,-74.7639 -11.85,-74.7569 -11.875,-74.7486 -11.9,-74.7392 -11.925,-74.7289 -11.95,-74.7178 -11.975,-74.706 -12,-74.6936 -12.025,-74.6809 -12.05,-74.6677 -12.075,-74.6541 -12.1,-74.6403 -12.125,-74.6262 -12.15,-74.6119 -12.175,-74.5974 -12.2,-74.5827 -12.225,-74.5678 -12.25,-74.5528 -12.275,-74.5377 -12.3,-74.5224 -12.325,-74.507 -12.35,-74.4915 -12.375,-74.4759 -12.4,-74.4602 -12.425,-74.4444 -12.45,-74.4285 -12.475,-74.4125 -12.5,-74.3965 -12.525,-74.3803 -12.55,-74.3641 -12.575,-74.3478 -12.6,-74.3314 -12.625,-74.3149 -12.65,-74.2984 -12.675,-74.2817 -12.7,-74.265 -12.725,-74.2483 -12.75,-74.2314 -12.775,-74.2145 -12.8,-74.1975 -12.825,-74.1804 -12.85,-74.1633 -12.875,-74.1461 -12.9,-74.1288 -12.925,-74.1115 -12.95,-74.094 -12.975,-74.0765 -13,-74.059 -13.025,-74.0413 -13.05,-74.0236 -13.075,-74.0059 -13.1,-73.988 -13.125,-73.9701 -13.15,-73.9521 -13.175,-73.9341 -13.2,-73.916 -13.225,-73.8978 -13.25,-73.8795 -13.275,-73.8612 -13.3,-73.8428 -13.325,-73.8244 -13.35,-73.2779 -13.375,-72.7881 -13.4,-72.3486 -13.425,-71.9535 -13.45,-71.5979 -13.475,-71.2772 -13.5,-70.9877 -13.525,-70.7259 -13.55,-70.4888 -13.575,-70.2737 -13.6,-70.0783 -13.625,-69.9005 -13.65,-69.7384 -13.675,-69.5905 -13.7,-69.4552 -13.725,-69.3313 -13.75,-69.2176 -13.775,-69.1132 -13.8,-69.017 -13.825,-68.9283 -13.85,-68.8464 -13.875,-68.7706 -13.9,-68.7003 -13.925,-68.635 -13.95,-68.5743 -13.975,-68.5176 -14,-68.4647 -14.025,-68.4152 -14.05,-68.3688 -14.075,-68.3253 -14.1,-68.2843 -14.125,-68.2457 -14.15,-68.2092 -14.175,-68.1747 -14.2,-68.142 -14.225,-68.111 -14.25,-68.0815 -14.275,-68.0534 -14.3,-68.0266 -14.325,-68.001 -14.35,-67.9765 -14.375,-67.953 -14.4,-67.9305 -14.425,-67.9088 -14.45,-67.888 -14.475,-67.8679 -14.5,-67.8485 -14.525,-67.8297 -14.55,-67.8116 -14.575,-67.794 -14.6,-67.777 -14.625,-67.7605 -14.65,-67.7444 -14.675,-67.7288 -14.7,-67.7135 -14.725,-67.6987 -14.75,-67.6843 -14.775,-67.6701 -14.8,-67.6563 -14.825,-67.6429 -14.85,-67.6297 -14.875,-67.6168 -14.9,-67.6041 -14.925,-67.5917 -14.95,-67.5796 -14.975,-67.5677 -15,-67.556 -15.025,-67.5445 -15.05,-67.5332 -15.075,-67.5221 -15.1,-67.5112 -15.125,-67.5005 -15.15,-67.4899 -15.175,-67.4795 -15.2,-67.4693 -15.225,-67.4592 -15.25,-67.4493 -15.275,-67.4395 -15.3,-67.4298 -15.325,-67.4203 -15.35,-67.411 -15.375,-67.4017 -15.4,-66.8901 -15.425,-66.4142 -15.45,-65.9712 -15.475,-65.5587 -15.5,-65.1746 -15.525,-64.8167 -15.55,-64.4832 -15.575,-64.1723 -15.6,-63.8825 -15.625,-63.6123 -15.65,-63.3602 -15.675,-63.125 -15.7,-62.9056 -15.725,-62.7008 -15.75,-62.5096 -15.775,-62.3311 -15.8,-62.1645 -15.825,-62.0088 -15.85,-61.8634 -15.875,-61.7276 -15.9,-61.6008 -15.925,-61.4822 -15.95,-61.3715 -15.975,-61.2681 -16,-61.1715 -16.025,-61.0813 -16.05,-60.997 -16.075,-60.9185 -16.1,-60.8452 -16.125,-60.7769 -16.15,-60.7132 -16.175,-60.654 -16.2,-60.599 -16.225,-60.5478 -16.25,-60.5005 -16.275,-60.4566 -16.3,-60.4161 -16.325,-60.3789 -16.35,-60.3446 -16.375,-60.3133 -16.4,-60.2847 -16.425,-60.2589 -16.45,-60.2355 -16.475,-60.2146 -16.5,-60.1961 -16.525,-60.1798 -16.55,-60.1658 -16.575,-60.1538 -16.6,-60.1439 -16.625,-60.1359 -16.65,-60.1298 -16.675,-60.1256 -16.7,-60.1232 -16.725,-60.1225 -16.75,-60.1235 -16.775,-60.1261 -16.8,-60.1303 -16.825,-60.1361 -16.85,-60.1434 -16.875,-60.1521 -16.9,-60.1622 -16.925,-60.1738 -16.95,-60.1867 -16.975,-60.2009 -17,-60.2163 -17.025,-60.2331 -17.05,-60.251 -17.075,-60.2701 -17.1,-60.2904 -17.125,-60.3118 -17.15,-60.3343 -17.175,-60.3578 -17.2,-60.3824 -17.225,-60.408 -17.25,-60.4345 -17.275,-60.462 -17.3,-60.4904 -17.325,-60.5198 -17.35,-60.55 -17.375,-60.581 -17.4,-60.6128 -17.425,-60.6455 -17.45,-60.6789 -17.475,-60.713 -17.5,-60.7479 -17.525,-60.7834 -17.55,-60.8196 -17.575,-60.8565 -17.6,-60.894 -17.625,-60.932 -17.65,-60.9707 -17.675,-61.0098 -17.7,-61.0495 -17.725,-61.0897 -17.75,-61.1304 -17.775,-61.1715 -17.8,-60.7517 -17.825,-60.3594 -17.85,-59.9922 -17.875,-59.6481 -17.9,-59.325 -17.925,-59.0214 -17.95,-58.7356 -17.975,-58.4663 -18,-58.212 -18.025,-57.9716 -18.05,-57.7439 -18.075,-57.5279 -18.1,-57.3226 -18.125,-57.127 -18.15,-56.9403 -18.175,-56.7618 -18.2,-56.5906 -18.225,-56.4261 -18.25,-56.2677 -18.275,-56.1148 -18.3,-55.9667 -18.325,-55.4051 -18.35,-54.8749 -18.375,-54.3724 -18.4,-53.8941 -18.425,-53.4366 -18.45,-52.9969 -18.475,-52.5719 -18.5,-52.1588 -18.525,-51.7547 -18.55,-51.3569 -18.575,-50.9627 -18.6,-50.5696 -18.625,-50.1747 -18.65,-49.7756 -18.675,-49.3693 -18.7,-48.9533 -18.725,-48.5245 -18.75,-48.0799 -18.775,-47.6164 -18.8,-47.1303 -18.825,-46.6178 -18.85,-46.0749 -18.875,-45.4968 -18.9,-44.8784 -18.925,-44.2138 -18.95,-43.4964 -18.975,-42.7187 -19,-41.872 -19.025,-40.9464 -19.05,-39.9306 -19.075,-38.8113 -19.1,-37.5736 -19.125,-36.2 -19.15,-34.6709 -19.175,-32.9644 -19.2,-31.056 -19.225,-28.9196 -19.25,-26.528 -19.275,-23.8555 -19.3,-20.8801 -19.325,-17.5885 -19.35,-13.9824 -19.375,-10.0853 -19.4,-5.95077 -19.425,-1.66708 -19.45,2.64394 -19.475,6.83684 -19.5,10.7606 -19.525,14.2812 -19.55,17.3009 -19.575,19.7689 -19.6,21.6807 -19.625,23.0683 -19.65,23.9868 -19.675,24.5013 -19.7,24.6771 -19.725,24.5743 -19.75,24.2441 -19.775,23.7294 -19.8,23.0646 -19.825,22.2775 -19.85,21.3901 -19.875,20.4202 -19.9,19.3822 -19.925,18.2877 -19.95,17.1467 -19.975,15.9673 -20,14.7564 -20.025,13.5199 -20.05,12.2631 -20.075,10.9904 -20.1,9.70572 -20.125,8.4124 -20.15,7.11343 -20.175,5.81141 -20.2,4.50858 -20.225,3.20689 -20.25,1.90805 -20.275,0.613519 -20.3,-0.675485 -20.325,-1.9579 -20.35,-3.23281 -20.375,-4.49951 -20.4,-5.75742 -20.425,-7.00604 -20.45,-8.24496 -20.475,-9.47398 -20.5,-10.6929 -20.525,-11.9017 -20.55,-13.1002 -20.575,-14.2885 -20.6,-15.4668 -20.625,-16.6353 -20.65,-17.7941 -20.675,-18.9437 -20.7,-20.0843 -20.725,-21.2164 -20.75,-22.3406 -20.775,-23.4575 -20.8,-24.5679 -20.825,-25.6725 -20.85,-26.7721 -20.875,-27.8679 -20.9,-28.9609 -20.925,-30.0523 -20.95,-31.1436 -20.975,-32.2363 -21,-33.3321 -21.025,-34.4329 -21.05,-35.5407 -21.075,-36.6574 -21.1,-37.7853 -21.125,-38.9267 -21.15,-40.084 -21.175,-41.2598 -21.2,-42.4563 -21.225,-43.6761 -21.25,-44.9214 -21.275,-46.1939 -21.3,-47.4953 -21.325,-48.8263 -21.35,-50.187 -21.375,-51.5761 -21.4,-52.9913 -21.425,-54.4284 -21.45,-55.8813 -21.475,-57.3418 -21.5,-58.7997 -21.525,-60.2426 -21.55,-61.6565 -21.575,-63.0262 -21.6,-64.3366 -21.625,-65.5732 -21.65,-66.7234 -21.675,-67.7777 -21.7,-68.7297 -21.725,-69.5772 -21.75,-70.3214 -21.775,-70.9664 -21.8,-71.5192 -21.825,-71.9879 -21.85,-72.3817 -21.875,-72.7098 -21.9,-72.9812 -21.925,-73.2043 -21.95,-72.9137 -21.975,-72.6798 -22,-72.49 -22.025,-72.3345 -22.05,-72.206 -22.075,-72.0988 -22.1,-72.0084 -22.125,-71.9315 -22.15,-71.8653 -22.175,-71.8076 -22.2,-71.7568 -22.225,-71.7115 -22.25,-71.6708 -22.275,-71.6336 -22.3,-71.5994 -22.325,-71.5676 -22.35,-71.5377 -22.375,-71.5094 -22.4,-71.4824 -22.425,-71.4565 -22.45,-71.4315 -22.475,-71.4072 -22.5,-71.3835 -22.525,-71.3603 -22.55,-71.3375 -22.575,-71.3151 -22.6,-71.293 -22.625,-71.2711 -22.65,-71.2494 -22.675,-71.2279 -22.7,-71.2066 -22.725,-71.1854 -22.75,-71.1643 -22.775,-71.1433 -22.8,-71.1224 -22.825,-71.1016 -22.85,-71.0809 -22.875,-71.0602 -22.9,-71.0395 -22.925,-71.019 -22.95,-70.9985 -22.975,-70.978 -23,-70.9576 -23.025,-70.9372 -23.05,-70.9169 -23.075,-70.8966 -23.1,-70.8763 -23.125,-70.8561 -23.15,-70.8359 -23.175,-70.8158 -23.2,-70.7957 -23.225,-70.7757 -23.25,-70.7556 -23.275,-70.7357 -23.3,-70.7157 -23.325,-70.6958 -23.35,-70.676 -23.375,-70.6562 -23.4,-70.6364 -23.425,-70.6167 -23.45,-70.597 -23.475,-70.5773 -23.5,-70.5577 -23.525,-70.5382 -23.55,-70.5186 -23.575,-70.4992 -23.6,-70.4797 -23.625,-70.4603 -23.65,-70.441 -23.675,-70.4217 -23.7,-70.4025 -23.725,-70.3833 -23.75,-70.3641 -23.775,-70.345 -23.8,-70.3259 -23.825,-70.3069 -23.85,-70.2879 -23.875,-70.269 -23.9,-70.2502 -23.925,-70.2313 -23.95,-70.2126 -23.975,-70.1938 -24,-70.1752 -24.025,-70.1566 -24.05,-70.138 -24.075,-70.1195 -24.1,-70.101 -24.125,-70.0826 -24.15,-70.0643 -24.175,-70.046 -24.2,-70.0277 -24.225,-70.0095 -24.25,-69.9914 -24.275,-69.9733 -24.3,-69.9553 -24.325,-69.9373 -24.35,-69.9194 -24.375,-69.9015 -24.4,-69.8837 -24.425,-69.8659 -24.45,-69.8482 -24.475,-69.8306 -24.5,-69.813 -24.525,-69.7955 -24.55,-69.778 -24.575,-69.7606 -24.6,-69.7432 -24.625,-69.7259 -24.65,-69.7087 -24.675,-69.6915 -24.7,-69.6744 -24.725,-69.6573 -24.75,-69.6403 -24.775,-69.6233 -24.8,-69.6064 -24.825,-69.5896 -24.85,-69.5728 -24.875,-69.5561 -24.9,-69.5394 -24.925,-69.5228 -24.95,-69.5063 -24.975,-69.4898 -25,-69.4734 -25.025,-69.457 -25.05,-69.4407 -25.075,-69.4245 -25.1,-69.4083 -25.125,-69.3922 -25.15,-69.3761 -25.175,-69.3601 -25.2,-69.3442 -25.225,-69.3283 -25.25,-69.3124 -25.275,-69.2967 -25.3,-69.281 -25.325,-69.2653 -25.35,-69.2498 -25.375,-69.2342 -25.4,-69.2188 -25.425,-69.2034 -25.45,-69.188 -25.475,-69.1727 -25.5,-69.1575 -25.525,-69.1424 -25.55,-69.1273 -25.575,-69.1122 -25.6,-69.0972 -25.625,-69.0823 -25.65,-69.0674 -25.675,-69.0526 -25.7,-69.0379 -25.725,-69.0232 -25.75,-69.0086 -25.775,-68.994 -25.8,-68.9795 -25.825,-68.9651 -25.85,-68.9507 -25.875,-68.9364 -25.9,-68.9221 -25.925,-68.9079 -25.95,-68.8937 -25.975,-68.8796 -26,-68.8656 -26.025,-68.8516 -26.05,-68.8376 -26.075,-68.8238 -26.1,-68.8099 -26.125,-68.7962 -26.15,-68.7825 -26.175,-68.7688 -26.2,-68.7552 -26.225,-68.7417 -26.25,-68.7282 -26.275,-68.7148 -26.3,-68.7014 -26.325,-68.6881 -26.35,-68.6748 -26.375,-68.6616 -26.4,-68.6485 -26.425,-68.6354 -26.45,-68.6223 -26.475,-68.6093 -26.5,-68.5964 -26.525,-68.5835 -26.55,-68.5706 -26.575,-68.5579 -26.6,-68.5451 -26.625,-68.5325 -26.65,-68.5198 -26.675,-68.5073 -26.7,-68.4947 -26.725,-68.4823 -26.75,-68.4698 -26.775,-68.4575 -26.8,-68.4452 -26.825,-68.4329 -26.85,-68.4207 -26.875,-68.4085 -26.9,-68.3964 -26.925,-68.3843 -26.95,-68.3723 -26.975,-68.3604 -27,-68.3484 -27.025,-68.3366 -27.05,-68.3247 -27.075,-68.313 -27.1,-68.3012 -27.125,-68.2896 -27.15,-68.2779 -27.175,-68.2664 -27.2,-68.2548 -27.225,-68.2433 -27.25,-68.2319 -27.275,-68.2205 -27.3,-68.2091 -27.325,-68.1978 -27.35,-68.1866 -27.375,-68.1753 -27.4,-68.1642 -27.425,-68.153 -27.45,-68.142 -27.475,-68.1309 -27.5,-68.1199 -27.525,-68.109 -27.55,-68.0981 -27.575,-68.0872 -27.6,-68.0764 -27.625,-68.0656 -27.65,-68.0548 -27.675,-68.0441 -27.7,-68.0335 -27.725,-68.0228 -27.75,-68.0123 -27.775,-68.0017 -27.8,-67.9912 -27.825,-67.9808 -27.85,-67.9704 -27.875,-67.96 -27.9,-67.9496 -27.925,-67.9393 -27.95,-67.9291 -27.975,-67.9188 -28,-67.9086 -28.025,-67.8985 -28.05,-67.8883 -28.075,-67.8782 -28.1,-67.8682 -28.125,-67.8582 -28.15,-67.8482 -28.175,-67.8382 -28.2,-67.8283 -28.225,-67.8184 -28.25,-67.8086 -28.275,-67.7988 -28.3,-67.789 -28.325,-67.7792 -28.35,-67.7695 -28.375,-67.7598 -28.4,-67.7501 -28.425,-67.7405 -28.45,-67.7309 -28.475,-67.7214 -28.5,-67.7118 -28.525,-67.7023 -28.55,-67.6928 -28.575,-67.6834 -28.6,-67.674 -28.625,-67.6646 -28.65,-67.6552 -28.675,-67.6459 -28.7,-67.6366 -28.725,-67.6273 -28.75,-67.6181 -28.775,-67.6089 -28.8,-67.5997 -28.825,-67.5905 -28.85,-67.5814 -28.875,-67.5723 -28.9,-67.5632 -28.925,-67.5542 -28.95,-67.5452 -28.975,-67.5362 -29,-67.5272 -29.025,-67.5183 -29.05,-67.5093 -29.075,-67.5004 -29.1,-67.4916 -29.125,-67.4827 -29.15,-67.4739 -29.175,-67.4651 -29.2,-67.4564 -29.225,-67.4476 -29.25,-67.4389 -29.275,-67.4302 -29.3,-67.4215 -29.325,-67.4129 -29.35,-67.4043 -29.375,-67.3957 -29.4,-67.3871 -29.425,-67.3785 -29.45,-67.37 -29.475,-67.3615 -29.5,-67.353 -29.525,-67.3445 -29.55,-67.3361 -29.575,-67.3276 -29.6,-67.3192 -29.625,-67.3109 -29.65,-67.3025 -29.675,-67.2942 -29.7,-67.2858 -29.725,-67.2775 -29.75,-67.2693 -29.775,-67.261 -29.8,-67.2528 -29.825,-67.2446 -29.85,-67.2364 -29.875,-67.2282 -29.9,-67.22 -29.925,-67.2119 -29.95,-67.2038 -29.975,-67.1957 -30,-67.1876 -30.025,-67.1795 -30.05,-67.1715 -30.075,-67.1634 -30.1,-67.1554 -30.125,-67.1474 -30.15,-67.1395 -30.175,-67.1315 -30.2,-67.1236 -30.225,-67.1156 -30.25,-67.1077 -30.275,-67.0999 -30.3,-67.092 -30.325,-67.0841 -30.35,-67.0763 -30.375,-67.0685 -30.4,-67.0607 -30.425,-67.0529 -30.45,-67.0451 -30.475,-67.0374 -30.5,-67.0296 -30.525,-67.0219 -30.55,-67.0142 -30.575,-67.0065 -30.6,-66.9988 -30.625,-66.9912 -30.65,-66.9835 -30.675,-66.9759 -30.7,-66.9683 -30.725,-66.9607 -30.75,-66.9531 -30.775,-66.9455 -30.8,-66.938 -30.825,-66.9304 -30.85,-66.9229 -30.875,-66.9154 -30.9,-66.9079 -30.925,-66.9004 -30.95,-66.8929 -30.975,-66.8854 -31,-66.8779 -31.025,-66.8705 -31.05,-66.8631 -31.075,-66.8556 -31.1,-66.8482 -31.125,-66.8408 -31.15,-66.8334 -31.175,-66.826 -31.2,-66.8187 -31.225,-66.8113 -31.25,-66.8039 -31.275,-66.7966 -31.3,-66.7893 -31.325,-66.782 -31.35,-66.7747 -31.375,-66.7674 -31.4,-66.7601 -31.425,-66.7528 -31.45,-66.7456 -31.475,-66.7383 -31.5,-66.7311 -31.525,-66.7238 -31.55,-66.7166 -31.575,-66.7094 -31.6,-66.7022 -31.625,-66.695 -31.65,-66.6878 -31.675,-66.6807 -31.7,-66.6735 -31.725,-66.6664 -31.75,-66.6592 -31.775,-66.6521 -31.8,-66.645 -31.825,-66.6379 -31.85,-66.6308 -31.875,-66.6237 -31.9,-66.6167 -31.925,-66.6096 -31.95,-66.6026 -31.975,-66.5955 -32,-66.5885 -32.025,-66.5815 -32.05,-66.5745 -32.075,-66.5675 -32.1,-66.5605 -32.125,-66.5535 -32.15,-66.5466 -32.175,-66.5396 -32.2,-66.5327 -32.225,-66.5258 -32.25,-66.5188 -32.275,-66.5119 -32.3,-66.505 -32.325,-66.4981 -32.35,-66.4913 -32.375,-66.4844 -32.4,-66.4776 -32.425,-66.4707 -32.45,-66.4639 -32.475,-66.4571 -32.5,-66.4503 -32.525,-66.4435 -32.55,-66.4367 -32.575,-66.4299 -32.6,-66.4231 -32.625,-66.4164 -32.65,-66.4096 -32.675,-66.4029 -32.7,-66.3962 -32.725,-66.3895 -32.75,-66.3828 -32.775,-66.3761 -32.8,-66.3694 -32.825,-66.3628 -32.85,-66.3561 -32.875,-66.3495 -32.9,-66.3429 -32.925,-66.3362 -32.95,-66.3296 -32.975,-66.323 -33,-66.3165 -33.025,-66.3099 -33.05,-66.3033 -33.075,-66.2968 -33.1,-66.2903 -33.125,-66.2837 -33.15,-66.2772 -33.175,-66.2707 -33.2,-66.2643 -33.225,-66.2578 -33.25,-66.2513 -33.275,-66.2449 -33.3,-66.2384 -33.325,-66.232 -33.35,-66.2256 -33.375,-66.2192 -33.4,-66.2128 -33.425,-66.2065 -33.45,-66.2001 -33.475,-66.1937 -33.5,-66.1874 -33.525,-66.1811 -33.55,-66.1748 -33.575,-66.1685 -33.6,-66.1622 -33.625,-66.1559 -33.65,-66.1497 -33.675,-66.1434 -33.7,-66.1372 -33.725,-66.131 -33.75,-66.1248 -33.775,-66.1186 -33.8,-66.1124 -33.825,-66.1062 -33.85,-66.1001 -33.875,-66.0939 -33.9,-66.0878 -33.925,-66.0817 -33.95,-66.0756 -33.975,-66.0695 -34,-66.0634 -34.025,-66.0574 -34.05,-66.0513 -34.075,-66.0453 -34.1,-66.0393 -34.125,-66.0333 -34.15,-66.0273 -34.175,-66.0213 -34.2,-66.0154 -34.225,-66.0094 -34.25,-66.0035 -34.275,-65.9976 -34.3,-65.9917 -34.325,-65.9858 -34.35,-65.9799 -34.375,-65.9741 -34.4,-65.9682 -34.425,-65.9624 -34.45,-65.9566 -34.475,-65.9508 -34.5,-65.945 -34.525,-65.9392 -34.55,-65.9334 -34.575,-65.9277 -34.6,-65.9219 -34.625,-65.9162 -34.65,-65.9105 -34.675,-65.9048 -34.7,-65.8991 -34.725,-65.8934 -34.75,-65.8877 -34.775,-65.882 -34.8,-65.8764 -34.825,-65.8708 -34.85,-65.8651 -34.875,-65.8595 -34.9,-65.8539 -34.925,-65.8483 -34.95,-65.8428 -34.975,-65.8372 -35,-65.8317 -35.025,-65.8261 -35.05,-65.8206 -35.075,-65.8151 -35.1,-65.8096 -35.125,-65.8041 -35.15,-65.7987 -35.175,-65.7932 -35.2,-65.7878 -35.225,-65.2721 -35.25,-64.7731 -35.275,-64.2901 -35.3,-63.8222 -35.325,-63.3686 -35.35,-62.9288 -35.375,-62.5019 -35.4,-62.0874 -35.425,-61.6845 -35.45,-61.2925 -35.475,-60.9108 -35.5,-60.5387 -35.525,-60.1756 -35.55,-59.8207 -35.575,-59.4733 -35.6,-59.1328 -35.625,-58.7984 -35.65,-58.4693 -35.675,-58.1449 -35.7,-57.8243 -35.725,-57.5069 -35.75,-57.1916 -35.775,-56.8778 -35.8,-56.5645 -35.825,-56.2509 -35.85,-55.9358 -35.875,-55.6185 -35.9,-55.2978 -35.925,-54.9725 -35.95,-54.6416 -35.975,-54.3036 -36,-53.9573 -36.025,-53.601 -36.05,-53.2331 -36.075,-52.8519 -36.1,-52.4553 -36.125,-52.041 -36.15,-51.6066 -36.175,-51.1492 -36.2,-50.6655 -36.225,-50.152 -36.25,-49.6044 -36.275,-49.0179 -36.3,-48.3868 -36.325,-47.7045 -36.35,-46.9633 -36.375,-46.1541 -36.4,-45.266 -36.425,-44.2861 -36.45,-43.1988 -36.475,-41.9855 -36.5,-40.6237 -36.525,-39.0861 -36.55,-37.3397 -36.575,-35.3445 -36.6,-33.0529 -36.625,-30.4084 -36.65,-27.3461 -36.675,-23.7944 -36.7,-19.681 -36.725,-14.9446 -36.75,-9.55619 -36.775,-3.55149 -36.8,2.93297 -36.825,9.6364 -36.85,16.19 -36.875,22.1897 -36.9,27.3004 -36.925,31.3404 -36.95,34.3003 -36.975,36.3009 -37,37.5248 -37.025,38.1589 -37.05,38.3625 -37.075,38.2569 -37.1,37.928 -37.125,37.4343 -37.15,36.8149 -37.175,36.0959 -37.2,35.2948 -37.225,34.4242 -37.25,33.4934 -37.275,32.5094 -37.3,31.4782 -37.325,30.4049 -37.35,29.294 -37.375,28.1496 -37.4,26.9754 -37.425,25.775 -37.45,24.5518 -37.475,23.3087 -37.5,22.0486 -37.525,20.7744 -37.55,19.4884 -37.575,18.1929 -37.6,16.8903 -37.625,15.5824 -37.65,14.2711 -37.675,12.9581 -37.7,11.6449 -37.725,10.3328 -37.75,9.02311 -37.775,7.71695 -37.8,6.41527 -37.825,5.11895 -37.85,3.82876 -37.875,2.54537 -37.9,1.26931 -37.925,0.00108842 -37.95,-1.25888 -37.975,-2.51033 -38,-3.75299 -38.025,-4.98667 -38.05,-6.2112 -38.075,-7.42657 -38.1,-8.63278 -38.125,-9.82982 -38.15,-11.0178 -38.175,-12.1967 -38.2,-13.3669 -38.225,-14.5285 -38.25,-15.6818 -38.275,-16.8271 -38.3,-17.9647 -38.325,-19.095 -38.35,-20.2185 -38.375,-21.3358 -38.4,-22.4475 -38.425,-23.5544 -38.45,-24.6571 -38.475,-25.7566 -38.5,-26.8538 -38.525,-27.9498 -38.55,-29.0458 -38.575,-30.1433 -38.6,-31.2439 -38.625,-32.3494 -38.65,-33.4615 -38.675,-34.5824 -38.7,-35.7143 -38.725,-36.8596 -38.75,-38.0208 -38.775,-39.2008 -38.8,-40.4024 -38.825,-41.6287 -38.85,-42.8826 -38.875,-44.167 -38.9,-45.4848 -38.925,-46.8382 -38.95,-48.2293 -38.975,-49.6591 -39,-51.1275 -39.025,-52.633 -39.05,-54.1723 -39.075,-55.7395 -39.1,-57.3264 -39.125,-58.9216 -39.15,-60.511 -39.175,-62.0776 -39.2,-63.6025 -39.225,-65.066 -39.25,-66.449 -39.275,-67.7343 -39.3,-68.9086 -39.325,-69.9633 -39.35,-70.8949 -39.375,-71.7049 -39.4,-72.3991 -39.425,-72.9863 -39.45,-73.4775 -39.475,-73.8844 -39.5,-74.2188 -39.525,-74.4915 -39.55,-74.7127 -39.575,-74.8911 -39.6,-75.0343 -39.625,-75.1486 -39.65,-75.2395 -39.675,-75.3113 -39.7,-75.3675 -39.725,-75.4112 -39.75,-75.4446 -39.775,-75.4697 -39.8,-75.4881 -39.825,-75.501 -39.85,-75.5095 -39.875,-75.5143 -39.9,-75.5161 -39.925,-75.5154 -39.95,-75.5127 -39.975,-75.5084 -40,-75.5026 -40.025,-75.4957 -40.05,-75.4879 -40.075,-75.4792 -40.1,-75.4698 -40.125,-75.4599 -40.15,-75.4495 -40.175,-75.4386 -40.2,-75.4273 -40.225,-75.4158 -40.25,-75.4039 -40.275,-75.3918 -40.3,-75.3794 -40.325,-75.3669 -40.35,-75.3541 -40.375,-75.3412 -40.4,-75.3282 -40.425,-75.3149 -40.45,-75.3016 -40.475,-75.2881 -40.5,-75.2744 -40.525,-75.2607 -40.55,-75.2468 -40.575,-75.2328 -40.6,-75.2188 -40.625,-75.2046 -40.65,-75.1902 -40.675,-75.1758 -40.7,-75.1613 -40.725,-75.1467 -40.75,-75.132 -40.775,-75.1171 -40.8,-75.1022 -40.825,-75.0872 -40.85,-75.0721 -40.875,-75.0569 -40.9,-75.0416 -40.925,-75.0261 -40.95,-75.0106 -40.975,-74.995 -41,-74.9793 -41.025,-74.9635 -41.05,-74.9476 -41.075,-74.9317 -41.1,-74.9156 -41.125,-74.8994 -41.15,-74.8831 -41.175,-74.8667 -41.2,-74.8503 -41.225,-74.8337 -41.25,-74.8171 -41.275,-74.8003 -41.3,-74.7835 -41.325,-74.7665 -41.35,-74.7495 -41.375,-74.7323 -41.4,-74.7151 -41.425,-74.6978 -41.45,-74.6804 -41.475,-74.6629 -41.5,-74.6453 -41.525,-74.6276 -41.55,-74.6098 -41.575,-74.5919 -41.6,-74.5739 -41.625,-74.5558 -41.65,-74.5376 -41.675,-74.5194 -41.7,-74.501 -41.725,-74.4826 -41.75,-74.464 -41.775,-74.4454 -41.8,-74.4267 -41.825,-74.4079 -41.85,-74.3889 -41.875,-74.3699 -41.9,-74.3508 -41.925,-74.3317 -41.95,-74.3124 -41.975,-74.293 -42,-74.2736 -42.025,-74.254 -42.05,-74.2344 -42.075,-74.2147 -42.1,-74.1948 -42.125,-74.1749 -42.15,-74.1549 -42.175,-74.1349 -42.2,-74.1147 -42.225,-74.0944 -42.25,-74.0741 -42.275,-74.0537 -42.3,-74.0332 -42.325,-74.0126 -42.35,-73.9919 -42.375,-73.9711 -42.4,-73.9503 -42.425,-73.9293 -42.45,-73.9083 -42.475,-73.8872 -42.5,-73.866 -42.525,-73.8447 -42.55,-73.8234 -42.575,-73.8019 -42.6,-73.7804 -42.625,-73.7588 -42.65,-73.7371 -42.675,-73.7154 -42.7,-73.6936 -42.725,-73.6716 -42.75,-73.6496 -42.775,-73.6276 -42.8,-73.6054 -42.825,-73.5832 -42.85,-73.5609 -42.875,-73.5385 -42.9,-72.9665 -42.925,-72.432 -42.95,-71.9321 -42.975,-71.4643 -43,-71.0263 -43.025,-70.616 -43.05,-70.2314 -43.075,-69.8707 -43.1,-69.5324 -43.125,-69.2147 -43.15,-68.9164 -43.175,-68.6361 -43.2,-68.3727 -43.225,-67.6166 -43.25,-66.9125 -43.275,-66.2565 -43.3,-65.6452 -43.325,-65.0754 -43.35,-64.5442 -43.375,-64.0487 -43.4,-63.5866 -43.425,-63.1555 -43.45,-62.7531 -43.475,-62.3774 -43.5,-62.0266 -43.525,-61.6989 -43.55,-61.3926 -43.575,-61.1062 -43.6,-60.8382 -43.625,-60.5874 -43.65,-60.3525 -43.675,-60.1322 -43.7,-59.9256 -43.725,-59.7317 -43.75,-59.5494 -43.775,-59.3779 -43.8,-59.2165 -43.825,-59.0644 -43.85,-58.9209 -43.875,-58.7854 -43.9,-58.6573 -43.925,-58.536 -43.95,-58.4211 -43.975,-58.3121 -44,-58.2086 -44.025,-58.1102 -44.05,-58.0167 -44.075,-57.9276 -44.1,-57.8427 -44.125,-57.7618 -44.15,-57.6845 -44.175,-57.6107 -44.2,-57.5402 -44.225,-57.4728 -44.25,-57.4083 -44.275,-57.3466 -44.3,-57.2876 -44.325,-57.2312 -44.35,-57.1772 -44.375,-57.1257 -44.4,-57.0764 -44.425,-57.0293 -44.45,-56.9845 -44.475,-56.9417 -44.5,-56.9011 -44.525,-56.8624 -44.55,-56.8257 -44.575,-56.7909 -44.6,-56.758 -44.625,-56.7269 -44.65,-56.6977 -44.675,-56.6703 -44.7,-56.6448 -44.725,-56.621 -44.75,-56.599 -44.775,-56.5788 -44.8,-56.5603 -44.825,-56.5437 -44.85,-56.5288 -44.875,-56.5157 -44.9,-56.5044 -44.925,-56.495 -44.95,-56.4873 -44.975,-56.4814 -45,-56.4774 -45.025,-56.4753 -45.05,-56.475 -45.075,-56.4766 -45.1,-56.48 -45.125,-56.4854 -45.15,-56.4927 -45.175,-56.502 -45.2,-56.5132 -45.225,-56.5264 -45.25,-56.5416 -45.275,-56.5589 -45.3,-56.5781 -45.325,-56.5995 -45.35,-56.6229 -45.375,-56.6484 -45.4,-56.676 -45.425,-56.7057 -45.45,-56.7376 -45.475,-56.7717 -45.5,-56.8079 -45.525,-56.8464 -45.55,-56.8871 -45.575,-56.93 -45.6,-56.9751 -45.625,-57.0225 -45.65,-57.0722 -45.675,-57.1241 -45.7,-57.1782 -45.725,-57.2345 -45.75,-57.2931 -45.775,-57.3538 -45.8,-57.4168 -45.825,-57.4819 -45.85,-57.5491 -45.875,-57.6184 -45.9,-57.6899 -45.925,-57.7635 -45.95,-57.8391 -45.975,-57.9167 -46,-57.9964 -46.025,-58.078 -46.05,-58.1616 -46.075,-58.247 -46.1,-58.3342 -46.125,-58.4231 -46.15,-58.5137 -46.175,-58.6059 -46.2,-58.6996 -46.225,-58.7947 -46.25,-58.8913 -46.275,-58.9892 -46.3,-59.0884 -46.325,-59.1887 -46.35,-59.2901 -46.375,-59.3925 -46.4,-59.4958 -46.425,-59.5998 -46.45,-59.7046 -46.475,-59.81 -46.5,-59.9159 -46.525,-60.0222 -46.55,-60.1289 -46.575,-60.2358 -46.6,-60.3429 -46.625,-60.45 -46.65,-60.5571 -46.675,-60.664 -46.7,-60.7707 -46.725,-60.8771 -46.75,-60.9831 -46.775,-61.0886 -46.8,-61.1936 -46.825,-61.298 -46.85,-61.4016 -46.875,-61.5044 -46.9,-61.6064 -46.925,-61.7075 -46.95,-61.8075 -46.975,-61.9066 -47,-62.0045 -47.025,-62.1014 -47.05,-62.197 -47.075,-62.2914 -47.1,-62.3846 -47.125,-62.4764 -47.15,-62.5669 -47.175,-62.656 -47.2,-62.7437 -47.225,-62.83 -47.25,-62.9149 -47.275,-62.9983 -47.3,-63.0803 -47.325,-63.1608 -47.35,-63.2399 -47.375,-63.3174 -47.4,-63.3935 -47.425,-63.4681 -47.45,-63.5411 -47.475,-63.6128 -47.5,-63.6829 -47.525,-63.7516 -47.55,-63.8188 -47.575,-63.8846 -47.6,-63.9489 -47.625,-64.0119 -47.65,-64.0735 -47.675,-64.1337 -47.7,-64.1925 -47.725,-64.25 -47.75,-64.3062 -47.775,-64.361 -47.8,-64.4146 -47.825,-64.4669 -47.85,-64.518 -47.875,-64.5678 -47.9,-64.6165 -47.925,-64.664 -47.95,-64.7103 -47.975,-64.7555 -48,-64.7996 -48.025,-64.8426 -48.05,-64.8846 -48.075,-64.9256 -48.1,-64.9655 -48.125,-65.0044 -48.15,-65.0424 -48.175,-65.0794 -48.2,-65.1156 -48.225,-65.1508 -48.25,-65.1851 -48.275,-65.2186 -48.3,-65.2512 -48.325,-65.283 -48.35,-65.314 -48.375,-65.3442 -48.4,-65.3736 -48.425,-65.4023 -48.45,-65.4303 -48.475,-65.4575 -48.5,-65.4841 -48.525,-65.51 -48.55,-65.5352 -48.575,-65.5598 -48.6,-65.5838 -48.625,-65.6071 -48.65,-65.6299 -48.675,-65.6521 -48.7,-65.6737 -48.725,-65.6948 -48.75,-65.7154 -48.775,-65.7354 -48.8,-65.7549 -48.825,-65.7739 -48.85,-65.7925 -48.875,-65.8106 -48.9,-65.8282 -48.925,-65.8454 -48.95,-65.8621 -48.975,-65.8785 -49,-65.8944 -49.025,-65.9099 -49.05,-65.925 -49.075,-65.9398 -49.1,-65.9542 -49.125,-65.9682 -49.15,-65.9819 -49.175,-65.9952 -49.2,-66.0082 -49.225,-66.0208 -49.25,-66.0332 -49.275,-66.0452 -49.3,-66.057 -49.325,-66.0684 -49.35,-66.0795 -49.375,-66.0904 -49.4,-66.101 -49.425,-66.1113 -49.45,-66.1213 -49.475,-66.1311 -49.5,-66.1407 -49.525,-66.15 -49.55,-66.159 -49.575,-66.1678 -49.6,-66.1764 -49.625,-66.1848 -49.65,-66.1929 -49.675,-66.2009 -49.7,-66.2086 -49.725,-66.2161 -49.75,-66.2234 -49.775,-66.2305 -49.8,-66.2375 -49.825,-66.2442 -49.85,-66.2508 -49.875,-66.2572 -49.9,-66.2634 -49.925,-66.2694 -49.95,-66.2753 -49.975,-66.281 -50,-66.2866 -50.025,-66.292 -50.05,-66.2972 -50.075,-66.3023 -50.1,-66.3073 -50.125,-66.3121 -50.15,-66.3168 -50.175,-66.3213 -50.2,-66.3257 -50.225,-66.3299 -50.25,-66.3341 -50.275,-66.3381 -50.3,-66.342 -50.325,-66.3457 -50.35,-66.3494 -50.375,-66.3529 -50.4,-66.3563 -50.425,-66.3596 -50.45,-66.3628 -50.475,-66.3659 -50.5,-66.3689 -50.525,-66.3717 -50.55,-66.3745 -50.575,-66.3772 -50.6,-66.3797 -50.625,-66.3822 -50.65,-66.3846 -50.675,-66.3869 -50.7,-66.3891 -50.725,-66.3912 -50.75,-66.3932 -50.775,-66.3951 -50.8,-66.3969 -50.825,-66.3987 -50.85,-66.4004 -50.875,-66.402 -50.9,-66.4035 -50.925,-66.4049 -50.95,-66.4063 -50.975,-66.4075 -51,-66.4087 -51.025,-66.4099 -51.05,-66.4109 -51.075,-66.4119 -51.1,-66.4128 -51.125,-66.4137 -51.15,-66.4144 -51.175,-66.4151 -51.2,-66.4158 -51.225,-66.4164 -51.25,-66.4169 -51.275,-66.4173 -51.3,-66.4177 -51.325,-66.418 -51.35,-66.4183 -51.375,-66.4185 -51.4,-66.4186 -51.425,-66.4187 -51.45,-66.4187 -51.475,-66.4187 -51.5,-66.4186 -51.525,-66.4185 -51.55,-66.4183 -51.575,-66.418 -51.6,-66.4177 -51.625,-66.4174 -51.65,-66.417 -51.675,-66.4165 -51.7,-66.416 -51.725,-66.4154 -51.75,-66.4148 -51.775,-66.4141 -51.8,-66.4134 -51.825,-66.4127 -51.85,-66.4119 -51.875,-66.411 -51.9,-66.4101 -51.925,-66.4092 -51.95,-66.4082 -51.975,-66.4072 -52,-66.4061 -52.025,-66.405 -52.05,-66.4038 -52.075,-66.4026 -52.1,-66.4014 -52.125,-66.4001 -52.15,-66.3987 -52.175,-66.3974 -52.2,-66.396 -52.225,-66.3945 -52.25,-66.393 -52.275,-66.3915 -52.3,-66.3899 -52.325,-66.3883 -52.35,-66.3867 -52.375,-66.385 -52.4,-66.3833 -52.425,-66.3816 -52.45,-66.3798 -52.475,-66.378 -52.5,-66.3761 -52.525,-66.3742 -52.55,-66.3723 -52.575,-66.3703 -52.6,-66.3683 -52.625,-66.3663 -52.65,-66.3642 -52.675,-66.3621 -52.7,-66.36 -52.725,-66.3579 -52.75,-66.3557 -52.775,-66.3535 -52.8,-66.3512 -52.825,-66.3489 -52.85,-66.3466 -52.875,-66.3443 -52.9,-66.3419 -52.925,-66.3395 -52.95,-66.3371 -52.975,-66.3346 -53,-66.3321 -53.025,-66.3296 -53.05,-66.3271 -53.075,-66.3245 -53.1,-66.3219 -53.125,-66.3193 -53.15,-66.3166 -53.175,-66.3139 -53.2,-66.3112 -53.225,-66.3085 -53.25,-66.3058 -53.275,-66.303 -53.3,-66.3002 -53.325,-66.2973 -53.35,-66.2945 -53.375,-66.2916 -53.4,-66.2887 -53.425,-66.2858 -53.45,-66.2828 -53.475,-66.2798 -53.5,-66.2768 -53.525,-66.2738 -53.55,-66.2708 -53.575,-66.2677 -53.6,-66.2646 -53.625,-66.2615 -53.65,-66.2584 -53.675,-66.2552 -53.7,-66.2521 -53.725,-66.2489 -53.75,-66.2457 -53.775,-66.2424 -53.8,-66.2392 -53.825,-66.2359 -53.85,-66.2326 -53.875,-66.2293 -53.9,-66.226 -53.925,-66.2226 -53.95,-66.2192 -53.975,-66.2159 -54,-66.2125 -54.025,-66.209 -54.05,-66.2056 -54.075,-66.2021 -54.1,-66.1987 -54.125,-66.1952 -54.15,-66.1917 -54.175,-66.1881 -54.2,-66.1846 -54.225,-66.181 -54.25,-66.1775 -54.275,-66.1739 -54.3,-66.1703 -54.325,-66.1666 -54.35,-66.163 -54.375,-66.1594 -54.4,-66.1557 -54.425,-66.152 -54.45,-66.1483 -54.475,-66.1446 -54.5,-66.1409 -54.525,-66.1371 -54.55,-66.1334 -54.575,-66.1296 -54.6,-66.1259 -54.625,-66.1221 -54.65,-66.1183 -54.675,-66.1145 -54.7,-66.1106 -54.725,-66.1068 -54.75,-66.103 -54.775,-66.0991 -54.8,-66.0952 -54.825,-66.0913 -54.85,-66.0874 -54.875,-66.0835 -54.9,-66.0796 -54.925,-66.0757 -54.95,-66.0718 -54.975,-66.0678 -55,-66.0639 -55.025,-66.0599 -55.05,-66.0559 -55.075,-66.052 -55.1,-66.048 -55.125,-66.044 -55.15,-66.04 -55.175,-66.0359 -55.2,-66.0319 -55.225,-66.0279 -55.25,-66.0238 -55.275,-66.0198 -55.3,-66.0157 -55.325,-66.0117 -55.35,-66.0076 -55.375,-66.0035 -55.4,-65.9995 -55.425,-65.9954 -55.45,-65.9913 -55.475,-65.9872 -55.5,-65.9831 -55.525,-65.9789 -55.55,-65.9748 -55.575,-65.9707 -55.6,-65.9666 -55.625,-65.9624 -55.65,-65.9583 -55.675,-65.9541 -55.7,-65.9499 -55.725,-65.9458 -55.75,-65.9416 -55.775,-65.9374 -55.8,-65.9332 -55.825,-65.929 -55.85,-65.9248 -55.875,-65.9206 -55.9,-65.9164 -55.925,-65.9122 -55.95,-65.908 -55.975,-65.9038 -56,-65.8996 -56.025,-65.8953 -56.05,-65.8911 -56.075,-65.8868 -56.1,-65.8826 -56.125,-65.8784 -56.15,-65.8741 -56.175,-65.8698 -56.2,-65.8656 -56.225,-65.8613 -56.25,-65.8571 -56.275,-65.8528 -56.3,-65.8485 -56.325,-65.8443 -56.35,-65.84 -56.375,-65.8357 -56.4,-65.8314 -56.425,-65.8272 -56.45,-65.8229 -56.475,-65.8186 -56.5,-65.8143 -56.525,-65.81 -56.55,-65.8057 -56.575,-65.8015 -56.6,-65.7972 -56.625,-65.7929 -56.65,-65.7886 -56.675,-65.7843 -56.7,-65.78 -56.725,-65.7757 -56.75,-65.7715 -56.775,-65.7672 -56.8,-65.7629 -56.825,-65.7586 -56.85,-65.7543 -56.875,-65.7501 -56.9,-65.7458 -56.925,-65.7415 -56.95,-65.7372 -56.975,-65.733 -57,-65.7287 -57.025,-65.7244 -57.05,-65.7202 -57.075,-65.7159 -57.1,-65.7117 -57.125,-65.7074 -57.15,-65.7032 -57.175,-65.6989 -57.2,-65.6947 -57.225,-65.6904 -57.25,-65.6862 -57.275,-65.682 -57.3,-65.6777 -57.325,-65.6735 -57.35,-65.6693 -57.375,-65.6651 -57.4,-65.6609 -57.425,-65.6567 -57.45,-65.6525 -57.475,-65.6483 -57.5,-65.6441 -57.525,-65.6399 -57.55,-65.6357 -57.575,-65.6316 -57.6,-65.6274 -57.625,-65.6232 -57.65,-65.6191 -57.675,-65.6149 -57.7,-65.6108 -57.725,-65.6067 -57.75,-65.6025 -57.775,-65.5984 -57.8,-65.5943 -57.825,-65.5902 -57.85,-65.5861 -57.875,-65.582 -57.9,-65.5779 -57.925,-65.5739 -57.95,-65.5698 -57.975,-65.5657 -58,-65.5617 -58.025,-65.5576 -58.05,-65.5536 -58.075,-65.5496 -58.1,-65.5456 -58.125,-65.5415 -58.15,-65.5375 -58.175,-65.5336 -58.2,-65.5296 -58.225,-65.5256 -58.25,-65.5216 -58.275,-65.5177 -58.3,-65.5137 -58.325,-65.5098 -58.35,-65.5059 -58.375,-65.502 -58.4,-65.4981 -58.425,-65.4942 -58.45,-65.4903 -58.475,-65.4864 -58.5,-65.4826 -58.525,-65.4787 -58.55,-65.4749 -58.575,-65.471 -58.6,-65.4672 -58.625,-65.4634 -58.65,-65.4596 -58.675,-65.4558 -58.7,-65.452 -58.725,-65.4483 -58.75,-65.4445 -58.775,-65.4408 -58.8,-65.4371 -58.825,-65.4333 -58.85,-65.4296 -58.875,-65.4259 -58.9,-65.4223 -58.925,-65.4186 -58.95,-65.4149 -58.975,-65.4113 -59,-65.4077 -59.025,-65.404 -59.05,-65.4004 -59.075,-65.3968 -59.1,-65.3932 -59.125,-65.3897 -59.15,-65.3861 -59.175,-65.3826 -59.2,-65.379 -59.225,-65.3755 -59.25,-65.372 -59.275,-65.3685 -59.3,-65.3651 -59.325,-65.3616 -59.35,-65.3581 -59.375,-65.3547 -59.4,-65.3513 -59.425,-65.3479 -59.45,-65.3445 -59.475,-65.3411 -59.5,-65.3377 -59.525,-65.3344 -59.55,-65.331 -59.575,-65.3277 -59.6,-65.3244 -59.625,-65.3211 -59.65,-65.3178 -59.675,-65.3146 -59.7,-65.3113 -59.725,-65.3081 -59.75,-65.3049 -59.775,-65.3016 -59.8,-65.2985 -59.825,-65.2953 -59.85,-65.2921 -59.875,-65.289 -59.9,-65.2858 -59.925,-65.2827 -59.95,-65.2796 -59.975,-65.2765 -60,-65.2734 -60.025,-65.2704 -60.05,-65.2673 -60.075,-65.2643 -60.1,-65.2613 -60.125,-65.2583 -60.15,-65.2553 -60.175,-65.2523 -60.2,-65.2494 -60.225,-65.2464 -60.25,-65.2435 -60.275,-65.2406 -60.3,-65.2377 -60.325,-65.2349 -60.35,-65.232 -60.375,-65.2292 -60.4,-65.2263 -60.425,-65.2235 -60.45,-65.2207 -60.475,-65.2179 -60.5,-65.2152 -60.525,-65.2124 -60.55,-65.2097 -60.575,-65.207 -60.6,-65.2043 -60.625,-65.2016 -60.65,-65.1989 -60.675,-65.1963 -60.7,-65.1936 -60.725,-65.191 -60.75,-65.1884 -60.775,-65.1858 -60.8,-65.1832 -60.825,-65.1807 -60.85,-65.1781 -60.875,-65.1756 -60.9,-65.1731 -60.925,-65.1706 -60.95,-65.1681 -60.975,-65.1657 -61,-65.1632 -61.025,-65.1608 -61.05,-65.1584 -61.075,-65.156 -61.1,-65.1536 -61.125,-65.1513 -61.15,-65.1489 -61.175,-65.1466 -61.2,-65.1443 -61.225,-65.142 -61.25,-65.1397 -61.275,-65.1374 -61.3,-65.1352 -61.325,-65.1329 -61.35,-65.1307 -61.375,-65.1285 -61.4,-65.1263 -61.425,-65.1242 -61.45,-65.122 -61.475,-65.1199 -61.5,-65.1178 -61.525,-65.1156 -61.55,-65.1136 -61.575,-65.1115 -61.6,-65.1094 -61.625,-65.1074 -61.65,-65.1054 -61.675,-65.1034 -61.7,-65.1014 -61.725,-65.0994 -61.75,-65.0974 -61.775,-65.0955 -61.8,-65.0935 -61.825,-65.0916 -61.85,-65.0897 -61.875,-65.0879 -61.9,-65.086 -61.925,-65.0841 -61.95,-65.0823 -61.975,-65.0805 -62,-65.0787 -62.025,-65.0769 -62.05,-65.0751 -62.075,-65.0734 -62.1,-65.0716 -62.125,-65.0699 -62.15,-65.0682 -62.175,-65.0665 -62.2,-65.0648 -62.225,-65.0631 -62.25,-65.0615 -62.275,-65.0599 -62.3,-65.0582 -62.325,-65.0566 -62.35,-65.0551 -62.375,-65.0535 -62.4,-65.0519 -62.425,-65.0504 -62.45,-65.0489 -62.475,-65.0473 -62.5,-65.0458 -62.525,-65.0444 -62.55,-65.0429 -62.575,-65.0414 -62.6,-65.04 -62.625,-65.0386 -62.65,-65.0372 -62.675,-65.0358 -62.7,-65.0344 -62.725,-65.033 -62.75,-65.0317 -62.775,-65.0303 -62.8,-65.029 -62.825,-65.0277 -62.85,-65.0264 -62.875,-65.0251 -62.9,-65.0239 -62.925,-65.0226 -62.95,-65.0214 -62.975,-65.0201 -63,-65.0189 -63.025,-65.0177 -63.05,-65.0166 -63.075,-65.0154 -63.1,-65.0142 -63.125,-65.0131 -63.15,-65.012 -63.175,-65.0109 -63.2,-65.0098 -63.225,-65.0087 -63.25,-65.0076 -63.275,-65.0065 -63.3,-65.0055 -63.325,-65.0044 -63.35,-65.0034 -63.375,-65.0024 -63.4,-65.0014 -63.425,-65.0004 -63.45,-64.9995 -63.475,-64.9985 -63.5,-64.9976 -63.525,-64.9966 -63.55,-64.9957 -63.575,-64.9948 -63.6,-64.9939 -63.625,-64.993 -63.65,-64.9922 -63.675,-64.9913 -63.7,-64.9904 -63.725,-64.9896 -63.75,-64.9888 -63.775,-64.988 -63.8,-64.9872 -63.825,-64.9864 -63.85,-64.9856 -63.875,-64.9848 -63.9,-64.9841 -63.925,-64.9833 -63.95,-64.9826 -63.975,-64.9819 -64,-64.9811 -64.025,-64.9804 -64.05,-64.9797 -64.075,-64.9791 -64.1,-64.9784 -64.125,-64.9777 -64.15,-64.9771 -64.175,-64.9764 -64.2,-64.9758 -64.225,-64.9752 -64.25,-64.9745 -64.275,-64.9739 -64.3,-64.9734 -64.325,-64.9728 -64.35,-64.9722 -64.375,-64.9716 -64.4,-64.9711 -64.425,-64.9705 -64.45,-64.97 -64.475,-64.9695 -64.5,-64.969 -64.525,-64.9685 -64.55,-64.968 -64.575,-64.9675 -64.6,-64.967 -64.625,-64.9665 -64.65,-64.9661 -64.675,-64.9656 -64.7,-64.9652 -64.725,-64.9647 -64.75,-64.9643 -64.775,-64.9639 -64.8,-64.9635 -64.825,-64.9631 -64.85,-64.9627 -64.875,-64.9623 -64.9,-64.9619 -64.925,-64.9616 -64.95,-64.9612 -64.975,-64.9609 -65,-64.9605 -65.025,-64.9602 -65.05,-64.9599 -65.075,-64.9596 -65.1,-64.9592 -65.125,-64.9589 -65.15,-64.9587 -65.175,-64.9584 -65.2,-64.9581 -65.225,-64.9578 -65.25,-64.9576 -65.275,-64.9573 -65.3,-64.9571 -65.325,-64.9568 -65.35,-64.9566 -65.375,-64.9564 -65.4,-64.9561 -65.425,-64.9559 -65.45,-64.9557 -65.475,-64.9555 -65.5,-64.9553 -65.525,-64.9552 -65.55,-64.955 -65.575,-64.9548 -65.6,-64.9547 -65.625,-64.9545 -65.65,-64.9544 -65.675,-64.9542 -65.7,-64.9541 -65.725,-64.9539 -65.75,-64.9538 -65.775,-64.9537 -65.8,-64.9536 -65.825,-64.9535 -65.85,-64.9534 -65.875,-64.9533 -65.9,-64.9532 -65.925,-64.9531 -65.95,-64.953 -65.975,-64.953 -66,-64.9529 -66.025,-64.9528 -66.05,-64.9528 -66.075,-64.9527 -66.1,-64.9527 -66.125,-64.9527 -66.15,-64.9526 -66.175,-64.9526 -66.2,-64.9526 -66.225,-64.9526 -66.25,-64.9525 -66.275,-64.9525 -66.3,-64.9525 -66.325,-64.9525 -66.35,-64.9525 -66.375,-64.9526 -66.4,-64.9526 -66.425,-64.9526 -66.45,-64.9526 -66.475,-64.9526 -66.5,-64.9527 -66.525,-64.9527 -66.55,-64.9528 -66.575,-64.9528 -66.6,-64.9529 -66.625,-64.9529 -66.65,-64.953 -66.675,-64.953 -66.7,-64.9531 -66.725,-64.9532 -66.75,-64.9532 -66.775,-64.9533 -66.8,-64.9534 -66.825,-64.9535 -66.85,-64.9536 -66.875,-64.9537 -66.9,-64.9538 -66.925,-64.9539 -66.95,-64.954 -66.975,-64.9541 -67,-64.9542 -67.025,-64.9543 -67.05,-64.9544 -67.075,-64.9545 -67.1,-64.9547 -67.125,-64.9548 -67.15,-64.9549 -67.175,-64.955 -67.2,-64.9552 -67.225,-64.9553 -67.25,-64.9554 -67.275,-64.9556 -67.3,-64.9557 -67.325,-64.9559 -67.35,-64.956 -67.375,-64.9562 -67.4,-64.9563 -67.425,-64.9565 -67.45,-64.9566 -67.475,-64.9568 -67.5,-64.957 -67.525,-64.9571 -67.55,-64.9573 -67.575,-64.9574 -67.6,-64.9576 -67.625,-64.9578 -67.65,-64.958 -67.675,-64.9581 -67.7,-64.9583 -67.725,-64.9585 -67.75,-64.9587 -67.775,-64.9589 -67.8,-64.959 -67.825,-64.9592 -67.85,-64.9594 -67.875,-64.9596 -67.9,-64.9598 -67.925,-64.96 -67.95,-64.9602 -67.975,-64.9604 -68,-64.9606 -68.025,-64.9608 -68.05,-64.961 -68.075,-64.9611 -68.1,-64.9613 -68.125,-64.9615 -68.15,-64.9617 -68.175,-64.962 -68.2,-64.9622 -68.225,-64.9624 -68.25,-64.9626 -68.275,-64.9628 -68.3,-64.963 -68.325,-64.9632 -68.35,-64.9634 -68.375,-64.9636 -68.4,-64.9638 -68.425,-64.964 -68.45,-64.9642 -68.475,-64.9644 -68.5,-64.9646 -68.525,-64.9648 -68.55,-64.9651 -68.575,-64.9653 -68.6,-64.9655 -68.625,-64.9657 -68.65,-64.9659 -68.675,-64.9661 -68.7,-64.9663 -68.725,-64.9665 -68.75,-64.9668 -68.775,-64.967 -68.8,-64.9672 -68.825,-64.9674 -68.85,-64.9676 -68.875,-64.9678 -68.9,-64.968 -68.925,-64.9682 -68.95,-64.9684 -68.975,-64.9687 -69,-64.9689 -69.025,-64.9691 -69.05,-64.9693 -69.075,-64.9695 -69.1,-64.9697 -69.125,-64.9699 -69.15,-64.9701 -69.175,-64.9703 -69.2,-64.9705 -69.225,-64.9708 -69.25,-64.971 -69.275,-64.9712 -69.3,-64.9714 -69.325,-64.9716 -69.35,-64.9718 -69.375,-64.972 -69.4,-64.9722 -69.425,-64.9724 -69.45,-64.9726 -69.475,-64.9728 -69.5,-64.973 -69.525,-64.9732 -69.55,-64.9734 -69.575,-64.9736 -69.6,-64.9738 -69.625,-64.974 -69.65,-64.9742 -69.675,-64.9744 -69.7,-64.9746 -69.725,-64.9748 -69.75,-64.975 -69.775,-64.9752 -69.8,-64.9753 -69.825,-64.9755 -69.85,-64.9757 -69.875,-64.9759 -69.9,-64.9761 -69.925,-64.9763 -69.95,-64.9765 -69.975,-64.9766 -70,-64.9768 -70.025,-64.977 -70.05,-64.9772 -70.075,-64.9774 -70.1,-64.9775 -70.125,-64.9777 -70.15,-64.9779 -70.175,-64.9781 -70.2,-64.9782 -70.225,-64.9784 -70.25,-64.9786 -70.275,-64.9787 -70.3,-64.9789 -70.325,-64.9791 -70.35,-64.9792 -70.375,-64.9794 -70.4,-64.9796 -70.425,-64.9797 -70.45,-64.9799 -70.475,-64.98 -70.5,-64.9802 -70.525,-64.9803 -70.55,-64.9805 -70.575,-64.9807 -70.6,-64.9808 -70.625,-64.981 -70.65,-64.9811 -70.675,-64.9812 -70.7,-64.9814 -70.725,-64.9815 -70.75,-64.9817 -70.775,-64.9818 -70.8,-64.982 -70.825,-64.9821 -70.85,-64.9822 -70.875,-64.9824 -70.9,-64.9825 -70.925,-64.9826 -70.95,-64.9828 -70.975,-64.9829 -71,-64.983 -71.025,-64.9831 -71.05,-64.9833 -71.075,-64.9834 -71.1,-64.9835 -71.125,-64.9836 -71.15,-64.9837 -71.175,-64.9839 -71.2,-64.984 -71.225,-64.9841 -71.25,-64.9842 -71.275,-64.9843 -71.3,-64.9844 -71.325,-64.9845 -71.35,-64.9846 -71.375,-64.9847 -71.4,-64.9848 -71.425,-64.9849 -71.45,-64.985 -71.475,-64.9851 -71.5,-64.9852 -71.525,-64.9853 -71.55,-64.9854 -71.575,-64.9855 -71.6,-64.9856 -71.625,-64.9857 -71.65,-64.9858 -71.675,-64.9859 -71.7,-64.9859 -71.725,-64.986 -71.75,-64.9861 -71.775,-64.9862 -71.8,-64.9863 -71.825,-64.9863 -71.85,-64.9864 -71.875,-64.9865 -71.9,-64.9866 -71.925,-64.9866 -71.95,-64.9867 -71.975,-64.9868 -72,-64.9868 -72.025,-64.9869 -72.05,-64.987 -72.075,-64.987 -72.1,-64.9871 -72.125,-64.9871 -72.15,-64.9872 -72.175,-64.9873 -72.2,-64.9873 -72.225,-64.9874 -72.25,-64.9874 -72.275,-64.9875 -72.3,-64.9875 -72.325,-64.9876 -72.35,-64.9876 -72.375,-64.9876 -72.4,-64.9877 -72.425,-64.9877 -72.45,-64.9878 -72.475,-64.9878 -72.5,-64.9878 -72.525,-64.9879 -72.55,-64.9879 -72.575,-64.9879 -72.6,-64.988 -72.625,-64.988 -72.65,-64.988 -72.675,-64.9881 -72.7,-64.9881 -72.725,-64.9881 -72.75,-64.9881 -72.775,-64.9882 -72.8,-64.9882 -72.825,-64.9882 -72.85,-64.9882 -72.875,-64.9882 -72.9,-64.9882 -72.925,-64.9883 -72.95,-64.9883 -72.975,-64.9883 -73,-64.9883 -73.025,-64.9883 -73.05,-64.9883 -73.075,-64.9883 -73.1,-64.9883 -73.125,-64.9883 -73.15,-64.9883 -73.175,-64.9883 -73.2,-64.9883 -73.225,-64.9883 -73.25,-64.9883 -73.275,-64.9883 -73.3,-64.9883 -73.325,-64.9883 -73.35,-64.9883 -73.375,-64.9883 -73.4,-64.9883 -73.425,-64.9883 -73.45,-64.9883 -73.475,-64.9883 -73.5,-64.9882 -73.525,-64.9882 -73.55,-64.9882 -73.575,-64.9882 -73.6,-64.9882 -73.625,-64.9882 -73.65,-64.9881 -73.675,-64.9881 -73.7,-64.9881 -73.725,-64.9881 -73.75,-64.988 -73.775,-64.988 -73.8,-64.988 -73.825,-64.988 -73.85,-64.9879 -73.875,-64.9879 -73.9,-64.9879 -73.925,-64.9879 -73.95,-64.9878 -73.975,-64.9878 -74,-64.9878 -74.025,-64.9877 -74.05,-64.9877 -74.075,-64.9877 -74.1,-64.9876 -74.125,-64.9876 -74.15,-64.9875 -74.175,-64.9875 -74.2,-64.9875 -74.225,-64.9874 -74.25,-64.9874 -74.275,-64.9873 -74.3,-64.9873 -74.325,-64.9873 -74.35,-64.9872 -74.375,-64.9872 -74.4,-64.9871 -74.425,-64.9871 -74.45,-64.987 -74.475,-64.987 -74.5,-64.9869 -74.525,-64.9869 -74.55,-64.9868 -74.575,-64.9868 -74.6,-64.9867 -74.625,-64.9867 -74.65,-64.9866 -74.675,-64.9866 -74.7,-64.9865 -74.725,-64.9865 -74.75,-64.9864 -74.775,-64.9864 -74.8,-64.9863 -74.825,-64.9863 -74.85,-64.9862 -74.875,-64.9862 -74.9,-64.9861 -74.925,-64.986 -74.95,-64.986 -74.975,-64.9859 -75,-64.9859 -75.025,-64.9858 -75.05,-64.9857 -75.075,-64.9857 -75.1,-64.9856 -75.125,-64.9856 -75.15,-64.9855 -75.175,-64.9854 -75.2,-64.9854 -75.225,-64.9853 -75.25,-64.9852 -75.275,-64.9852 -75.3,-64.9851 -75.325,-64.9851 -75.35,-64.985 -75.375,-64.9849 -75.4,-64.9849 -75.425,-64.9848 -75.45,-64.9847 -75.475,-64.9847 -75.5,-64.9846 -75.525,-64.9845 -75.55,-64.9845 -75.575,-64.9844 -75.6,-64.9843 -75.625,-64.9843 -75.65,-64.9842 -75.675,-64.9841 -75.7,-64.9841 -75.725,-64.984 -75.75,-64.9839 -75.775,-64.9838 -75.8,-64.9838 -75.825,-64.9837 -75.85,-64.9836 -75.875,-64.9836 -75.9,-64.9835 -75.925,-64.9834 -75.95,-64.9834 -75.975,-64.9833 -76,-64.9832 -76.025,-64.9831 -76.05,-64.9831 -76.075,-64.983 -76.1,-64.9829 -76.125,-64.9829 -76.15,-64.9828 -76.175,-64.9827 -76.2,-64.9826 -76.225,-64.9826 -76.25,-64.9825 -76.275,-64.9824 -76.3,-64.9824 -76.325,-64.9823 -76.35,-64.9822 -76.375,-64.9821 -76.4,-64.9821 -76.425,-64.982 -76.45,-64.9819 -76.475,-64.9819 -76.5,-64.9818 -76.525,-64.9817 -76.55,-64.9817 -76.575,-64.9816 -76.6,-64.9815 -76.625,-64.9814 -76.65,-64.9814 -76.675,-64.9813 -76.7,-64.9812 -76.725,-64.9812 -76.75,-64.9811 -76.775,-64.981 -76.8,-64.9809 -76.825,-64.9809 -76.85,-64.9808 -76.875,-64.9807 -76.9,-64.9807 -76.925,-64.9806 -76.95,-64.9805 -76.975,-64.9805 -77,-64.9804 -77.025,-64.9803 -77.05,-64.9802 -77.075,-64.9802 -77.1,-64.9801 -77.125,-64.98 -77.15,-64.98 -77.175,-64.9799 -77.2,-64.9798 -77.225,-64.9798 -77.25,-64.9797 -77.275,-64.9796 -77.3,-64.9796 -77.325,-64.9795 -77.35,-64.9794 -77.375,-64.9794 -77.4,-64.9793 -77.425,-64.9792 -77.45,-64.9792 -77.475,-64.9791 -77.5,-64.979 -77.525,-64.979 -77.55,-64.9789 -77.575,-64.9788 -77.6,-64.9788 -77.625,-64.9787 -77.65,-64.9787 -77.675,-64.9786 -77.7,-64.9785 -77.725,-64.9785 -77.75,-64.9784 -77.775,-64.9783 -77.8,-64.9783 -77.825,-64.9782 -77.85,-64.9782 -77.875,-64.9781 -77.9,-64.978 -77.925,-64.978 -77.95,-64.9779 -77.975,-64.9779 -78,-64.9778 -78.025,-64.9777 -78.05,-64.9777 -78.075,-64.9776 -78.1,-64.9776 -78.125,-64.9775 -78.15,-64.9774 -78.175,-64.9774 -78.2,-64.9773 -78.225,-64.9773 -78.25,-64.9772 -78.275,-64.9772 -78.3,-64.9771 -78.325,-64.9771 -78.35,-64.977 -78.375,-64.9769 -78.4,-64.9769 -78.425,-64.9768 -78.45,-64.9768 -78.475,-64.9767 -78.5,-64.9767 -78.525,-64.9766 -78.55,-64.9766 -78.575,-64.9765 -78.6,-64.9765 -78.625,-64.9764 -78.65,-64.9764 -78.675,-64.9763 -78.7,-64.9763 -78.725,-64.9762 -78.75,-64.9762 -78.775,-64.9761 -78.8,-64.9761 -78.825,-64.976 -78.85,-64.976 -78.875,-64.9759 -78.9,-64.9759 -78.925,-64.9758 -78.95,-64.9758 -78.975,-64.9758 -79,-64.9757 -79.025,-64.9757 -79.05,-64.9756 -79.075,-64.9756 -79.1,-64.9755 -79.125,-64.9755 -79.15,-64.9754 -79.175,-64.9754 -79.2,-64.9754 -79.225,-64.9753 -79.25,-64.9753 -79.275,-64.9752 -79.3,-64.9752 -79.325,-64.9752 -79.35,-64.9751 -79.375,-64.9751 -79.4,-64.975 -79.425,-64.975 -79.45,-64.975 -79.475,-64.9749 -79.5,-64.9749 -79.525,-64.9749 -79.55,-64.9748 -79.575,-64.9748 -79.6,-64.9747 -79.625,-64.9747 -79.65,-64.9747 -79.675,-64.9746 -79.7,-64.9746 -79.725,-64.9746 -79.75,-64.9745 -79.775,-64.9745 -79.8,-64.9745 -79.825,-64.9744 -79.85,-64.9744 -79.875,-64.9744 -79.9,-64.9744 -79.925,-64.9743 -79.95,-64.9743 -79.975,-64.9743 -80,-64.9742 -80.025,-64.9742 -80.05,-64.9742 -80.075,-64.9741 -80.1,-64.9741 -80.125,-64.9741 -80.15,-64.9741 -80.175,-64.974 -80.2,-64.974 -80.225,-64.974 -80.25,-64.974 -80.275,-64.9739 -80.3,-64.9739 -80.325,-64.9739 -80.35,-64.9739 -80.375,-64.9738 -80.4,-64.9738 -80.425,-64.9738 -80.45,-64.9738 -80.475,-64.9738 -80.5,-64.9737 -80.525,-64.9737 -80.55,-64.9737 -80.575,-64.9737 -80.6,-64.9736 -80.625,-64.9736 -80.65,-64.9736 -80.675,-64.9736 -80.7,-64.9736 -80.725,-64.9735 -80.75,-64.9735 -80.775,-64.9735 -80.8,-64.9735 -80.825,-64.9735 -80.85,-64.9735 -80.875,-64.9734 -80.9,-64.9734 -80.925,-64.9734 -80.95,-64.9734 -80.975,-64.9734 -81,-64.9734 -81.025,-64.9734 -81.05,-64.9733 -81.075,-64.9733 -81.1,-64.9733 -81.125,-64.9733 -81.15,-64.9733 -81.175,-64.9733 -81.2,-64.9733 -81.225,-64.9732 -81.25,-64.9732 -81.275,-64.9732 -81.3,-64.9732 -81.325,-64.9732 -81.35,-64.9732 -81.375,-64.9732 -81.4,-64.9732 -81.425,-64.9732 -81.45,-64.9732 -81.475,-64.9731 -81.5,-64.9731 -81.525,-64.9731 -81.55,-64.9731 -81.575,-64.9731 -81.6,-64.9731 -81.625,-64.9731 -81.65,-64.9731 -81.675,-64.9731 -81.7,-64.9731 -81.725,-64.9731 -81.75,-64.9731 -81.775,-64.9731 -81.8,-64.973 -81.825,-64.973 -81.85,-64.973 -81.875,-64.973 -81.9,-64.973 -81.925,-64.973 -81.95,-64.973 -81.975,-64.973 -82,-64.973 -82.025,-64.973 -82.05,-64.973 -82.075,-64.973 -82.1,-64.973 -82.125,-64.973 -82.15,-64.973 -82.175,-64.973 -82.2,-64.973 -82.225,-64.973 -82.25,-64.973 -82.275,-64.973 -82.3,-64.973 -82.325,-64.973 -82.35,-64.973 -82.375,-64.973 -82.4,-64.973 -82.425,-64.973 -82.45,-64.973 -82.475,-64.973 -82.5,-64.973 -82.525,-64.973 -82.55,-64.973 -82.575,-64.973 -82.6,-64.973 -82.625,-64.973 -82.65,-64.973 -82.675,-64.973 -82.7,-64.973 -82.725,-64.973 -82.75,-64.973 -82.775,-64.973 -82.8,-64.973 -82.825,-64.973 -82.85,-64.973 -82.875,-64.973 -82.9,-64.973 -82.925,-64.973 -82.95,-64.973 -82.975,-64.973 -83,-64.973 -83.025,-64.973 -83.05,-64.973 -83.075,-64.9731 -83.1,-64.9731 -83.125,-64.9731 -83.15,-64.9731 -83.175,-64.9731 -83.2,-64.9731 -83.225,-64.9731 -83.25,-64.9731 -83.275,-64.9731 -83.3,-64.9731 -83.325,-64.9731 -83.35,-64.9731 -83.375,-64.9731 -83.4,-64.9731 -83.425,-64.9731 -83.45,-64.9731 -83.475,-64.9731 -83.5,-64.9732 -83.525,-64.9732 -83.55,-64.9732 -83.575,-64.9732 -83.6,-64.9732 -83.625,-64.9732 -83.65,-64.9732 -83.675,-64.9732 -83.7,-64.9732 -83.725,-64.9732 -83.75,-64.9732 -83.775,-64.9732 -83.8,-64.9732 -83.825,-64.9732 -83.85,-64.9733 -83.875,-64.9733 -83.9,-64.9733 -83.925,-64.9733 -83.95,-64.9733 -83.975,-64.9733 -84,-64.9733 -84.025,-64.9733 -84.05,-64.9733 -84.075,-64.9733 -84.1,-64.9733 -84.125,-64.9733 -84.15,-64.9734 -84.175,-64.9734 -84.2,-64.9734 -84.225,-64.9734 -84.25,-64.9734 -84.275,-64.9734 -84.3,-64.9734 -84.325,-64.9734 -84.35,-64.9734 -84.375,-64.9734 -84.4,-64.9734 -84.425,-64.9735 -84.45,-64.9735 -84.475,-64.9735 -84.5,-64.9735 -84.525,-64.9735 -84.55,-64.9735 -84.575,-64.9735 -84.6,-64.9735 -84.625,-64.9735 -84.65,-64.9735 -84.675,-64.9735 -84.7,-64.9736 -84.725,-64.9736 -84.75,-64.9736 -84.775,-64.9736 -84.8,-64.9736 -84.825,-64.9736 -84.85,-64.9736 -84.875,-64.9736 -84.9,-64.9736 -84.925,-64.9736 -84.95,-64.9736 -84.975,-64.9737 -85,-64.9737 -85.025,-64.9737 -85.05,-64.9737 -85.075,-64.9737 -85.1,-64.9737 -85.125,-64.9737 -85.15,-64.9737 -85.175,-64.9737 -85.2,-64.9737 -85.225,-64.9738 -85.25,-64.9738 -85.275,-64.9738 -85.3,-64.9738 -85.325,-64.9738 -85.35,-64.9738 -85.375,-64.9738 -85.4,-64.9738 -85.425,-64.9738 -85.45,-64.9738 -85.475,-64.9738 -85.5,-64.9739 -85.525,-64.9739 -85.55,-64.9739 -85.575,-64.9739 -85.6,-64.9739 -85.625,-64.9739 -85.65,-64.9739 -85.675,-64.9739 -85.7,-64.9739 -85.725,-64.9739 -85.75,-64.9739 -85.775,-64.974 -85.8,-64.974 -85.825,-64.974 -85.85,-64.974 -85.875,-64.974 -85.9,-64.974 -85.925,-64.974 -85.95,-64.974 -85.975,-64.974 -86,-64.974 -86.025,-64.974 -86.05,-64.974 -86.075,-64.9741 -86.1,-64.9741 -86.125,-64.9741 -86.15,-64.9741 -86.175,-64.9741 -86.2,-64.9741 -86.225,-64.9741 -86.25,-64.9741 -86.275,-64.9741 -86.3,-64.9741 -86.325,-64.9741 -86.35,-64.9741 -86.375,-64.9742 -86.4,-64.9742 -86.425,-64.9742 -86.45,-64.9742 -86.475,-64.9742 -86.5,-64.9742 -86.525,-64.9742 -86.55,-64.9742 -86.575,-64.9742 -86.6,-64.9742 -86.625,-64.9742 -86.65,-64.9742 -86.675,-64.9742 -86.7,-64.9742 -86.725,-64.9743 -86.75,-64.9743 -86.775,-64.9743 -86.8,-64.9743 -86.825,-64.9743 -86.85,-64.9743 -86.875,-64.9743 -86.9,-64.9743 -86.925,-64.9743 -86.95,-64.9743 -86.975,-64.9743 -87,-64.9743 -87.025,-64.9743 -87.05,-64.9743 -87.075,-64.9743 -87.1,-64.9743 -87.125,-64.9744 -87.15,-64.9744 -87.175,-64.9744 -87.2,-64.9744 -87.225,-64.9744 -87.25,-64.9744 -87.275,-64.9744 -87.3,-64.9744 -87.325,-64.9744 -87.35,-64.9744 -87.375,-64.9744 -87.4,-64.9744 -87.425,-64.9744 -87.45,-64.9744 -87.475,-64.9744 -87.5,-64.9744 -87.525,-64.9744 -87.55,-64.9744 -87.575,-64.9744 -87.6,-64.9745 -87.625,-64.9745 -87.65,-64.9745 -87.675,-64.9745 -87.7,-64.9745 -87.725,-64.9745 -87.75,-64.9745 -87.775,-64.9745 -87.8,-64.9745 -87.825,-64.9745 -87.85,-64.9745 -87.875,-64.9745 -87.9,-64.9745 -87.925,-64.9745 -87.95,-64.9745 -87.975,-64.9745 -88,-64.9745 -88.025,-64.9745 -88.05,-64.9745 -88.075,-64.9745 -88.1,-64.9745 -88.125,-64.9745 -88.15,-64.9745 -88.175,-64.9745 -88.2,-64.9745 -88.225,-64.9745 -88.25,-64.9745 -88.275,-64.9746 -88.3,-64.9746 -88.325,-64.9746 -88.35,-64.9746 -88.375,-64.9746 -88.4,-64.9746 -88.425,-64.9746 -88.45,-64.9746 -88.475,-64.9746 -88.5,-64.9746 -88.525,-64.9746 -88.55,-64.9746 -88.575,-64.9746 -88.6,-64.9746 -88.625,-64.9746 -88.65,-64.9746 -88.675,-64.9746 -88.7,-64.9746 -88.725,-64.9746 -88.75,-64.9746 -88.775,-64.9746 -88.8,-64.9746 -88.825,-64.9746 -88.85,-64.9746 -88.875,-64.9746 -88.9,-64.9746 -88.925,-64.9746 -88.95,-64.9746 -88.975,-64.9746 -89,-64.9746 -89.025,-64.9746 -89.05,-64.9746 -89.075,-64.9746 -89.1,-64.9746 -89.125,-64.9746 -89.15,-64.9746 -89.175,-64.9746 -89.2,-64.9746 -89.225,-64.9746 -89.25,-64.9746 -89.275,-64.9746 -89.3,-64.9746 -89.325,-64.9746 -89.35,-64.9746 -89.375,-64.9746 -89.4,-64.9746 -89.425,-64.9746 -89.45,-64.9746 -89.475,-64.9746 -89.5,-64.9746 -89.525,-64.9746 -89.55,-64.9746 -89.575,-64.9746 -89.6,-64.9746 -89.625,-64.9746 -89.65,-64.9746 -89.675,-64.9746 -89.7,-64.9746 -89.725,-64.9746 -89.75,-64.9746 -89.775,-64.9746 -89.8,-64.9746 -89.825,-64.9746 -89.85,-64.9746 -89.875,-64.9746 -89.9,-64.9746 -89.925,-64.9746 -89.95,-64.9746 -89.975,-64.9746 -90,-64.9746 -90.025,-64.9746 -90.05,-64.9746 -90.075,-64.9746 -90.1,-64.9746 -90.125,-64.9746 -90.15,-64.9746 -90.175,-64.9746 -90.2,-64.9746 -90.225,-64.9746 -90.25,-64.9746 -90.275,-64.9746 -90.3,-64.9746 -90.325,-64.9746 -90.35,-64.9746 -90.375,-64.9746 -90.4,-64.9746 -90.425,-64.9746 -90.45,-64.9746 -90.475,-64.9746 -90.5,-64.9746 -90.525,-64.9745 -90.55,-64.9745 -90.575,-64.9745 -90.6,-64.9745 -90.625,-64.9745 -90.65,-64.9745 -90.675,-64.9745 -90.7,-64.9745 -90.725,-64.9745 -90.75,-64.9745 -90.775,-64.9745 -90.8,-64.9745 -90.825,-64.9745 -90.85,-64.9745 -90.875,-64.9745 -90.9,-64.9745 -90.925,-64.9745 -90.95,-64.9745 -90.975,-64.9745 -91,-64.9745 -91.025,-64.9745 -91.05,-64.9745 -91.075,-64.9745 -91.1,-64.9745 -91.125,-64.9745 -91.15,-64.9745 -91.175,-64.9745 -91.2,-64.9745 -91.225,-64.9745 -91.25,-64.9745 -91.275,-64.9745 -91.3,-64.9745 -91.325,-64.9745 -91.35,-64.9745 -91.375,-64.9745 -91.4,-64.9745 -91.425,-64.9745 -91.45,-64.9744 -91.475,-64.9744 -91.5,-64.9744 -91.525,-64.9744 -91.55,-64.9744 -91.575,-64.9744 -91.6,-64.9744 -91.625,-64.9744 -91.65,-64.9744 -91.675,-64.9744 -91.7,-64.9744 -91.725,-64.9744 -91.75,-64.9744 -91.775,-64.9744 -91.8,-64.9744 -91.825,-64.9744 -91.85,-64.9744 -91.875,-64.9744 -91.9,-64.9744 -91.925,-64.9744 -91.95,-64.9744 -91.975,-64.9744 -92,-64.9744 -92.025,-64.9744 -92.05,-64.9744 -92.075,-64.9744 -92.1,-64.9744 -92.125,-64.9744 -92.15,-64.9744 -92.175,-64.9743 -92.2,-64.9743 -92.225,-64.9743 -92.25,-64.9743 -92.275,-64.9743 -92.3,-64.9743 -92.325,-64.9743 -92.35,-64.9743 -92.375,-64.9743 -92.4,-64.9743 -92.425,-64.9743 -92.45,-64.9743 -92.475,-64.9743 -92.5,-64.9743 -92.525,-64.9743 -92.55,-64.9743 -92.575,-64.9743 -92.6,-64.9743 -92.625,-64.9743 -92.65,-64.9743 -92.675,-64.9743 -92.7,-64.9743 -92.725,-64.9743 -92.75,-64.9743 -92.775,-64.9743 -92.8,-64.9743 -92.825,-64.9743 -92.85,-64.9743 -92.875,-64.9742 -92.9,-64.9742 -92.925,-64.9742 -92.95,-64.9742 -92.975,-64.9742 -93,-64.9742 -93.025,-64.9742 -93.05,-64.9742 -93.075,-64.9742 -93.1,-64.9742 -93.125,-64.9742 -93.15,-64.9742 -93.175,-64.9742 -93.2,-64.9742 -93.225,-64.9742 -93.25,-64.9742 -93.275,-64.9742 -93.3,-64.9742 -93.325,-64.9742 -93.35,-64.9742 -93.375,-64.9742 -93.4,-64.9742 -93.425,-64.9742 -93.45,-64.9742 -93.475,-64.9742 -93.5,-64.9742 -93.525,-64.9742 -93.55,-64.9742 -93.575,-64.9741 -93.6,-64.9741 -93.625,-64.9741 -93.65,-64.9741 -93.675,-64.9741 -93.7,-64.9741 -93.725,-64.9741 -93.75,-64.9741 -93.775,-64.9741 -93.8,-64.9741 -93.825,-64.9741 -93.85,-64.9741 -93.875,-64.9741 -93.9,-64.9741 -93.925,-64.9741 -93.95,-64.9741 -93.975,-64.9741 -94,-64.9741 -94.025,-64.9741 -94.05,-64.9741 -94.075,-64.9741 -94.1,-64.9741 -94.125,-64.9741 -94.15,-64.9741 -94.175,-64.9741 -94.2,-64.9741 -94.225,-64.9741 -94.25,-64.9741 -94.275,-64.9741 -94.3,-64.9741 -94.325,-64.974 -94.35,-64.974 -94.375,-64.974 -94.4,-64.974 -94.425,-64.974 -94.45,-64.974 -94.475,-64.974 -94.5,-64.974 -94.525,-64.974 -94.55,-64.974 -94.575,-64.974 -94.6,-64.974 -94.625,-64.974 -94.65,-64.974 -94.675,-64.974 -94.7,-64.974 -94.725,-64.974 -94.75,-64.974 -94.775,-64.974 -94.8,-64.974 -94.825,-64.974 -94.85,-64.974 -94.875,-64.974 -94.9,-64.974 -94.925,-64.974 -94.95,-64.974 -94.975,-64.974 -95,-64.974 -95.025,-64.974 -95.05,-64.974 -95.075,-64.974 -95.1,-64.974 -95.125,-64.974 -95.15,-64.974 -95.175,-64.974 -95.2,-64.9739 -95.225,-64.9739 -95.25,-64.9739 -95.275,-64.9739 -95.3,-64.9739 -95.325,-64.9739 -95.35,-64.9739 -95.375,-64.9739 -95.4,-64.9739 -95.425,-64.9739 -95.45,-64.9739 -95.475,-64.9739 -95.5,-64.9739 -95.525,-64.9739 -95.55,-64.9739 -95.575,-64.9739 -95.6,-64.9739 -95.625,-64.9739 -95.65,-64.9739 -95.675,-64.9739 -95.7,-64.9739 -95.725,-64.9739 -95.75,-64.9739 -95.775,-64.9739 -95.8,-64.9739 -95.825,-64.9739 -95.85,-64.9739 -95.875,-64.9739 -95.9,-64.9739 -95.925,-64.9739 -95.95,-64.9739 -95.975,-64.9739 -96,-64.9739 -96.025,-64.9739 -96.05,-64.9739 -96.075,-64.9739 -96.1,-64.9739 -96.125,-64.9739 -96.15,-64.9739 -96.175,-64.9739 -96.2,-64.9739 -96.225,-64.9739 -96.25,-64.9739 -96.275,-64.9739 -96.3,-64.9739 -96.325,-64.9739 -96.35,-64.9739 -96.375,-64.9738 -96.4,-64.9738 -96.425,-64.9738 -96.45,-64.9738 -96.475,-64.9738 -96.5,-64.9738 -96.525,-64.9738 -96.55,-64.9738 -96.575,-64.9738 -96.6,-64.9738 -96.625,-64.9738 -96.65,-64.9738 -96.675,-64.9738 -96.7,-64.9738 -96.725,-64.9738 -96.75,-64.9738 -96.775,-64.9738 -96.8,-64.9738 -96.825,-64.9738 -96.85,-64.9738 -96.875,-64.9738 -96.9,-64.9738 -96.925,-64.9738 -96.95,-64.9738 -96.975,-64.9738 -97,-64.9738 -97.025,-64.9738 -97.05,-64.9738 -97.075,-64.9738 -97.1,-64.9738 -97.125,-64.9738 -97.15,-64.9738 -97.175,-64.9738 -97.2,-64.9738 -97.225,-64.9738 -97.25,-64.9738 -97.275,-64.9738 -97.3,-64.9738 -97.325,-64.9738 -97.35,-64.9738 -97.375,-64.9738 -97.4,-64.9738 -97.425,-64.9738 -97.45,-64.9738 -97.475,-64.9738 -97.5,-64.9738 -97.525,-64.9738 -97.55,-64.9738 -97.575,-64.9738 -97.6,-64.9738 -97.625,-64.9738 -97.65,-64.9738 -97.675,-64.9738 -97.7,-64.9738 -97.725,-64.9738 -97.75,-64.9738 -97.775,-64.9738 -97.8,-64.9738 -97.825,-64.9738 -97.85,-64.9738 -97.875,-64.9738 -97.9,-64.9738 -97.925,-64.9738 -97.95,-64.9738 -97.975,-64.9738 -98,-64.9738 -98.025,-64.9738 -98.05,-64.9738 -98.075,-64.9738 -98.1,-64.9738 -98.125,-64.9738 -98.15,-64.9738 -98.175,-64.9738 -98.2,-64.9738 -98.225,-64.9738 -98.25,-64.9738 -98.275,-64.9738 -98.3,-64.9738 -98.325,-64.9738 -98.35,-64.9738 -98.375,-64.9738 -98.4,-64.9738 -98.425,-64.9738 -98.45,-64.9738 -98.475,-64.9738 -98.5,-64.9738 -98.525,-64.9738 -98.55,-64.9738 -98.575,-64.9738 -98.6,-64.9738 -98.625,-64.9738 -98.65,-64.9738 -98.675,-64.9738 -98.7,-64.9738 -98.725,-64.9738 -98.75,-64.9738 -98.775,-64.9738 -98.8,-64.9738 -98.825,-64.9738 -98.85,-64.9738 -98.875,-64.9738 -98.9,-64.9738 -98.925,-64.9738 -98.95,-64.9738 -98.975,-64.9738 -99,-64.9738 -99.025,-64.9738 -99.05,-64.9738 -99.075,-64.9738 -99.1,-64.9738 -99.125,-64.9738 -99.15,-64.9738 -99.175,-64.9738 -99.2,-64.9738 -99.225,-64.9738 -99.25,-64.9738 -99.275,-64.9738 -99.3,-64.9738 -99.325,-64.9738 -99.35,-64.9738 -99.375,-64.9738 -99.4,-64.9738 -99.425,-64.9738 -99.45,-64.9738 -99.475,-64.9738 -99.5,-64.9738 -99.525,-64.9738 -99.55,-64.9738 -99.575,-64.9738 -99.6,-64.9738 -99.625,-64.9738 -99.65,-64.9738 -99.675,-64.9738 -99.7,-64.9738 -99.725,-64.9738 -99.75,-64.9738 -99.775,-64.9738 -99.8,-64.9738 -99.825,-64.9738 -99.85,-64.9738 -99.875,-64.9738 -99.9,-64.9738 -99.925,-64.9738 -99.95,-64.9738 -99.975,-64.9738 -100,-64.9738 diff --git a/test/api/ref/vclamp.csv b/test/api/ref/vclamp.csv deleted file mode 100644 index 130ba712b5..0000000000 --- a/test/api/ref/vclamp.csv +++ /dev/null @@ -1,241 +0,0 @@ -0,-65 -0.025,-2.5 -0.05,-0.0961537 -0.075,-0.00369822 -0.1,-0.000142239 -0.125,-5.47073e-06 -0.15,-2.10413e-07 -0.175,-8.09278e-09 -0.2,-3.11261e-10 -0.225,-1.19716e-11 -0.25,-4.60444e-13 -0.275,-1.77094e-14 -0.3,-6.8113e-16 -0.325,-2.61973e-17 -0.35,-1.00759e-18 -0.375,-3.87534e-20 -0.4,-1.49051e-21 -0.425,-5.73274e-23 -0.45,-2.2049e-24 -0.475,-8.48037e-26 -0.5,-3.26168e-27 -0.525,-1.25449e-28 -0.55,-4.82496e-30 -0.575,-1.85575e-31 -0.6,-7.13751e-33 -0.625,-2.7452e-34 -0.65,-1.05584e-35 -0.675,-4.06094e-37 -0.7,-1.5619e-38 -0.725,-6.0073e-40 -0.75,-2.3105e-41 -0.775,-8.88652e-43 -0.8,-3.41789e-44 -0.825,-1.31457e-45 -0.85,-5.05605e-47 -0.875,-1.94463e-48 -0.9,-7.47935e-50 -0.925,-2.87667e-51 -0.95,-1.10641e-52 -0.975,-4.25543e-54 -1,-1.6367e-55 -1.025,9.61519 -1.05,9.98501 -1.075,9.99923 -1.1,9.99978 -1.125,9.9998 -1.15,9.9998 -1.175,9.9998 -1.2,9.9998 -1.225,9.9998 -1.25,9.9998 -1.275,9.9998 -1.3,9.9998 -1.325,9.9998 -1.35,9.9998 -1.375,9.9998 -1.4,9.9998 -1.425,9.9998 -1.45,9.9998 -1.475,9.9998 -1.5,9.9998 -1.525,9.9998 -1.55,9.9998 -1.575,9.9998 -1.6,9.9998 -1.625,9.9998 -1.65,9.9998 -1.675,9.9998 -1.7,9.9998 -1.725,9.9998 -1.75,9.9998 -1.775,9.9998 -1.8,9.9998 -1.825,9.9998 -1.85,9.9998 -1.875,9.9998 -1.9,9.9998 -1.925,9.9998 -1.95,9.9998 -1.975,9.9998 -2,9.9998 -2.025,9.9998 -2.05,9.9998 -2.075,9.9998 -2.1,9.9998 -2.125,9.9998 -2.15,9.9998 -2.175,9.9998 -2.2,9.9998 -2.225,9.9998 -2.25,9.9998 -2.275,9.9998 -2.3,9.9998 -2.325,9.9998 -2.35,9.9998 -2.375,9.9998 -2.4,9.9998 -2.425,9.9998 -2.45,9.9998 -2.475,9.9998 -2.5,9.9998 -2.525,9.9998 -2.55,9.9998 -2.575,9.9998 -2.6,9.9998 -2.625,9.9998 -2.65,9.9998 -2.675,9.9998 -2.7,9.9998 -2.725,9.9998 -2.75,9.9998 -2.775,9.9998 -2.8,9.9998 -2.825,9.9998 -2.85,9.9998 -2.875,9.9998 -2.9,9.9998 -2.925,9.9998 -2.95,9.9998 -2.975,9.9998 -3,9.9998 -3.025,5.19221 -3.05,5.0073 -3.075,5.00018 -3.1,4.99991 -3.125,4.9999 -3.15,4.9999 -3.175,4.9999 -3.2,4.9999 -3.225,4.9999 -3.25,4.9999 -3.275,4.9999 -3.3,4.9999 -3.325,4.9999 -3.35,4.9999 -3.375,4.9999 -3.4,4.9999 -3.425,4.9999 -3.45,4.9999 -3.475,4.9999 -3.5,4.9999 -3.525,4.9999 -3.55,4.9999 -3.575,4.9999 -3.6,4.9999 -3.625,4.9999 -3.65,4.9999 -3.675,4.9999 -3.7,4.9999 -3.725,4.9999 -3.75,4.9999 -3.775,4.9999 -3.8,4.9999 -3.825,4.9999 -3.85,4.9999 -3.875,4.9999 -3.9,4.9999 -3.925,4.9999 -3.95,4.9999 -3.975,4.9999 -4,4.9999 -4.025,4.9999 -4.05,4.9999 -4.075,4.9999 -4.1,4.9999 -4.125,4.9999 -4.15,4.9999 -4.175,4.9999 -4.2,4.9999 -4.225,4.9999 -4.25,4.9999 -4.275,4.9999 -4.3,4.9999 -4.325,4.9999 -4.35,4.9999 -4.375,4.9999 -4.4,4.9999 -4.425,4.9999 -4.45,4.9999 -4.475,4.9999 -4.5,4.9999 -4.525,4.9999 -4.55,4.9999 -4.575,4.9999 -4.6,4.9999 -4.625,4.9999 -4.65,4.9999 -4.675,4.9999 -4.7,4.9999 -4.725,4.9999 -4.75,4.9999 -4.775,4.9999 -4.8,4.9999 -4.825,4.9999 -4.85,4.9999 -4.875,4.9999 -4.9,4.9999 -4.925,4.9999 -4.95,4.9999 -4.975,4.9999 -5,4.9999 -5.025,4.9999 -5.05,4.9999 -5.075,4.9999 -5.1,4.9999 -5.125,4.9999 -5.15,4.9999 -5.175,4.9999 -5.2,4.9999 -5.225,4.9999 -5.25,4.9999 -5.275,4.9999 -5.3,4.9999 -5.325,4.9999 -5.35,4.9999 -5.375,4.9999 -5.4,4.9999 -5.425,4.9999 -5.45,4.9999 -5.475,4.9999 -5.5,4.9999 -5.525,4.9999 -5.55,4.9999 -5.575,4.9999 -5.6,4.9999 -5.625,4.9999 -5.65,4.9999 -5.675,4.9999 -5.7,4.9999 -5.725,4.9999 -5.75,4.9999 -5.775,4.9999 -5.8,4.9999 -5.825,4.9999 -5.85,4.9999 -5.875,4.9999 -5.9,4.9999 -5.925,4.9999 -5.95,4.9999 -5.975,4.9999 -6,4.9999 diff --git a/test/api/test_common.h b/test/api/test_common.h index 026a30fda1..77ed1e44d3 100644 --- a/test/api/test_common.h +++ b/test/api/test_common.h @@ -1,10 +1,11 @@ #ifdef __cplusplus +#include #include #include #include -constexpr double EPSILON = 1.0 / 1024; +constexpr double EPSILON = 0x1p-16; // 1>>16 for double /// Compare two doubles. Mitigate accumulated errors by updating a drift inline bool almost_equal(double a, double b, double* drift) { @@ -54,4 +55,24 @@ bool compare_spikes(const char* ref_csv, double* tvec, double* vvec, long n_volt return true; } + +template +bool approximate(const std::array& reference, Object* v) { + long v_size = nrn_vector_capacity(v); + double* v_values = nrn_vector_data(v); + if (v_size != reference.size()) { + std::cerr << "Bad array length: " << v_size << "!=" << reference.size() << std::endl; + return false; + } + for (int i = 0; i < v_size; i++) { + // Uncomment to create ref: Diplay EXACT doubles (no conversion to decimal) + // printf("Vec[%d] %a\n", i, v_values[i]); + if (std::fabs(v_values[i] - reference[i]) > EPSILON) { + std::cerr << "DIFF at line " << i << ": " << v_values[i] << "!=" << reference[i] + << std::endl; + return false; + } + } + return true; +} #endif \ No newline at end of file diff --git a/test/api/vclamp.cpp b/test/api/vclamp.cpp index 3cb2a2929f..d90e40a783 100644 --- a/test/api/vclamp.cpp +++ b/test/api/vclamp.cpp @@ -2,6 +2,7 @@ #include "neuronapi.h" #include +#include #include #include #include @@ -13,9 +14,19 @@ using std::cout; using std::endl; using std::ofstream; +extern "C" void modl_reg(){}; + static const char* argv[] = {"vclamp", "-nogui", "-nopython", nullptr}; -extern "C" void modl_reg(){}; +constexpr std::array EXPECTED_V{ + -0x1.04p+6, + -0x1.00d7f6756215p-182, + 0x1.3ffe5c93f70cep+3, + 0x1.3ffe5c93f70cep+3, + 0x1.3ffe5c93f70cep+2, + 0x1.3ffe5c93f70cep+2, + 0x1.3ffe5c93f70cep+2, +}; int main(void) { Section* soma; @@ -58,11 +69,8 @@ int main(void) { // setup recording v = nrn_object_new(nrn_symbol("Vector"), 0); nrn_rangevar_push(nrn_symbol("v"), soma, 0.5); - nrn_method_call(v, nrn_method_symbol(v, "record"), 1); - nrn_object_unref(nrn_object_pop()); // record returns the vector - t = nrn_object_new(nrn_symbol("Vector"), 0); - nrn_symbol_push(nrn_symbol("t")); - nrn_method_call(t, nrn_method_symbol(t, "record"), 1); + nrn_double_push(1); + nrn_method_call(v, nrn_method_symbol(v, "record"), 2); nrn_object_unref(nrn_object_pop()); // record returns the vector // finitialize(-65) @@ -75,10 +83,7 @@ int main(void) { nrn_function_call(nrn_symbol("continuerun"), 1); nrn_double_pop(); - long n_voltages = nrn_vector_capacity(t); - auto ref_file = std::string(std::getenv("CURRENT_SOURCE_DIR")) + "/ref/vclamp.csv"; - if (compare_spikes(ref_file.c_str(), nrn_vector_data(t), nrn_vector_data(v), n_voltages)) { - return 0; + if (!approximate(EXPECTED_V, v)) { + return 1; } - return 1; } \ No newline at end of file From 75b1f375a05c3e62d5169a8a1275c18b5d307f5d Mon Sep 17 00:00:00 2001 From: Fernando Pereira Date: Wed, 3 Jan 2024 10:52:42 +0100 Subject: [PATCH 52/65] Use free for allocated c strings --- test/api/hh_sim.cpp | 3 ++- test/api/netcon.cpp | 3 ++- test/api/vclamp.cpp | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/test/api/hh_sim.cpp b/test/api/hh_sim.cpp index 641e37fcea..2d0c7d9b29 100644 --- a/test/api/hh_sim.cpp +++ b/test/api/hh_sim.cpp @@ -4,6 +4,7 @@ #include #include +#include #include #include #include @@ -44,7 +45,7 @@ int main(void) { nrn_str_push(&temp_str); nrn_function_call(nrn_symbol("load_file"), 1); nrn_double_pop(); - delete[] temp_str; + free(temp_str); // topology soma = nrn_section_new("soma"); diff --git a/test/api/netcon.cpp b/test/api/netcon.cpp index 0fa5a60751..273025bb20 100644 --- a/test/api/netcon.cpp +++ b/test/api/netcon.cpp @@ -1,4 +1,5 @@ // NOTE: this assumes neuronapi.h is on your CPLUS_INCLUDE_PATH +#include #include #include #include @@ -45,7 +46,7 @@ int main(void) { nrn_str_push(&temp_str); nrn_function_call(nrn_symbol("load_file"), 1); nrn_double_pop(); - delete[] temp_str; + free(temp_str); // topology auto soma = nrn_section_new("soma"); diff --git a/test/api/vclamp.cpp b/test/api/vclamp.cpp index d90e40a783..f87d317b7a 100644 --- a/test/api/vclamp.cpp +++ b/test/api/vclamp.cpp @@ -4,6 +4,7 @@ #include #include +#include #include #include #include @@ -43,7 +44,7 @@ int main(void) { nrn_str_push(&temp_str); nrn_function_call(nrn_symbol("load_file"), 1); nrn_double_pop(); - delete[] temp_str; + free(temp_str); // topology From a5fbaabed411c379637da74fe4a7295a735277c6 Mon Sep 17 00:00:00 2001 From: Fernando Pereira Date: Wed, 3 Jan 2024 13:11:01 +0100 Subject: [PATCH 53/65] Dont alloc Section Item to heap as its not used. NOTE: It seems that Sections are never freed. However we are lacking API to free Sections and Symbols in general. --- src/nrniv/neuronapi.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/nrniv/neuronapi.cpp b/src/nrniv/neuronapi.cpp index be627be76b..42bdc041c1 100644 --- a/src/nrniv/neuronapi.cpp +++ b/src/nrniv/neuronapi.cpp @@ -77,14 +77,14 @@ void nrn_stdout_redirect(int (*myprint)(int, char*)) { Section* nrn_section_new(char const* const name) { // TODO: check for memory leaks; should we free the symbol, pitm, etc? Symbol* symbol = new Symbol; - auto pitm = new hoc_Item*; symbol->name = strdup(name); symbol->type = 1; symbol->u.oboff = 0; symbol->arayinfo = 0; hoc_install_object_data_index(symbol); - new_sections(nullptr, symbol, pitm, 1); - return (*pitm)->element.sec; + hoc_Item* itm; + new_sections(nullptr, symbol, &itm, 1); + return itm->element.sec; } void nrn_section_connect(Section* child_sec, double child_x, Section* parent_sec, double parent_x) { From 1f6273c7d7e38066a68db5fd3f213e8b6ccbdfce Mon Sep 17 00:00:00 2001 From: Fernando Pereira Date: Sun, 7 Jan 2024 23:50:42 +0100 Subject: [PATCH 54/65] Address intel compiler complain --- test/api/vclamp.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/api/vclamp.cpp b/test/api/vclamp.cpp index f87d317b7a..f3496e7119 100644 --- a/test/api/vclamp.cpp +++ b/test/api/vclamp.cpp @@ -62,7 +62,7 @@ int main(void) { vclamp = nrn_object_new(nrn_symbol("VClamp"), 1); // 0 mV for 1 ms; 10 mV for the next 2 ms; 5 mV for the next 3 ms int i = 0; - for (auto& [amp, dur]: {std::pair{0, 1}, {10, 2}, {5, 3}}) { + for (auto& [amp, dur]: std::initializer_list>{{0, 1}, {10, 2}, {5, 3}}) { nrn_property_array_set(vclamp, "amp", i, amp); nrn_property_array_set(vclamp, "dur", i, dur); ++i; From 15f91eeaf3772b1673931a3a0c3a3625eb7ade10 Mon Sep 17 00:00:00 2001 From: Fernando Pereira Date: Tue, 16 Jan 2024 16:23:43 +0100 Subject: [PATCH 55/65] Free memb_func[].dparam_semantics --- src/nrnoc/init.cpp | 2 ++ src/nrnoc/multicore.cpp | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/src/nrnoc/init.cpp b/src/nrnoc/init.cpp index 4feddaa3df..88ff83ba75 100644 --- a/src/nrnoc/init.cpp +++ b/src/nrnoc/init.cpp @@ -808,6 +808,7 @@ int dparam_semantics_to_int(std::string_view name) { } // namespace namespace neuron::mechanism::detail { + void register_data_fields(int mechtype, std::vector> const& param_info, std::vector> const& dparam_info) { @@ -822,6 +823,7 @@ void register_data_fields(int mechtype, dparam_info[i].second); } } + // Translate param_info into the type we want to use internally now we're fully inside NEURON // library code (wheels...) std::vector param_info_new{}; diff --git a/src/nrnoc/multicore.cpp b/src/nrnoc/multicore.cpp index ac2dbdd70e..876bfe34a7 100644 --- a/src/nrnoc/multicore.cpp +++ b/src/nrnoc/multicore.cpp @@ -403,6 +403,11 @@ void nrn_threads_free() { } delete[] ml->_thread; } + // The last allocated dparam_semantics needs to be freed + auto dparam_semantics = std::exchange(memb_func[tml->index].dparam_semantics, nullptr); + if (dparam_semantics) { + delete[] dparam_semantics; + } delete ml; free((char*) tml); } From c1f44bcddb54852cbdb14be6088c4948d60a3843 Mon Sep 17 00:00:00 2001 From: Fernando Pereira Date: Thu, 18 Jan 2024 18:33:21 +0100 Subject: [PATCH 56/65] Switch dparam_semantics to unique_ptr (no raw!) --- src/neuron/cache/mechanism_range.hpp | 2 +- src/nrniv/nrncore_write/callbacks/nrncore_callbacks.cpp | 6 +++--- src/nrniv/nrncore_write/data/cell_group.cpp | 5 ++--- src/nrnoc/init.cpp | 7 ++++--- src/nrnoc/membfunc.h | 2 +- src/nrnoc/multicore.cpp | 5 ----- 6 files changed, 11 insertions(+), 16 deletions(-) diff --git a/src/neuron/cache/mechanism_range.hpp b/src/neuron/cache/mechanism_range.hpp index 4a133b0b44..63c53af910 100644 --- a/src/neuron/cache/mechanism_range.hpp +++ b/src/neuron/cache/mechanism_range.hpp @@ -15,7 +15,7 @@ namespace neuron::cache { template void indices_to_cache(short type, Callable callable) { auto const pdata_size = nrn_prop_dparam_size_[type]; - auto* const dparam_semantics = memb_func[type].dparam_semantics; + auto* const dparam_semantics = memb_func[type].dparam_semantics.get(); for (int field = pdata_size - 1; field >= 0; --field) { // Check if the field-th dparam of this mechanism type is an ion variable. See // hoc_register_dparam_semantics. diff --git a/src/nrniv/nrncore_write/callbacks/nrncore_callbacks.cpp b/src/nrniv/nrncore_write/callbacks/nrncore_callbacks.cpp index 49a1bf6806..c5b2e12e06 100644 --- a/src/nrniv/nrncore_write/callbacks/nrncore_callbacks.cpp +++ b/src/nrniv/nrncore_write/callbacks/nrncore_callbacks.cpp @@ -256,7 +256,7 @@ int nrnthread_dat2_1(int tid, tml_index[j] = type; ml_nodecount[j] = ml->nodecount; cg.ml_vdata_offset[j] = vdata_offset; - int* ds = memb_func[type].dparam_semantics; + int* ds = memb_func[type].dparam_semantics.get(); for (int psz = 0; psz < bbcore_dparam_size[type]; ++psz) { if (ds[psz] == -4 || ds[psz] == -6 || ds[psz] == -7 || ds[psz] == 0) { // printf("%s ds[%d]=%d vdata_offset=%d\n", memb_func[type].sym->name, psz, ds[psz], @@ -533,7 +533,7 @@ int* datum2int(int type, int isart = nrn_is_artificial_[di.type]; int sz = bbcore_dparam_size[type]; int* pdata = new int[ml->nodecount * sz]; - int* semantics = memb_func[type].dparam_semantics; + int* semantics = memb_func[type].dparam_semantics.get(); for (int i = 0; i < ml->nodecount; ++i) { int ioff = i * sz; for (int j = 0; j < sz; ++j) { @@ -772,7 +772,7 @@ static std::map type2movable; static void setup_type2semantics() { if (type2movable.empty()) { for (int type = 0; type < n_memb_func; ++type) { - int* ds = memb_func[type].dparam_semantics; + int* ds = memb_func[type].dparam_semantics.get(); if (ds) { for (int psz = 0; psz < bbcore_dparam_size[type]; ++psz) { if (ds[psz] == -4) { // netsend semantics diff --git a/src/nrniv/nrncore_write/data/cell_group.cpp b/src/nrniv/nrncore_write/data/cell_group.cpp index fae073634a..1fe742c63e 100644 --- a/src/nrniv/nrncore_write/data/cell_group.cpp +++ b/src/nrniv/nrncore_write/data/cell_group.cpp @@ -252,13 +252,12 @@ void CellGroup::datumindex_fill(int ith, CellGroup& cg, DatumIndices& di, Memb_l if (dsize == 0) { return; } - int* dmap = memb_func[di.type].dparam_semantics; + int* dmap = memb_func[di.type].dparam_semantics.get(); assert(dmap); // what is the size of the nt._vdata portion needed for a single ml->dparam[i] int vdata_size = 0; for (int i = 0; i < dsize; ++i) { - int* ds = memb_func[di.type].dparam_semantics; - if (ds[i] == -4 || ds[i] == -6 || ds[i] == -7 || ds[i] == 0) { + if (dmap[i] == -4 || dmap[i] == -6 || dmap[i] == -7 || dmap[i] == 0) { ++vdata_size; } } diff --git a/src/nrnoc/init.cpp b/src/nrnoc/init.cpp index 88ff83ba75..cdfead99cb 100644 --- a/src/nrnoc/init.cpp +++ b/src/nrnoc/init.cpp @@ -814,9 +814,10 @@ void register_data_fields(int mechtype, std::vector> const& dparam_info) { nrn_prop_param_size_[mechtype] = param_info.size(); nrn_prop_dparam_size_[mechtype] = dparam_info.size(); - delete[] std::exchange(memb_func[mechtype].dparam_semantics, nullptr); - if (!dparam_info.empty()) { - memb_func[mechtype].dparam_semantics = new int[dparam_info.size()]; + if (dparam_info.empty()) { + memb_func[mechtype].dparam_semantics.reset(nullptr); + } else { + memb_func[mechtype].dparam_semantics.reset(new int[dparam_info.size()]); for (auto i = 0; i < dparam_info.size(); ++i) { // dparam_info[i].first is the name of the variable, currently unused... memb_func[mechtype].dparam_semantics[i] = dparam_semantics_to_int( diff --git a/src/nrnoc/membfunc.h b/src/nrnoc/membfunc.h index 916d871f7f..49a2a2b002 100644 --- a/src/nrnoc/membfunc.h +++ b/src/nrnoc/membfunc.h @@ -84,7 +84,7 @@ struct Memb_func { int is_point; void* hoc_mech; void (*setdata_)(struct Prop*); - int* dparam_semantics; // for nrncore writing. + std::unique_ptr dparam_semantics; // for nrncore writing. private: nrn_init_t m_initialize{}; }; diff --git a/src/nrnoc/multicore.cpp b/src/nrnoc/multicore.cpp index 876bfe34a7..ac2dbdd70e 100644 --- a/src/nrnoc/multicore.cpp +++ b/src/nrnoc/multicore.cpp @@ -403,11 +403,6 @@ void nrn_threads_free() { } delete[] ml->_thread; } - // The last allocated dparam_semantics needs to be freed - auto dparam_semantics = std::exchange(memb_func[tml->index].dparam_semantics, nullptr); - if (dparam_semantics) { - delete[] dparam_semantics; - } delete ml; free((char*) tml); } From b08dcd7c54ab6a88d011aa28de9d475bd1c5bd7f Mon Sep 17 00:00:00 2001 From: Fernando Pereira Date: Sun, 21 Jan 2024 21:47:05 +0100 Subject: [PATCH 57/65] Memb_list to do its memory management --- src/nrnoc/memblist.cpp | 29 +++++++++++++++++++++++++++++ src/nrnoc/nrnoc_ml.h | 16 ++++++++++++++++ src/nrnoc/treeset.cpp | 36 ++++++++---------------------------- 3 files changed, 53 insertions(+), 28 deletions(-) diff --git a/src/nrnoc/memblist.cpp b/src/nrnoc/memblist.cpp index 6e83477441..cdcfdbd73d 100644 --- a/src/nrnoc/memblist.cpp +++ b/src/nrnoc/memblist.cpp @@ -7,11 +7,40 @@ #include // std::distance, std::next #include // std::accumulate +extern void* emalloc(size_t); + + Memb_list::Memb_list(int type) : m_storage{&neuron::model().mechanism_data(type)} { assert(type == m_storage->type()); } +void Memb_list::nodes_alloc(int node_count, bool also_pdata) { + if (node_count == 0) { + return; + } + nodecount = node_count; + nodelist = (Node**) emalloc(node_count * sizeof(Node*)); + nodeindices = (int*) emalloc(node_count * sizeof(int)); + // Prop used by ode_map even when hoc_mech is false + prop = new Prop*[node_count]; + if (also_pdata) { + pdata = (Datum**) emalloc(node_count * sizeof(Datum*)); + } +} + +void Memb_list::nodes_free() { + nodecount = 0; + free(std::exchange(nodelist, nullptr)); + free(std::exchange(nodeindices, nullptr)); + delete[] std::exchange(prop, nullptr); + free(std::exchange(pdata, nullptr)); +} + +Memb_list::~Memb_list() { + nodes_free(); +} + [[nodiscard]] std::vector Memb_list::data() { using Tag = neuron::container::Mechanism::field::FloatingPoint; assert(m_storage); diff --git a/src/nrnoc/nrnoc_ml.h b/src/nrnoc/nrnoc_ml.h index 6cf6d4397a..13729d4114 100644 --- a/src/nrnoc/nrnoc_ml.h +++ b/src/nrnoc/nrnoc_ml.h @@ -45,6 +45,22 @@ struct Memb_list { */ Memb_list(int type); + /** + * @brief Uninitialize, freeing any allocated mem for nodes. + */ + ~Memb_list(); + + /** + * @brief Allocate memory for node_count nodes. + * @param also_pdata Allocate also pdata Datum's + */ + void nodes_alloc(int node_count, bool also_pdata); + + /** + * @brief Free memory allocated for nodes (with nodes_alloc) + */ + void nodes_free(); + Node** nodelist{}; /* nodeindices contains all nodes this extension is responsible for, * ordered according to the matrix. This allows to access the matrix diff --git a/src/nrnoc/treeset.cpp b/src/nrnoc/treeset.cpp index b3b698851c..6acf1ab109 100644 --- a/src/nrnoc/treeset.cpp +++ b/src/nrnoc/treeset.cpp @@ -1620,42 +1620,22 @@ void v_setup_vectors(void) { for (i = 0; i < n_memb_func; ++i) if (nrn_is_artificial_[i] && memb_func[i].has_initialize()) { if (memb_list[i].nodecount) { - memb_list[i].nodecount = 0; - free(memb_list[i].nodelist); - free(memb_list[i].nodeindices); - delete[] memb_list[i].prop; - if (!memb_func[i].hoc_mech) { - // free(memb_list[i]._data); - free(memb_list[i].pdata); - } + memb_list[i].nodes_free(); } } #if 1 /* see finitialize */ - /* and count the artificial cells */ - for (i = 0; i < n_memb_func; ++i) + /* and allocate for the artificial cells */ + for (i = 0; i < n_memb_func; ++i) { if (nrn_is_artificial_[i] && memb_func[i].has_initialize()) { - cTemplate* tmp = nrn_pnt_template_[i]; - memb_list[i].nodecount = tmp->count; + int node_count = nrn_pnt_template_[i]->count; + bool alloc_pdata = !memb_func[i].hoc_mech; + memb_list[i].nodes_alloc(node_count, alloc_pdata); + memb_list[i].nodecount = 0; /* counted again below. TODO: Why? */ } + } #endif - /* allocate it*/ - - for (i = 0; i < n_memb_func; ++i) - if (nrn_is_artificial_[i] && memb_func[i].has_initialize()) { - if (memb_list[i].nodecount) { - memb_list[i].nodelist = (Node**) emalloc(memb_list[i].nodecount * sizeof(Node*)); - memb_list[i].nodeindices = (int*) emalloc(memb_list[i].nodecount * sizeof(int)); - // Prop used by ode_map even when hoc_mech is false - memb_list[i].prop = new Prop*[memb_list[i].nodecount]; - if (!memb_func[i].hoc_mech) { - memb_list[i].pdata = (Datum**) emalloc(memb_list[i].nodecount * sizeof(Datum*)); - } - memb_list[i].nodecount = 0; /* counted again below */ - } - } - #if MULTICORE if (!nrn_user_partition()) { /* does not depend on memb_list */ From 3c31399b90dffe7f9c5d9b0cfc7dfc82dfc3b00b Mon Sep 17 00:00:00 2001 From: Fernando Pereira Date: Mon, 22 Jan 2024 19:40:10 +0100 Subject: [PATCH 58/65] Memb_list to be aware of its potential "view" condition and not free --- src/nrnoc/memblist.cpp | 12 ++++++------ src/nrnoc/multicore.cpp | 17 ++++++++--------- src/nrnoc/nrnoc_ml.h | 9 +++++++-- src/nrnoc/solve.cpp | 6 +++--- src/nrnoc/treeset.cpp | 12 +++++++++--- 5 files changed, 33 insertions(+), 23 deletions(-) diff --git a/src/nrnoc/memblist.cpp b/src/nrnoc/memblist.cpp index cdcfdbd73d..3dd7eea383 100644 --- a/src/nrnoc/memblist.cpp +++ b/src/nrnoc/memblist.cpp @@ -15,18 +15,16 @@ Memb_list::Memb_list(int type) assert(type == m_storage->type()); } -void Memb_list::nodes_alloc(int node_count, bool also_pdata) { +void Memb_list::nodes_alloc(int node_count) { if (node_count == 0) { return; } + m_owns_nodes = true; nodecount = node_count; nodelist = (Node**) emalloc(node_count * sizeof(Node*)); nodeindices = (int*) emalloc(node_count * sizeof(int)); // Prop used by ode_map even when hoc_mech is false prop = new Prop*[node_count]; - if (also_pdata) { - pdata = (Datum**) emalloc(node_count * sizeof(Datum*)); - } } void Memb_list::nodes_free() { @@ -34,11 +32,13 @@ void Memb_list::nodes_free() { free(std::exchange(nodelist, nullptr)); free(std::exchange(nodeindices, nullptr)); delete[] std::exchange(prop, nullptr); - free(std::exchange(pdata, nullptr)); + m_owns_nodes = false; // make potentially reusable for a view } Memb_list::~Memb_list() { - nodes_free(); + if (m_owns_nodes) { + nodes_free(); + } } [[nodiscard]] std::vector Memb_list::data() { diff --git a/src/nrnoc/multicore.cpp b/src/nrnoc/multicore.cpp index ac2dbdd70e..fa01c3e8a8 100644 --- a/src/nrnoc/multicore.cpp +++ b/src/nrnoc/multicore.cpp @@ -391,24 +391,23 @@ void nrn_threads_free() { for (tml = nt->tml; tml; tml = tml2) { Memb_list* ml = tml->ml; tml2 = tml->next; - free((char*) ml->nodelist); - free((char*) ml->nodeindices); - delete[] ml->prop; + free((char*) std::exchange(ml->nodelist, nullptr)); + free((char*) std::exchange(ml->nodeindices, nullptr)); + delete[] std::exchange(ml->prop, nullptr); if (!memb_func[tml->index].hoc_mech) { - free((char*) ml->pdata); + free((char*) std::exchange(ml->pdata, nullptr)); } if (ml->_thread) { if (memb_func[tml->index].thread_cleanup_) { (*memb_func[tml->index].thread_cleanup_)(ml->_thread); } - delete[] ml->_thread; + delete[] std::exchange(ml->_thread, nullptr); } - delete ml; - free((char*) tml); + delete std::exchange(ml, nullptr); + free((char*) std::exchange(tml, nullptr)); } if (nt->_ml_list) { - free((char*) nt->_ml_list); - nt->_ml_list = NULL; + free((char*) std::exchange(nt->_ml_list, nullptr)); } for (i = 0; i < BEFORE_AFTER_SIZE; ++i) { NrnThreadBAList *tbl, *tbl2; diff --git a/src/nrnoc/nrnoc_ml.h b/src/nrnoc/nrnoc_ml.h index 13729d4114..1e7e5fe35f 100644 --- a/src/nrnoc/nrnoc_ml.h +++ b/src/nrnoc/nrnoc_ml.h @@ -52,9 +52,8 @@ struct Memb_list { /** * @brief Allocate memory for node_count nodes. - * @param also_pdata Allocate also pdata Datum's */ - void nodes_alloc(int node_count, bool also_pdata); + void nodes_alloc(int node_count); /** * @brief Free memory allocated for nodes (with nodes_alloc) @@ -218,4 +217,10 @@ struct Memb_list { * permanent...in which case this value should probably not live here. */ std::size_t m_storage_offset{neuron::container::invalid_row}; + + /** + * @brief Whether this memlist owns its nodes memory or whether we are a view + * Has implications on memory management + */ + bool m_owns_nodes{false}; }; diff --git a/src/nrnoc/solve.cpp b/src/nrnoc/solve.cpp index 08b104c1b5..38aa3ebc53 100644 --- a/src/nrnoc/solve.cpp +++ b/src/nrnoc/solve.cpp @@ -501,7 +501,7 @@ void sec_free(hoc_Item* secitem) { prop_free(&(sec->prop)); node_free(sec); if (!sec->parentsec && sec->parentnode) { - delete sec->parentnode; + delete std::exchange(sec->parentnode, nullptr); } #if DIAMLIST if (sec->pt3d) { @@ -582,9 +582,9 @@ Node::~Node() { // this is delete[]...apart from the order? void node_destruct(Node** pnode, int n) { for (int i = n - 1; i >= 0; --i) { - delete pnode[i]; + delete std::exchange(pnode[i], nullptr); } - delete[] pnode; + delete[] std::exchange(pnode, nullptr); } #if KEEP_NSEG_PARM diff --git a/src/nrnoc/treeset.cpp b/src/nrnoc/treeset.cpp index 6acf1ab109..76d5fe970c 100644 --- a/src/nrnoc/treeset.cpp +++ b/src/nrnoc/treeset.cpp @@ -1617,20 +1617,26 @@ void v_setup_vectors(void) { nrn_threads_free(); - for (i = 0; i < n_memb_func; ++i) + for (i = 0; i < n_memb_func; ++i) { if (nrn_is_artificial_[i] && memb_func[i].has_initialize()) { if (memb_list[i].nodecount) { memb_list[i].nodes_free(); + if (!memb_func[i].hoc_mech) { + free(memb_list[i].pdata); + } } } + } #if 1 /* see finitialize */ /* and allocate for the artificial cells */ for (i = 0; i < n_memb_func; ++i) { if (nrn_is_artificial_[i] && memb_func[i].has_initialize()) { int node_count = nrn_pnt_template_[i]->count; - bool alloc_pdata = !memb_func[i].hoc_mech; - memb_list[i].nodes_alloc(node_count, alloc_pdata); + memb_list[i].nodes_alloc(node_count); + if (!memb_func[i].hoc_mech) { + memb_list[i].pdata = (Datum**) emalloc(node_count * sizeof(Datum*)); + } memb_list[i].nodecount = 0; /* counted again below. TODO: Why? */ } } From 4fc381a27acf61767e844a66fb2bd5beaaae3fde Mon Sep 17 00:00:00 2001 From: Fernando Pereira Date: Mon, 22 Jan 2024 20:03:51 +0100 Subject: [PATCH 59/65] Back pdata free --- src/nrnoc/init.cpp | 2 +- src/nrnoc/memblist.cpp | 8 +++++++- src/nrnoc/nrnoc_ml.h | 3 ++- src/nrnoc/treeset.cpp | 6 ++---- 4 files changed, 12 insertions(+), 7 deletions(-) diff --git a/src/nrnoc/init.cpp b/src/nrnoc/init.cpp index cdfead99cb..ae2db04a39 100644 --- a/src/nrnoc/init.cpp +++ b/src/nrnoc/init.cpp @@ -815,7 +815,7 @@ void register_data_fields(int mechtype, nrn_prop_param_size_[mechtype] = param_info.size(); nrn_prop_dparam_size_[mechtype] = dparam_info.size(); if (dparam_info.empty()) { - memb_func[mechtype].dparam_semantics.reset(nullptr); + memb_func[mechtype].dparam_semantics = nullptr; } else { memb_func[mechtype].dparam_semantics.reset(new int[dparam_info.size()]); for (auto i = 0; i < dparam_info.size(); ++i) { diff --git a/src/nrnoc/memblist.cpp b/src/nrnoc/memblist.cpp index 3dd7eea383..65244d54be 100644 --- a/src/nrnoc/memblist.cpp +++ b/src/nrnoc/memblist.cpp @@ -15,7 +15,7 @@ Memb_list::Memb_list(int type) assert(type == m_storage->type()); } -void Memb_list::nodes_alloc(int node_count) { +void Memb_list::nodes_alloc(int node_count, bool also_pdata) { if (node_count == 0) { return; } @@ -25,6 +25,11 @@ void Memb_list::nodes_alloc(int node_count) { nodeindices = (int*) emalloc(node_count * sizeof(int)); // Prop used by ode_map even when hoc_mech is false prop = new Prop*[node_count]; + if (also_pdata) { + pdata = (Datum**) emalloc(node_count * sizeof(Datum*)); + } else { + pdata = nullptr; + } } void Memb_list::nodes_free() { @@ -32,6 +37,7 @@ void Memb_list::nodes_free() { free(std::exchange(nodelist, nullptr)); free(std::exchange(nodeindices, nullptr)); delete[] std::exchange(prop, nullptr); + free(std::exchange(pdata, nullptr)); m_owns_nodes = false; // make potentially reusable for a view } diff --git a/src/nrnoc/nrnoc_ml.h b/src/nrnoc/nrnoc_ml.h index 1e7e5fe35f..866cb2c4ea 100644 --- a/src/nrnoc/nrnoc_ml.h +++ b/src/nrnoc/nrnoc_ml.h @@ -52,8 +52,9 @@ struct Memb_list { /** * @brief Allocate memory for node_count nodes. + * @param also_pdata Allocate also pdata Datum's */ - void nodes_alloc(int node_count); + void nodes_alloc(int node_count, bool also_pdata); /** * @brief Free memory allocated for nodes (with nodes_alloc) diff --git a/src/nrnoc/treeset.cpp b/src/nrnoc/treeset.cpp index 76d5fe970c..5e95e1a7d0 100644 --- a/src/nrnoc/treeset.cpp +++ b/src/nrnoc/treeset.cpp @@ -1633,10 +1633,8 @@ void v_setup_vectors(void) { for (i = 0; i < n_memb_func; ++i) { if (nrn_is_artificial_[i] && memb_func[i].has_initialize()) { int node_count = nrn_pnt_template_[i]->count; - memb_list[i].nodes_alloc(node_count); - if (!memb_func[i].hoc_mech) { - memb_list[i].pdata = (Datum**) emalloc(node_count * sizeof(Datum*)); - } + bool alloc_pdata = !memb_func[i].hoc_mech; + memb_list[i].nodes_alloc(node_count, alloc_pdata); memb_list[i].nodecount = 0; /* counted again below. TODO: Why? */ } } From 6fcb3529eaa5463692bf6a6b5dd89a9f6764dc7f Mon Sep 17 00:00:00 2001 From: Fernando Pereira Date: Tue, 23 Jan 2024 19:51:12 +0100 Subject: [PATCH 60/65] nrn_init to better initialize mpi --- src/ivoc/ivocmain.cpp | 26 ++++++++++++++++++++++++++ src/nrniv/neuronapi.cpp | 15 +++++---------- test/api/hh_sim.cpp | 2 +- test/api/netcon.cpp | 2 +- test/api/sections.c | 2 +- test/api/test_common.h | 2 +- test/api/vclamp.cpp | 2 +- 7 files changed, 36 insertions(+), 15 deletions(-) diff --git a/src/ivoc/ivocmain.cpp b/src/ivoc/ivocmain.cpp index 315a375eda..87beda9e28 100644 --- a/src/ivoc/ivocmain.cpp +++ b/src/ivoc/ivocmain.cpp @@ -231,6 +231,7 @@ extern void hoc_nrnmpi_init(); #if NRNMPI_DYNAMICLOAD extern void nrnmpi_stubs(); extern std::string nrnmpi_load(); +void nrnmpi_load_or_exit(); #endif // some things are defined in libraries earlier than they are used so... @@ -805,3 +806,28 @@ int run_til_stdin() { } void hoc_notify_value() {} #endif + + +/// A top-level initialization of MPI given argc and argv. +/// Sets stubs, load dyn lib, and initializes +std::tuple nrn_mpi_setup(int argc, char** argv) { +#if defined(AUTO_DLOPEN_NRNMECH) && AUTO_DLOPEN_NRNMECH == 0 + nrn_noauto_dlopen_nrnmech = 1; +#endif + +#if NRNMPI +#if NRNMPI_DYNAMICLOAD + nrnmpi_stubs(); + bool mpi_loaded = false; + for (int i = 0; i < argc; ++i) { + if (strcmp("-mpi", argv[i]) == 0) { + nrnmpi_load_or_exit(); + mpi_loaded = true; + break; + } + } +#endif // NRNMPI_DYNAMICLOAD + nrnmpi_init(1, &argc, &argv); // may change argc and argv +#endif // NRNMPI + return {argc, argv}; +} diff --git a/src/nrniv/neuronapi.cpp b/src/nrniv/neuronapi.cpp index 42bdc041c1..2954dd88bf 100644 --- a/src/nrniv/neuronapi.cpp +++ b/src/nrniv/neuronapi.cpp @@ -43,6 +43,7 @@ int ivocmain_session(int, const char**, const char**, int start_session); void simpleconnectsection(); extern Object* hoc_newobj1(Symbol*, int); extern void nrn_change_nseg(Section*, int); +extern std::tuple nrn_mpi_setup(int argc, char** argv); extern "C" { @@ -52,15 +53,9 @@ extern "C" { int nrn_init(int argc, const char** argv) { nrn_nobanner_ = 1; - int exit_status = ivocmain_session(argc, argv, nullptr, 0); -#if NRNMPI -#if NRNMPI_DYNAMICLOAD -#ifdef nrnmpi_stubs - nrnmpi_stubs(); -#endif -#endif -#endif - return exit_status; + auto [final_argc, final_argv] = nrn_mpi_setup(argc, const_cast(argv)); + errno = 0; + return ivocmain_session(final_argc, (const char**) final_argv, nullptr, 0); } void nrn_stdout_redirect(int (*myprint)(int, char*)) { @@ -521,4 +516,4 @@ Symlist* nrn_symbol_table(Symbol* sym) { Symlist* nrn_global_symbol_table(void) { return hoc_built_in_symlist; } -} \ No newline at end of file +} diff --git a/test/api/hh_sim.cpp b/test/api/hh_sim.cpp index 2d0c7d9b29..4c6d4a1846 100644 --- a/test/api/hh_sim.cpp +++ b/test/api/hh_sim.cpp @@ -94,4 +94,4 @@ int main(void) { if (!approximate(EXPECTED_V, v)) { return 1; } -} \ No newline at end of file +} diff --git a/test/api/netcon.cpp b/test/api/netcon.cpp index 273025bb20..ac2eb9955e 100644 --- a/test/api/netcon.cpp +++ b/test/api/netcon.cpp @@ -101,4 +101,4 @@ int main(void) { if (!approximate(EXPECTED_V, v)) { return 1; } -} \ No newline at end of file +} diff --git a/test/api/sections.c b/test/api/sections.c index 27e230b53a..262db42356 100644 --- a/test/api/sections.c +++ b/test/api/sections.c @@ -49,4 +49,4 @@ int main(void) { printf(" %s\n", nrn_secname(sec)); } nrn_sectionlist_iterator_free(sli); -} \ No newline at end of file +} diff --git a/test/api/test_common.h b/test/api/test_common.h index 77ed1e44d3..5153093012 100644 --- a/test/api/test_common.h +++ b/test/api/test_common.h @@ -75,4 +75,4 @@ bool approximate(const std::array& reference, Object* v) { } return true; } -#endif \ No newline at end of file +#endif diff --git a/test/api/vclamp.cpp b/test/api/vclamp.cpp index f3496e7119..3e5ca00a94 100644 --- a/test/api/vclamp.cpp +++ b/test/api/vclamp.cpp @@ -87,4 +87,4 @@ int main(void) { if (!approximate(EXPECTED_V, v)) { return 1; } -} \ No newline at end of file +} From f6aaf6fd249e486f034f18d2394ed825bd93f9d6 Mon Sep 17 00:00:00 2001 From: Fernando Pereira Date: Wed, 24 Jan 2024 23:16:30 +0100 Subject: [PATCH 61/65] Addressed a number of warnings, inc avoidiing potential double free --- src/ivoc/ivocmain.cpp | 9 +++++---- src/nrniv/neuronapi.cpp | 30 +++++++++++++++--------------- src/nrniv/neuronapi.h | 11 ++++++----- src/nrnoc/memblist.cpp | 14 ++++++++++++++ src/nrnoc/nrnoc_ml.h | 10 +++++++++- test/api/hh_sim.cpp | 17 +++++------------ test/api/netcon.cpp | 12 +++--------- test/api/sections.c | 3 +-- test/api/test_common.h | 2 +- test/api/vclamp.cpp | 15 ++++----------- 10 files changed, 63 insertions(+), 60 deletions(-) diff --git a/src/ivoc/ivocmain.cpp b/src/ivoc/ivocmain.cpp index 87beda9e28..4586793270 100644 --- a/src/ivoc/ivocmain.cpp +++ b/src/ivoc/ivocmain.cpp @@ -810,7 +810,7 @@ void hoc_notify_value() {} /// A top-level initialization of MPI given argc and argv. /// Sets stubs, load dyn lib, and initializes -std::tuple nrn_mpi_setup(int argc, char** argv) { +std::tuple nrn_mpi_setup(int argc, const char** argv) { #if defined(AUTO_DLOPEN_NRNMECH) && AUTO_DLOPEN_NRNMECH == 0 nrn_noauto_dlopen_nrnmech = 1; #endif @@ -826,8 +826,9 @@ std::tuple nrn_mpi_setup(int argc, char** argv) { break; } } -#endif // NRNMPI_DYNAMICLOAD - nrnmpi_init(1, &argc, &argv); // may change argc and argv -#endif // NRNMPI +#endif // NRNMPI_DYNAMICLOAD + auto argv_ptr = const_cast(&argv); // safe if individual strings not modified + nrnmpi_init(1, &argc, argv_ptr); // may change argc and argv +#endif // NRNMPI return {argc, argv}; } diff --git a/src/nrniv/neuronapi.cpp b/src/nrniv/neuronapi.cpp index 2954dd88bf..551902b437 100644 --- a/src/nrniv/neuronapi.cpp +++ b/src/nrniv/neuronapi.cpp @@ -14,7 +14,7 @@ struct nrn_Item: public hoc_Item {}; struct SectionListIterator { - SectionListIterator(nrn_Item*); + explicit SectionListIterator(nrn_Item*); Section* next(void); int done(void); @@ -24,7 +24,7 @@ struct SectionListIterator { }; struct SymbolTableIterator { - SymbolTableIterator(Symlist*); + explicit SymbolTableIterator(Symlist*); char const* next(void); int done(void); @@ -43,7 +43,7 @@ int ivocmain_session(int, const char**, const char**, int start_session); void simpleconnectsection(); extern Object* hoc_newobj1(Symbol*, int); extern void nrn_change_nseg(Section*, int); -extern std::tuple nrn_mpi_setup(int argc, char** argv); +extern std::tuple nrn_mpi_setup(int argc, const char** argv); extern "C" { @@ -53,9 +53,9 @@ extern "C" { int nrn_init(int argc, const char** argv) { nrn_nobanner_ = 1; - auto [final_argc, final_argv] = nrn_mpi_setup(argc, const_cast(argv)); + auto [final_argc, final_argv] = nrn_mpi_setup(argc, argv); errno = 0; - return ivocmain_session(final_argc, (const char**) final_argv, nullptr, 0); + return ivocmain_session(final_argc, final_argv, nullptr, 0); } void nrn_stdout_redirect(int (*myprint)(int, char*)) { @@ -101,12 +101,12 @@ void nrn_section_length_set(Section* sec, const double length) { sec->recalc_area_ = 1; } -double nrn_section_length_get(Section const* sec) { - return section_length(const_cast(sec)); +double nrn_section_length_get(Section* sec) { + return section_length(sec); } -double nrn_section_Ra_get(Section const* sec) { - return nrn_ra(const_cast(sec)); +double nrn_section_Ra_get(Section* sec) { + return nrn_ra(sec); } void nrn_section_Ra_set(Section* sec, double const val) { @@ -138,7 +138,7 @@ void nrn_mechanism_insert(Section* sec, Symbol* mechanism) { * Segments ****************************************/ -int nrn_nseg_get(Section const* const sec) { +int nrn_nseg_get(Section const* sec) { // always one more node than nseg return sec->nnode - 1; } @@ -160,15 +160,15 @@ void nrn_segment_diam_set(Section* const sec, const double x, const double diam) } } -double nrn_rangevar_get(const Symbol* sym, const Section* const sec, double x) { - return *nrn_rangepointer(const_cast(sec), const_cast(sym), x); +double nrn_rangevar_get(Symbol* sym, Section* sec, double x) { + return *nrn_rangepointer(sec, sym, x); } -void nrn_rangevar_set(Symbol* sym, Section* const sec, double x, double value) { +void nrn_rangevar_set(Symbol* sym, Section* sec, double x, double value) { *nrn_rangepointer(sec, sym, x) = value; } -void nrn_rangevar_push(Symbol* sym, Section* const sec, double x) { +void nrn_rangevar_push(Symbol* sym, Section* sec, double x) { hoc_push(nrn_rangepointer(sec, sym, x)); } @@ -270,7 +270,7 @@ nrn_stack_types_t nrn_stack_type(void) { return STACK_UNKNOWN; } -char const* const nrn_stack_type_name(nrn_stack_types_t id) { +char const* nrn_stack_type_name(nrn_stack_types_t id) { switch (id) { case STACK_IS_STR: return "STRING"; diff --git a/src/nrniv/neuronapi.h b/src/nrniv/neuronapi.h index 82d6157753..a65d234df4 100644 --- a/src/nrniv/neuronapi.h +++ b/src/nrniv/neuronapi.h @@ -37,7 +37,8 @@ void nrn_stdout_redirect(int (*myprint)(int, char*)); Section* nrn_section_new(char const* name); void nrn_section_connect(Section* child_sec, double child_x, Section* parent_sec, double parent_x); void nrn_section_length_set(Section* sec, double length); -double nrn_section_length_get(Section const* sec); +double nrn_section_length_get(Section* sec); +double nrn_section_Ra_get(Section* sec); void nrn_section_Ra_set(Section* sec, double val); char const* nrn_secname(Section* sec); void nrn_section_push(Section* sec); @@ -49,17 +50,17 @@ nrn_Item* nrn_sectionlist_data(Object* obj); /**************************************** * Segments ****************************************/ -int nrn_nseg_get(Section const* sec); +int nrn_nseg_get(const Section* sec); void nrn_nseg_set(Section* sec, int nseg); void nrn_segment_diam_set(Section* sec, double x, double diam); void nrn_rangevar_push(Symbol* sym, Section* sec, double x); -double nrn_rangevar_get(const Symbol* sym, const Section* sec, double x); +double nrn_rangevar_get(Symbol* sym, Section* sec, double x); void nrn_rangevar_set(Symbol* sym, Section* sec, double x, double value); /**************************************** * Functions, objects, and the stack ****************************************/ -Symbol* nrn_symbol(char const* name); +Symbol* nrn_symbol(const char* name); void nrn_symbol_push(Symbol* sym); int nrn_symbol_type(const Symbol* sym); // double* (*nrn_get_symbol_ptr)(Symbol* sym); @@ -74,7 +75,7 @@ int nrn_int_pop(void); void nrn_object_push(Object* obj); Object* nrn_object_pop(void); nrn_stack_types_t nrn_stack_type(void); -char const* const nrn_stack_type_name(nrn_stack_types_t id); +char const* nrn_stack_type_name(nrn_stack_types_t id); Object* nrn_object_new(Symbol* sym, int narg); Symbol* nrn_method_symbol(Object* obj, char const* name); // TODO: the next two functions throw exceptions in C++; need a version that diff --git a/src/nrnoc/memblist.cpp b/src/nrnoc/memblist.cpp index 65244d54be..5fa57a6339 100644 --- a/src/nrnoc/memblist.cpp +++ b/src/nrnoc/memblist.cpp @@ -1,6 +1,7 @@ #include "neuron/container/generic_data_handle.hpp" #include "neuron/container/mechanism_data.hpp" #include "neuron/model_data.hpp" +#include "nrnassrt.h" #include "nrnoc_ml.h" #include @@ -34,6 +35,7 @@ void Memb_list::nodes_alloc(int node_count, bool also_pdata) { void Memb_list::nodes_free() { nodecount = 0; + nrn_assert(m_owns_nodes); free(std::exchange(nodelist, nullptr)); free(std::exchange(nodeindices, nullptr)); delete[] std::exchange(prop, nullptr); @@ -41,6 +43,18 @@ void Memb_list::nodes_free() { m_owns_nodes = false; // make potentially reusable for a view } +Memb_list::Memb_list(Memb_list&& other) { + /// Other should not be used. But if it is, fine, but not the memory owner anymore + *this = other; + other.m_owns_nodes = false; +} + +Memb_list& Memb_list::operator=(Memb_list&& rhs) { + *this = rhs; + rhs.m_owns_nodes = false; + return *this; +} + Memb_list::~Memb_list() { if (m_owns_nodes) { nodes_free(); diff --git a/src/nrnoc/nrnoc_ml.h b/src/nrnoc/nrnoc_ml.h index 866cb2c4ea..6974823d95 100644 --- a/src/nrnoc/nrnoc_ml.h +++ b/src/nrnoc/nrnoc_ml.h @@ -43,13 +43,17 @@ struct Memb_list { * Defined in .cpp to hide neuron::container::Mechanism::storage layout from translated MOD file * code. */ - Memb_list(int type); + explicit Memb_list(int type); /** * @brief Uninitialize, freeing any allocated mem for nodes. */ ~Memb_list(); + // Move is ok. Copy is restricted + Memb_list(Memb_list&&); + Memb_list& operator=(Memb_list&&); + /** * @brief Allocate memory for node_count nodes. * @param also_pdata Allocate also pdata Datum's @@ -224,4 +228,8 @@ struct Memb_list { * Has implications on memory management */ bool m_owns_nodes{false}; + + // No copying since one may own memory and double free would occur + Memb_list(const Memb_list&) = delete; + Memb_list& operator=(const Memb_list&) = default; // private, used by move ctrs }; diff --git a/test/api/hh_sim.cpp b/test/api/hh_sim.cpp index 4c6d4a1846..0426c5f2ab 100644 --- a/test/api/hh_sim.cpp +++ b/test/api/hh_sim.cpp @@ -27,28 +27,21 @@ constexpr std::array EXPECTED_V{ #endif }; -static const char* argv[] = {"hh_sim", "-nogui", "-nopython", nullptr}; - extern "C" void modl_reg(){}; int main(void) { - Section* soma; - Object* iclamp; - Object* v; - Object* t; - char* temp_str; - + static const char* argv[] = {"hh_sim", "-nogui", "-nopython", nullptr}; nrn_init(3, argv); // load the stdrun library - temp_str = strdup("stdrun.hoc"); + char* temp_str = strdup("stdrun.hoc"); nrn_str_push(&temp_str); nrn_function_call(nrn_symbol("load_file"), 1); nrn_double_pop(); free(temp_str); // topology - soma = nrn_section_new("soma"); + Section* soma = nrn_section_new("soma"); nrn_nseg_set(soma, 3); // define soma morphology with two 3d points @@ -69,13 +62,13 @@ int main(void) { // current clamp at soma(0.5) nrn_double_push(0.5); - iclamp = nrn_object_new(nrn_symbol("IClamp"), 1); + Object* iclamp = nrn_object_new(nrn_symbol("IClamp"), 1); nrn_property_set(iclamp, "amp", 0.3); nrn_property_set(iclamp, "del", 1); nrn_property_set(iclamp, "dur", 0.1); // setup recording - v = nrn_object_new(nrn_symbol("Vector"), 0); + Object* v = nrn_object_new(nrn_symbol("Vector"), 0); nrn_rangevar_push(nrn_symbol("v"), soma, 0.5); nrn_double_push(5.); nrn_method_call(v, nrn_method_symbol(v, "record"), 2); diff --git a/test/api/netcon.cpp b/test/api/netcon.cpp index ac2eb9955e..31768efd8c 100644 --- a/test/api/netcon.cpp +++ b/test/api/netcon.cpp @@ -11,8 +11,6 @@ using std::cout; using std::endl; using std::ofstream; -static const char* argv[] = {"netcon", "-nogui", "-nopython", nullptr}; - constexpr std::array EXPECTED_V{ #ifndef CORENEURON_ENABLED -0x1.04p+6, @@ -31,18 +29,14 @@ constexpr std::array EXPECTED_V{ #endif }; - extern "C" void modl_reg(){}; int main(void) { - Object* v; - Object* t; - char* temp_str; - + static const char* argv[] = {"netcon", "-nogui", "-nopython", nullptr}; nrn_init(3, argv); // load the stdrun library - temp_str = strdup("stdrun.hoc"); + char* temp_str = strdup("stdrun.hoc"); nrn_str_push(&temp_str); nrn_function_call(nrn_symbol("load_file"), 1); nrn_double_pop(); @@ -82,7 +76,7 @@ int main(void) { // TODO: record probably put something on the stack that should be removed // setup recording - v = nrn_object_new(nrn_symbol("Vector"), 0); + Object* v = nrn_object_new(nrn_symbol("Vector"), 0); nrn_rangevar_push(nrn_symbol("v"), soma, 0.5); nrn_double_push(20); nrn_method_call(v, nrn_method_symbol(v, "record"), 2); diff --git a/test/api/sections.c b/test/api/sections.c index 262db42356..8c67f4ee99 100644 --- a/test/api/sections.c +++ b/test/api/sections.c @@ -5,11 +5,10 @@ #include #include -static const char* argv[] = {"sections", "-nogui", "-nopython", NULL}; - void modl_reg(){}; int main(void) { + static const char* argv[] = {"sections", "-nogui", "-nopython", NULL}; nrn_init(3, argv); // topology diff --git a/test/api/test_common.h b/test/api/test_common.h index 5153093012..cbdf5f6a13 100644 --- a/test/api/test_common.h +++ b/test/api/test_common.h @@ -31,7 +31,7 @@ bool compare_spikes(const char* ref_csv, double* tvec, double* vvec, long n_volt while (std::getline(ref_file, line) && cur_line < n_voltages) { size_t end; auto tref = std::stod(line, &end); - auto vref = std::strtof(line.c_str() + end + 1, NULL); + auto vref = std::strtof(line.c_str() + end + 1, nullptr); // ref values have exponent around 0, so we compare absolute values // and our epsilon is relatively large if (!almost_equal(tvec[cur_line], tref, &t_drift)) { diff --git a/test/api/vclamp.cpp b/test/api/vclamp.cpp index 3e5ca00a94..1c88375211 100644 --- a/test/api/vclamp.cpp +++ b/test/api/vclamp.cpp @@ -17,8 +17,6 @@ using std::ofstream; extern "C" void modl_reg(){}; -static const char* argv[] = {"vclamp", "-nogui", "-nopython", nullptr}; - constexpr std::array EXPECTED_V{ -0x1.04p+6, -0x1.00d7f6756215p-182, @@ -30,25 +28,20 @@ constexpr std::array EXPECTED_V{ }; int main(void) { - Section* soma; - Object* vclamp; - Object* v; - Object* t; char* temp_str; + static const char* argv[] = {"vclamp", "-nogui", "-nopython", nullptr}; nrn_init(3, argv); // load the stdrun library - temp_str = strdup("stdrun.hoc"); nrn_str_push(&temp_str); nrn_function_call(nrn_symbol("load_file"), 1); nrn_double_pop(); free(temp_str); - // topology - soma = nrn_section_new("soma"); + Section* soma = nrn_section_new("soma"); // define soma morphology with two 3d points nrn_section_push(soma); @@ -59,7 +52,7 @@ int main(void) { // voltage clamp at soma(0.5) nrn_double_push(0.5); - vclamp = nrn_object_new(nrn_symbol("VClamp"), 1); + Object* vclamp = nrn_object_new(nrn_symbol("VClamp"), 1); // 0 mV for 1 ms; 10 mV for the next 2 ms; 5 mV for the next 3 ms int i = 0; for (auto& [amp, dur]: std::initializer_list>{{0, 1}, {10, 2}, {5, 3}}) { @@ -68,7 +61,7 @@ int main(void) { ++i; } // setup recording - v = nrn_object_new(nrn_symbol("Vector"), 0); + Object* v = nrn_object_new(nrn_symbol("Vector"), 0); nrn_rangevar_push(nrn_symbol("v"), soma, 0.5); nrn_double_push(1); nrn_method_call(v, nrn_method_symbol(v, "record"), 2); From 193003fdbd6e4849c0bf6143acea44cf66ca3d94 Mon Sep 17 00:00:00 2001 From: Fernando Pereira Date: Sun, 28 Jan 2024 21:54:23 +0100 Subject: [PATCH 62/65] Addressed sonarcloud issues --- src/ivoc/ivocmain.cpp | 5 ++-- src/nrniv/neuronapi.cpp | 44 +++++++++++++---------------------- src/nrniv/neuronapi.h | 6 ++--- src/nrnoc/cabcode.cpp | 16 +++++++------ src/nrnoc/memblist.cpp | 4 ++-- src/nrnoc/nrnoc_ml.h | 6 ++--- test/api/hh_sim.cpp | 6 ++--- test/api/netcon.cpp | 6 ++--- test/api/sections.c | 4 ++-- test/api/test_common.h | 51 +---------------------------------------- test/api/vclamp.cpp | 10 ++++---- 11 files changed, 47 insertions(+), 111 deletions(-) diff --git a/src/ivoc/ivocmain.cpp b/src/ivoc/ivocmain.cpp index 4586793270..6767b7560e 100644 --- a/src/ivoc/ivocmain.cpp +++ b/src/ivoc/ivocmain.cpp @@ -812,17 +812,16 @@ void hoc_notify_value() {} /// Sets stubs, load dyn lib, and initializes std::tuple nrn_mpi_setup(int argc, const char** argv) { #if defined(AUTO_DLOPEN_NRNMECH) && AUTO_DLOPEN_NRNMECH == 0 + extern int nrn_noauto_dlopen_nrnmech; nrn_noauto_dlopen_nrnmech = 1; #endif #if NRNMPI #if NRNMPI_DYNAMICLOAD nrnmpi_stubs(); - bool mpi_loaded = false; - for (int i = 0; i < argc; ++i) { + for (int i = 1; i < argc; ++i) { if (strcmp("-mpi", argv[i]) == 0) { nrnmpi_load_or_exit(); - mpi_loaded = true; break; } } diff --git a/src/nrniv/neuronapi.cpp b/src/nrniv/neuronapi.cpp index 551902b437..3a286c87c0 100644 --- a/src/nrniv/neuronapi.cpp +++ b/src/nrniv/neuronapi.cpp @@ -16,7 +16,7 @@ struct nrn_Item: public hoc_Item {}; struct SectionListIterator { explicit SectionListIterator(nrn_Item*); Section* next(void); - int done(void); + int done(void) const; private: hoc_Item* initial; @@ -26,7 +26,7 @@ struct SectionListIterator { struct SymbolTableIterator { explicit SymbolTableIterator(Symlist*); char const* next(void); - int done(void); + int done(void) const; private: Symbol* current; @@ -43,6 +43,7 @@ int ivocmain_session(int, const char**, const char**, int start_session); void simpleconnectsection(); extern Object* hoc_newobj1(Symbol*, int); extern void nrn_change_nseg(Section*, int); +extern Section* section_new(Symbol* sym); extern std::tuple nrn_mpi_setup(int argc, const char** argv); extern "C" { @@ -70,16 +71,13 @@ void nrn_stdout_redirect(int (*myprint)(int, char*)) { ****************************************/ Section* nrn_section_new(char const* const name) { - // TODO: check for memory leaks; should we free the symbol, pitm, etc? - Symbol* symbol = new Symbol; + auto* symbol = new Symbol; symbol->name = strdup(name); symbol->type = 1; symbol->u.oboff = 0; symbol->arayinfo = 0; hoc_install_object_data_index(symbol); - hoc_Item* itm; - new_sections(nullptr, symbol, &itm, 1); - return itm->element.sec; + return section_new(symbol); } void nrn_section_connect(Section* child_sec, double child_x, Section* parent_sec, double parent_x) { @@ -129,7 +127,7 @@ void nrn_section_pop(void) { nrn_sec_pop(); } -void nrn_mechanism_insert(Section* sec, Symbol* mechanism) { +void nrn_mechanism_insert(Section* sec, const Symbol* mechanism) { // TODO: throw exception if mechanism is not an insertable mechanism? mech_insert1(sec, mechanism->subtype); } @@ -199,10 +197,6 @@ void nrn_symbol_push(Symbol* sym) { hoc_pushpx(sym->u.pval); } -/*double* nrn_get_symbol_ptr(Symbol* sym) { - return sym->u.pval; -}*/ - void nrn_double_push(double val) { hoc_pushx(val); } @@ -261,11 +255,9 @@ nrn_stack_types_t nrn_stack_type(void) { case OBJECTTMP: return STACK_IS_OBJTMP; case USERINT: - return STACK_IS_USERINT; + return STACK_IS_INT; case SYMBOL: return STACK_IS_SYM; - case STKOBJ_UNREF: - return STACK_IS_OBJUNREF; } return STACK_UNKNOWN; } @@ -282,12 +274,10 @@ char const* nrn_stack_type_name(nrn_stack_types_t id) { return "OBJECTVAR"; case STACK_IS_OBJTMP: return "OBJECTTMP"; - case STACK_IS_USERINT: - return "USERINT"; + case STACK_IS_INT: + return "INT"; case STACK_IS_SYM: return "SYMBOL"; - case STACK_IS_OBJUNREF: - return "STKOBJ_UNREF"; default: return "UNKNOWN"; } @@ -330,10 +320,9 @@ int nrn_hoc_call(char const* const command) { return hoc_oc(command); } -SectionListIterator::SectionListIterator(nrn_Item* my_sectionlist) { - initial = my_sectionlist; - current = my_sectionlist->next; -} +SectionListIterator::SectionListIterator(nrn_Item* my_sectionlist) + : initial(my_sectionlist) + , current(my_sectionlist->next) {} Section* SectionListIterator::next(void) { // NOTE: if no next element, returns nullptr @@ -353,16 +342,15 @@ Section* SectionListIterator::next(void) { } } -int SectionListIterator::done(void) { +int SectionListIterator::done(void) const { if (initial == current) { return 1; } return 0; } -SymbolTableIterator::SymbolTableIterator(Symlist* list) { - current = list->first; -} +SymbolTableIterator::SymbolTableIterator(Symlist* list) + : current(list->first) {} char const* SymbolTableIterator::next(void) { auto result = current->name; @@ -370,7 +358,7 @@ char const* SymbolTableIterator::next(void) { return result; } -int SymbolTableIterator::done(void) { +int SymbolTableIterator::done(void) const { if (!current) { return 1; } diff --git a/src/nrniv/neuronapi.h b/src/nrniv/neuronapi.h index a65d234df4..0c39c8c0a9 100644 --- a/src/nrniv/neuronapi.h +++ b/src/nrniv/neuronapi.h @@ -19,9 +19,8 @@ typedef enum { STACK_IS_NUM = 3, STACK_IS_OBJVAR = 4, STACK_IS_OBJTMP = 5, - STACK_IS_USERINT = 6, + STACK_IS_INT = 6, STACK_IS_SYM = 7, - STACK_IS_OBJUNREF = 8, STACK_UNKNOWN = -1 } nrn_stack_types_t; @@ -43,7 +42,7 @@ void nrn_section_Ra_set(Section* sec, double val); char const* nrn_secname(Section* sec); void nrn_section_push(Section* sec); void nrn_section_pop(void); -void nrn_mechanism_insert(Section* sec, Symbol* mechanism); +void nrn_mechanism_insert(Section* sec, const Symbol* mechanism); nrn_Item* nrn_allsec(void); nrn_Item* nrn_sectionlist_data(Object* obj); @@ -63,7 +62,6 @@ void nrn_rangevar_set(Symbol* sym, Section* sec, double x, double value); Symbol* nrn_symbol(const char* name); void nrn_symbol_push(Symbol* sym); int nrn_symbol_type(const Symbol* sym); -// double* (*nrn_get_symbol_ptr)(Symbol* sym); void nrn_double_push(double val); double nrn_double_pop(void); void nrn_double_ptr_push(double* addr); diff --git a/src/nrnoc/cabcode.cpp b/src/nrnoc/cabcode.cpp index cfd0faa111..15f8063dd8 100644 --- a/src/nrnoc/cabcode.cpp +++ b/src/nrnoc/cabcode.cpp @@ -287,17 +287,19 @@ void new_sections(Object* ob, Symbol* sym, Item** pitm, int size) { } } +/// @brief Creates a new section and registers with the global section list +Section* section_new(Symbol* sym) { + Section* sec = new_section(nullptr, sym, 0); + auto itm = lappendsec(section_list, sec); + sec->prop->dparam[8] = {neuron::container::do_not_search, itm}; + return sec; +} + #if USE_PYTHON struct NPySecObj; Section* nrnpy_newsection(NPySecObj* v) { - Item* itm; - Section* sec; - sec = new_section((Object*) 0, (Symbol*) 0, 0); -#if USE_PYTHON + auto sec = section_new(nullptr); sec->prop->dparam[PROP_PY_INDEX] = static_cast(v); -#endif - itm = lappendsec(section_list, sec); - sec->prop->dparam[8] = itm; return sec; } #endif diff --git a/src/nrnoc/memblist.cpp b/src/nrnoc/memblist.cpp index 5fa57a6339..522642a787 100644 --- a/src/nrnoc/memblist.cpp +++ b/src/nrnoc/memblist.cpp @@ -43,13 +43,13 @@ void Memb_list::nodes_free() { m_owns_nodes = false; // make potentially reusable for a view } -Memb_list::Memb_list(Memb_list&& other) { +Memb_list::Memb_list(Memb_list&& other) noexcept { /// Other should not be used. But if it is, fine, but not the memory owner anymore *this = other; other.m_owns_nodes = false; } -Memb_list& Memb_list::operator=(Memb_list&& rhs) { +Memb_list& Memb_list::operator=(Memb_list&& rhs) noexcept { *this = rhs; rhs.m_owns_nodes = false; return *this; diff --git a/src/nrnoc/nrnoc_ml.h b/src/nrnoc/nrnoc_ml.h index 6974823d95..f5ff620ec1 100644 --- a/src/nrnoc/nrnoc_ml.h +++ b/src/nrnoc/nrnoc_ml.h @@ -48,11 +48,11 @@ struct Memb_list { /** * @brief Uninitialize, freeing any allocated mem for nodes. */ - ~Memb_list(); + ~Memb_list() noexcept; // Move is ok. Copy is restricted - Memb_list(Memb_list&&); - Memb_list& operator=(Memb_list&&); + Memb_list(Memb_list&&) noexcept; + Memb_list& operator=(Memb_list&&) noexcept; /** * @brief Allocate memory for node_count nodes. diff --git a/test/api/hh_sim.cpp b/test/api/hh_sim.cpp index 0426c5f2ab..0dd548c637 100644 --- a/test/api/hh_sim.cpp +++ b/test/api/hh_sim.cpp @@ -27,11 +27,11 @@ constexpr std::array EXPECTED_V{ #endif }; -extern "C" void modl_reg(){}; +extern "C" void modl_reg(){/* No modl_reg */}; int main(void) { - static const char* argv[] = {"hh_sim", "-nogui", "-nopython", nullptr}; - nrn_init(3, argv); + static std::array argv = {"hh_sim", "-nogui", "-nopython", nullptr}; + nrn_init(3, argv.data()); // load the stdrun library char* temp_str = strdup("stdrun.hoc"); diff --git a/test/api/netcon.cpp b/test/api/netcon.cpp index 31768efd8c..d0b3c7975a 100644 --- a/test/api/netcon.cpp +++ b/test/api/netcon.cpp @@ -29,11 +29,11 @@ constexpr std::array EXPECTED_V{ #endif }; -extern "C" void modl_reg(){}; +extern "C" void modl_reg(){/* No modl_reg */}; int main(void) { - static const char* argv[] = {"netcon", "-nogui", "-nopython", nullptr}; - nrn_init(3, argv); + static std::array argv = {"netcon", "-nogui", "-nopython", nullptr}; + nrn_init(3, argv.data()); // load the stdrun library char* temp_str = strdup("stdrun.hoc"); diff --git a/test/api/sections.c b/test/api/sections.c index 8c67f4ee99..1571bbcc6c 100644 --- a/test/api/sections.c +++ b/test/api/sections.c @@ -35,7 +35,7 @@ int main(void) { /* loop over allsec, print out */ printf("allsec:\n"); SectionListIterator* sli = nrn_sectionlist_iterator_new(nrn_allsec()); - for (; !nrn_sectionlist_iterator_done(sli);) { + while (!nrn_sectionlist_iterator_done(sli)) { Section* sec = nrn_sectionlist_iterator_next(sli); printf(" %s\n", nrn_secname(sec)); } @@ -43,7 +43,7 @@ int main(void) { printf("\ndend1's subtree:\n"); sli = nrn_sectionlist_iterator_new(nrn_sectionlist_data(seclist)); - for (; !nrn_sectionlist_iterator_done(sli);) { + while (!nrn_sectionlist_iterator_done(sli)) { Section* sec = nrn_sectionlist_iterator_next(sli); printf(" %s\n", nrn_secname(sec)); } diff --git a/test/api/test_common.h b/test/api/test_common.h index cbdf5f6a13..e3ee4bff13 100644 --- a/test/api/test_common.h +++ b/test/api/test_common.h @@ -7,59 +7,10 @@ constexpr double EPSILON = 0x1p-16; // 1>>16 for double -/// Compare two doubles. Mitigate accumulated errors by updating a drift -inline bool almost_equal(double a, double b, double* drift) { - double diff = b - a; - bool is_ok = std::fabs(diff - *drift) < EPSILON; - *drift = diff; - return is_ok; -} - -/// @brief Compared volatges from a csv file against raw vectors of tvec and voltage -bool compare_spikes(const char* ref_csv, double* tvec, double* vvec, long n_voltages) { - std::ifstream ref_file(ref_csv); - if (!ref_file.is_open()) { - std::cerr << "Bad ref file: " << ref_csv << std::endl; - return false; - } - - std::string line; - long cur_line = 0; - double t_drift = 0.; - double v_drift = 0.; - - while (std::getline(ref_file, line) && cur_line < n_voltages) { - size_t end; - auto tref = std::stod(line, &end); - auto vref = std::strtof(line.c_str() + end + 1, nullptr); - // ref values have exponent around 0, so we compare absolute values - // and our epsilon is relatively large - if (!almost_equal(tvec[cur_line], tref, &t_drift)) { - std::cerr << "DIFF at line " << cur_line << ": " << tvec[cur_line] << "!=" << tref - << std::endl; - return false; - } - if (!almost_equal(vvec[cur_line], vref, &v_drift)) { - std::cerr << "DIFF at line " << cur_line << ": " << vvec[cur_line] << "!=" << vref - << " (Drift=" << v_drift << ')' << std::endl; - return false; - } - ++cur_line; - } - - if (cur_line != n_voltages) { - std::cerr << "Unexpected array length: " << cur_line << " (Ref: " << n_voltages << ')' - << std::endl; - return false; - } - - return true; -} - template bool approximate(const std::array& reference, Object* v) { long v_size = nrn_vector_capacity(v); - double* v_values = nrn_vector_data(v); + const double* v_values = nrn_vector_data(v); if (v_size != reference.size()) { std::cerr << "Bad array length: " << v_size << "!=" << reference.size() << std::endl; return false; diff --git a/test/api/vclamp.cpp b/test/api/vclamp.cpp index 1c88375211..66b9576d67 100644 --- a/test/api/vclamp.cpp +++ b/test/api/vclamp.cpp @@ -15,7 +15,7 @@ using std::cout; using std::endl; using std::ofstream; -extern "C" void modl_reg(){}; +extern "C" void modl_reg(){/* No modl_reg */}; constexpr std::array EXPECTED_V{ -0x1.04p+6, @@ -28,13 +28,11 @@ constexpr std::array EXPECTED_V{ }; int main(void) { - char* temp_str; - - static const char* argv[] = {"vclamp", "-nogui", "-nopython", nullptr}; - nrn_init(3, argv); + static std::array argv = {"vclamp", "-nogui", "-nopython", nullptr}; + nrn_init(3, argv.data()); // load the stdrun library - temp_str = strdup("stdrun.hoc"); + char* temp_str = strdup("stdrun.hoc"); nrn_str_push(&temp_str); nrn_function_call(nrn_symbol("load_file"), 1); nrn_double_pop(); From aed536f39b1428f4737dccd6a986f557137f335b Mon Sep 17 00:00:00 2001 From: Pramod Kumbhar Date: Tue, 19 Mar 2024 16:43:08 +0100 Subject: [PATCH 63/65] fix the merge with master --- src/nrniv/nrncore_write/data/cell_group.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/nrniv/nrncore_write/data/cell_group.cpp b/src/nrniv/nrncore_write/data/cell_group.cpp index 80b8583f49..e44a27bd4c 100644 --- a/src/nrniv/nrncore_write/data/cell_group.cpp +++ b/src/nrniv/nrncore_write/data/cell_group.cpp @@ -257,8 +257,7 @@ void CellGroup::datumindex_fill(int ith, CellGroup& cg, DatumIndices& di, Memb_l // what is the size of the nt._vdata portion needed for a single ml->dparam[i] int vdata_size = 0; for (int i = 0; i < dsize; ++i) { - int* ds = memb_func[di.type].dparam_semantics; - if (ds[i] == -4 || ds[i] == -6 || ds[i] == -7 || ds[i] == -11 || ds[i] == 0) { + if (dmap[i] == -4 || dmap[i] == -6 || dmap[i] == -7 || dmap[i] == -11 || dmap[i] == 0) { ++vdata_size; } } From 030985e46cffac950ab570756acec29129497f5a Mon Sep 17 00:00:00 2001 From: Pramod Kumbhar Date: Tue, 19 Mar 2024 18:36:44 +0100 Subject: [PATCH 64/65] Fix test/api/netcon.cpp after merge with master - after RANDOM construct (#2627) was merged, netstim.mod uses Random123 by default - before this, netstim was using scoprand by default and reference results were from the same - now, explicitly use Random123 in the test and update reference results --- test/api/netcon.cpp | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/test/api/netcon.cpp b/test/api/netcon.cpp index d0b3c7975a..87cfd567d5 100644 --- a/test/api/netcon.cpp +++ b/test/api/netcon.cpp @@ -14,18 +14,18 @@ using std::ofstream; constexpr std::array EXPECTED_V{ #ifndef CORENEURON_ENABLED -0x1.04p+6, - 0x1.d8340689fafcdp+3, - -0x1.2e02b18fab641p+6, - -0x1.0517fe92a58d9p+6, - -0x1.03e59d79732fcp+6, - -0x1.03e51f949532bp+6, + -0x1.085a63d029bc3p+6, + -0x1.112a5e95eb67cp+6, + -0x1.1795abaec26c1p+6, + -0x1.0422351f3f9dcp+6, + -0x1.03e5317ac368cp+6, #else -0x1.04p+6, - 0x1.d9fa4f205318p+3, - -0x1.2e0327138fc9p+6, - -0x1.051caef48c1p+6, - -0x1.03e62a34d83f2p+6, - -0x1.03e5860b6c0c1p+6, + -0x1.085a703d657a7p+6, + -0x1.112d0039e9c38p+6, + -0x1.17974aa201b7bp+6, + -0x1.041fdf57a182bp+6, + -0x1.03e58fad20b92p+6, #endif }; @@ -55,6 +55,11 @@ int main(void) { nrn_property_set(ns, "interval", 5); nrn_property_set(ns, "number", 10); + nrn_double_push(1); + nrn_double_push(2); + nrn_double_push(3); + nrn_method_call(ns, nrn_method_symbol(ns, "noiseFromRandom123"), 3); + // syn = h.ExpSyn(soma(0.5)) nrn_double_push(0.5); auto syn = nrn_object_new(nrn_symbol("ExpSyn"), 1); From 9e53b77e97040d2cb51e175e79bfbe350b4d1330 Mon Sep 17 00:00:00 2001 From: Michael Hines Date: Wed, 22 May 2024 12:28:50 +0200 Subject: [PATCH 65/65] fix warning [-Wimplicit-exception-spec-mismatch] --- src/nrnoc/memblist.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/nrnoc/memblist.cpp b/src/nrnoc/memblist.cpp index c5cf800f8f..c01093cee4 100644 --- a/src/nrnoc/memblist.cpp +++ b/src/nrnoc/memblist.cpp @@ -55,7 +55,7 @@ Memb_list& Memb_list::operator=(Memb_list&& rhs) noexcept { return *this; } -Memb_list::~Memb_list() { +Memb_list::~Memb_list() noexcept { if (m_owns_nodes) { nodes_free(); }