MBSim

Project Page
discretization_interface.h
1 /* Copyright (C) 2004-2009 MBSim Development Team
2  *
3  * This library is free software; you can redistribute it and/or
4  * modify it under the terms of the GNU Lesser General Public
5  * License as published by the Free Software Foundation; either
6  * version 2.1 of the License, or (at your option) any later version.
7  *
8  * This library is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11  * Lesser General Public License for more details.
12  *
13  * You should have received a copy of the GNU Lesser General Public
14  * License along with this library; if not, write to the Free Software
15  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16  *
17  * Contact: thschindler@users.berlios.de
18  * rzander@users.berlios.de
19  */
20 
21 #ifndef _DISCRETIZATION_INTERFACE_H_
22 #define _DISCRETIZATION_INTERFACE_H_
23 
24 #include <fmatvec.h>
25 
26 namespace MBSim {
27 
28  class ContourPointData;
29 
40  public:
45 
50 
54  virtual const fmatvec::SymMat& getM() const = 0;
55 
59  virtual const fmatvec::Vec& geth() const = 0;
60 
64  virtual const fmatvec::SqrMat& getdhdq() const = 0;
65 
69  virtual const fmatvec::SqrMat& getdhdu() const = 0;
70 
74  virtual int getqSize() const = 0;
75 
79  virtual int getuSize() const = 0;
80 
85  virtual void computeM(const fmatvec::Vec& q) = 0;
86 
92  virtual void computeh(const fmatvec::Vec& q,const fmatvec::Vec& u) = 0;
93 
99  virtual void computedhdz(const fmatvec::Vec& q,const fmatvec::Vec& u) = 0;
100 
106  virtual double computeKineticEnergy(const fmatvec::Vec& q,const fmatvec::Vec& u) = 0;
107 
112  virtual double computeGravitationalEnergy(const fmatvec::Vec& q) = 0;
113 
118  virtual double computeElasticEnergy(const fmatvec::Vec& q) = 0;
119 
125  virtual fmatvec::Vec computePosition(const fmatvec::Vec& q, const ContourPointData &data) = 0;
126 
132  virtual fmatvec::SqrMat computeOrientation(const fmatvec::Vec& q, const ContourPointData &data) = 0;
133 
140  virtual fmatvec::Vec computeVelocity(const fmatvec::Vec& q, const fmatvec::Vec& u, const ContourPointData &data) = 0;
141 
148  virtual fmatvec::Vec computeAngularVelocity(const fmatvec::Vec& q, const fmatvec::Vec& u, const ContourPointData &data) = 0;
149 
155  virtual fmatvec::Mat computeJacobianOfMotion(const fmatvec::Vec& q,const ContourPointData &data) = 0;
156  };
157 
158 }
159 
160 #endif /* _DISCRETIZATION_INTERFACE_H_ */
161