MBDyn-1.7.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups
instruments.h
Go to the documentation of this file.
1 /* $Header: /var/cvs/mbdyn/mbdyn/mbdyn-1.0/mbdyn/aero/instruments.h,v 1.24 2017/01/12 14:45:58 masarati Exp $ */
2 /*
3  * MBDyn (C) is a multibody analysis code.
4  * http://www.mbdyn.org
5  *
6  * Copyright (C) 1996-2017
7  *
8  * Pierangelo Masarati <masarati@aero.polimi.it>
9  * Paolo Mantegazza <mantegazza@aero.polimi.it>
10  *
11  * Dipartimento di Ingegneria Aerospaziale - Politecnico di Milano
12  * via La Masa, 34 - 20156 Milano, Italy
13  * http://www.aero.polimi.it
14  *
15  * Changing this copyright notice is forbidden.
16  *
17  * This program is free software; you can redistribute it and/or modify
18  * it under the terms of the GNU General Public License as published by
19  * the Free Software Foundation (version 2 of the License).
20  *
21  *
22  * This program is distributed in the hope that it will be useful,
23  * but WITHOUT ANY WARRANTY; without even the implied warranty of
24  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25  * GNU General Public License for more details.
26  *
27  * You should have received a copy of the GNU General Public License
28  * along with this program; if not, write to the Free Software
29  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
30  */
31 
32 #ifndef INSTRUMENTS_H
33 #define INSTRUMENTS_H
34 
35 // strumenti di volo
36 
37 #include "aerodyn.h"
38 
39 class AircraftInstruments : virtual public Elem, public AerodynamicElem {
40 public:
41  enum Measure {
42  AIRSPEED = 1,
50  AOA,
54 
58 
60  };
61 
62 protected:
63  const StructNode* pNode;
65 
67 
68  void Update(void);
69 
70 public:
71  AircraftInstruments(unsigned int uLabel,
72  const DofOwner *pDO, const StructNode* pN,
73  const Mat3x3 &R, flag fOut);
74  virtual ~AircraftInstruments(void);
75 
76  /* Scrive il contributo dell'elemento al file di restart */
77  virtual std::ostream& Restart(std::ostream& out) const;
78 
79  /* Tipo dell'elemento (usato per debug ecc.) */
80  virtual Elem::Type GetElemType(void) const;
81 
82  /* funzioni proprie */
83 
84  /*
85  * output; si assume che ogni tipo di elemento sappia, attraverso
86  * l'OutputHandler, dove scrivere il proprio output
87  */
88  virtual void Output(OutputHandler& OH) const;
89 
90  /* Tipo di elemento aerodinamico */
93  };
94 
95  /* Dimensioni del workspace */
96  virtual void
97  WorkSpaceDim(integer* piNumRows, integer* piNumCols) const;
98 
99  /* assemblaggio jacobiano */
100  virtual VariableSubMatrixHandler&
102  doublereal /* dCoef */ ,
103  const VectorHandler& /* XCurr */ ,
104  const VectorHandler& /* XPrimeCurr */ );
105 
106  /* assemblaggio residuo */
107  virtual SubVectorHandler&
108  AssRes(SubVectorHandler& WorkVec,
109  doublereal dCoef,
110  const VectorHandler& XCurr,
111  const VectorHandler& XPrimeCurr);
112 
113  /* Dati privati */
114  virtual unsigned int iGetNumPrivData(void) const;
115  virtual unsigned int iGetPrivDataIdx(const char *s) const;
116  virtual doublereal dGetPrivData(unsigned int i) const;
117 
118  /* *******PER IL SOLUTORE PARALLELO******** */
119  /*
120  * Fornisce il tipo e la label dei nodi che sono connessi all'elemento
121  * utile per l'assemblaggio della matrice di connessione fra i dofs
122  */
123  virtual void
124  GetConnectedNodes(std::vector<const Node *>& connectedNodes) const;
125 
126  /* ************************************************ */
127 };
128 
129 class DataManager;
130 class MBDynParser;
131 
132 extern Elem *
134  const DofOwner *pDO, unsigned int uLabel);
135 
136 #endif // INSTRUMENTS_H
137 
virtual AerodynamicElem::Type GetAerodynamicElemType(void) const
Definition: instruments.h:91
long int flag
Definition: mbdyn.h:43
virtual VariableSubMatrixHandler & AssJac(VariableSubMatrixHandler &WorkMat, doublereal, const VectorHandler &, const VectorHandler &)
Definition: instruments.cc:178
virtual SubVectorHandler & AssRes(SubVectorHandler &WorkVec, doublereal dCoef, const VectorHandler &XCurr, const VectorHandler &XPrimeCurr)
Definition: instruments.cc:192
virtual void Output(OutputHandler &OH) const
Definition: instruments.cc:154
virtual void GetConnectedNodes(std::vector< const Node * > &connectedNodes) const
Definition: instruments.cc:261
AircraftInstruments(unsigned int uLabel, const DofOwner *pDO, const StructNode *pN, const Mat3x3 &R, flag fOut)
Definition: instruments.cc:39
DataManager * pDM
Definition: mbpar.h:252
doublereal dMeasure[LASTMEASURE]
Definition: instruments.h:66
Elem * ReadAircraftInstruments(DataManager *pDM, MBDynParser &HP, const DofOwner *pDO, unsigned int uLabel)
Definition: instruments.cc:268
unsigned int uLabel
Definition: withlab.h:44
virtual std::ostream & Restart(std::ostream &out) const
Definition: instruments.cc:143
const StructNode * pNode
Definition: instruments.h:63
Definition: elem.h:75
Type
Definition: elem.h:91
virtual doublereal dGetPrivData(unsigned int i) const
Definition: instruments.cc:249
virtual ~AircraftInstruments(void)
Definition: instruments.cc:50
virtual Elem::Type GetElemType(void) const
Definition: instruments.cc:56
double doublereal
Definition: colamd.c:52
virtual void WorkSpaceDim(integer *piNumRows, integer *piNumCols) const
Definition: instruments.cc:170
long int integer
Definition: colamd.c:51
Mat3x3 R
virtual unsigned int iGetPrivDataIdx(const char *s) const
Definition: instruments.cc:212
virtual unsigned int iGetNumPrivData(void) const
Definition: instruments.cc:206