|
AGXDynamics
2.31.1.0
|
A FlowDimension represents the flow of fluid through a FlowUnit. More...
#include <FlowDimension.h>
Inheritance diagram for agxHydraulics::FlowDimension:Public Types | |
| typedef int | Type |
| typedef agx::Vector< Type > | TypeVector |
Public Member Functions | |
| FlowDimension (agxHydraulics::FlowUnit *unit) | |
| FlowDimension (agxHydraulics::FlowUnit *unit, agx::RigidBody *body, agx::UInt8 slot) | |
| virtual void | addLoad (agx::Real load) |
| Add a load to the dimension. More... | |
| AGXSTREAM_DECLARE_ABSTRACT_SERIALIZABLE (agxPowerLine::PhysicalDimension) | |
| template<typename T > | |
| T * | as () |
| Subclass casting. More... | |
| template<typename T > | |
| const T * | as () const |
| template<typename T > | |
| T * | asSafe () |
| Safe subclass casting, return nullptr if template type does not match. More... | |
| template<typename T > | |
| const T * | asSafe () const |
| virtual void | calculateJacobian (agx::Jacobian6DOFElement *G, const agx::Real ratio, const size_t index) const |
| Calculates jacobian for a physical dimension. More... | |
| virtual void | clear () |
| Clear all reference pointers. More... | |
| bool | connect (agxPowerLine::PhysicalDimension *otherDimension, agxPowerLine::Connector *connector) |
| Connect to another dimension for possible power transfer. More... | |
| agxPowerLine::detail::AbstractDimensionState1Dof * | get1DofState () |
| Access the DimensionState as a 1-dimensional state. More... | |
| const agxPowerLine::detail::AbstractDimensionState1Dof * | get1DofState () const |
| agxPowerLine::detail::AbstractDimensionState3Dof * | get3DofState () |
| Access the DimensionState as a 3-dimensional state. More... | |
| const agxPowerLine::detail::AbstractDimensionState3Dof * | get3DofState () const |
| size_t | getBodyIndexIn (const RigidBodyPtrIntHashVector &bodyToIndexTable) |
| const char * | getClassName () const override |
| const agxPowerLine::ConnectionRefVector & | getConnections (agxPowerLine::Side side) const |
| agxPowerLine::PhysicalDimensionMultiBodyConstraintImplementation * | getConstraint (size_t outputConnection=0) const |
| agx::UInt8 | getElementIndex () const |
| bool | getEnableSerialization () const |
| bool | getEnableUuidGeneration () |
| agxHydraulics::FlowConnector * | getFlowConnector (agxPowerLine::Side side) |
| const agxHydraulics::FlowConnector * | getFlowConnector (agxPowerLine::Side side) const |
| agxPowerLine::detail::Translational1DofState * | getFlowState () |
| const agxPowerLine::detail::Translational1DofState * | getFlowState () const |
| FlowUnit * | getFlowUnit () |
| const FlowUnit * | getFlowUnit () const |
| virtual agx::Real | getGradient () const |
| agx::UInt32 | getIndex () const |
| This index is given at creation of this object. More... | |
| const agxPowerLine::Connection * | getInputConnection (size_t inputIndex=0) const |
| Traversing helper functions. More... | |
| Connection * | getInputConnection (const Connector *connector) |
| Connection * | getInputConnection (const Unit *unit) |
| const Connection * | getInputConnection (const Connector *connector) const |
| const Connection * | getInputConnection (const Unit *unit) const |
| agxPowerLine::Connection * | getInputConnection (size_t inputIndex=0) |
| const agxPowerLine::ConnectionRefVector & | getInputConnections () const |
| agxPowerLine::PhysicalDimensionMultiBodyConstraintImplementation * | getInputConstraint (size_t inputConnection=0) const |
| agxHydraulics::FlowConnector * | getInputFlowConnector () |
| const agxHydraulics::FlowConnector * | getInputFlowConnector () const |
| virtual agx::Real | getInputLoad () const override |
| Returns the sum of the constraint forces of all constraints owned by Connectors connected to the input side of this FlowDimension. More... | |
| virtual agx::Real | getMassProperty () const |
| returns the mass property of the dimension body. More... | |
| const agx::Name & | getName () const |
| Returns the name of this PhysicalDimension instance. More... | |
| size_t | getNumConnections (agxPowerLine::Side side) const |
| size_t | getNumConnections () const |
| size_t | getNumInputConnections () const |
| size_t | getNumOutputConnections () const |
| agx::RigidBody * | getOrReserveBody () |
| Return a body that is guaranteed to not be shared with any other PhysicalDimension. More... | |
| const agxPowerLine::Connection * | getOutputConnection (size_t outputIndex=0) const |
| Connection * | getOutputConnection (const Connector *connector) |
| Connection * | getOutputConnection (const Unit *unit) |
| const Connection * | getOutputConnection (const Connector *connector) const |
| const Connection * | getOutputConnection (const Unit *unit) const |
| agxPowerLine::Connection * | getOutputConnection (size_t outputIndex=0) |
| const agxPowerLine::ConnectionRefVector & | getOutputConnections () const |
| agxHydraulics::FlowConnector * | getOutputFlowConnector () |
| const agxHydraulics::FlowConnector * | getOutputFlowConnector () const |
| virtual agx::Real | getOutputLoad () const override |
| Returns the sum of the constraint forces of all constraints owned by Connectors connected to the output side of this FlowDimension. More... | |
| virtual agx::Real | getPowerIn () const override |
| Compute the combined power, i.e., pressure * flow rate, generated at all input connections. More... | |
| virtual agx::Real | getPowerOut () const override |
| Compute the combined power, i.e., pressure * flow rate, generated at all output connections. More... | |
| int | getReferenceCount () const |
| agx::RigidBody * | getReservedBody () |
| Return a body that is guaranteed to not be shared with any other PhysicalDimension. More... | |
| const agx::RigidBody * | getReservedBody () const |
| virtual agx::Real | getSecondGradient () const |
| agxPowerLine::detail::DimensionState * | getState () |
| Provides direct access to the underlying DimensionState. More... | |
| const agxPowerLine::detail::DimensionState * | getState () const |
| agxStream::StorageAgent * | getStorageAgent () const override |
| agxPowerLine::PhysicalDimension::Type | getType () const |
| returns the PhysicalDimension::Type of this dimension More... | |
| virtual std::string | getTypeName () const override |
| const agxPowerLine::Unit * | getUnit () const |
| Returns pointer to the Unit that contains this dimension. More... | |
| agxPowerLine::Unit * | getUnit () |
| agx::Uuid | getUuid () const |
| virtual agx::Real | getValue () const |
| Physical properties of the dimension. More... | |
| float | getVelocityDamping () const |
| agx::Vec3 | getWorldDirection () const |
| bool | hasReservedBody () const |
| template<typename T > | |
| bool | is () const |
| Subclass test. More... | |
| bool | isExternalBody () const |
| Return true if the body that defines the dimension was given to the Power- Line, false if the body was created by the PowerLine. More... | |
| bool | isFinished () const |
| void | reference (void *ptr=nullptr) const |
| Explicitly increment the reference count by one, indicating that this object has another pointer which is referencing it. More... | |
| virtual void | renderDebug () |
| Implement this to render Your physical dimension. More... | |
| void | reserveBody () |
| Ensure that this PhysicalDimension does not share it's body with any other PhysicalDimension. More... | |
| virtual void | restore (agxStream::InputArchive &in) override |
| virtual bool | restore (agxStream::StorageStream &in) override |
| Restores internal data from stream. More... | |
| void | restore (agxStream::InputArchive &in, agx::RigidBody *&body, bool &externalBody) |
| void | setEnableSerialization (bool flag) |
| Set to false to disable serialization of this object. More... | |
| void | setFinished () |
| Tells this class that it is restored correctly and should not be deleted during destruction of an Archive. More... | |
| virtual void | setGradient (agx::Real value) |
| virtual void | setMassProperty (agx::Real massProperty) |
| Set the mass property of the dimension. More... | |
| void | setName (const agx::Name &name) |
| void | setUuid (const agx::Uuid &uuid) |
| Explicitly set a Uuid on a serializable object. More... | |
| virtual void | setValue (agx::Real value) |
| void | setVelocityDamping (float damping) |
| virtual void | store (agxStream::OutputArchive &out) const override |
| virtual bool | store (agxStream::StorageStream &out) const override |
| Stores internal data into stream. More... | |
| void | unreference (void *ptr=nullptr) const |
| Decrement the reference count by one, indicating that a pointer to this object is referencing it. More... | |
| void | unreference_nodelete () const |
| Decrement the reference count by one, indicating that a pointer to this object is referencing it. More... | |
Static Public Member Functions | |
| static agxStream::Serializable * | create () |
| static agxStream::Serializable * | create (agxStream::InputArchive &) |
| static const char * | getConstructClassId () |
| static int | getNumberOfPhysicalDimensions () |
| static agxPowerLine::PhysicalDimension::Type | getStaticType () |
| The ID of a physical dimension type is always a number between zero and the total number of types of physical dimensions in the system, which can be queried using PowerLineController::getNumberOfPhysicalDimensions. More... | |
| static std::string | getStaticTypeName () |
| static void | setEnableUuidGeneration (bool flag) |
| Specify if there should be UUID:s generated for each new Serializable object. By default it is enabled. More... | |
| template<typename T > | |
| static bool | ValidateCast (const Referenced *object) |
Static Protected Member Functions | |
| static DeleteHandler * | getDeleteHandler () |
| static void | setDeleteHandler (DeleteHandler *handler) |
| Internal: Set a DeleteHandler to which deletion of all referenced counted objects will be delegated to. More... | |
Protected Attributes | |
| ConnectionRefVector | m_inputConnections |
| Mutex | m_mutex |
| agx::Name | m_name |
| ObserverContainer | m_observers |
| ConnectionRefVector | m_outputConnections |
| AtomicValue | m_refCount |
| agxPowerLine::detail::PhysicalDimensionStateRef | m_state |
| PhysicalDimension::Type | m_type |
| Unit * | m_unit |
A FlowDimension represents the flow of fluid through a FlowUnit.
Definition at line 53 of file FlowDimension.h.
|
inherited |
Definition at line 96 of file PhysicalDimension.h.
|
inherited |
Definition at line 97 of file PhysicalDimension.h.
| agxHydraulics::FlowDimension::FlowDimension | ( | agxHydraulics::FlowUnit * | unit | ) |
| agxHydraulics::FlowDimension::FlowDimension | ( | agxHydraulics::FlowUnit * | unit, |
| agx::RigidBody * | body, | ||
| agx::UInt8 | slot | ||
| ) |
|
protected |
|
inlineprotectedvirtual |
Definition at line 176 of file FlowDimension.h.
Add a load to the dimension.
The effect depends on the type of the dimension.
|
protectedinherited |
|
protectedinherited |
Called when the Unit owning this PhysicalDimension is added to a simulation.
The body backing this PhysicalDimension is then added to the same simulation.
|
protectedinherited |
Add to singleton that controls the different types of physical dimensions.
(PowerLineDimensionNameSingleton)
|
inherited |
|
protectedinherited |
|
inherited |
Subclass casting.
Template type must match actual type, dynamic_cast assertion will fail otherwise.
Referenced by agx::InternalData::get(), agxVehicle::Track::getNode(), and agx::InternalData::getOrCreate().
|
inherited |
|
inherited |
Safe subclass casting, return nullptr if template type does not match.
Referenced by agxUtil::CollectBodiesAndWiresVisitor::visit().
|
inherited |
|
virtualinherited |
Calculates jacobian for a physical dimension.
| G | - Array of Jacobian elements to be filled in. |
| ratio | - Scaling to apply in order to convert the dimension's unit direction to a constraint Jacobian. |
| index | - Index in G to write to. |
|
virtualinherited |
Clear all reference pointers.
|
inherited |
Connect to another dimension for possible power transfer.
| otherDimension | - a physical dimension with a body defining another dof. |
| connector | - defines the constraint between the dimensions |
|
inlinestatic |
Definition at line 154 of file FlowDimension.h.
|
inlinestatic |
Definition at line 154 of file FlowDimension.h.
|
protectedinherited |
|
protectedinherited |
|
inherited |
Access the DimensionState as a 1-dimensional state.
Will return nullptr if the PhysicalDimension has a 3-dimensional DimensionState.
|
inherited |
|
inherited |
Access the DimensionState as a 3-dimensional state.
Will return nullptr if the PhysicalDimension has a 1-dimensional DimensionState.
|
inherited |
|
inherited |
|
inlineoverridevirtual |
Reimplemented from agxStream::Serializable.
Definition at line 154 of file FlowDimension.h.
|
inherited |
|
protectedinherited |
|
inherited |
|
inlinestatic |
Definition at line 154 of file FlowDimension.h.
|
staticprotectedinherited |
| agx::UInt8 agxHydraulics::FlowDimension::getElementIndex | ( | ) | const |
|
inherited |
Definition at line 273 of file Serializable.h.
|
inherited |
| agxHydraulics::FlowConnector* agxHydraulics::FlowDimension::getFlowConnector | ( | agxPowerLine::Side | side | ) |
| const agxHydraulics::FlowConnector* agxHydraulics::FlowDimension::getFlowConnector | ( | agxPowerLine::Side | side | ) | const |
| agxPowerLine::detail::Translational1DofState* agxHydraulics::FlowDimension::getFlowState | ( | ) |
| const agxPowerLine::detail::Translational1DofState* agxHydraulics::FlowDimension::getFlowState | ( | ) | const |
| FlowUnit* agxHydraulics::FlowDimension::getFlowUnit | ( | ) |
| const FlowUnit* agxHydraulics::FlowDimension::getFlowUnit | ( | ) | const |
|
virtualinherited |
|
inherited |
This index is given at creation of this object.
It is guaranteed to be unique for the lifetime of this library instance. As long as the application is running. This value is not serialized or restored. A new object will always get a new index no matter how it is created.
Definition at line 247 of file Serializable.h.
|
inherited |
Traversing helper functions.
Has to be public. Do NOT use them.
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
| agxHydraulics::FlowConnector* agxHydraulics::FlowDimension::getInputFlowConnector | ( | ) |
| const agxHydraulics::FlowConnector* agxHydraulics::FlowDimension::getInputFlowConnector | ( | ) | const |
|
overridevirtual |
Returns the sum of the constraint forces of all constraints owned by Connectors connected to the input side of this FlowDimension.
The constraint force is often a pressure, but may be something else as well. Use with caution.
Reimplemented from agxPowerLine::PhysicalDimension.
|
virtualinherited |
returns the mass property of the dimension body.
( Inertia for the rotational dimension, mass for translational dimension, ... )
Reimplemented in agxPowerLine::RotationalDimension.
|
inherited |
Returns the name of this PhysicalDimension instance.
There are two types of names for a PhysicalDimension: the instance name and the type name. The instance name can be set by the user and the type name is an indentifier for a type of PhysicalDimension. For example, all RotationalDimensions have the same type name but may have different instance names.
|
staticinherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
Return a body that is guaranteed to not be shared with any other PhysicalDimension.
May create a new body for this PhysicalDimension.
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
| agxHydraulics::FlowConnector* agxHydraulics::FlowDimension::getOutputFlowConnector | ( | ) |
| const agxHydraulics::FlowConnector* agxHydraulics::FlowDimension::getOutputFlowConnector | ( | ) | const |
|
overridevirtual |
Returns the sum of the constraint forces of all constraints owned by Connectors connected to the output side of this FlowDimension.
The constraint force is often a pressure, but may be something else as well. Use with caution.
Reimplemented from agxPowerLine::PhysicalDimension.
|
overridevirtual |
Compute the combined power, i.e., pressure * flow rate, generated at all input connections.
The returned power will be wrong if there is a connection to a constraint whose constraint force is not in units of pressure.
Reimplemented from agxPowerLine::PhysicalDimension.
|
overridevirtual |
Compute the combined power, i.e., pressure * flow rate, generated at all output connections.
The returned power will be wrong if there is a connection to a constraint whose constraint force is not in units of pressure.
Reimplemented from agxPowerLine::PhysicalDimension.
|
inherited |
|
inherited |
Return a body that is guaranteed to not be shared with any other PhysicalDimension.
Will return nullptr if no such guarantee can be made.
|
inherited |
|
virtualinherited |
|
inherited |
Provides direct access to the underlying DimensionState.
This should be considered an implementation detail and not called in user code.
|
inherited |
|
static |
The ID of a physical dimension type is always a number between zero and the total number of types of physical dimensions in the system, which can be queried using PowerLineController::getNumberOfPhysicalDimensions.
|
static |
|
inlineoverridevirtual |
Implements agxStream::Serializable.
Definition at line 154 of file FlowDimension.h.
|
inherited |
returns the PhysicalDimension::Type of this dimension
|
overridevirtual |
Reimplemented from agxPowerLine::PhysicalDimension.
|
inherited |
Returns pointer to the Unit that contains this dimension.
|
inherited |
|
inherited |
Definition at line 268 of file Serializable.h.
|
virtualinherited |
Physical properties of the dimension.
Implement these in child class. (value is for example angle or position. gradient is velocity ...)
|
inherited |
|
inherited |
|
inherited |
|
inherited |
Subclass test.
Referenced by agx::Object::getAutoScopedResource(), agxData::Buffer::getElement(), and agx::Object::getResource().
|
inherited |
Return true if the body that defines the dimension was given to the Power- Line, false if the body was created by the PowerLine.
|
inherited |
Definition at line 252 of file Serializable.h.
Explicitly increment the reference count by one, indicating that this object has another pointer which is referencing it.
This method should be used with care, always balanced with the same number of calls to unreference.
Referenced by agxData::Val< UInt >::Val().
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
Called when the Unit owning this PhysicalDimension is removed from a simulation.
/
|
protectedvirtualinherited |
Remove the PhysicalDimension from the simulation.
May only be called if there are no connections to or from the dimension.
|
protectedinherited |
|
virtualinherited |
Implement this to render Your physical dimension.
Reimplemented in agxPowerLine::RotationalDimension.
|
inherited |
Ensure that this PhysicalDimension does not share it's body with any other PhysicalDimension.
A new body may be created for this PhysicalDimension in order to make that guarantee. Body sharing becomes disabled for this PhysicalDimension.
|
overridevirtual |
Reimplemented from agxPowerLine::PhysicalDimension.
|
overridevirtual |
Restores internal data from stream.
Reimplemented from agxPowerLine::PhysicalDimension.
|
inherited |
|
protectedinherited |
Some serialization versions stored the dimension axis direction in classes deriving from PhysicalDimension.
When loading such classes from such streams the restoring derived class need to pass the direction into the parent class, since the parent class is unable to read it from the stream.
|
staticprotectedinherited |
Internal: Set a DeleteHandler to which deletion of all referenced counted objects will be delegated to.
|
inherited |
Set to false to disable serialization of this object.
It will just be ignored during serialization (writing). It is still possible to restore TO this object.
|
staticinherited |
Specify if there should be UUID:s generated for each new Serializable object. By default it is enabled.
|
inherited |
Tells this class that it is restored correctly and should not be deleted during destruction of an Archive.
|
virtualinherited |
Set the mass property of the dimension.
Explicitly set a Uuid on a serializable object.
Use this method with great care, as it can result in non-unique identifiers in the system!
|
inherited |
|
overridevirtual |
Reimplemented from agxPowerLine::PhysicalDimension.
|
overridevirtual |
Stores internal data into stream.
Reimplemented from agxPowerLine::PhysicalDimension.
Decrement the reference count by one, indicating that a pointer to this object is referencing it.
If the reference count goes to zero, it is assumed that this object is no longer referenced and is automatically deleted.
This method should be used with care, always balanced with the same number of calls to reference.
|
inherited |
Decrement the reference count by one, indicating that a pointer to this object is referencing it.
However, do not delete it, even if ref count goes to 0. Warning, unref_nodelete() should only be called if the user knows exactly who will be responsible for, one should prefer unref() over unref_nodelete() as the later can lead to memory leaks.
|
staticinherited |
|
protectedinherited |
Definition at line 437 of file PhysicalDimension.h.
|
mutableprotectedinherited |
Definition at line 240 of file Referenced.h.
|
protectedinherited |
Definition at line 441 of file PhysicalDimension.h.
|
mutableprotectedinherited |
Definition at line 239 of file Referenced.h.
|
protectedinherited |
Definition at line 438 of file PhysicalDimension.h.
|
mutableprotectedinherited |
Definition at line 241 of file Referenced.h.
|
protectedinherited |
Definition at line 440 of file PhysicalDimension.h.
|
protectedinherited |
Definition at line 436 of file PhysicalDimension.h.
|
protectedinherited |
Definition at line 439 of file PhysicalDimension.h.