MBDyn-1.7.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups
ScalarFuncGR Struct Reference

#include <windprof.h>

Inheritance diagram for ScalarFuncGR:
Collaboration diagram for ScalarFuncGR:

Public Member Functions

virtual ~ScalarFuncGR (void)
 
virtual GustRead (const DataManager *pDM, MBDynParser &HP)
 
- Public Member Functions inherited from GustRead
virtual ~GustRead (void)
 

Detailed Description

Definition at line 73 of file windprof.h.

Constructor & Destructor Documentation

ScalarFuncGR::~ScalarFuncGR ( void  )
virtual

Definition at line 98 of file windprof.cc.

References NO_OP.

99 {
100  NO_OP;
101 }
#define NO_OP
Definition: myassert.h:74

Member Function Documentation

Gust * ScalarFuncGR::Read ( const DataManager pDM,
MBDynParser HP 
)
virtual

Implements GustRead.

Definition at line 104 of file windprof.cc.

References AbsRefFrame, Eye3, IncludeParser::GetLineData(), MBDynParser::GetRotAbs(), MBDynParser::GetVecAbs(), HighParser::IsArg(), HighParser::IsKeyWord(), MBDYN_EXCEPT_ARGS, ParseScalarFunction(), SAFENEWWITHCONSTRUCTOR, and Zero3.

105 {
106  const BasicScalarFunction *sf = 0;
107  Vec3 X0(Zero3);
108  bool bGotX0 = false;
109  Mat3x3 R0(Eye3);
110  bool bGotR0 = false;
111 
112  while (HP.IsArg()) {
113  if (HP.IsKeyWord("reference" "position")) {
114  if (bGotX0) {
115  silent_cerr("ScalarFuncWindProfile: "
116  "reference position provided twice "
117  "at line " << HP.GetLineData()
118  << std::endl);
120  }
121 
122  X0 = HP.GetVecAbs(::AbsRefFrame);
123 
124  } else if (HP.IsKeyWord("reference" "orientation")) {
125  if (bGotR0) {
126  silent_cerr("ScalarFuncWindProfile: "
127  "reference orientation provided twice "
128  "at line " << HP.GetLineData()
129  << std::endl);
131  }
132 
133  R0 = HP.GetRotAbs(::AbsRefFrame);
134 
135  } else {
136  break;
137  }
138  }
139 
140  if (!HP.IsArg()) {
141  silent_cerr("ScalarFuncWindProfile: "
142  "function expected "
143  "at line " << HP.GetLineData() << std::endl);
145  }
146 
147  sf = ParseScalarFunction(HP, const_cast<DataManager *const>(pDM));
148  if (sf == 0) {
149  silent_cerr("ScalarFuncWindProfile: "
150  "unable to parse scalar function "
151  "at line " << HP.GetLineData() << std::endl);
153  }
154 
155  Gust *pG = 0;
157  ScalarFuncWindProfile(X0, R0, sf));
158 
159  return pG;
160 }
const Vec3 Zero3(0., 0., 0.)
#define MBDYN_EXCEPT_ARGS
Definition: except.h:63
Definition: matvec3.h:98
Mat3x3 GetRotAbs(const ReferenceFrame &rf)
Definition: mbpar.cc:1857
const Mat3x3 Eye3(1., 0., 0., 0., 1., 0., 0., 0., 1.)
const ReferenceFrame AbsRefFrame(0, Vec3(0., 0., 0), Mat3x3(1., 0., 0., 0., 1., 0., 0., 0., 1.), Vec3(0., 0., 0), Vec3(0., 0., 0), EULER_123)
virtual bool IsKeyWord(const char *sKeyWord)
Definition: parser.cc:910
Definition: gust.h:44
#define SAFENEWWITHCONSTRUCTOR(pnt, item, constructor)
Definition: mynewmem.h:698
Vec3 GetVecAbs(const ReferenceFrame &rf)
Definition: mbpar.cc:1641
virtual bool IsArg(void)
Definition: parser.cc:807
virtual HighParser::ErrOut GetLineData(void) const
Definition: parsinc.cc:697
const BasicScalarFunction *const ParseScalarFunction(MBDynParser &HP, DataManager *const pDM)

Here is the call graph for this function:


The documentation for this struct was generated from the following files: