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 };
00042 
00046       ContourPointData() : type(continuum), ID(0) {}
00047       ContourPointData(const double       &alpha_) : type(continuum), ID(0), alpha() {
00048         alpha(0) = alpha_;
00049       }
00050       ContourPointData(const fmatvec::Vec2 &alpha_) : type(continuum), ID(0), alpha(alpha_) {}
00051       ContourPointData(const int  &id_, const ContourParameterType type_ = node) : type(type_), ID(id_) {}
00052 
00056       virtual ~ContourPointData() {}
00057 
00058       /* GETTER / SETTER */
00059       ContourParameterType& getContourParameterType() { return type; }
00060       const ContourParameterType& getContourParameterType() const { return type; }
00061       int& getNodeNumber() { return ID; }
00062       const int& getNodeNumber() const { return ID; }
00063       fmatvec::Vec2& getLagrangeParameterPosition() { return alpha; }
00064       const fmatvec::Vec2& getLagrangeParameterPosition() const { return alpha; }
00065       fmatvec::Vec2& getLagrangeParameterVelocity() { return alphap; }
00066       const fmatvec::Vec2& getLagrangeParameterVelocity() const { return alphap; }
00067       fmatvec::VecV& getInterpolationWeights() { return iWeights; }
00068       const fmatvec::VecV& getInterpolationWeights() const { return iWeights; }
00069       Frame& getFrameOfReference() { return cosy; }
00070       const Frame& getFrameOfReference() const { return cosy; }
00071       /***************************************************/
00072 
00073     protected:
00077       ContourParameterType type;
00078 
00082       int ID;
00083 
00087       fmatvec::Vec2 alpha;
00088 
00092       fmatvec::Vec2 alphap;
00093 
00097       fmatvec::VecV iWeights;
00098 
00104       std::vector<Point*> iPoints;
00105 
00109       Frame cosy;
00110   };
00111 
00112 }
00113 
00114 #endif /* _CONTOUR_PDATA_H_ */
00115