AGX Dynamics 2.38.0.2
Loading...
Searching...
No Matches
AddedMassInteractionHandler.h
Go to the documentation of this file.
1/*
2Copyright 2007-2024. Algoryx Simulation AB.
3
4All AGX source code, intellectual property, documentation, sample code,
5tutorials, scene files and technical white papers, are copyrighted, proprietary
6and confidential material of Algoryx Simulation AB. You may not download, read,
7store, distribute, publish, copy or otherwise disseminate, use or expose this
8material unless having a written signed agreement with Algoryx Simulation AB, or having been
9advised so by Algoryx Simulation AB for a time limited evaluation, or having purchased a
10valid commercial license from Algoryx Simulation AB.
11
12Algoryx Simulation AB disclaims all responsibilities for loss or damage caused
13from using this software, unless otherwise stated in written agreements with
14Algoryx Simulation AB.
15*/
16
17#pragma once
18
20
21namespace agx
22{
28 {
29 public:
34
43
55
61
62 protected:
66
67 protected:
72
76 virtual void preSystemCallback( agx::DynamicsSystem* dynamicsSystem ) override;
77
81 virtual void postSystemCallback( agx::DynamicsSystem* dynamicsSystem ) override;
82
83 protected:
88
93
98
103
108
113
114 private:
115 RbAddedMassInteractionContainer m_rbInteractions;
116 RbRbAddedMassInteractionContainer m_pairInteractions;
117 };
118
120}
121
#define AGXPHYSICS_EXPORT
Class containing and handling a global view of several objects interacting trough strong added mass i...
AddedMassInteractionHandler()
Default constructor.
SymmetricRigidBodyPtrPair createKey(agx::RigidBody *rb1, agx::RigidBody *rb2) const
Create key for two body interaction.
agx::SymmetricPair< agx::RigidBody * > SymmetricRigidBodyPtrPair
virtual void postSystemCallback(agx::DynamicsSystem *dynamicsSystem) override
After solve, remove interactions.
agx::AddedMassInteraction * getOrCreateInteraction(agx::RigidBody *rb1, agx::RigidBody *rb2)
Creates and added mass interaction given two bodies.
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.
agx::AddedMassInteraction * getOrCreateInteraction(agx::RigidBody *rb)
Creates an added mass interaction given a single body.
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,...
This class is a combined container which has the find complexity of a HashTable, deterministic iterat...
Definition HashVector.h:41
The base class for interactions.
Definition Interaction.h:32
The rigid body class, combining a geometric model and a frame of reference.
Definition RigidBody.h:52
A std::pair, with both elements of the same type, and symmetric so (a, b) == (b, a)
Smart pointer for handling referenced counted objects.
Definition ref_ptr.h:30
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
bool Bool
Definition Integer.h:40
ref_ptr< AddedMassInteractionHandler > AddedMassInteractionHandlerRef