Overview
Comment: | Improved pre-processor directives to better accommodate future alternatives (matlab) if necessary. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | origin/master | trunk |
Files: | files | file ages | folders |
SHA3-256: |
f3e2114050e6858532ded2da253cb7ae |
User & Date: | geraint@users.sourceforge.net on 2002-05-01 17:30:56 |
Other Links: | branch diff | manifest | tags |
Context
2002-05-02
| ||
09:19:40 | replaced by cxxsim_rep.make check-in: be1568ff45 user: geraint@users.sourceforge.net tags: origin/master, trunk | |
2002-05-01
| ||
17:30:56 |
Improved pre-processor directives to better accommodate future alternatives (matlab) if necessary. check-in: f3e2114050 user: geraint@users.sourceforge.net tags: origin/master, trunk | |
14:26:03 | Whoops! Put awk back to gawk check-in: 86f1b8f455 user: gawthrop@users.sourceforge.net tags: origin/master, trunk | |
Changes
Modified mttroot/mtt/bin/mtt from [b5d9f5c247] to [e0453def2b].
︙ | |||
13 14 15 16 17 18 19 20 21 22 23 24 25 26 | 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | + + + | # Copyright (C) 2001 by Peter J. Gawthrop ############################################################### ## Version control history ############################################################### ## $Header$ ## $Log$ ## Revision 1.334 2002/05/01 14:10:22 gawthrop ## Added -dr foo (reads from dir foo) option ## ## Revision 1.333 2002/04/28 18:41:26 geraint ## Fixed [ 549658 ] awk should be gawk. ## Replaced calls to awk with call to gawk. ## ## Revision 1.332 2002/04/26 23:19:00 geraint ## Fixed path to info files for "mtt info". ## |
︙ | |||
2085 2086 2087 2088 2089 2090 2091 | 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 | - + - + - + - + | # Cancel implicit rules I don't want %.dvi: %.tex # MTT implicit rules ## .oct files $1_%.oct: $1_%.cc $1_def.h $1_sympar.h $1_cr.h |
︙ | |||
2760 2761 2762 2763 2764 2765 2766 | 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 | - + - + | echo Creating $1_ode2odes.exe ${MTT_CXX} ${MTT_CXXFLAGS} -o $1_ode2odes.exe\ $1_ode2odes.o $1_ode2odes_common.o $1_ode2odes_${integration_method}.o $1_ode2odes_${algebraic_solver}.o mtt_kpathsea.o\ ${MTT_LDFLAGS} ${MTT_CXXLIBS} $1_ode2odes.o: $1_ode2odes.cc $1_ode2odes_common.o $1_ode2odes_${integration_method}.o $1_ode2odes_${algebraic_solver}.o echo Creating $1_ode2odes.o |
︙ |
Modified mttroot/mtt/bin/trans/make_ode2odes from [aa15487e6e] to [de3807b0bb].
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | + + + | #! /bin/sh ###################################### ##### Model Transformation Tools ##### ###################################### ############################################################### ## Version control history ############################################################### ## $Id$ ## $Log$ ## Revision 1.73 2002/05/01 12:24:41 geraint ## Removed unnecessary inclusion of load-save.h. ## ## Revision 1.72 2002/05/01 12:21:29 geraint ## No longer uses save_ascii_data_for_plotting function to write data ## - eliminates dependence on liboctinterp (and libncurses) for .cc. ## ## Revision 1.71 2002/04/30 23:27:00 geraint ## Replaced octave_map with columnvector in simpar.cc. Not quite as descriptive but ## standardises the interfaces somewhat and reduces the dependency on liboctinterp |
︙ | |||
423 424 425 426 427 428 429 430 431 432 433 | 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 | + + + + + + + + - + - + - + | *) vector_value=column_vector_value feval_header=parse.h ;; esac cat <<EOF > $filename // Code generation directives #define STANDALONE 0 #define OCTAVEDLD 1 #if (! defined (CODEGENTARGET)) #define CODEGENTARGET STANDALONE #endif // (! defined (CODEGENTARGET)) #include <octave/oct.h> #include <octave/lo-mappers.h> #include <octave/variables.h> |
︙ | |||
537 538 539 540 541 542 543 | 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 | - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + | EOF ;; esac cat <<EOF >> $filename void set_signal_handlers (void); |
︙ | |||
869 870 871 872 873 874 875 | 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 | - + - + - + - + - + - + | } else step = t; for (register int i = MTTNX; i < MTTNX+MTTNYZ; i++) residual(i) += X(i) - DX(i)*step; } |
︙ | |||
958 959 960 961 962 963 964 | 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 | - + - + - + - + | fcputime << t << '\t' << static_cast <double> (cputime - cputime0) / CLOCKS_PER_SEC << '\t' << static_cast <double> (cputime - cputime1) / CLOCKS_PER_SEC << std::endl; cputime1 = cputime; if (nrows == row) { |
︙ | |||
1017 1018 1019 1020 1021 1022 1023 | 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 | - + - + - + | signal (SIGFPE, handle_signal); signal (SIGINT, handle_signal); signal (SIGQUIT, handle_signal); } int main (void) { set_signal_handlers (); |
︙ | |||
1061 1062 1063 1064 1065 1066 1067 | 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 | - + - + - + | dt = mtt_simpar ()(1); last = mtt_simpar ()(2); stepfactor = mtt_simpar ()(3); par = mtt_numpar (); x0 = args (0).${vector_value} (); break; case 0: |
︙ | |||
1162 1163 1164 1165 1166 1167 1168 | 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 | - + - + - + | open_switches = mtt_logic (x, u, t, par); x = $algorithm; t += ddt; j++; j = (j == static_cast<int> (stepfactor)) ? 0 : j; } |
︙ |
Modified mttroot/mtt/bin/trans/make_stdin from [c1f26ffe2e] to [d2cafbc640].
︙ | |||
69 70 71 72 73 74 75 | 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 | + - + + + + + + + | // -*-c++-*- Put emacs into c++-mode // // System ${Sys}, representation input, language oct; // File ${Sys}_input.oct; // Generated by MTT on `date`; // Code generation directives |
︙ | |||
96 97 98 99 100 101 102 | 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 | - + - - + - + - + - + - + - - + - + | ColumnVector F${Sys}_input ( ColumnVector &mttx, ColumnVector &mtty, const double &mttt, ColumnVector &mttpar ) { |
︙ |
Modified mttroot/mtt/bin/trans/mtt_header from [f0f5b8d756] to [c82b78366b].
︙ | |||
8 9 10 11 12 13 14 15 16 17 18 19 20 21 | 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | + + + + + | # Copyright (C) 2000 by Peter J. Gawthrop ############################################################### ## Version control history ############################################################### ## $Id$ ## $Log$ ## Revision 1.43 2002/04/30 23:27:00 geraint ## Replaced octave_map with columnvector in simpar.cc. Not quite as descriptive but ## standardises the interfaces somewhat and reduces the dependency on liboctinterp ## (and thus libreadline, libkpathsea, libncurses, etc). ## ## Revision 1.42 2002/04/28 18:41:27 geraint ## Fixed [ 549658 ] awk should be gawk. ## Replaced calls to awk with call to gawk. ## ## Revision 1.41 2002/04/23 17:46:05 gawthrop ## _sim.m now returns time as third argument ## |
︙ | |||
725 726 727 728 729 730 731 | 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 | - + - + - + - + | echo ${ans} } write_DLD_header() { cat <<EOF |
︙ | |||
794 795 796 797 798 799 800 | 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 | - + - + + - + + + + + + + | s=${1:-""} # comma separated output list c=`get_field ${s} 0` # count of outputs i=0 cat <<EOF \/\/ END Code |
︙ | |||
843 844 845 846 847 848 849 | 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 | - + - + - + | get_arg_specific_stuff ${w} printf "\t${arg_type}\t&${w}${comma}\n" done fi cat <<EOF ) { |
︙ |
Modified mttroot/mtt/lib/cc/mtt_Hybrd_Solver.cc from [f1e519c135] to [478c947ac8].
︙ | |||
23 24 25 26 27 28 29 | 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 | - + | static int convergences; static int progress_errors; static int limit_errors; static int unknown_errors; NLFunc fcn(&Hybrd_Solver::f_hybrd); NLEqn eqn(Solver::_ui,fcn); |
︙ |
Modified mttroot/mtt/lib/cc/mtt_dassl.cc from [b9b24f4791] to [e3d59b9298].
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 | + + + + + + - + - + - + - + - + - + - + - + - + - + - + | #include <octave/oct.h> #include <octave/DASSL.h> #ifdef OCTAVE_DEV #include <octave/parse.h> #define VECTOR_VALUE column_vector_value #else // !OCTAVE_DEV #include <octave/toplev.h> #define VECTOR_VALUE vector_value #endif // OCTAVE_DEV // Code generation directives #define STANDALONE 0 #define OCTAVEDLD 1 #if (! defined (CODEGENTARGET)) #define CODEGENTARGET STANDALONE #endif // (! defined (CODEGENTARGET)) |
Modified mttroot/mtt/lib/cc/mtt_euler.cc from [43d68034de] to [94aa4f3270].
1 2 3 4 5 6 7 8 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 | + - + + + + + + + - + - + - + - + - + | #include <octave/oct.h> #ifdef OCTAVE_DEV #define VECTOR_VALUE column_vector_value #else // !OCTAVE_DEV #define VECTOR_VALUE vector_value #endif // OCTAVE_DEV // Code generation directives |
Modified mttroot/mtt/lib/cc/mtt_implicit.cc from [99ad6e1348] to [44405c14b7].
1 2 3 4 5 6 7 8 9 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 | + - + + + + + + + - + - + | #include <octave/oct.h> #include <octave/xdiv.h> #ifdef OCTAVE_DEV #define VECTOR_VALUE column_vector_value #else // !OCTAVE_DEV #define VECTOR_VALUE vector_value #endif // OCTAVE_DEV // Code generation directives |
︙ | |||
59 60 61 62 63 64 65 | 66 67 68 69 70 71 72 73 74 75 76 77 78 | - + - + - + | { if (openx (row) > 0.5) { x (row) = 0.0; } } |