MBDyn-1.7.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups
extedge.cc
Go to the documentation of this file.
1 /* $Header: /var/cvs/mbdyn/mbdyn/mbdyn-1.0/mbdyn/base/extedge.cc,v 1.39 2017/01/12 14:46:09 masarati Exp $ */
2 /*
3  * MBDyn (C) is a multibody analysis code.
4  * http://www.mbdyn.org
5  *
6  * Copyright (C) 2007-2017
7  *
8  * Pierangelo Masarati <masarati@aero.polimi.it>
9  * Paolo Mantegazza <mantegazza@aero.polimi.it>
10  *
11  * Dipartimento di Ingegneria Aerospaziale - Politecnico di Milano
12  * via La Masa, 34 - 20156 Milano, Italy
13  * http://www.aero.polimi.it
14  *
15  * Changing this copyright notice is forbidden.
16  *
17  * This program is free software; you can redistribute it and/or modify
18  * it under the terms of the GNU General Public License as published by
19  * the Free Software Foundation (version 2 of the License).
20  *
21  *
22  * This program is distributed in the hope that it will be useful,
23  * but WITHOUT ANY WARRANTY; without even the implied warranty of
24  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25  * GNU General Public License for more details.
26  *
27  * You should have received a copy of the GNU General Public License
28  * along with this program; if not, write to the Free Software
29  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
30  */
31 
32 #include "mbconfig.h" /* This goes first in every *.c,*.cc file */
33 
34 #include "dataman.h"
35 #include "extedge.h"
36 #include "except.h"
37 #include "solver.h"
38 
39 #include <fstream>
40 
41 #include <sys/types.h>
42 #include <sys/stat.h>
43 #include <cstdlib>
44 #include <unistd.h>
45 #include <cerrno>
46 #include <cstring>
47 
48 int
49 mbedge_goto_eol(std::istream& fin, char *buf, size_t bufsiz)
50 {
51  size_t i;
52 
53  for (i = 0; i < bufsiz; i++) {
54  buf[i] = fin.get();
55 
56  if (!fin) {
57  return -1;
58  }
59 
60  if (buf[i] == '\n') {
61  buf[i] = '\0';
62  break;
63  }
64  }
65 
66  if (i == bufsiz) {
67  return -1;
68  }
69 
70  return 0;
71 }
72 
73 char *
74 mbedge_eat_sep(char *buf, size_t& buflen)
75 {
76  size_t len = buflen;
77 
78  ASSERT(buflen > 0);
79 
80  while (len > 0) {
81  if (buf[0] == '\n' || buf[0] == '\0' || (buf[0] != ',' && !std::isspace(buf[0]))) {
82  buflen = len;
83  return buf;
84  }
85 
86  len--;
87  buf++;
88  }
89 
90  return 0;
91 }
92 
93 char *
94 mbedge_eat_field(char *buf, size_t& buflen, const char *val)
95 {
96  ASSERT(buflen > 0);
97 
98  size_t vallen = strlen(val);
99  if (buflen < vallen) {
100  return 0;
101  }
102 
103  if (strncmp(buf, val, vallen) == 0) {
104  buflen -= vallen;
105  return &buf[vallen];
106  }
107 
108  return 0;
109 }
110 
111 #if 0
112 char *
113 mbedge_eat_field(char *buf, size_t& buflen)
114 {
115  size_t len = buflen;
116 
117  ASSERT(buflen > 0);
118 
119  while (len > 0) {
120  if (buf[0] == ',' || std::isspace(buf[0])) {
121  buflen = len;
122  return buf;
123  }
124 
125  len--;
126  buf++;
127  }
128 
129  return 0;
130 }
131 #endif
132 
133 /* ExtFileHandlerEDGE - begin */
134 
136  std::string& fdataname, mbsleep_t SleepTime, std::streamsize Precision)
137 : ExtFileHandlerBase(SleepTime, Precision),
138 fflagname(fflagname), fdataname(fdataname),
139 bReadForces(true)
140 {
141  NO_OP;
142 }
143 
145 {
146  int cnt = -1;
147  switch (CheckFlag(cnt)) {
148  case EDGE_READ_READY:
149  case EDGE_GOTO_NEXT_STEP:
151  break;
152 
153  default:
154  break;
155  }
156 }
157 
158 static const char *sEDGEcmd2str[] = {
159  "INITIALIZING",
160  "BUSY",
161  "READ_READY",
162  "MBDYN_WRITE_DONE",
163  "GOTO_NEXT_STEP",
164  "QUIT",
165  0
166 };
167 
168 const char *
170 {
171  if (cmd < 0 || cmd >= EDGE_LAST) {
172  return "UNKNOWN";
173  }
174 
175  return sEDGEcmd2str[cmd];
176 }
177 
180 {
181  int cmd;
182  unsigned lineno = 0;
183 
184  cnt++;
185 
186  infile.open(fflagname.c_str());
187  if (!infile && cnt == -1) {
188  return EDGE_QUIT;
189  }
190 
191  // Needs tuning?
192  const int max_retries = 10;
193  int retrying = 0;
194 retry:;
195 
196  if (SleepTime > 0) {
197  // WARNING: loops forever
198  // add optional, configurable limit?
199  for (; !infile; cnt++) {
200  silent_cout("flag file \"" << fflagname.c_str() << "\" "
201  "missing, try #" << cnt << "; "
202  "sleeping " << SleepTime << " s" << std::endl);
204  cmd = EDGE_QUIT;
205  goto done;
206  }
207 
208  mbsleep(&SleepTime);
209 
210  infile.clear();
211  infile.open(fflagname.c_str());
212  }
213 
214  } else if (!infile) {
215  // error
216  silent_cerr("flag file \"" << fflagname.c_str() << "\" "
217  "missing" << std::endl);
219  }
220 
221  /*
222  UPDATE,N,0,0,1
223  FLAG,I,1,1,0
224  <flag value>
225  */
226 
227  // old syntax without this block
228  while (true) {
229  char buf[BUFSIZ], *p;
230  if (mbedge_goto_eol(infile, buf, sizeof(buf))) {
231  if (!infile) {
232  break;
233  }
234  }
235 
236  lineno++;
237 
238  if (buf[0] == '*') {
239  continue;
240  }
241 
242  if (strncasecmp(buf, "UPDATE", STRLENOF("UPDATE")) == 0) {
243  size_t buflen = sizeof(buf) - STRLENOF("UPDATE");
244  p = &buf[0] + STRLENOF("UPDATE");
245 
246  p = mbedge_eat_sep(p, buflen);
247  if (p == 0) {
248  silent_cerr("ExtFileHandlerEDGE: unable to skip separator "
249  "at line=" << lineno << ", \"" << &buf[sizeof(buf) - buflen] << "\"" << std::endl);
250  if (retrying < max_retries) {
251  retrying++;
252  goto retry;
253  }
255  }
256 
257  p = mbedge_eat_field(p, buflen, "N");
258  if (p == 0) {
259  silent_cerr("ExtFileHandlerEDGE: unable to skip field \"N\" "
260  "at line=" << lineno << ", \"" << &buf[sizeof(buf) - buflen] << "\"" << std::endl);
261  if (retrying < max_retries) {
262  retrying++;
263  goto retry;
264  }
266  }
267 
268  p = mbedge_eat_sep(p, buflen);
269  if (p == 0) {
270  silent_cerr("ExtFileHandlerEDGE: unable to skip separator "
271  "at line=" << lineno << ", \"" << &buf[sizeof(buf) - buflen] << "\"" << std::endl);
272  if (retrying < max_retries) {
273  retrying++;
274  goto retry;
275  }
277  }
278 
279  p = mbedge_eat_field(p, buflen, "0");
280  if (p == 0) {
281  silent_cerr("ExtFileHandlerEDGE: unable to skip field \"0\" "
282  "at line=" << lineno << ", \"" << &buf[sizeof(buf) - buflen] << "\"" << std::endl);
283  if (retrying < max_retries) {
284  retrying++;
285  goto retry;
286  }
288  }
289 
290  p = mbedge_eat_sep(p, buflen);
291  if (p == 0) {
292  silent_cerr("ExtFileHandlerEDGE: unable to skip separator "
293  "at line=" << lineno << ", \"" << &buf[sizeof(buf) - buflen] << "\"" << std::endl);
294  if (retrying < max_retries) {
295  retrying++;
296  goto retry;
297  }
299  }
300 
301  p = mbedge_eat_field(p, buflen, "0");
302  if (p == 0) {
303  silent_cerr("ExtFileHandlerEDGE: unable to skip field \"0\" "
304  "at line=" << lineno << ", \"" << &buf[sizeof(buf) - buflen] << "\"" << std::endl);
305  if (retrying < max_retries) {
306  retrying++;
307  goto retry;
308  }
310  }
311 
312  p = mbedge_eat_sep(p, buflen);
313  if (p == 0) {
314  silent_cerr("ExtFileHandlerEDGE: unable to skip separator "
315  "at line=" << lineno << ", \"" << &buf[sizeof(buf) - buflen] << "\"" << std::endl);
316  if (retrying < max_retries) {
317  retrying++;
318  goto retry;
319  }
321  }
322 
323  p = mbedge_eat_field(p, buflen, "1");
324  if (p == 0) {
325  silent_cerr("ExtFileHandlerEDGE: unable to skip field \"1\" "
326  "at line=" << lineno << ", \"" << &buf[sizeof(buf) - buflen] << "\"" << std::endl);
327  if (retrying < max_retries) {
328  retrying++;
329  goto retry;
330  }
332  }
333 
334  p = mbedge_eat_sep(p, buflen);
335  if (p == 0) {
336  silent_cerr("ExtRigidForceEDGE: unable to skip separator "
337  "at line=" << lineno << ", \"" << &buf[sizeof(buf) - buflen] << "\"" << std::endl);
338  if (retrying < max_retries) {
339  retrying++;
340  goto retry;
341  }
343  }
344 
345  if (p[0] != '\0' && p[0] != '\n') {
346  silent_cerr("ExtRigidForceEDGE: no line terminator "
347  "at line=" << lineno << ", \"" << p << "\"" << std::endl);
348  if (retrying < max_retries) {
349  retrying++;
350  goto retry;
351  }
353  }
354 
355  if (mbedge_goto_eol(infile, buf, sizeof(buf))) {
356  silent_cerr("ExtRigidForceEDGE: unable to get \"FLAG\" line "
357  "at line=" << lineno << ", \"" << p << "\"" << std::endl);
358  if (retrying < max_retries) {
359  retrying++;
360  goto retry;
361  }
363  }
364 
365  lineno++;
366 
367  if (strncasecmp(buf, "FLAG", STRLENOF("FLAG")) != 0) {
368  silent_cerr("ExtRigidForceEDGE: \"FLAG\" line expected "
369  "at line=" << lineno << ", \"" << p << "\"" << std::endl);
370  if (retrying < max_retries) {
371  retrying++;
372  goto retry;
373  }
375  }
376 
377  buflen = sizeof(buf) - STRLENOF("FLAG");
378  p = &buf[0] + STRLENOF("FLAG");
379 
380  p = mbedge_eat_sep(p, buflen);
381  if (p == 0) {
382  silent_cerr("ExtFileHandlerEDGE: unable to skip separator "
383  "at line=" << lineno << ", \"" << buf[sizeof(buf) - buflen] << "\"" << std::endl);
384  if (retrying < max_retries) {
385  retrying++;
386  goto retry;
387  }
389  }
390 
391  p = mbedge_eat_field(p, buflen, "I");
392  if (p == 0) {
393  silent_cerr("ExtFileHandlerEDGE: unable to skip field \"I\" "
394  "at line=" << lineno << ", \"" << buf[sizeof(buf) - buflen] << "\"" << std::endl);
395  if (retrying < max_retries) {
396  retrying++;
397  goto retry;
398  }
400  }
401 
402  p = mbedge_eat_sep(p, buflen);
403  if (p == 0) {
404  silent_cerr("ExtFileHandlerEDGE: unable to skip separator "
405  "at line=" << lineno << ", \"" << buf[sizeof(buf) - buflen] << "\"" << std::endl);
406  if (retrying < max_retries) {
407  retrying++;
408  goto retry;
409  }
411  }
412 
413  p = mbedge_eat_field(p, buflen, "1");
414  if (p == 0) {
415  silent_cerr("ExtFileHandlerEDGE: unable to skip field \"1\" "
416  "at line=" << lineno << ", \"" << buf[sizeof(buf) - buflen] << "\"" << std::endl);
417  if (retrying < max_retries) {
418  retrying++;
419  goto retry;
420  }
422  }
423 
424  p = mbedge_eat_sep(p, buflen);
425  if (p == 0) {
426  silent_cerr("ExtFileHandlerEDGE: unable to skip separator "
427  "at line=" << lineno << ", \"" << buf[sizeof(buf) - buflen] << "\"" << std::endl);
428  if (retrying < max_retries) {
429  retrying++;
430  goto retry;
431  }
433  }
434 
435  p = mbedge_eat_field(p, buflen, "1");
436  if (p == 0) {
437  silent_cerr("ExtFileHandlerEDGE: unable to skip field \"1\" "
438  "at line=" << lineno << ", \"" << buf[sizeof(buf) - buflen] << "\"" << std::endl);
439  if (retrying < max_retries) {
440  retrying++;
441  goto retry;
442  }
444  }
445 
446  p = mbedge_eat_sep(p, buflen);
447  if (p == 0) {
448  silent_cerr("ExtFileHandlerEDGE: unable to skip separator "
449  "at line=" << lineno << ", \"" << buf[sizeof(buf) - buflen] << "\"" << std::endl);
450  if (retrying < max_retries) {
451  retrying++;
452  goto retry;
453  }
455  }
456 
457  p = mbedge_eat_field(p, buflen, "0");
458  if (p == 0) {
459  silent_cerr("ExtFileHandlerEDGE: unable to skip field \"0\" "
460  "at line=" << lineno << ", \"" << buf[sizeof(buf) - buflen] << "\"" << std::endl);
461  if (retrying < max_retries) {
462  retrying++;
463  goto retry;
464  }
466  }
467 
468  p = mbedge_eat_sep(p, buflen);
469  if (p == 0) {
470  silent_cerr("ExtRigidForceEDGE: unable to skip separator "
471  "at line=" << lineno << ", \"" << buf[sizeof(buf) - buflen] << "\"" << std::endl);
472  if (retrying < max_retries) {
473  retrying++;
474  goto retry;
475  }
477  }
478 
479  if (p[0] != '\0' && p[0] != '\n') {
480  silent_cerr("ExtRigidForceEDGE: no line terminator "
481  "at line=" << lineno << ", \"" << p << "\"" << std::endl);
482  if (retrying < max_retries) {
483  retrying++;
484  goto retry;
485  }
487  }
488 
489  lineno++;
490 
491  break;
492  }
493  }
494 
495  infile >> cmd;
496 
497 done:;
498  silent_cerr("<<< checking flag file \"" << fflagname.c_str() << "\": "
499  "cmd=" << cmd << " (" << EDGEcmd2str(cmd) << ")"
500  << std::endl);
501 
502  infile.close();
503  infile.clear();
504 
505  return EDGEcmd(cmd);
506 }
507 
508 void
510 {
511  // write to a temporary, unique file and then rename to fflagname
512 #ifdef HAVE_MKSTEMP
513  char ftmpname[] = "mbedgeXXXXXX";
514  int filedes = mkstemp(ftmpname);
515  FILE *fd = fdopen(filedes, "w");
516 #else // ! HAVE_MKSTEMP
517  std::string ftmpn(fflagname + ".tmp");
518  const char *ftmpname = ftmpn.c_str();
519  FILE *fd = fopen(ftmpname, "w");
520 #endif // ! HAVE_MKSTEMP
521 
522  fprintf(fd, "UPDATE,N,0,0,1\n");
523  fprintf(fd, "FLAG,I,1,1,0\n");
524  fprintf(fd, "%d", int(cmd));
525  fclose(fd);
526 retry:;
527  if (rename(ftmpname, fflagname.c_str()) == -1) {
528  switch (errno) {
529  case EBUSY: {
531  // TODO: configurable?
532  mbsleep(&timeout);
533 
535  // ultimately give up
536  unlink(ftmpname);
537  return;
538  }
539 
540  goto retry;
541  }
542 
543  default: {
544  int save_errno = errno;
545  silent_cerr("unable to rename flag file "
546  "\"" << fdataname.c_str() << "\" "
547  "(errno=" << save_errno << ": "
548  << strerror(save_errno) << ")"
549  << std::endl);
551  }
552  }
553  }
554 
555  silent_cerr(">>> sending flag file \"" << fflagname.c_str() << "\": "
556  "cmd=" << cmd << " (" << EDGEcmd2str(cmd) << ")"
557  << std::endl);
558 
559 }
560 
561 bool
563 {
564  return true;
565 }
566 
567 void
569 {
570  NO_OP;
571 }
572 
573 void
575 {
576  bReadForces = true;
577 }
578 
579 bool
581 {
582  int cnt = 0;
583  EDGEcmd cmd = EDGE_UNKNOWN;
584 
585  if (!bReadForces) {
586  goto bad;
587  }
588 
589  // open data file for writing
590 retry:;
591  cmd = CheckFlag(cnt);
592  switch (cmd) {
593  case EDGE_INITIALIZING:
594  case EDGE_BUSY:
595  if (SleepTime > 0) {
596  silent_cout("flag file \"" << fflagname.c_str() << "\": "
597  "cmd=" << cmd << " (" << EDGEcmd2str(cmd) << ")"
598  " try #" << cnt << "; "
599  "sleeping " << SleepTime << " s" << std::endl);
600 
601  mbsleep(&SleepTime);
602  }
603 
605  bReadForces = false;
606  goto bad;
607  }
608 
609  goto retry;
610 
611  case EDGE_READ_READY:
612  case EDGE_GOTO_NEXT_STEP:
613  outfile.open(fdataname.c_str());
614  if (!outfile) {
615  int save_errno = errno;
616  silent_cerr("unable to open data file "
617  "\"" << fdataname.c_str() << "\" "
618  "for output (" << errno << ": "
619  << strerror(save_errno) << ")"
620  << std::endl);
622  }
623 
624  outfile.setf(std::ios::scientific);
625  outfile.precision(Precision);
626  break;
627 
628  default:
629 bad:;
630  outfile.setstate(std::ios_base::badbit);
631  break;
632  }
633 
634  return outfile.good();
635 }
636 
637 void
639 {
640  if (!bReadForces) {
641  return;
642  }
643 
644  // close data file after writing
645  if (outfile.is_open()) {
646  outfile.close();
647  }
648 
649  if (when == SEND_AFTER_CONVERGENCE) {
650 #if 0
651  // This stops EDGE's subiterations
652  // and advances to next step
653  outfile.open("update.ainp");
654  outfile <<
655  "UPDATE,N,0,0,1\n"
656  "IBREAK,I,1,1,0\n"
657  "5\n";
658  outfile.close();
659 #endif
660 
661  bReadForces = true;
662  }
663 
665 }
666 
667 bool
669 {
670  for (int cnt = 0; ;) {
671 
672  EDGEcmd cmd = CheckFlag(cnt);
673  switch (cmd) {
674  case EDGE_READ_READY:
675  goto done;
676 
677  case EDGE_GOTO_NEXT_STEP:
678  // FIXME: EDGE is done; do not read forces,
679  // keep using old
680  bReadForces = false;
681  goto done;
682 
683  case EDGE_QUIT:
684  silent_cout("EDGE requested end of simulation"
685  << std::endl);
687  bReadForces = false;
688  goto done;
689 
690  default:
691  break;
692  }
693 
695  bReadForces = false;
696  goto done;
697  }
698 
699  // WARNING: loops forever
700  // add optional, configurable limit?
701  if (SleepTime > 0) {
702  silent_cout("flag file \"" << fflagname.c_str() << "\": "
703  "cmd=" << cmd << " (" << EDGEcmd2str(cmd) << ")"
704  " try #" << cnt << "; "
705  "sleeping " << SleepTime << " s" << std::endl);
706 
707  mbsleep(&SleepTime);
708  } else {
709  silent_cout("flag file \"" << fflagname.c_str() << "\": "
710  "cmd=" << cmd << " (" << EDGEcmd2str(cmd) << ")"
711  " try #" << cnt << std::endl);
712  }
713  }
714 
715 done:;
716  if (bReadForces) {
717  infile.open(fdataname.c_str());
718  if (!infile) {
719  silent_cerr("unable to open data file "
720  "\"" << fdataname.c_str() << "\" "
721  "for input" << std::endl);
723  }
724 
725  } else {
726  infile.setstate(std::ios_base::badbit);
727  }
728 
729  return infile.good();
730 }
731 
732 bool
734 {
735  if (infile.is_open()) {
736  infile.close();
737  }
738 
739  return !bReadForces;
740 }
741 
742 std::ostream *
744 {
745  return &outfile;
746 }
747 
748 std::istream *
750 {
751  return &infile;
752 }
753 
754 /* ExtFileHandlerEDGE - end */
755 
758  MBDynParser& HP,
759  unsigned int uLabel)
760 {
761  ExtFileHandlerBase *pEFH = 0;
762 
763  const char *s = HP.GetFileName();
764  if (s == 0) {
765  silent_cerr("ExtForceEDGE(" << uLabel << "): "
766  "unable to get flag file name "
767  "at line " << HP.GetLineData() << std::endl);
769  }
770  std::string fflagname = s;
771 
772  s = HP.GetFileName();
773  if (s == 0) {
774  silent_cerr("ExtForceEDGE(" << uLabel << "): "
775  "unable to get data file name "
776  "at line " << HP.GetLineData() << std::endl);
778  }
779  std::string fdataname = s;
780 
781  mbsleep_t SleepTime = mbsleep_init(1);
782  std::streamsize Precision = 0;
783  ReadExtFileParams(pDM, HP, uLabel, SleepTime, Precision);
784 
786  ExtFileHandlerEDGE(fflagname, fdataname, SleepTime, Precision));
787 
788  return pEFH;
789 }
790 
virtual bool Prepare_pre(void)
Definition: extedge.cc:562
static int timeout
#define MBDYN_EXCEPT_ARGS
Definition: except.h:63
const char * EDGEcmd2str(int cmd) const
Definition: extedge.cc:169
std::string fdataname
Definition: extedge.h:43
int mbsleep(const mbsleep_t *t)
Definition: mbsleep.c:90
unsigned long mbsleep_t
Definition: mbsleep.h:51
char * mbedge_eat_sep(char *buf, size_t &buflen)
Definition: extedge.cc:74
virtual void AfterPredict(void)
Definition: extedge.cc:574
virtual std::ostream * GetOutStream(void)
Definition: extedge.cc:743
virtual const char * GetFileName(enum Delims Del=DEFAULTDELIM)
Definition: parsinc.cc:673
#define NO_OP
Definition: myassert.h:74
ExtFileHandlerEDGE(std::string &fflagname, std::string &fdataname, mbsleep_t SleepTime, std::streamsize Precision)
Definition: extedge.cc:135
int mbdyn_stop_at_end_of_iteration(void)
Definition: solver.cc:172
static const char * sEDGEcmd2str[]
Definition: extedge.cc:158
virtual void Prepare_post(bool ok)
Definition: extedge.cc:568
std::string fflagname
Definition: extedge.h:43
ExtFileHandlerBase * ReadExtFileHandlerEDGE(DataManager *pDM, MBDynParser &HP, unsigned int uLabel)
Definition: extedge.cc:757
virtual bool Recv_post(void)
Definition: extedge.cc:733
int mbedge_goto_eol(std::istream &fin, char *buf, size_t bufsiz)
Definition: extedge.cc:49
Definition: mbdyn.h:77
virtual void Send_post(SendWhen when)
Definition: extedge.cc:638
mbsleep_t mbsleep_init(long t)
Definition: mbsleep.c:38
std::ifstream infile
Definition: extedge.h:46
std::streamsize Precision
Definition: extforce.h:75
virtual std::istream * GetInStream(void)
Definition: extedge.cc:749
virtual bool Send_pre(SendWhen when)
Definition: extedge.cc:580
#define ASSERT(expression)
Definition: colamd.c:977
char * mbedge_eat_field(char *buf, size_t &buflen, const char *val)
Definition: extedge.cc:94
#define SAFENEWWITHCONSTRUCTOR(pnt, item, constructor)
Definition: mynewmem.h:698
virtual bool Recv_pre(void)
Definition: extedge.cc:668
~ExtFileHandlerEDGE(void)
Definition: extedge.cc:144
void SendFlag(EDGEcmd cmd)
Definition: extedge.cc:509
#define STRLENOF(s)
Definition: mbdyn.h:166
static unsigned done
Definition: gust.cc:209
std::ofstream outfile
Definition: extedge.h:47
EDGEcmd CheckFlag(int &cnt)
Definition: extedge.cc:179
static doublereal buf[BUFSIZE]
Definition: discctrl.cc:333
mbsleep_t SleepTime
Definition: extforce.h:76
virtual HighParser::ErrOut GetLineData(void) const
Definition: parsinc.cc:697
void mbdyn_set_stop_at_end_of_time_step(void)
Definition: solver.cc:200
void ReadExtFileParams(DataManager *pDM, MBDynParser &HP, unsigned int uLabel, mbsleep_t &SleepTime, std::streamsize &Precision)
Definition: extforce.cc:845