MBDyn-1.7.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups
gust.h
Go to the documentation of this file.
1 /* $Header: /var/cvs/mbdyn/mbdyn/mbdyn-1.0/mbdyn/aero/gust.h,v 1.8 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 GUST_H
33 #define GUST_H
34 
35 #include "matvec3.h"
36 
37 // forward declaration
38 class MBDynParser;
39 class DataManager;
40 class AirProperties;
41 
42 /* Gust - begin */
43 
44 class Gust {
45 protected:
47 
48 public:
49  virtual ~Gust(void);
50  void SetAirProperties(const AirProperties *pap);
51  virtual Vec3 GetVelocity(const Vec3& X) const;
52  virtual bool GetVelocity(const Vec3& X, Vec3& V) const = 0;
53  virtual std::ostream& Restart(std::ostream& out) const = 0;
54 };
55 
56 /* prototype of the functional object: reads a gust */
57 struct GustRead {
58 public:
59  virtual ~GustRead(void);
60  virtual Gust *
61  Read(const DataManager* pDM, MBDynParser& HP) = 0;
62 };
63 
64 /* drive caller registration function: call to register one */
65 extern bool
66 SetGustData(const char *name, GustRead* rf);
67 
68 /* create/destroy */
69 extern void InitGustData(void);
70 extern void DestroyGustData(void);
71 
72 extern Gust *
73 ReadGustData(const DataManager *pDM, MBDynParser& HP);
74 
75 /* Gust - end */
76 
77 #endif // GUST_H
78 
virtual ~GustRead(void)
Definition: gust.cc:62
void DestroyGustData(void)
Definition: gust.cc:233
virtual ~Gust(void)
Definition: gust.cc:42
Definition: matvec3.h:98
virtual std::ostream & Restart(std::ostream &out) const =0
Definition: gust.h:57
virtual Vec3 GetVelocity(const Vec3 &X) const
Definition: gust.cc:55
void InitGustData(void)
Definition: gust.cc:212
virtual Gust * Read(const DataManager *pDM, MBDynParser &HP)=0
const AirProperties * pAP
Definition: gust.h:46
bool SetGustData(const char *name, GustRead *rf)
Definition: gust.cc:182
Definition: gust.h:44
Gust * ReadGustData(const DataManager *pDM, MBDynParser &HP)
Definition: gust.cc:190
void SetAirProperties(const AirProperties *pap)
Definition: gust.cc:48