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

#include <aeroelem.h>

Inheritance diagram for AerodynamicOutput:
Collaboration diagram for AerodynamicOutput:

Classes

struct  Aero_output
 

Public Types

enum  eOutput {
  AEROD_OUT_NONE = 0x0U, AEROD_OUT_STD = (ToBeOutput::OUTPUT_PRIVATE << 0), AEROD_OUT_PGAUSS = (ToBeOutput::OUTPUT_PRIVATE << 1), AEROD_OUT_NODE = (ToBeOutput::OUTPUT_PRIVATE << 2),
  AEROD_OUT_MASK = (AEROD_OUT_STD | AEROD_OUT_PGAUSS | AEROD_OUT_NODE)
}
 
enum  {
  OUTPUT_NONE = 0x0U, OUTPUT_GP_X = (ToBeOutput::OUTPUT_PRIVATE << 4), OUTPUT_GP_R = (ToBeOutput::OUTPUT_PRIVATE << 5), OUTPUT_GP_V = (ToBeOutput::OUTPUT_PRIVATE << 6),
  OUTPUT_GP_W = (ToBeOutput::OUTPUT_PRIVATE << 7), OUTPUT_GP_CONFIGURATION = (OUTPUT_GP_X | OUTPUT_GP_R | OUTPUT_GP_V | OUTPUT_GP_W), OUTPUT_GP_F = (ToBeOutput::OUTPUT_PRIVATE << 8), OUTPUT_GP_M = (ToBeOutput::OUTPUT_PRIVATE << 9),
  OUTPUT_GP_FORCES = (OUTPUT_GP_F | OUTPUT_GP_M), OUTPUT_DEFAULT = (OUTPUT_GP_F | OUTPUT_GP_M), OUTPUT_GP_ALL = (ToBeOutput::OUTPUT_PRIVATE_MASK & (~AEROD_OUT_MASK))
}
 

Public Member Functions

 AerodynamicOutput (flag f, int iNP, OrientationDescription ood)
 
 ~AerodynamicOutput (void)
 
void SetOutputFlag (flag f, int iNP)
 
void ResetIterator (void)
 
void SetData (const Vec3 &v, const doublereal *pd, const Vec3 &X, const Mat3x3 &R, const Vec3 &V, const Vec3 &W, const Vec3 &F, const Vec3 &M)
 
AerodynamicOutput::eOutput GetOutput (void) const
 
bool IsOutput (void) const
 
bool IsSTD (void) const
 
bool IsPGAUSS (void) const
 
bool IsNODE (void) const
 

Protected Attributes

flag m_eOutput
 
OrientationDescription od
 
std::vector< Aero_outputOutputData
 
std::vector< Aero_output >
::iterator 
OutputIter
 

Detailed Description

Definition at line 47 of file aeroelem.h.

Member Enumeration Documentation

anonymous enum
Enumerator
OUTPUT_NONE 
OUTPUT_GP_X 
OUTPUT_GP_R 
OUTPUT_GP_V 
OUTPUT_GP_W 
OUTPUT_GP_CONFIGURATION 
OUTPUT_GP_F 
OUTPUT_GP_M 
OUTPUT_GP_FORCES 
OUTPUT_DEFAULT 
OUTPUT_GP_ALL 

Definition at line 60 of file aeroelem.h.

Enumerator
AEROD_OUT_NONE 
AEROD_OUT_STD 
AEROD_OUT_PGAUSS 
AEROD_OUT_NODE 
AEROD_OUT_MASK 

Definition at line 49 of file aeroelem.h.

Constructor & Destructor Documentation

AerodynamicOutput::AerodynamicOutput ( flag  f,
int  iNP,
OrientationDescription  ood 
)

Definition at line 50 of file aeroelem.cc.

References SetOutputFlag().

52 : m_eOutput(f),
53 od(ood)
54 {
55  SetOutputFlag(f, iNP);
56 }
void SetOutputFlag(flag f, int iNP)
Definition: aeroelem.cc:64
OrientationDescription od
Definition: aeroelem.h:83

Here is the call graph for this function:

AerodynamicOutput::~AerodynamicOutput ( void  )

Definition at line 58 of file aeroelem.cc.

References NO_OP.

59 {
60  NO_OP;
61 }
#define NO_OP
Definition: myassert.h:74

Member Function Documentation

AerodynamicOutput::eOutput AerodynamicOutput::GetOutput ( void  ) const
bool AerodynamicOutput::IsNODE ( void  ) const

Definition at line 149 of file aeroelem.cc.

References AEROD_OUT_NODE, and GetOutput().

150 {
151  return GetOutput() == AEROD_OUT_NODE;
152 }
AerodynamicOutput::eOutput GetOutput(void) const
Definition: aeroelem.cc:125

Here is the call graph for this function:

bool AerodynamicOutput::IsOutput ( void  ) const

Definition at line 131 of file aeroelem.cc.

References m_eOutput, and ToBeOutput::OUTPUT.

Referenced by ResetIterator(), and SetOutputFlag().

132 {
133  return (m_eOutput & ToBeOutput::OUTPUT);
134 }
bool AerodynamicOutput::IsPGAUSS ( void  ) const

Definition at line 143 of file aeroelem.cc.

References AEROD_OUT_PGAUSS, and GetOutput().

Referenced by ResetIterator(), SetData(), and SetOutputFlag().

144 {
145  return GetOutput() == AEROD_OUT_PGAUSS;
146 }
AerodynamicOutput::eOutput GetOutput(void) const
Definition: aeroelem.cc:125

Here is the call graph for this function:

