|
mbsimflexiblebody
4.0.0
|
00001 /* Copyright (C) 2004-2011 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 CIRCLESOLID_FLEXIBLEBAND_H_ 00022 #define CIRCLESOLID_FLEXIBLEBAND_H_ 00023 00024 #include "mbsim/contact_kinematics/contact_kinematics.h" 00025 #include "mbsim/mbsim_event.h" 00026 00027 namespace MBSim { 00028 class CircleSolid; 00029 } 00030 00031 namespace MBSimFlexibleBody { 00032 00033 class FlexibleBand; 00034 00040 class ContactKinematicsCircleSolidFlexibleBand : public MBSim::ContactKinematics { 00041 public: 00045 ContactKinematicsCircleSolidFlexibleBand(); 00046 00050 virtual ~ContactKinematicsCircleSolidFlexibleBand(); 00051 00054 void setNumberOfPossibleContactPerNode(int n) {possibleContactsPerNode = n;} 00055 00056 /* INHERITED INTERFACE OF CONTACTKINEAMTICS */ 00057 virtual void assignContours(const std::vector<MBSim::Contour*>& contour); 00058 virtual void updateg(fmatvec::Vec &g, MBSim::ContourPointData *cpData, int index = 0) { throw MBSim::MBSimError("ContactKinematicsCircleSolidFlexibleBand::updateg not implemented!"); } 00059 virtual void updateg(std::vector<MBSim::SingleContact> & contact) { throw MBSim::MBSimError("ContactKinematicsCircleSolidFlexibleBand::updateg not implemented!"); } 00060 virtual void updatewb(fmatvec::Vec &wb, const fmatvec::Vec &g, MBSim::ContourPointData* cpData) { throw MBSim::MBSimError("ContactKinematicsCircleSolidFlexibleBand::updatewb not implemented!"); }; 00061 /***************************************************/ 00062 00063 virtual ContactKinematics* getContactKinematics(int i=0) const { return contactKinematics[i]; } 00064 00065 private: 00069 int icircle, icontour; 00070 00074 int possibleContactsPerNode; 00075 00079 double rCircle; 00080 00084 double hBand; 00085 00089 double wBand; 00090 00094 MBSim::CircleSolid *circle; 00095 FlexibleBand *band; 00096 00097 fmatvec::Vec lastContactPositions; 00098 fmatvec::Vec staticNodes; 00099 double epsTol; 00100 double l0; 00101 00102 std::vector<ContactKinematics*> contactKinematics; 00103 }; 00104 00105 } 00106 00107 #endif /* CIRCLESOLID_FLEXIBLEBAND_H_ */ 00108
1.8.0