#include <modaledge.h>
|
| ExtModalForceEDGE (DataManager *pDM) |
|
unsigned | Recv (ExtFileHandlerBase *pEFH, unsigned uFlags, unsigned &uLabel, Vec3 &f, Vec3 &m, std::vector< doublereal > &a) |
|
void | Send (ExtFileHandlerBase *pEFH, unsigned uFlags, unsigned uLabel, const Vec3 &x, const Mat3x3 &R, const Vec3 &v, const Vec3 &w, const std::vector< doublereal > &q, const std::vector< doublereal > &qP) |
|
| ExtForceEDGE (DataManager *pDM) |
|
virtual | ~ExtForceEDGE (void) |
|
bool | Prepare (ExtFileHandlerBase *pEFH, unsigned uLabel, bool bRigid, unsigned uModes) |
|
virtual | ~ExtModalForceBase (void) |
|
Definition at line 77 of file modaledge.h.
ExtModalForceEDGE::ExtModalForceEDGE |
( |
DataManager * |
pDM | ) |
|
Implements ExtModalForceBase.
Definition at line 301 of file modaledge.cc.
References ASSERT, buf, ExtModalForceBase::EMF_ALL, ExtModalForceBase::EMF_MODAL, ExtModalForceBase::EMF_MODAL_DETECT_MASK, ExtModalForceBase::EMF_NONE, ExtFileHandlerBase::GetInStream(), MBDYN_EXCEPT_ARGS, mbedge_eat_field(), mbedge_eat_sep(), mbedge_goto_eol(), and STRLENOF.
320 char buf[BUFSIZ], *p;
333 if (strncasecmp(buf,
"modal_force_flow",
STRLENOF(
"modal_force_flow")) == 0) {
334 p = buf +
STRLENOF(
"modal_force_flow");
336 size_t buflen =
sizeof(
buf) -
STRLENOF(
"modal_force_flow");
337 p = &buf[0] +
STRLENOF(
"modal_force_flow");
341 silent_cerr(
"ExtModalForceEDGE: unable to skip separator "
342 "at line=" << lineno <<
", \"" << buf[
sizeof(buf) - buflen] <<
"\"" << std::endl);
348 silent_cerr(
"ExtModalForceEDGE: unable to skip field \"R\" "
349 "at line=" << lineno <<
", \"" << buf[
sizeof(buf) - buflen] <<
"\"" << std::endl);
355 silent_cerr(
"ExtModalForceEDGE: unable to skip separator "
356 "at line=" << lineno <<
", \"" << buf[
sizeof(buf) - buflen] <<
"\"" << std::endl);
362 long nmodes = strtol(p, &next, 10);
363 int save_errno = errno;
365 silent_cerr(
"ExtModalForceEDGE: unable to skip modes number field "
366 "at line=" << lineno <<
", \"" << buf[
sizeof(buf) - buflen] <<
"\"" << std::endl);
369 }
else if (save_errno == ERANGE) {
370 silent_cerr(
"ExtModalForceEDGE: modes number field overflows "
371 "at line=" << lineno <<
", \"" << buf[
sizeof(buf) - buflen] <<
"\"" << std::endl);
377 silent_cerr(
"ExtModalForceEDGE: unable to skip separator "
378 "at line=" << lineno <<
", \"" << buf[
sizeof(buf) - buflen] <<
"\"" << std::endl);
384 silent_cerr(
"ExtModalForceEDGE: unable to skip field \"1\" "
385 "at line=" << lineno <<
", \"" << buf[
sizeof(buf) - buflen] <<
"\"" << std::endl);
391 silent_cerr(
"ExtModalForceEDGE: unable to skip separator "
392 "at line=" << lineno <<
", \"" << buf[
sizeof(buf) - buflen] <<
"\"" << std::endl);
398 silent_cerr(
"ExtModalForceEDGE: unable to skip field \"0\" "
399 "at line=" << lineno <<
", \"" << buf[
sizeof(buf) - buflen] <<
"\"" << std::endl);
405 silent_cerr(
"ExtModalForceEDGE: unable to skip separator "
406 "at line=" << lineno <<
", \"" << buf[
sizeof(buf) - buflen] <<
"\"" << std::endl);
410 if (p[0] !=
'\0' && p[0] !=
'\n') {
411 silent_cerr(
"ExtModalForceEDGE: no line terminator "
412 "at line=" << lineno <<
", \"" << p <<
"\"" << std::endl);
416 if (std::vector<doublereal>::size_type(nmodes) !=
a.size()) {
417 silent_cerr(
"ExtModalForceEDGE: mode number mismatch, "
418 "expected " <<
a.size() <<
" got " << nmodes << std::endl);
423 for (std::vector<doublereal>::iterator i =
a.begin();
434 silent_cerr(
"ExtModalForceEDGE: unable to skip to end of line "
435 "at line=" << lineno << std::endl);
441 silent_cerr(
"ExtModalForceEDGE: unexpected line=" << lineno <<
", "
442 "\"" << buf <<
"\"" << std::endl);
virtual std::istream * GetInStream(void)
#define MBDYN_EXCEPT_ARGS
char * mbedge_eat_sep(char *buf, size_t &buflen)
int mbedge_goto_eol(std::istream &fin, char *buf, size_t bufsiz)
#define ASSERT(expression)
char * mbedge_eat_field(char *buf, size_t &buflen, const char *val)
static const doublereal a
static doublereal buf[BUFSIZE]
Implements ExtModalForceBase.
Definition at line 461 of file modaledge.cc.
References ASSERT, ExtModalForceBase::EMF_ALL, ExtModalForceBase::EMF_MODAL, and ExtFileHandlerBase::GetOutStream().
472 fout <<
"* MBDyn to EDGE modal dynamics\n"
473 "modal_state,N,0,0,2\n"
474 "modal_coordinate,R," << q.size() <<
",1,0\n"
476 for (std::vector<doublereal>::const_iterator i = q.begin() + 1;
482 "modal_velocity,R," << qP.size() <<
",1,0\n"
484 for (std::vector<doublereal>::const_iterator i = qP.begin() + 1;
#define ASSERT(expression)
virtual std::ostream * GetOutStream(void)
The documentation for this class was generated from the following files: