| 811 | |
| 812 | |
| 813 | int OpenSeesAppInit(Tcl_Interp *interp) { |
| 814 | |
| 815 | ops_TheActiveDomain = &theDomain; |
| 816 | |
| 817 | // |
| 818 | // redo puts command so we can capture puts into std:cerr |
| 819 | // |
| 820 | |
| 821 | if (OPS_suppressOpenSeesOutput == false) { |
| 822 | // get a handle on puts procedure |
| 823 | Tcl_CmdInfo putsCommandInfo; |
| 824 | Tcl_GetCommandInfo(interp, "puts", &putsCommandInfo); |
| 825 | Tcl_putsCommand = putsCommandInfo.objProc; |
| 826 | // if handle, use our procedure as opposed to theirs |
| 827 | if (Tcl_putsCommand != 0) { |
| 828 | Tcl_CreateObjCommand(interp, "oldputs", Tcl_putsCommand, NULL, NULL); |
| 829 | Tcl_CreateObjCommand(interp, "puts", OpenSees_putsCommand, NULL, NULL); |
| 830 | } |
| 831 | } |
| 832 | |
| 833 | theSimulationInfoPtr = &simulationInfo; |
| 834 | |
| 835 | #ifndef _LINUX |
| 836 | opserr.setFloatField(SCIENTIFIC); |
| 837 | opserr.setFloatField(FIXEDD); |
| 838 | #endif |
| 839 | |
| 840 | //Tcl_CreateObjCommand(interp, "interp", Tcl_InterpOpenSeesObjCmd, NULL, NULL); |
| 841 | |
| 842 | Tcl_CreateCommand(interp, "recorderValue", &OPS_recorderValue, |
| 843 | (ClientData)NULL, (Tcl_CmdDeleteProc *)NULL); //by SAJalali |
| 844 | |
| 845 | Tcl_CreateObjCommand(interp, "pset", &OPS_SetObjCmd, |
| 846 | (ClientData)NULL, (Tcl_CmdDeleteProc *)NULL); |
| 847 | |
| 848 | Tcl_CreateObjCommand(interp, "source", &OPS_SourceCmd, |
| 849 | (ClientData)NULL, (Tcl_CmdDeleteProc *)NULL); |
| 850 | |
| 851 | Tcl_CreateCommand(interp, "getNDM", &getNDM, |
| 852 | (ClientData)NULL, (Tcl_CmdDeleteProc*)NULL); |
| 853 | Tcl_CreateCommand(interp, "getNDF", &getNDF, |
| 854 | (ClientData)NULL, (Tcl_CmdDeleteProc*)NULL); |
| 855 | |
| 856 | Tcl_CreateCommand(interp, "wipe", &wipeModel, |
| 857 | (ClientData)NULL, (Tcl_CmdDeleteProc *)NULL); |
| 858 | |
| 859 | Tcl_CreateCommand(interp, "wipeAnalysis", &wipeAnalysis, |
| 860 | (ClientData)NULL, (Tcl_CmdDeleteProc *)NULL); |
| 861 | Tcl_CreateCommand(interp, "reset", &resetModel, |
| 862 | (ClientData)NULL, (Tcl_CmdDeleteProc *)NULL); |
| 863 | |
| 864 | Tcl_CreateCommand(interp, "initialize", &initializeAnalysis, |
| 865 | (ClientData)NULL, (Tcl_CmdDeleteProc *)NULL); |
| 866 | Tcl_CreateCommand(interp, "loadConst", &setLoadConst, |
| 867 | (ClientData)NULL, (Tcl_CmdDeleteProc *)NULL); |
| 868 | |
| 869 | Tcl_CreateCommand(interp, "setCreep", &setCreep, |
| 870 | (ClientData)NULL, (Tcl_CmdDeleteProc *)NULL); |
no test coverage detected