590 bool bSendAfterPredict =
false;
591 ReadExtForce(pDM, HP, uLabel, pEFH, bSendAfterPredict, iCoupling);
598 bool bUseReferenceNodeForces(pRefNode != 0 ?
true :
false);
599 bool bRotateReferenceNodeForces(
true);
600 if (pRefNode != 0 && HP.
IsKeyWord(
"use" "rigid" "body" "forces")) {
601 if (!HP.
GetYesNo(bUseReferenceNodeForces)) {
602 silent_cerr(
"ModalMappingExt(" << uLabel <<
"): "
603 "\"use rigid body forces\" must be either \"yes\" or \"no\" "
608 if (bUseReferenceNodeForces && HP.
IsKeyWord(
"rotate" "rigid" "body" "forces")) {
609 if (!HP.
GetYesNo(bRotateReferenceNodeForces)) {
610 silent_cerr(
"ModalMappingExt(" << uLabel <<
"): "
611 "\"rotate rigid body forces\" must be either \"yes\" or \"no\" "
618 bool bOutputAccelerations(
false);
620 bOutputAccelerations =
true;
633 silent_cerr(
"ModalMappingExt(" << uLabel <<
"): unknown ModalMappingExt type "
640 if (dynamic_cast<ExtFileHandlerEDGE *>(pEFH) != 0) {
655 case ExtModalForceBase::EMF_ALL:
656 silent_cerr(
"ModalMappingExt(" << uLabel <<
"): "
657 "EDGE ExtFileHandler can only be used "
658 "when ModalMappingExt is either \"rigid\" "
659 "or \"modal\" but not when it is \"all\" "
669 }
else if (dynamic_cast<ExtSocketHandler *>(pEFH) != 0) {
676 silent_cerr(
"ModalMappingExt(" << uLabel <<
"): "
677 "unknown external force type" << std::endl);
682 silent_cerr(
"ModalMappingExt(" << uLabel <<
"): "
683 "\"nodes number\" keyword expected "
689 silent_cerr(
"ModalMappingExt(" << uLabel <<
"): "
690 "invalid nodes number "
694 std::vector<const StructNode *> n(nNodes);
695 for (
int i = 0; i < nNodes; i++) {
700 silent_cerr(
"ModalMappingExt(" << uLabel <<
"): "
701 "\"modes number\" keyword expected "
709 silent_cerr(
"ModalMappingExt(" << uLabel <<
"): "
710 "invalid modes number "
718 ASSERT(nCols == 6*nNodes);
723 silent_cerr(
"ModalMappingExt(" << uLabel <<
"): "
724 "semicolon expected at line "
733 bOutputAccelerations,
734 pEFH, pEMF, bSendAfterPredict, iCoupling, bm,
735 bUseReferenceNodeForces, bRotateReferenceNodeForces, fOut));
flag fReadOutput(MBDynParser &HP, const T &t) const
#define MBDYN_EXCEPT_ARGS
virtual integer GetInt(integer iDefval=0)
#define SAFENEW(pnt, item)
virtual bool IsKeyWord(const char *sKeyWord)
#define ASSERT(expression)
#define SAFENEWWITHCONSTRUCTOR(pnt, item, constructor)
virtual bool GetYesNo(bool &bRet)
virtual HighParser::ErrOut GetLineData(void) const
Node * ReadNode(MBDynParser &HP, Node::Type type) const
void ReadExtForce(DataManager *pDM, MBDynParser &HP, unsigned int uLabel, ExtFileHandlerBase *&pEFH, bool &bSendAfterPredict, int &iCoupling)
SpMapMatrixHandler * ReadSparseMappingMatrix(MBDynParser &HP, integer &nRows, integer &nCols)