mbsimflexiblebody  4.0.0
finite_element_linear_external_lumped_node.h
00001 /* Copyright (C) 2004-2013 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: thorsten.schindler@mytum.de
00018  *          rzander@users.berlios.de
00019  */
00020 
00021 #ifndef _FINITE_ELEMENT_LINEAR_EXTERNAL_LUMPED_NODE_H_
00022 #define _FINITE_ELEMENT_LINEAR_EXTERNAL_LUMPED_NODE_H_
00023 
00024 #include <fmatvec/fmatvec.h>
00025 #include "mbsim/mbsim_event.h"
00026 #include <mbsim/discretization_interface.h>
00027 
00028 namespace MBSimFlexibleBody {
00029 
00030   class FiniteElementLinearExternalLumpedNode : public MBSim::DiscretizationInterface {
00031 
00032     public:
00036       FiniteElementLinearExternalLumpedNode(double& mij_, fmatvec::Vec3& u0_, const fmatvec::Mat3xV& phi_);
00037 
00041       virtual ~FiniteElementLinearExternalLumpedNode();
00042 
00043       /* INTERFACE OF DISCRETIZATIONINTERFACE */
00044       virtual const fmatvec::SymMat& getM() const;
00045       virtual const fmatvec::Vec& geth() const;
00046       virtual const fmatvec::SqrMat& getdhdq() const;
00047       virtual const fmatvec::SqrMat& getdhdu() const;
00048       virtual int getqSize() const;
00049       virtual int getuSize() const;
00050       virtual void computeM(const fmatvec::Vec& qG);
00051       virtual void computeh(const fmatvec::Vec& qG, const fmatvec::Vec& qGt);
00052       virtual void computedhdz(const fmatvec::Vec& qG, const fmatvec::Vec& qGt);
00053       virtual double computeKineticEnergy(const fmatvec::Vec& qG, const fmatvec::Vec& qGt);
00054       virtual double computeGravitationalEnergy(const fmatvec::Vec& qG);
00055       virtual double computeElasticEnergy(const fmatvec::Vec& qG);
00056       virtual fmatvec::Vec computePosition(const fmatvec::Vec& q, const MBSim::ContourPointData &data);
00057       virtual fmatvec::SqrMat computeOrientation(const fmatvec::Vec& q, const MBSim::ContourPointData &data);
00058       virtual fmatvec::Vec computeVelocity(const fmatvec::Vec& q, const fmatvec::Vec& u, const MBSim::ContourPointData &data);
00059       virtual fmatvec::Vec computeAngularVelocity(const fmatvec::Vec& q, const fmatvec::Vec& u, const MBSim::ContourPointData &data);
00060       virtual fmatvec::Mat computeJacobianOfMotion(const fmatvec::Vec& qG, const MBSim::ContourPointData& data);
00061       /***************************************************/
00062 
00063       const double getMij() const;
00064 //      fmatvec::Vec getU();
00065       const fmatvec::Vec3& getU0() const;
00066       const fmatvec::Mat3xV& getModeShape() const;
00067 
00068     private:
00072       const double mij;
00076       const fmatvec::Vec3 u0;
00080       fmatvec::Mat3xV phi;
00081   };
00082 
00083   inline const fmatvec::SymMat& FiniteElementLinearExternalLumpedNode::getM() const { throw MBSim::MBSimError("(FiniteElementLinearExternalLumpedNode::getM): Not implemented");  }
00084   inline const fmatvec::Vec& FiniteElementLinearExternalLumpedNode::geth() const { throw MBSim::MBSimError("(FiniteElementLinearExternalLumpedNode::geth): Not implemented");}
00085   inline const fmatvec::SqrMat& FiniteElementLinearExternalLumpedNode::getdhdq() const { throw MBSim::MBSimError("(FiniteElementLinearExternalLumpedNode::getdhdq): Not implemented");}
00086   inline const fmatvec::SqrMat& FiniteElementLinearExternalLumpedNode::getdhdu() const {throw MBSim::MBSimError("(FiniteElementLinearExternalLumpedNode::getdhdu): Not implemented");}
00087   inline int FiniteElementLinearExternalLumpedNode::getqSize() const { throw MBSim::MBSimError("(FiniteElementLinearExternalLumpedNode::getqSize): Not implemented"); }
00088   inline int FiniteElementLinearExternalLumpedNode::getuSize() const { throw MBSim::MBSimError("(FiniteElementLinearExternalLumpedNode::getuSize): Not implemented");}
00089   inline void  FiniteElementLinearExternalLumpedNode::computeM(const fmatvec::Vec& qG) { throw MBSim::MBSimError("(FiniteElementLinearExternalLumpedNode::computeM): Not implemented"); }
00090   inline void  FiniteElementLinearExternalLumpedNode::computeh(const fmatvec::Vec& qG, const fmatvec::Vec& qGt) { throw MBSim::MBSimError("(FiniteElementLinearExternalLumpedNode::computeh): Not implemented"); }
00091   inline void  FiniteElementLinearExternalLumpedNode::computedhdz(const fmatvec::Vec& qG, const fmatvec::Vec& qGt) { throw MBSim::MBSimError("(FiniteElementLinearExternalLumpedNode::computedhdz): Not implemented"); }
00092   inline double FiniteElementLinearExternalLumpedNode::computeKineticEnergy(const fmatvec::Vec& qG, const fmatvec::Vec& qGt) { throw MBSim::MBSimError("(FiniteElementLinearExternalLumpedNode::computeKineticEnergy): Not implemented"); }
00093   inline double FiniteElementLinearExternalLumpedNode::computeGravitationalEnergy(const fmatvec::Vec& qG) { throw MBSim::MBSimError("(FiniteElementLinearExternalLumpedNode::computeGravitationalEnergy): Not implemented"); }
00094   inline double FiniteElementLinearExternalLumpedNode::computeElasticEnergy(const fmatvec::Vec& qG) { throw MBSim::MBSimError("(FiniteElementLinearExternalLumpedNode::computeElasticEnergy): Not implemented"); }
00095   inline fmatvec::Vec FiniteElementLinearExternalLumpedNode::computePosition(const fmatvec::Vec& q, const MBSim::ContourPointData &data) { throw MBSim::MBSimError("(FiniteElementLinearExternalLumpedNode::computePosition): Not implemented!"); }
00096   inline fmatvec::SqrMat FiniteElementLinearExternalLumpedNode::computeOrientation(const fmatvec::Vec& q, const MBSim::ContourPointData &data) { throw MBSim::MBSimError("(FiniteElementLinearExternalLumpedNode::computeOrientation): Not implemented!"); }
00097   inline fmatvec::Vec FiniteElementLinearExternalLumpedNode::computeVelocity(const fmatvec::Vec& q, const fmatvec::Vec& u, const MBSim::ContourPointData &data) { throw MBSim::MBSimError("(FiniteElementLinearExternalLumpedNode::computeVelocity): Not implemented!"); }
00098   inline fmatvec::Vec FiniteElementLinearExternalLumpedNode::computeAngularVelocity(const fmatvec::Vec& q, const fmatvec::Vec& u, const MBSim::ContourPointData &data) { throw MBSim::MBSimError("(FiniteElementLinearExternalLumpedNode::computeAngularVelocity): Not implemented!"); }
00099   inline fmatvec::Mat FiniteElementLinearExternalLumpedNode::computeJacobianOfMotion(const fmatvec::Vec& qG,const MBSim::ContourPointData& data) { throw MBSim::MBSimError("(FiniteElementLinearExternalLumpedNode::computeJacobianOfMotion): Not implemented"); }
00100 
00101 
00102   inline const double FiniteElementLinearExternalLumpedNode::getMij() const {return mij;}
00103   inline const fmatvec::Vec3& FiniteElementLinearExternalLumpedNode::getU0() const {return u0;}
00104   inline const fmatvec::Mat3xV& FiniteElementLinearExternalLumpedNode::getModeShape() const {return phi;}
00105 
00106 }
00107 
00108 #endif