1 #ifndef SimTK_SIMBODY_COMPLIANT_CONTACT_SUBSYSTEM_H_     2 #define SimTK_SIMBODY_COMPLIANT_CONTACT_SUBSYSTEM_H_    35 class MultibodySystem;
    36 class SimbodyMatterSubsystem;
    37 class ContactTrackerSubsystem;
    38 class ContactForceGenerator;
    67 Real getTransitionVelocity() 
const;
    69 void setTransitionVelocity(
Real vt);
    71 Real getOOTransitionVelocity() 
const;
    81 void setTrackDissipatedEnergy(
bool shouldTrack);
    86 bool getTrackDissipatedEnergy() 
const;
    92 int getNumContactForces(
const State& state) 
const;
   136 bool calcContactPatchDetailsById(
const State&   state,
   170 Real getDissipatedEnergy(
const State& state) 
const;
   192 void setDissipatedEnergy(
State& state, 
Real energy) 
const;
   214 bool hasDefaultForceGenerator() 
const;
   244 class CompliantContactSubsystemImpl& updImpl();
   245 const CompliantContactSubsystemImpl& getImpl() 
const;
   312              Real potentialEnergy, 
Real powerLoss)
   313 :   m_contactId(id), m_contactPt(contactPt), 
   314     m_forceOnSurface2(forceOnSurface2),
   315     m_potentialEnergy(potentialEnergy), m_powerLoss(powerLoss) {}
   342            Real potentialEnergy, 
Real powerLoss)
   344     m_contactPt         = contactPt;
   345     m_forceOnSurface2   = forceOnSurface2;
   346     m_potentialEnergy   = potentialEnergy;
   347     m_powerLoss         = powerLoss; }
   356 {   m_forceOnSurface2=forceOnSurface2; }
   359 {   m_potentialEnergy=potentialEnergy; }
   365 void clear() {m_contactId.invalidate();}
   367 bool isValid()
 const {
return m_contactId.isValid();}
   374     m_contactPt         = X_BA*m_contactPt;        
   375     m_forceOnSurface2   = X_BA.
R()*m_forceOnSurface2;      
   382 Real            m_potentialEnergy;      
   388     o << 
"ContactForce for ContactId " << f.
getContactId() << 
" (ground frame):\n";
   512     m_contactPt       = X_BA*m_contactPt;       
   513     m_patchNormal     = R_BA*m_patchNormal;     
   514     m_slipVelocity    = R_BA*m_slipVelocity;    
   515     m_forceOnSurface2 = R_BA*m_forceOnSurface2; 
   523     m_contactPt       = X_BA*m_contactPt;       
   524     m_patchNormal     = R_BA*(-m_patchNormal);  
   525     m_slipVelocity    = R_BA*(-m_slipVelocity); 
   526     m_forceOnSurface2 = R_BA*(-m_forceOnSurface2); 
   543     o << 
"ContactDetail (ground frame):\n";
   583 void clear() {m_resultant.clear(); m_elements.clear();}
   584 bool isValid()
 const {
return m_resultant.isValid();}
   593     m_resultant.changeFrameInPlace(X_BA);
   594     for (
unsigned i=0; i<m_elements.size(); ++i)
   595         m_elements[i].changeFrameInPlace(X_BA);
   639 {   assert(m_compliantContactSubsys); 
return *m_compliantContactSubsys; }
   641 {   m_compliantContactSubsys = sub; }
   656 virtual void calcContactForce
   668 virtual void calcContactPatch
   703 void calcContactForce
   709 void calcContactPatch
   733 void calcContactForce
   739 void calcContactPatch
   761 void calcContactForce
   767 void calcContactPatch
   788 void calcContactForce
   794 void calcContactPatch
   801 void calcContactForceAndDetails
   808 void calcWeightedPatchCentroid
   810     const std::set<int>&                    insideFaces,
   811     Vec3&                                   weightedPatchCentroid,
   812     Real&                                   patchArea) 
const;
   817     const std::set<int>&                    insideFaces,
   821     Real                                    meshDeformationFraction, 
   822     Real                                    areaScaleFactor, 
   824     const Vec3&                 resultantPt_M, 
   826     Real&                       potentialEnergy,
   828     Vec3&                       weightedCenterOfPressure_M, 
   829     Real&                       sumOfAllPressureMoments,    
   848 void calcContactForce
   854         "ContactForceGenerator::DoNothing::calcContactForce() not implemented yet."); }
   855 void calcContactPatch
   861         "ContactForceGenerator::DoNothing::calcContactPatch() not implemented yet."); }
   879 void calcContactForce
   885         "ContactForceGenerator::ThrowError::calcContactForce() not implemented yet."); }
   886 void calcContactPatch
   892         "ContactForceGenerator::ThrowError::calcContactPatch() not implemented yet."); }
   897 #endif // SimTK_SIMBODY_COMPLIANT_CONTACT_SUBSYSTEM_H_ 
#define SimTK_PIMPL_DOWNCAST(Derived, Parent)
Similar to the above but for private implementation abstract classes, that is, abstract class hierarc...
Definition: SimTKcommon/include/SimTKcommon/internal/common.h:593
 
This is the top-level SimTK namespace into which all SimTK names are placed to avoid collision with o...
Definition: Assembler.h:37
 
#define SimTK_ASSERT_ALWAYS(cond, msg)
Definition: ExceptionMacros.h:349
 
Every Simbody header and source file should include this header before any other Simbody header...
 
SimTK_Real Real
This is the default compiled-in floating point type for SimTK, either float or double. 
Definition: SimTKcommon/include/SimTKcommon/internal/common.h:606
 
This object is intended to contain all state information for a SimTK::System, except topological info...
Definition: State.h:280
 
The Array_<T> container class is a plug-compatible replacement for the C++ standard template library ...
Definition: Array.h:53
 
The job of the MultibodySystem class is to coordinate the activities of various subsystems which can ...
Definition: MultibodySystem.h:48
 
This is logically an abstract class, more specialized than "Subsystem" but not yet concrete...
Definition: ForceSubsystem.h:36
 
std::ostream & operator<<(std::ostream &o, const ContactForce &f)
Definition: CompliantContactSubsystem.h:387
 
#define SimTK_SIMBODY_EXPORT
Definition: Simbody/include/simbody/internal/common.h:68