Simbody
3.4 (development)
|
00001 #ifndef SimTK_SIMBODY_FORCE_MOBILITY_LINEAR_STOP_H_ 00002 #define SimTK_SIMBODY_FORCE_MOBILITY_LINEAR_STOP_H_ 00003 00004 /* -------------------------------------------------------------------------- * 00005 * Simbody(tm) * 00006 * -------------------------------------------------------------------------- * 00007 * This is part of the SimTK biosimulation toolkit originating from * 00008 * Simbios, the NIH National Center for Physics-Based Simulation of * 00009 * Biological Structures at Stanford, funded under the NIH Roadmap for * 00010 * Medical Research, grant U54 GM072970. See https://simtk.org/home/simbody. * 00011 * * 00012 * Portions copyright (c) 2013 Stanford University and the Authors. * 00013 * Authors: Michael Sherman * 00014 * Contributors: * 00015 * * 00016 * Licensed under the Apache License, Version 2.0 (the "License"); you may * 00017 * not use this file except in compliance with the License. You may obtain a * 00018 * copy of the License at http://www.apache.org/licenses/LICENSE-2.0. * 00019 * * 00020 * Unless required by applicable law or agreed to in writing, software * 00021 * distributed under the License is distributed on an "AS IS" BASIS, * 00022 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * 00023 * See the License for the specific language governing permissions and * 00024 * limitations under the License. * 00025 * -------------------------------------------------------------------------- */ 00026 00027 #include "SimTKcommon.h" 00028 #include "simbody/internal/Force.h" 00029 00035 namespace SimTK { 00036 00065 class SimTK_SIMBODY_EXPORT Force::MobilityLinearStop : public Force { 00066 public: 00089 MobilityLinearStop(GeneralForceSubsystem& forces, 00090 const MobilizedBody& mobod, 00091 MobilizerQIndex whichQ, 00092 Real defaultStiffness, 00093 Real defaultDissipation, 00094 Real defaultQLow =-Infinity, 00095 Real defaultQHigh= Infinity); 00096 00099 MobilityLinearStop() {} 00100 00117 MobilityLinearStop& setDefaultBounds(Real defaultQLow, Real defaultQHigh); 00118 00119 00134 MobilityLinearStop& setDefaultMaterialProperties 00135 (Real defaultStiffness, Real defaultDissipation); 00136 00140 Real getDefaultLowerBound() const; 00141 00145 Real getDefaultUpperBound() const; 00146 00150 Real getDefaultStiffness() const; 00151 00155 Real getDefaultDissipation() const; 00156 00172 void setBounds(State& state, Real qLow, Real qHigh) const; 00173 00187 void setMaterialProperties 00188 (State& state, Real stiffness, Real dissipation) const; 00189 00194 Real getLowerBound(const State& state) const; 00195 00200 Real getUpperBound(const State& state) const; 00201 00206 Real getStiffness(const State& state) const; 00207 00212 Real getDissipation(const State& state) const; 00213 00215 SimTK_INSERT_DERIVED_HANDLE_DECLARATIONS(MobilityLinearStop, 00216 MobilityLinearStopImpl, Force); 00218 }; 00219 00220 00221 00222 } // namespace SimTK 00223 00224 #endif // SimTK_SIMBODY_FORCE_MOBILITY_LINEAR_STOP_H_