45 : 
a(0), t(0), iPoints(0), numUpdates(0), pTime(pt)
 
   92                 coe[2] = ((aa[2]-aa[0])/(tt[2]-tt[0])
 
   93                                 - (aa[1]-aa[0])/(tt[1]-tt[0]))/(tt[2]-tt[1]);
 
   94                 coe[1] = (aa[1]-aa[0])/(tt[1]-tt[0]) - (tt[1]+tt[0])*coe[2];
 
   97                 coe[1] = aa[0] - tt[0]*coe[1] - tt[0]*tt[0]*coe[2];
 
  102                         std::cerr << 
"aa[0:2]= " << aa[0] << 
"," << aa[1] << 
"," << aa[2] << std::endl
 
  103                                 << 
"tt[0:2]= " << tt[0] << 
"," << tt[1] << 
"," << tt[2] << std::endl
 
  104                                 << 
"coe[0:2]=" << coe[0] << 
"," << coe[1] << 
"," << coe[2] << std::endl;
 
  107                 alf1 = coe[1]+2.*coe[2]*tt[2];
 
  129                 for (
int j = 1; j < s; j++) {
 
  154                 for (
int i = 0; i < 2*s*
iPoints; i++) {
 
  183 : 
AeroMemory(ptime), unsteadyflag(u), Omega(0.)
 
  256                 out << 
", unsteady, harris";
 
  260                 out << 
", unsteady, bielawa";
 
  287         for (
unsigned int iColm1 = 0; iColm1 < 6; iColm1++)     {
 
  293                         delta = dv*epsilon + nu;
 
  296                         delta = dw*epsilon + nu;
 
  298                 WW[iColm1] = dorig + delta;
 
  302                 for (
unsigned int iRowm1 = 0; iRowm1 < 6; iRowm1++) {
 
  303                         J.
Put(iRowm1 + 1, iColm1 + 1, (TNG[iRowm1] - TNG0[iRowm1])/delta);
 
  330         for (
unsigned int iColm1 = 0; iColm1 < 6; iColm1++)     {
 
  336                         delta = dv*epsilon + nu;
 
  339                         delta = dw*epsilon + nu;
 
  342                 WW[iColm1] = dorig + delta;
 
  346                 WW[iColm1] = dorig - delta;
 
  351                 for (
unsigned int iRowm1 = 0; iRowm1 < 6; iRowm1++) {
 
  352                         J.
Put(iRowm1 + 1, iColm1 + 1, (TNGp[iRowm1] - TNGm[iRowm1])/delta2);
 
  370         silent_cerr(
"AeroData: " 
  371                 "GetDofType() is undefined because aerodynamic data " 
  372                 "has no degrees of freedom" << std::endl);
 
  379         silent_cerr(
"AeroData: GetForces() is undefined" << std::endl);
 
  386         silent_cerr(
"AeroData: GetForcesJac() is undefined" << std::endl);
 
  398         silent_cerr(
"AeroData: AssRes() is undefined" << std::endl);
 
  411         silent_cerr(
"AeroData: AssJac() is undefined" << std::endl);
 
  446                                 pedantic_cerr(
"deprecated unsteady model " 
  447                                         "given by integer number;" 
  448                                         " use \"steady\", \"Harris\" or \"Bielawa\" " 
  454                                         silent_cerr(
"illegal unsteady flag " 
  455                                                         "numeric value " << i
 
  471                         silent_cerr(
"\"Harris\" unsteady aerodynamics " 
  472                                         "are not available at line " 
  478                         silent_cerr(
"illegal unsteady flag at line " 
  497         int iGP, 
int iDim, 
bool bInterp = 
false)
 
  500         if (bInterp && HP.
IsKeyWord(
"tolerance")) {
 
  503                         silent_cerr(
"ReadC81MultipleAeroData: " 
  504                                 "invalid c81 data tolerance at line " 
  511         if (nProfiles <= 0) {
 
  512                 silent_cerr(
"Need at least one airfoil at line " 
  517         std::vector<unsigned> profiles(nProfiles);
 
  518         std::vector<doublereal> upper_bounds(nProfiles);
 
  519         std::vector<const c81_data *> data(nProfiles);
 
  521         for (
int i = 0; i < nProfiles; i++) {
 
  522                 profiles[i] = (unsigned)HP.
GetInt();
 
  523                 upper_bounds[i] = HP.
GetReal();
 
  524                 if (upper_bounds[i] <= -1.) {
 
  525                         if (!bInterp || upper_bounds[i] < -1.) {
 
  526                                 silent_cerr(
"upper bound " 
  527                                         << i + 1 << 
" = " << upper_bounds[i]
 
  528                                         << 
" too small at line " 
  534                 } 
else if (upper_bounds[i] > 1.) {
 
  535                         silent_cerr(
"upper bound " 
  538                                 << 
" too large at line " 
  543                 } 
else if (i > 0 && upper_bounds[i] <= upper_bounds[i-1]) {
 
  544                         silent_cerr(
"upper bound " 
  545                                 << i+1 << 
" = " << upper_bounds[i]
 
  546                                 << 
" not in increasing order " 
  553                         silent_cerr(
"Unable to find airfoil " 
  554                                 << profiles[i] << 
" at line " 
  559                         << 
" is from file c81 " << profiles[i]
 
  563         if (upper_bounds[nProfiles - 1] != 1.) {
 
  564                 silent_cerr(
"warning: the last upper bound should be 1.0 " 
  580                                 eInst, profiles, upper_bounds, data,
 
  587                                 eInst, profiles, upper_bounds, data,
 
  602         const char* sKeyWords[] = {
 
  642         if (*piNumber <= 0) {
 
  643                 silent_cerr(
"need at least 1 Gauss integration point at line " 
  648                         << *piNumber << std::endl);
 
  661                         silent_cerr(
"unknown airfoil type \"" << HP.
GetString()
 
  663                                         << 
"; using default (NACA0012)" 
  668                                    "airfoil is NACA0012" << std::endl);
 
  684                                 "airfoil is RAE9671" << std::endl);
 
  706                         } 
else if (HP.
IsKeyWord(
"interpolated")) {
 
  710                                 unsigned iProfile = (unsigned)HP.
GetInt();
 
  714                                         "airfoil data is from file c81 " 
  715                                         << iProfile << std::endl);
 
  734                                 silent_cerr(
"Theodorsen aerodata: warning, assuming \"c81\" at line " 
  742                         } 
else if (HP.
IsKeyWord(
"interpolated")) {
 
  746                                 unsigned iProfile = (unsigned)HP.
GetInt();
 
  750                                         "airfoil data is from file c81 " 
  751                                         << iProfile << std::endl);
 
  781                 silent_cerr(
"missing airfoil type at line " 
  783                                 << 
"; using default (NACA0012)" 
static void ReadC81MultipleAeroData(DataManager *pDM, MBDynParser &HP, AeroData **aerodata, int iGP, int iDim, bool bInterp=false)
void Put(unsigned short int ir, unsigned short int ic, const doublereal &d)
virtual void SetSectionData(const doublereal &abscissa, const doublereal &chord, const doublereal &forcepoint, const doublereal &velocitypoint, const doublereal &twist, const doublereal &omega=0.)
int StorageSize(void) const 
std::ostream & RestartUnsteady(std::ostream &out) const 
virtual int GetForcesJac(int i, const doublereal *W, doublereal *TNG, Mat6x6 &J, outa_t &OUTA)
#define MBDYN_EXCEPT_ARGS
#define DEBUGCOUTFNAME(fname)
virtual integer GetInt(integer iDefval=0)
doublereal Norm(void) const 
int polcoe(doublereal *x, doublereal *y, integer *n, doublereal *cof)
AeroMemory(DriveCaller *pt)
virtual unsigned int iGetNumDof(void) const 
static AeroData::UnsteadyModel ReadUnsteadyFlag(MBDynParser &HP)
doublereal sound_celerity
#define SAFEDELETEARR(pnt)
virtual int GetForces(int i, const doublereal *W, doublereal *TNG, outa_t &OUTA)
const DriveHandler * pGetDrvHdl(void) const 
virtual void SetAirData(const doublereal &rho, const doublereal &c)
virtual int StorageSize(void) const =0
Shape * ReadShape(MBDynParser &HP)
const c81_data * GetC81Data(unsigned profile) const 
C81Data(unsigned int uLabel)
AeroData::UnsteadyModel Unsteady(void) const 
void Predict(int i, doublereal alpha, doublereal &alf1, doublereal &alf2)
int GetNumPoints(void) const 
#define SAFENEW(pnt, item)
virtual bool IsKeyWord(const char *sKeyWord)
int GetForcesJacForwardDiff_int(int i, const doublereal *W, doublereal *TNG, Mat6x6 &J, outa_t &OUTA)
doublereal force_position
UnsteadyModel unsteadyflag
int GetForcesJacCenteredDiff_int(int i, const doublereal *W, doublereal *TNG, Mat6x6 &J, outa_t &OUTA)
void ReadAeroData(DataManager *pDM, MBDynParser &HP, int iDim, Shape **ppChord, Shape **ppForce, Shape **ppVelocity, Shape **ppTwist, Shape **ppTipLoss, integer *piNumber, DriveCaller **ppDC, AeroData **aerodata)
#define ASSERT(expression)
virtual void AfterConvergence(int i, const VectorHandler &X, const VectorHandler &XP)
#define SAFENEWWITHCONSTRUCTOR(pnt, item, constructor)
virtual doublereal dGet(const doublereal &dVar) const =0
virtual DofOrder::Order GetDofType(unsigned int i) const 
static std::stack< cleanup * > c
virtual std::string GetString(const std::string &sDefVal)
virtual ~AeroMemory(void)
#define SAFENEWARR(pnt, item, sz)
DriveCaller * GetDriveCaller(bool bDeferred=false)
static const doublereal a
virtual void AssJac(FullSubMatrixHandler &WorkMat, doublereal dCoef, const VectorHandler &XCurr, const VectorHandler &XPrimeCurr, integer iFirstIndex, integer iFirstSubIndex, const Mat3xN &vx, const Mat3xN &wx, Mat3xN &fq, Mat3xN &cq, int i, const doublereal *W, doublereal *TNG, Mat6x6 &J, outa_t &OUTA)
AeroData(int i_p, int i_dim, UnsteadyModel u=STEADY, DriveCaller *pt=0)
virtual HighParser::ErrOut GetLineData(void) const 
#define DEBUGLCOUT(level, msg)
virtual void AssRes(SubVectorHandler &WorkVec, doublereal dCoef, const VectorHandler &XCurr, const VectorHandler &XPrimeCurr, integer iFirstIndex, integer iFirstSubIndex, int i, const doublereal *W, doublereal *TNG, outa_t &OUTA)
virtual doublereal GetReal(const doublereal &dDefval=0.0)