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

#include <windprof.h>

Inheritance diagram for LogarithmicGR:
Collaboration diagram for LogarithmicGR:

Public Member Functions

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

Detailed Description

Definition at line 128 of file windprof.h.

Constructor & Destructor Documentation

LogarithmicGR::~LogarithmicGR ( void  )
virtual

Definition at line 376 of file windprof.cc.

References NO_OP.

377 {
378  NO_OP;
379 }
#define NO_OP
Definition: myassert.h:74

Member Function Documentation

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

Implements GustRead.

Definition at line 382 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.

383 {
384  doublereal dZRef = -1.;
385  DriveCaller *pVRef = 0;
386  doublereal dSurfaceRoughnessLength = -1.;
387  Vec3 X0(Zero3);
388  bool bGotX0 = false;
389  Mat3x3 R0(Eye3);
390  bool bGotR0 = false;
391 
392  while (HP.IsArg()) {
393  if (HP.IsKeyWord("reference" "elevation")) {
394  if (dZRef != -1.) {
395  silent_cerr("LogarithmicWindProfile: "
396  "reference elevation provided twice "
397  "at line " << HP.GetLineData()
398  << std::endl);
400  }
401 
402  dZRef = HP.GetReal();
403 
404  } else if (HP.IsKeyWord("reference" "velocity")) {
405  if (pVRef != 0) {
406  silent_cerr("LogarithmicWindProfile: "
407  "reference velocity provided twice "
408  "at line " << HP.GetLineData()
409  << std::endl);
411  }
412 
413  pVRef = HP.GetDriveCaller();
414 
415  } else if (HP.IsKeyWord("surface" "roughness" "length")) {
416  if (dSurfaceRoughnessLength != -1.) {
417  silent_cerr("LogarithmicWindProfile: "
418  "surface roughness length provided twice "
419  "at line " << HP.GetLineData()
420  << std::endl);
422  }
423 
424  dSurfaceRoughnessLength = HP.GetReal();
425 
426  } else if (HP.IsKeyWord("reference" "position")) {
427  if (bGotX0) {
428  silent_cerr("PowerLawWindProfile: "
429  "reference position provided twice "
430  "at line " << HP.GetLineData()
431  << std::endl);
433  }
434 
435  X0 = HP.GetVecAbs(::AbsRefFrame);
436 
437  } else if (HP.IsKeyWord("reference" "orientation")) {
438  if (bGotR0) {
439  silent_cerr("PowerLawWindProfile: "
440  "reference orientation provided twice "
441  "at line " << HP.GetLineData()
442  << std::endl);
444  }
445 
446  R0 = HP.GetRotAbs(::AbsRefFrame);
447 
448  } else {
449  break;
450  }
451  }
452 
453  if (dZRef == -1.) {
454  silent_cerr("LogarithmicWindProfile: "
455  "reference elevation missing "
456  "at line " << HP.GetLineData()
457  << std::endl);
459  }
460 
461  if (pVRef == 0) {
462  silent_cerr("LogarithmicWindProfile: "
463  "reference velocity missing "
464  "at line " << HP.GetLineData()
465  << std::endl);
467  }
468 
469  if (dSurfaceRoughnessLength == -1.) {
470  silent_cerr("LogarithmicWindProfile: "
471  "surface roughness length missing "
472  "at line " << HP.GetLineData()
473  << std::endl);
475  }
476 
477  Gust *pG = 0;
479  LogarithmicWindProfile(X0, R0,
480  dZRef, pVRef, dSurfaceRoughnessLength));
481 
482  return pG;
483 }
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: