#include <modaledge.h>
|
| ExtRigidForceEDGE (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 58 of file modaledge.h.
ExtRigidForceEDGE::ExtRigidForceEDGE |
( |
DataManager * |
pDM | ) |
|
Implements ExtModalForceBase.
Definition at line 88 of file modaledge.cc.
References ASSERT, buf, ExtModalForceBase::EMF_ALL, ExtModalForceBase::EMF_NONE, ExtModalForceBase::EMF_RIGID, ExtModalForceBase::EMF_RIGID_DETECT_MASK, ExtFileHandlerBase::GetInStream(), MBDYN_EXCEPT_ARGS, mbedge_eat_field(), mbedge_eat_sep(), mbedge_goto_eol(), and STRLENOF.
106 char buf[BUFSIZ], *p;
119 if (strncasecmp(buf,
"body_forces",
STRLENOF(
"body_forces")) == 0) {
120 size_t buflen =
sizeof(
buf) -
STRLENOF(
"body_forces");
121 p = &buf[0] +
STRLENOF(
"body_forces");
125 silent_cerr(
"ExtRigidForceEDGE: unable to skip separator "
126 "at line=" << lineno <<
", \"" << buf[
sizeof(buf) - buflen] <<
"\"" << std::endl);
132 silent_cerr(
"ExtRigidForceEDGE: unable to skip field \"R\" "
133 "at line=" << lineno <<
", \"" << buf[
sizeof(buf) - buflen] <<
"\"" << std::endl);
139 silent_cerr(
"ExtRigidForceEDGE: unable to skip separator "
140 "at line=" << lineno <<
", \"" << buf[
sizeof(buf) - buflen] <<
"\"" << std::endl);
146 silent_cerr(
"ExtRigidForceEDGE: unable to skip field \"1\" "
147 "at line=" << lineno <<
", \"" << buf[
sizeof(buf) - buflen] <<
"\"" << std::endl);
153 silent_cerr(
"ExtRigidForceEDGE: unable to skip separator "
154 "at line=" << lineno <<
", \"" << buf[
sizeof(buf) - buflen] <<
"\"" << std::endl);
160 silent_cerr(
"ExtRigidForceEDGE: unable to skip field \"6\" "
161 "at line=" << lineno <<
", \"" << buf[
sizeof(buf) - buflen] <<
"\"" << std::endl);
167 silent_cerr(
"ExtRigidForceEDGE: unable to skip separator "
168 "at line=" << lineno <<
", \"" << buf[
sizeof(buf) - buflen] <<
"\"" << std::endl);
174 silent_cerr(
"ExtRigidForceEDGE: unable to skip field \"0\" "
175 "at line=" << lineno <<
", \"" << buf[
sizeof(buf) - buflen] <<
"\"" << std::endl);
181 silent_cerr(
"ExtRigidForceEDGE: unable to skip separator "
182 "at line=" << lineno <<
", \"" << buf[
sizeof(buf) - buflen] <<
"\"" << std::endl);
186 if (p[0] !=
'\0' && p[0] !=
'\n') {
187 silent_cerr(
"ExtRigidForceEDGE: no line terminator "
188 "at line=" << lineno <<
", \"" << p <<
"\"" << std::endl);
194 for (
int i = 0; i < 6; i++) {
205 silent_cerr(
"ExtRigidForceEDGE: unable to skip to end of line "
206 "at line=" << lineno << std::endl);
212 silent_cerr(
"ExtRigidForceEDGE: unexpected line=" << lineno <<
", "
213 "\"" << 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 doublereal buf[BUFSIZE]
Implements ExtModalForceBase.
Definition at line 245 of file modaledge.cc.
References ASSERT, ExtModalForceBase::EMF_ALL, ExtModalForceBase::EMF_RIGID, ExtFileHandlerBase::GetOutStream(), AirProperties::GetVelocity(), Mat3x3::MulTV(), ExtForceEDGE::pAP, and R.
266 fout <<
"* MBDyn to EDGE rigid body dynamics\n"
267 "body_dynamics,N,0,0,3\n"
268 "* Body linear velocity in body axes\n"
270 << vB(1) <<
" " << vB(2) <<
" " << vB(3) <<
"\n"
271 "* Body angular velocity in body axes\n"
273 << wB(1) <<
" " << wB(2) <<
" " << wB(3) <<
"\n"
274 "* Body reference frame cosines (listed by columns)\n"
277 <<
R(1, 1) <<
" " <<
R(2, 1) <<
" " <<
R(3, 1) <<
"\n"
278 <<
R(1, 2) <<
" " <<
R(2, 2) <<
" " <<
R(3, 2) <<
"\n"
279 <<
R(1, 3) <<
" " <<
R(2, 3) <<
" " <<
R(3, 3) <<
"\n";
virtual Vec3 GetVelocity(const Vec3 &) const
Vec3 MulTV(const Vec3 &v) const
#define ASSERT(expression)
virtual std::ostream * GetOutStream(void)
const AirProperties * pAP
The documentation for this class was generated from the following files: