MBSim

Project Page
contour_pdata.h
00001 /* Copyright (C) 2004-2009 MBSim Development Team
00002  * This library is free software; you can redistribute it and/or 
00003  * modify it under the terms of the GNU Lesser General Public 
00004  * License as published by the Free Software Foundation; either 
00005  * version 2.1 of the License, or (at your option) any later version. 
00006  *  
00007  * This library is distributed in the hope that it will be useful, 
00008  * but WITHOUT ANY WARRANTY; without even the implied warranty of 
00009  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
00010  * Lesser General Public License for more details. 
00011  *  
00012  * You should have received a copy of the GNU Lesser General Public 
00013  * License along with this library; if not, write to the Free Software 
00014  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 USA
00015  *
00016  * Contact: rzander@users.berlios.de
00017  */
00018 
00019 #ifndef _CONTOUR_PDATA_H_
00020 #define _CONTOUR_PDATA_H_
00021 
00022 #include "fmatvec/fmatvec.h"
00023 #include "mbsim/frame.h"
00024 #include <vector>
00025 
00026 namespace MBSim {
00027 
00028   class Point;
00029 
00038   class ContourPointData {
00039     public:
00040 
00041       enum ContourParameterType { node, staggeredNode, continuum, extInterpol, ffrorigin, fixedrelativeframe };
00042 
00046       ContourPointData() :
00047           type(continuum), ID(0), alpha(fmatvec::Vec2()), alphap(fmatvec::Vec2()) {
00048       }
00049       ContourPointData(const double &alpha_) :
00050           type(continuum), ID(0), alpha(fmatvec::Vec2()), alphap(fmatvec::Vec2()) {
00051         alpha(0) = alpha_;
00052       }
00053       ContourPointData(const fmatvec::Vec2 &alpha_) :
00054           type(continuum), ID(0), alpha(alpha_), alphap(fmatvec::Vec2()) {
00055       }
00056       ContourPointData(const int &id_, const ContourParameterType type_ = node) :
00057           type(type_), ID(id_), alpha(fmatvec::Vec2()), alphap(fmatvec::Vec2()) {
00058       }
00059 
00063       virtual ~ContourPointData() {
00064       }
00065 
00066       /* GETTER / SETTER */
00067       ContourParameterType& getContourParameterType() {
00068         return type;
00069       }
00070       const ContourParameterType& getContourParameterType() const {
00071         return type;
00072       }
00073       int& getNodeNumber() {
00074         return ID;
00075       }
00076       const int& getNodeNumber() const {
00077         return ID;
00078       }
00079       fmatvec::Vec2& getLagrangeParameterPosition() {
00080         return alpha;
00081       }
00082       const fmatvec::Vec2& getLagrangeParameterPosition() const {
00083         return alpha;
00084       }
00085       fmatvec::Vec2& getLagrangeParameterVelocity() {
00086         return alphap;
00087       }
00088       const fmatvec::Vec2& getLagrangeParameterVelocity() const {
00089         return alphap;
00090       }
00091       fmatvec::VecV& getInterpolationWeights() {
00092         return iWeights;
00093       }
00094       const fmatvec::VecV& getInterpolationWeights() const {
00095         return iWeights;
00096       }
00097       Frame& getFrameOfReference() {
00098         return cosy;
00099       }
00100       const Frame& getFrameOfReference() const {
00101         return cosy;
00102       }
00103       /***************************************************/
00104 
00105     private:
00109       ContourParameterType type;
00110 
00114       int ID;
00115 
00119       fmatvec::Vec2 alpha;
00120 
00124       fmatvec::Vec2 alphap;
00125 
00129       fmatvec::VecV iWeights;
00130 
00136       std::vector<Point*> iPoints;
00137 
00141       Frame cosy;
00142   };
00143 
00144 }
00145 
00146 #endif /* _CONTOUR_PDATA_H_ */
00147