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 
00030   enum ContourParameterType { NODE, STAGGEREDNODE, CONTINUUM, EXTINTERPOL };
00031 
00040   class ContourPointData {
00041     public:
00045       ContourPointData() : type(CONTINUUM), ID(0) {}
00046       ContourPointData(const double       &alpha_) : type(CONTINUUM), ID(0), alpha(1,fmatvec::INIT,alpha_) {}
00047       ContourPointData(const fmatvec::VecV &alpha_) : type(CONTINUUM), ID(0), alpha(alpha_) {}
00048       ContourPointData(const int  &id_, const ContourParameterType type_ = NODE) : type(type_), ID(id_) {}
00049 
00053       virtual ~ContourPointData() {}
00054 
00055       /* GETTER / SETTER */
00056       ContourParameterType& getContourParameterType() { return type; }
00057       const ContourParameterType& getContourParameterType() const { return type; }
00058       int& getNodeNumber() { return ID; }
00059       const int& getNodeNumber() const { return ID; }
00060       fmatvec::VecV& getLagrangeParameterPosition() { return alpha; }
00061       const fmatvec::VecV& getLagrangeParameterPosition() const { return alpha; }
00062       fmatvec::VecV& getLagrangeParameterVelocity() { return alphap; }
00063       const fmatvec::VecV& getLagrangeParameterVelocity() const { return alphap; }
00064       fmatvec::VecV& getInterpolationWeights() { return iWeights; }
00065       const fmatvec::VecV& getInterpolationWeights() const { return iWeights; }
00066       Frame& getFrameOfReference() { return cosy; }
00067       const Frame& getFrameOfReference() const { return cosy; }
00068       /***************************************************/
00069 
00070     private:
00074       ContourParameterType type;
00075 
00079       int ID;
00080 
00084       fmatvec::VecV alpha;
00085 
00089       fmatvec::VecV alphap;
00090 
00094       fmatvec::VecV iWeights;
00095 
00101       std::vector<Point*> iPoints;
00102 
00106       Frame cosy;
00107   };
00108 
00109 }
00110 
00111 #endif /* _CONTOUR_PDATA_H_ */
00112