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

#include <windprof.h>

Inheritance diagram for PowerLawGR:
Collaboration diagram for PowerLawGR:

Public Member Functions

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

Detailed Description

Definition at line 99 of file windprof.h.

Constructor & Destructor Documentation

PowerLawGR::~PowerLawGR ( void  )
virtual

Definition at line 215 of file windprof.cc.

References NO_OP.

216 {
217  NO_OP;
218 }
#define NO_OP
Definition: myassert.h:74

Member Function Documentation

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

Implements GustRead.

Definition at line 221 of file windprof.cc.

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

222 {
223  doublereal dZRef = -1.;
224  DriveCaller *pVRef = 0;
225  doublereal dPower = -1.;
226  Vec3 X0(Zero3);
227  bool bGotX0 = false;
228  Mat3x3 R0(Eye3);
229  bool bGotR0 = false;
230 
231  while (HP.IsArg()) {
232  if (HP.IsKeyWord("reference" "elevation")) {
233  if (dZRef != -1.) {
234  silent_cerr("PowerLawWindProfile: "
235  "reference elevation provided twice "
236  "at line " << HP.GetLineData()
237  << std::endl);
239  }
240 
241  dZRef = HP.GetReal();
242 
243  } else if (HP.IsKeyWord("reference" "velocity")) {
244  if (pVRef != 0) {
245  silent_cerr("PowerLawWindProfile: "
246  "reference velocity provided twice "
247  "at line " << HP.GetLineData()
248  << std::endl);
250  }
251 
252  pVRef = HP.GetDriveCaller();
253 
254  } else if (HP.IsKeyWord("exponent")) {
255  if (dPower != -1.) {
256  silent_cerr("PowerLawWindProfile: "
257  "exponent provided twice "
258  "at line " << HP.GetLineData()
259  << std::endl);
261  }
262 
263  dPower = HP.GetReal();
264 
265  } else if (HP.IsKeyWord("reference" "position")) {
266  if (bGotX0) {
267  silent_cerr("PowerLawWindProfile: "
268  "reference position provided twice "
269  "at line " << HP.GetLineData()
270  << std::endl);
272  }
273 
274  X0 = HP.GetVecAbs(::AbsRefFrame);
275 
276  } else if (HP.IsKeyWord("reference" "orientation")) {
277  if (bGotR0) {
278  silent_cerr("PowerLawWindProfile: "
279  "reference orientation provided twice "
280  "at line " << HP.GetLineData()
281  << std::endl);
283  }
284 
285  R0 = HP.GetRotAbs(::AbsRefFrame);
286 
287  } else {
288  break;
289  }
290  }
291 
292  if (dZRef == -1.) {
293  silent_cerr("PowerLawWindProfile: "
294  "reference elevation missing "
295  "at line " << HP.GetLineData()
296  << std::endl);
298  }
299 
300  if (pVRef == 0) {
301  silent_cerr("PowerLawWindProfile: "
302  "reference velocity missing "
303  "at line " << HP.GetLineData()
304  << std::endl);
306  }
307 
308  if (dPower == -1.) {
309  silent_cerr("PowerLawWindProfile: "
310  "exponent missing "
311  "at line " << HP.GetLineData()
312  << std::endl);
314  }
315 
316  Gust *pG = 0;
318  PowerLawWindProfile(X0, R0, dZRef, pVRef, dPower));
319 
320  return pG;
321 }
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
DriveCaller * GetDriveCaller(bool bDeferred=false)
Definition: mbpar.cc:2033
double doublereal
Definition: colamd.c:52
virtual HighParser::ErrOut GetLineData(void) const
Definition: parsinc.cc:697
virtual doublereal GetReal(const doublereal &dDefval=0.0)
Definition: parser.cc:1056

Here is the call graph for this function:


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