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;
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";
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; }
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,
854 "ContactForceGenerator::DoNothing::calcContactForce() not implemented yet."); }
861 "ContactForceGenerator::DoNothing::calcContactPatch() not implemented yet."); }
885 "ContactForceGenerator::ThrowError::calcContactForce() not implemented yet."); }
892 "ContactForceGenerator::ThrowError::calcContactPatch() not implemented yet."); }
#define SimTK_ASSERT_ALWAYS(cond, msg)
Definition: ExceptionMacros.h:349
#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:594
Every Simbody header and source file should include this header before any other Simbody header.
#define SimTK_SIMBODY_EXPORT
Definition: Simbody/include/simbody/internal/common.h:68
The Array_<T> container class is a plug-compatible replacement for the C++ standard template library ...
Definition: Array.h:1520
This is logically an abstract class, more specialized than "Subsystem" but not yet concrete.
Definition: ForceSubsystem.h:36
The job of the MultibodySystem class is to coordinate the activities of various subsystems which can ...
Definition: MultibodySystem.h:48
This object is intended to contain all state information for a SimTK::System, except topological info...
Definition: State.h:280
This is the top-level SimTK namespace into which all SimTK names are placed to avoid collision with o...
Definition: Assembler.h:37
std::ostream & operator<<(std::ostream &o, const ContactForce &f)
Definition: CompliantContactSubsystem.h:387
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:607