Force_LinearBushing.h

Go to the documentation of this file.
00001 #ifndef SimTK_SIMBODY_FORCE_LINEAR_BUSHING_H_
00002 #define SimTK_SIMBODY_FORCE_LINEAR_BUSHING_H_
00003 /* -------------------------------------------------------------------------- *
00004  *                      SimTK Core: SimTK Simbody(tm)                         *
00005  * -------------------------------------------------------------------------- *
00006  * This is part of the SimTK Core biosimulation toolkit originating from      *
00007  * Simbios, the NIH National Center for Physics-Based Simulation of           *
00008  * Biological Structures at Stanford, funded under the NIH Roadmap for        *
00009  * Medical Research, grant U54 GM072970. See https://simtk.org.               *
00010  *                                                                            *
00011  * Portions copyright (c) 2009 Stanford University and the Authors.           *
00012  * Authors: Michael Sherman                                                   *
00013  * Contributors:                                                              *
00014  *                                                                            *
00015  * Permission is hereby granted, free of charge, to any person obtaining a    *
00016  * copy of this software and associated documentation files (the "Software"), *
00017  * to deal in the Software without restriction, including without limitation  *
00018  * the rights to use, copy, modify, merge, publish, distribute, sublicense,   *
00019  * and/or sell copies of the Software, and to permit persons to whom the      *
00020  * Software is furnished to do so, subject to the following conditions:       *
00021  *                                                                            *
00022  * The above copyright notice and this permission notice shall be included in *
00023  * all copies or substantial portions of the Software.                        *
00024  *                                                                            *
00025  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR *
00026  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,   *
00027  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL    *
00028  * THE AUTHORS, CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,    *
00029  * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR      *
00030  * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE  *
00031  * USE OR OTHER DEALINGS IN THE SOFTWARE.                                     *
00032  * -------------------------------------------------------------------------- */
00033 
00034 #include "SimTKcommon.h"
00035 #include "simbody/internal/Force.h"
00036 
00043 namespace SimTK {
00108 class SimTK_SIMBODY_EXPORT Force::LinearBushing : public Force {
00109 public:
00131     LinearBushing(GeneralForceSubsystem& forces, 
00132                   const MobilizedBody& body1, const Transform& frameFOnB1, 
00133                   const MobilizedBody& body2, const Transform& frameMOnB2, 
00134                   const Vec6& stiffness, const Vec6& damping);
00135 
00153     LinearBushing(GeneralForceSubsystem& forces, 
00154                   const MobilizedBody& body1, 
00155                   const MobilizedBody& body2, 
00156                   const Vec6& stiffness, const Vec6& damping);
00157 
00158 
00159 
00160     //--------------------------------------------------------------------------
00174 
00175 
00176 
00177 
00178 
00179 
00180 
00181 
00182 
00183 
00184     LinearBushing& setDefaultFrameOnBody1(const Transform& X_B1F);
00194     LinearBushing& setDefaultFrameOnBody2(const Transform& X_B2M);
00203     LinearBushing& setDefaultStiffness(const Vec6& stiffness);
00212     LinearBushing& setDefaultDamping(const Vec6& damping);
00213 
00220     const Transform& getDefaultFrameOnBody1() const;
00227     const Transform& getDefaultFrameOnBody2() const;
00232     const Vec6& getDefaultStiffness() const;
00238     const Vec6& getDefaultDamping()   const;
00240 
00241 
00242 
00243     //--------------------------------------------------------------------------
00260 
00261 
00262 
00263 
00264 
00265 
00266 
00267 
00268 
00269 
00270 
00271 
00272 
00273     const LinearBushing& setFrameOnBody1(State&             state, 
00274                                          const Transform&   X_B1F) const;
00287     const LinearBushing& setFrameOnBody2(State&             state, 
00288                                          const Transform&   X_B2M) const;
00300     const LinearBushing& setStiffness(State&        state, 
00301                                       const Vec6&   stiffness) const;
00313     const LinearBushing& setDamping(State&      state, 
00314                                     const Vec6& damping) const;
00315 
00325     const Transform& getFrameOnBody1(const State& state) const;
00335     const Transform& getFrameOnBody2(const State& state) const;
00345     const Vec6& getStiffness(const State& state) const;
00355     const Vec6& getDamping(const State& state)   const;
00357 
00358 
00359 
00360     //--------------------------------------------------------------------------
00371 
00372 
00373 
00374 
00375 
00376 
00377 
00378 
00379 
00380 
00381 
00382 
00383 
00384     const Vec6& getQ(const State& state) const;
00385 
00393     const Transform& getX_GF(const State& state) const;
00394 
00402     const Transform& getX_GM(const State& state) const;
00403 
00411     const Transform& getX_FM(const State& state) const;
00413 
00414 
00415 
00416     //--------------------------------------------------------------------------
00427 
00428 
00429 
00430 
00431 
00432 
00433 
00434 
00435 
00436 
00437 
00438 
00439 
00440     const Vec6& getQDot(const State& state) const;
00441 
00453     const SpatialVec& getV_GF(const State& state) const;
00454 
00466     const SpatialVec& getV_GM(const State& state) const;
00467 
00480     const SpatialVec& getV_FM(const State& state) const;
00482 
00483 
00484 
00485     //--------------------------------------------------------------------------
00496 
00497 
00498 
00499 
00500 
00501 
00502 
00503 
00504 
00505 
00506 
00507 
00508 
00509 
00510     const Vec6& getF(const State& state) const;
00511 
00521     const SpatialVec& getF_GM(const State& state) const;
00522 
00533     const SpatialVec& getF_GF(const State& state) const;
00535 
00536 
00537 
00538     //--------------------------------------------------------------------------
00544 
00545 
00546 
00547 
00548 
00549 
00550 
00551 
00552 
00553     Real getPotentialEnergy(const State& state) const;
00554 
00565     Real getPowerDissipation(const State& state) const;
00566 
00580     Real getDissipatedEnergy(const State& state) const;
00581 
00594     void setDissipatedEnergy(State& state, Real energy) const;
00596 
00597     // Don't show this in Doxygen.
00599     SimTK_INSERT_DERIVED_HANDLE_DECLARATIONS
00600        (LinearBushing, LinearBushingImpl, Force);
00602 };
00603 
00604 } // namespace SimTK
00605 
00606 #endif // SimTK_SIMBODY_FORCE_LINEAR_BUSHING_H_

Generated on Thu Aug 12 16:37:06 2010 for SimTKcore by  doxygen 1.6.1