MBSim

Project Page
discretization_interface.h
00001 /* Copyright (C) 2004-2009 MBSim Development Team
00002  *
00003  * This library is free software; you can redistribute it and/or 
00004  * modify it under the terms of the GNU Lesser General Public 
00005  * License as published by the Free Software Foundation; either 
00006  * version 2.1 of the License, or (at your option) any later version. 
00007  *  
00008  * This library is distributed in the hope that it will be useful, 
00009  * but WITHOUT ANY WARRANTY; without even the implied warranty of 
00010  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
00011  * Lesser General Public License for more details. 
00012  *  
00013  * You should have received a copy of the GNU Lesser General Public 
00014  * License along with this library; if not, write to the Free Software 
00015  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 USA
00016  *
00017  * Contact: thschindler@users.berlios.de
00018  *          rzander@users.berlios.de
00019  */
00020 
00021 #ifndef _DISCRETIZATION_INTERFACE_H_
00022 #define _DISCRETIZATION_INTERFACE_H_
00023 
00024 #include <fmatvec/fmatvec.h>
00025 
00026 namespace MBSim {
00027 
00028   class ContourPointData;
00029 
00039   class DiscretizationInterface {
00040     public:
00044       DiscretizationInterface() {}    
00045 
00049       virtual ~DiscretizationInterface() {}    
00050 
00054       virtual const fmatvec::SymMat& getM() const = 0;    
00055 
00059       virtual const fmatvec::Vec& geth() const = 0;
00060 
00064       virtual const fmatvec::SqrMat& getdhdq() const = 0;    
00065 
00069       virtual const fmatvec::SqrMat& getdhdu() const = 0;
00070 
00074       virtual int getqSize() const = 0;
00075 
00079       virtual int getuSize() const = 0;
00080 
00085       virtual void computeM(const fmatvec::Vec& q) = 0;
00086 
00092       virtual void computeh(const fmatvec::Vec& q,const fmatvec::Vec& u) = 0;
00093 
00099       virtual void computedhdz(const fmatvec::Vec& q,const fmatvec::Vec& u) = 0;
00100 
00106       virtual double computeKineticEnergy(const fmatvec::Vec& q,const fmatvec::Vec& u) = 0;
00107 
00112       virtual double computeGravitationalEnergy(const fmatvec::Vec& q) = 0;    
00113 
00118       virtual double computeElasticEnergy(const fmatvec::Vec& q) = 0;
00119 
00125       virtual fmatvec::Vec computePosition(const fmatvec::Vec& q, const ContourPointData &data) = 0;
00126 
00132       virtual fmatvec::SqrMat computeOrientation(const fmatvec::Vec& q, const ContourPointData &data) = 0;
00133 
00140       virtual fmatvec::Vec computeVelocity(const fmatvec::Vec& q, const fmatvec::Vec& u, const ContourPointData &data) = 0;
00141 
00148       virtual fmatvec::Vec computeAngularVelocity(const fmatvec::Vec& q, const fmatvec::Vec& u, const ContourPointData &data) = 0;
00149 
00155       virtual fmatvec::Mat computeJacobianOfMotion(const fmatvec::Vec& q,const ContourPointData &data) = 0;
00156   };
00157 
00158 }
00159 
00160 #endif /* _DISCRETIZATION_INTERFACE_H_ */
00161