mbsimflexiblebody 4.0.0 MBSim Flexible Body Module

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: martin.o.foerg@googlemail.com
18 */
19
20 #ifndef _DISCRETIZATION_INTERFACE_H_
21 #define _DISCRETIZATION_INTERFACE_H_
22
23 #include <fmatvec/fmatvec.h>
24
25 namespace MBSimFlexibleBody {
26
36 class DiscretizationInterface {
37 public:
41 DiscretizationInterface() = default;
42
46 virtual ~DiscretizationInterface() = default;
47
51 virtual const fmatvec::SymMat& getM() const = 0;
52
56 virtual const fmatvec::Vec& geth() const = 0;
57
61 virtual const fmatvec::SqrMat& getdhdq() const = 0;
62
66 virtual const fmatvec::SqrMat& getdhdu() const = 0;
67
71 virtual int getqSize() const = 0;
72
76 virtual int getuSize() const = 0;
77
82 virtual void computeM(const fmatvec::Vec& q) = 0;
83
89 virtual void computeh(const fmatvec::Vec& q,const fmatvec::Vec& u) = 0;
90
96 virtual void computedhdz(const fmatvec::Vec& q,const fmatvec::Vec& u) = 0;
97
103 virtual double computeKineticEnergy(const fmatvec::Vec& q,const fmatvec::Vec& u) = 0;
104
109 virtual double computeGravitationalEnergy(const fmatvec::Vec& q) = 0;
110
115 virtual double computeElasticEnergy(const fmatvec::Vec& q) = 0;
116
117 // /*!
118 // * \brief compute position of contour in physical representation
119 // * \param generalised positions
120 // * \param contour location
121 // */
122 // virtual fmatvec::Vec computePosition(const fmatvec::Vec& q, const fmatvec::Vec2 &zeta) = 0;
123 //
124 // /*!
125 // * \brief compute orientation of contour in physical representation
126 // * \param generalised coordiantes
127 // * \param contour location
128 // */
129 // virtual fmatvec::SqrMat computeOrientation(const fmatvec::Vec& q, const fmatvec::Vec2 &zeta) = 0;
130 //
131 // /*!
132 // * \brief compute translational velocity of contour in physical representation
133 // * \param generalised positions
134 // * \param generalised velocities
135 // * \param contour location
136 // */
137 // virtual fmatvec::Vec computeVelocity(const fmatvec::Vec& q, const fmatvec::Vec& u, const fmatvec::Vec2 &zeta) = 0;
138 //
139 // /*!
140 // * \brief compute angular velocity of contour in physical representation
141 // * \param generalised positions
142 // * \param generalised velocities
143 // * \param contour location
144 // */
145 // virtual fmatvec::Vec computeAngularVelocity(const fmatvec::Vec& q, const fmatvec::Vec& u, const fmatvec::Vec2 &zeta) = 0;
146 //
147 // /*!
148 // * \brief compute Jacobian of minimal representation regarding physical representation
149 // * \param generalised positions
150 // * \param contour location
151 // */
152 // virtual fmatvec::Mat computeJacobianOfMotion(const fmatvec::Vec& q, const fmatvec::Vec2 &zeta) = 0;
153 };
154
155 }
156
157 #endif /* _DISCRETIZATION_INTERFACE_H_ */
158
MBSimFlexibleBody::DiscretizationInterface::computeElasticEnergy
virtual double computeElasticEnergy(const fmatvec::Vec &q)=0
compute elastic energy
MBSimFlexibleBody::DiscretizationInterface::getqSize
virtual int getqSize() const =0
MBSimFlexibleBody::DiscretizationInterface::geth
virtual const fmatvec::Vec & geth() const =0
MBSimFlexibleBody::DiscretizationInterface::DiscretizationInterface
DiscretizationInterface()=default
constructor
MBSimFlexibleBody::DiscretizationInterface::~DiscretizationInterface
virtual ~DiscretizationInterface()=default
destructor
MBSimFlexibleBody::DiscretizationInterface::computeGravitationalEnergy
virtual double computeGravitationalEnergy(const fmatvec::Vec &q)=0
compute gravitational energy
MBSimFlexibleBody::DiscretizationInterface::computeKineticEnergy
virtual double computeKineticEnergy(const fmatvec::Vec &q, const fmatvec::Vec &u)=0
compute kinetic energy
MBSimFlexibleBody::DiscretizationInterface::getdhdq
virtual const fmatvec::SqrMat & getdhdq() const =0
MBSimFlexibleBody::DiscretizationInterface::computedhdz
virtual void computedhdz(const fmatvec::Vec &q, const fmatvec::Vec &u)=0
compute Jacobian for implicit integration
MBSimFlexibleBody::DiscretizationInterface::computeM
virtual void computeM(const fmatvec::Vec &q)=0
compute mass matrix
MBSimFlexibleBody::DiscretizationInterface::getuSize
virtual int getuSize() const =0
MBSimFlexibleBody::DiscretizationInterface::getdhdu
virtual const fmatvec::SqrMat & getdhdu() const =0
MBSimFlexibleBody::DiscretizationInterface::computeh
virtual void computeh(const fmatvec::Vec &q, const fmatvec::Vec &u)=0
compute smooth right hand side
MBSimFlexibleBody::DiscretizationInterface
discretization interface for flexible systems
Definition: discretization_interface.h:36
MBSimFlexibleBody::DiscretizationInterface::getM
virtual const fmatvec::SymMat & getM() const =0