bool AerodynamicOutput::IsSTD ( void  ) const

Definition at line 137 of file aeroelem.cc.

References AEROD_OUT_STD, and GetOutput().

138 {
139  return GetOutput() == AEROD_OUT_STD;
140 }
AerodynamicOutput::eOutput GetOutput(void) const
Definition: aeroelem.cc:125

Here is the call graph for this function:

void AerodynamicOutput::ResetIterator ( void  )

Definition at line 77 of file aeroelem.cc.

References ASSERT, IsOutput(), IsPGAUSS(), OutputData, and OutputIter.

Referenced by AerodynamicBody::AssJac(), AerodynamicBeam::AssJac(), AerodynamicBeam2::AssJac(), AerodynamicBody::AssVec(), AerodynamicBeam::AssVec(), and AerodynamicBeam2::AssVec().

78 {
79  if (IsOutput() && IsPGAUSS()) {
80  ASSERT(!OutputData.empty());
81  OutputIter = OutputData.begin();
82  }
83 
84 #ifdef USE_NETCDF
85  if (!NetCDFOutputData.empty()) {
86  NetCDFOutputIter = NetCDFOutputData.begin();
87  }
88 #endif // USE_NETCDF
89 }
bool IsOutput(void) const
Definition: aeroelem.cc:131
#define ASSERT(expression)
Definition: colamd.c:977
bool IsPGAUSS(void) const
Definition: aeroelem.cc:143
std::vector< Aero_output > OutputData
Definition: aeroelem.h:107
std::vector< Aero_output >::iterator OutputIter
Definition: aeroelem.h:108

Here is the call graph for this function:

void AerodynamicOutput::SetData ( const Vec3 v,
const doublereal pd,
const Vec3 X,
const Mat3x3 R,
const Vec3 V,
const Vec3 W,
const Vec3 F,
const Vec3 M 
)

Definition at line 92 of file aeroelem.cc.

References ASSERT, grad::atan2(), IsPGAUSS(), M_PI, OutputData, OutputIter, and R.

Referenced by AerodynamicBody::AssVec(), AerodynamicBeam::AssVec(), and AerodynamicBeam2::AssVec().

94 {
95  if (IsPGAUSS()) {
96  ASSERT(!OutputData.empty());
97  ASSERT(OutputIter >= OutputData.begin());
98  ASSERT(OutputIter < OutputData.end());
99 
100  OutputIter->alpha = 180./M_PI*atan2(-v(2), v(1));
101  OutputIter->f = Vec3(pd[1], pd[0], pd[5]);
102 
103  // move iterator forward
104  ++OutputIter;
105  }
106 
107 #ifdef USE_NETCDF
108  if (!NetCDFOutputData.empty()) {
109  ASSERT(NetCDFOutputIter >= NetCDFOutputData.begin());
110  ASSERT(NetCDFOutputIter < NetCDFOutputData.end());
111 
112  if (NetCDFOutputIter->Var_X) NetCDFOutputIter->X = X;
113  if (NetCDFOutputIter->Var_Phi) NetCDFOutputIter->R = R;
114  if (NetCDFOutputIter->Var_V) NetCDFOutputIter->V = V;
115  if (NetCDFOutputIter->Var_W) NetCDFOutputIter->W = W;
116  if (NetCDFOutputIter->Var_F) NetCDFOutputIter->F = F;
117  if (NetCDFOutputIter->Var_M) NetCDFOutputIter->M = M;
118 
119  ++NetCDFOutputIter;
120  }
121 #endif // USE_NETCDF
122 }
#define M_PI
Definition: gradienttest.cc:67
Definition: matvec3.h:98
#define ASSERT(expression)
Definition: colamd.c:977
bool IsPGAUSS(void) const
Definition: aeroelem.cc:143
std::vector< Aero_output > OutputData
Definition: aeroelem.h:107
GradientExpression< BinaryExpr< FuncAtan2, LhsExpr, RhsExpr > > atan2(const GradientExpression< LhsExpr > &u, const GradientExpression< RhsExpr > &v)
Definition: gradient.h:2962
std::vector< Aero_output >::iterator OutputIter
Definition: aeroelem.h:108
Mat3x3 R

Here is the call graph for this function:

void AerodynamicOutput::SetOutputFlag ( flag  f,
int  iNP 
)

Definition at line 64 of file aeroelem.cc.

References IsOutput(), IsPGAUSS(), m_eOutput, and OutputData.

Referenced by AerodynamicOutput(), and Aerodynamic2DElem< iNN >::SetOutputFlag().

65 {
66  m_eOutput = f;
67 
68  if (IsOutput() && IsPGAUSS()) {
69  OutputData.resize(iNP);
70 
71  } else {
72  OutputData.resize(0);
73  }
74 }
bool IsOutput(void) const
Definition: aeroelem.cc:131
bool IsPGAUSS(void) const
Definition: aeroelem.cc:143
std::vector< Aero_output > OutputData
Definition: aeroelem.h:107

Here is the call graph for this function:

Member Data Documentation

flag AerodynamicOutput::m_eOutput
protected

Definition at line 80 of file aeroelem.h.

Referenced by GetOutput(), IsOutput(), and SetOutputFlag().

OrientationDescription AerodynamicOutput::od
protected

Definition at line 83 of file aeroelem.h.

std::vector<Aero_output> AerodynamicOutput::OutputData
protected
std::vector<Aero_output>::iterator AerodynamicOutput::OutputIter
protected

Definition at line 108 of file aeroelem.h.

Referenced by ResetIterator(), and SetData().


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