Overview
Comment: | Updated to read recent struct.txt records which contain 6 fields. Prepended std:: to iostream classes to satisfy g++. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | origin/master | trunk |
Files: | files | file ages | folders |
SHA3-256: |
105ebebabdc1e2acc9497f9f852c22f1 |
User & Date: | geraint@users.sourceforge.net on 2004-08-09 17:44:16 |
Other Links: | branch diff | manifest | tags |
Context
2004-08-09
| ||
17:45:56 | cmath is preferred to math.h check-in: b22e319862 user: geraint@users.sourceforge.net tags: origin/master, trunk | |
17:44:16 |
Updated to read recent struct.txt records which contain 6 fields. Prepended std:: to iostream classes to satisfy g++. check-in: 105ebebabd user: geraint@users.sourceforge.net tags: origin/master, trunk | |
17:42:23 | Updated to reflect new CR format: component type is passed as the first argument. check-in: 0aa1668692 user: geraint@users.sourceforge.net tags: origin/master, trunk | |
Changes
Modified mttroot/mtt/lib/rep/cxxsim.cc from [5e41fc125d] to [e39d33615e].
︙ | |||
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 | + | * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include <fstream> #include <iostream> #include <list> #include <map> #include <string> namespace cxxsim { class cr { |
︙ | |||
127 128 129 130 131 132 133 134 135 136 137 138 139 140 | 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 | + | struct record { std::string vec; // vector: u, x, y, yz unsigned int num; // position of element in vector std::string cmp; // component std::string fnm; // full name unsigned int rpt; // number of repetitions std::string cty; // causality }; typedef struct record record_t; std::list<record_t> Lu; std::list<record_t> Lx; std::list<record_t> Ly; std::list<record_t> Lyz; |
︙ | |||
187 188 189 190 191 192 193 | 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 | - - + + - + - + | char c; std::string s; std::string t; unsigned int i; |
︙ | |||
400 401 402 403 404 405 406 | 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 | - + - + | }; void parameter::read (std::ifstream &file){ record_t r; while (file >> r.variable >> r.component){ if (r.variable.find("#") == 0){ |
︙ | |||
467 468 469 470 471 472 473 | 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 | - + | void structure::read (std::ifstream &file){ std::list<record_t> *p; record_t r; if (! file){ std::cerr << "warning: no structure data found (empty file)" << std::endl; } |
︙ | |||
634 635 636 637 638 639 640 | 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 | - + - + - + | << " for (mttt = 0.0; mttt <= 10.0; mttt += mttdt){" << std::endl << std::endl << " // get inputs and rates" << std::endl << " " << system_name << "_input(mttt,mttu,mttx,mtty);" << std::endl << " " << system_name << "_ode(mttt,mttu,mttx,mttdx,mtty);" << std::endl << std::endl << " // integrate states (euler)" << std::endl |
︙ |