MBSim

Project Page
contour_pdata.h
1 /* Copyright (C) 2004-2009 MBSim Development Team
2  * This library is free software; you can redistribute it and/or
3  * modify it under the terms of the GNU Lesser General Public
4  * License as published by the Free Software Foundation; either
5  * version 2.1 of the License, or (at your option) any later version.
6  *
7  * This library is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
10  * Lesser General Public License for more details.
11  *
12  * You should have received a copy of the GNU Lesser General Public
13  * License along with this library; if not, write to the Free Software
14  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
15  *
16  * Contact: rzander@users.berlios.de
17  */
18 
19 #ifndef _CONTOUR_PDATA_H_
20 #define _CONTOUR_PDATA_H_
21 
22 #include "fmatvec.h"
23 #include "mbsim/frame.h"
24 #include <vector>
25 
26 namespace MBSim {
27 
28  class Point;
29 
30  enum ContourParameterType { NODE, STAGGEREDNODE, CONTINUUM, EXTINTERPOL };
31 
41  public:
45  ContourPointData() : type(CONTINUUM), ID(0) {}
46  ContourPointData(const double &alpha_) : type(CONTINUUM), ID(0), alpha(1,fmatvec::INIT,alpha_) {}
47  ContourPointData(const fmatvec::Vec &alpha_) : type(CONTINUUM), ID(0), alpha(alpha_) {}
48  ContourPointData(const int &id_, const ContourParameterType type_ = NODE) : type(type_), ID(id_) {}
49 
53  virtual ~ContourPointData() {}
54 
55  /* GETTER / SETTER */
56  ContourParameterType& getContourParameterType() { return type; }
57  const ContourParameterType& getContourParameterType() const { return type; }
58  int& getNodeNumber() { return ID; }
59  const int& getNodeNumber() const { return ID; }
60  fmatvec::Vec& getLagrangeParameterPosition() { return alpha; }
61  const fmatvec::Vec& getLagrangeParameterPosition() const { return alpha; }
62  fmatvec::Vec& getLagrangeParameterVelocity() { return alphap; }
63  const fmatvec::Vec& getLagrangeParameterVelocity() const { return alphap; }
64  fmatvec::Vec& getInterpolationWeights() { return iWeights; }
65  const fmatvec::Vec& getInterpolationWeights() const { return iWeights; }
66  Frame& getFrameOfReference() { return cosy; }
67  const Frame& getFrameOfReference() const { return cosy; }
68  /***************************************************/
69 
70  private:
74  ContourParameterType type;
75 
79  int ID;
80 
84  fmatvec::Vec alpha;
85 
89  fmatvec::Vec alphap;
90 
94  fmatvec::Vec iWeights;
95 
101  std::vector<Point*> iPoints;
102 
107  };
108 
109 }
110 
111 #endif /* _CONTOUR_PDATA_H_ */
112