#define AGXPHYSICS_EXPORT
Class containing and handling a global view of several objects interacting trough strong added mass i...
agx::AddedMassInteraction * getOrCreateInteraction(agx::RigidBody *rb1, agx::RigidBody *rb2)
Creates and added mass interaction given two bodies.
AddedMassInteractionHandler()
Default constructor.
SymmetricRigidBodyPtrPair createKey(agx::RigidBody *rb1, agx::RigidBody *rb2) const
Create key for two body interaction.
agx::AddedMassInteraction * getOrCreateInteraction(agx::RigidBody *rb)
Creates an added mass interaction given a single body.
agx::SymmetricPair< agx::RigidBody * > SymmetricRigidBodyPtrPair
virtual void postSystemCallback(agx::DynamicsSystem *dynamicsSystem) override
After solve, remove interactions.
agx::HashVector< SymmetricRigidBodyPtrPair, agx::AddedMassInteractionRef > RbRbAddedMassInteractionContainer
agx::Bool setBlock(agx::RigidBody *rb1, agx::RigidBody *rb2, const agx::AddedMassInteraction::Matrix6x6 &matrix)
Assign off diagonal matrix block matrix, defining an interaction between rb1 and rb2,...
void removeInteraction(agx::RigidBody *rb1, agx::RigidBody *rb2)
Removes a two body added mass interaction.
virtual ~AddedMassInteractionHandler()
Reference counted object, protected destructor.
void removeInteraction(agx::RigidBody *rb)
Removes a single body added mass interaction.
virtual void preSystemCallback(agx::DynamicsSystem *dynamicsSystem) override
Before solve, expand collected interactions for the solver.
void garbageCollect()
Removes garbage (interactions containing deleted and/or removed bodies) from the simulation.
agx::Bool setBlock(agx::RigidBody *rb, const agx::AddedMassInteraction::Matrix6x6 &matrix)
Assign diagonal block matrix for rb.
agx::HashVector< agx::RigidBody *, agx::AddedMassInteractionRef > RbAddedMassInteractionContainer
agx::AddedMassInteractionRef createInteraction(agx::RigidBody *rb1, agx::RigidBody *rb2=nullptr) const
Create a default added mass interaction given one or two rigid bodies.
6x6 matrix class with blockwise interface to get or set 3x3 matrices: [ M(0, 0) M(0,...
Interface to write added mass matrices for one or two rigid bodies.
The complete physical system with bodies, interactions, data layout, time stepper,...
The base class for interactions.
The rigid body class, combining a geometric model and a frame of reference.
A std::pair, with both elements of the same type, and symmetric so (a, b) == (b, a)
Smart pointer for handling referenced counted objects.
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
ref_ptr< AddedMassInteractionHandler > AddedMassInteractionHandlerRef