AGX Dynamics  2.35.0.1
agxHydraulics::FlowDimension Class Reference

A FlowDimension represents the flow of fluid through a FlowUnit. More...

#include <FlowDimension.h>

+ Inheritance diagram for agxHydraulics::FlowDimension:

Public Member Functions

 FlowDimension (agxHydraulics::FlowUnit *unit)
 
 FlowDimension (agxHydraulics::FlowUnit *unit, agx::RigidBody *body, agx::UInt8 slot)
 
const char * getClassName () const override
 
agx::UInt8 getElementIndex () const
 
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
 
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...
 
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...
 
agxStream::StorageAgent * getStorageAgent () const override
 
virtual std::string getTypeName () const override
 
virtual void restore (agxStream::InputArchive &in) override
 
virtual bool restore (agxStream::StorageStream &in) override
 Restores internal data from stream. More...
 
virtual void store (agxStream::OutputArchive &out) const override
 
virtual bool store (agxStream::StorageStream &out) const override
 Stores internal data into stream. More...
 
- Public Member Functions inherited from agxPowerLine::PhysicalDimension
virtual void addLoad (agx::Real load)
 Add a load to the dimension. More...
 
 AGXSTREAM_DECLARE_ABSTRACT_SERIALIZABLE (agxPowerLine::PhysicalDimension)
 
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 agxPowerLine::ConnectionRefVector & getConnections (agxPowerLine::Side side) const
 
agxPowerLine::PhysicalDimensionMultiBodyConstraintImplementation * getConstraint (size_t outputConnection=0) const
 
virtual agx::Real getGradient () const
 
Connection * getInputConnection (const Connector *connector)
 
const Connection * getInputConnection (const Connector *connector) const
 
Connection * getInputConnection (const Unit *unit)
 
const Connection * getInputConnection (const Unit *unit) const
 
agxPowerLine::Connection * getInputConnection (size_t inputIndex=0)
 
const agxPowerLine::Connection * getInputConnection (size_t inputIndex=0) const
 Traversing helper functions. More...
 
const agxPowerLine::ConnectionRefVector & getInputConnections () const
 
agxPowerLine::PhysicalDimensionMultiBodyConstraintImplementation * getInputConstraint (size_t inputConnection=0) const
 
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 () const
 
size_t getNumConnections (agxPowerLine::Side side) 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...
 
Connection * getOutputConnection (const Connector *connector)
 
const Connection * getOutputConnection (const Connector *connector) const
 
Connection * getOutputConnection (const Unit *unit)
 
const Connection * getOutputConnection (const Unit *unit) const
 
agxPowerLine::Connection * getOutputConnection (size_t outputIndex=0)
 
const agxPowerLine::Connection * getOutputConnection (size_t outputIndex=0) const
 
const agxPowerLine::ConnectionRefVector & getOutputConnections () 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
 
agxPowerLine::PhysicalDimension::Type getType () const
 returns the PhysicalDimension::Type of this dimension More...
 
agxPowerLine::Unit * getUnit ()
 
const agxPowerLine::Unit * getUnit () const
 Returns pointer to the Unit that contains this dimension. More...
 
virtual agx::Real getValue () const
 Physical properties of the dimension. More...
 
float getVelocityDamping () const
 
agx::Vec3 getWorldDirection () const
 
bool hasReservedBody () const
 
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...
 
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...
 
void restore (agxStream::InputArchive &in, agx::RigidBody *&body, bool &externalBody)
 
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)
 
virtual void setValue (agx::Real value)
 
void setVelocityDamping (float damping)
 
- Public Member Functions inherited from agx::Referenced
 Referenced ()
 Default constructor. More...
 
 Referenced (const Referenced &)
 
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
 
int getReferenceCount () const
 
template<typename T >
bool is () const
 Subclass test. More...
 
Referenced & operator= (const Referenced &)
 Assignment operator. Will increment the number of references to the referenced object. More...
 
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...
 
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...
 
- Public Member Functions inherited from agxStream::Serializable
virtual ~Serializable ()
 Destructor for normal C++ use but hidden from SWIG bindings. More...
 
bool getEnableSerialization () const
 
bool getEnableUuidGeneration ()
 
agx::UInt32 getIndex () const
 This index is given at creation of this object. More...
 
agx::Uuid getUuid () const
 
bool isFinished () const
 
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...
 
void setUuid (const agx::Uuid &uuid)
 Explicitly set a Uuid on a serializable object. More...
 

Static Public Member Functions

static agxStream::Serializable * create ()
 
static agxStream::Serializable * create (agxStream::InputArchive &)
 
static const char * getConstructClassId ()
 
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 Public Member Functions inherited from agxPowerLine::PhysicalDimension
static int getNumberOfPhysicalDimensions ()
 
static agxPowerLine::PhysicalDimension::Type getStaticType ()
 
static std::string getStaticTypeName ()
 Returns the dimension type name of PhysicalDimension. More...
 
- Static Public Member Functions inherited from agx::Referenced
template<typename T >
static bool ValidateCast (const Referenced *object)
 
- Static Public Member Functions inherited from agxStream::Serializable
static void setEnableUuidGeneration (bool flag)
 Specify if there should be UUID:s generated for each new Serializable object. By default it is enabled. More...
 

Protected Member Functions

 FlowDimension ()
 
virtual ~FlowDimension ()
 
- Protected Member Functions inherited from agxPowerLine::PhysicalDimension
 PhysicalDimension ()
 
 PhysicalDimension (agxPowerLine::Unit *unit, agxPowerLine::PhysicalDimension::Type type, agxPowerLine::detail::DimensionState *state)
 
virtual ~PhysicalDimension ()
 
void addNotification (agxPowerLine::PowerLine *powerLine)
 
void addNotification (agxSDK::Simulation *simulation)
 Called when the Unit owning this PhysicalDimension is added to a simulation. More...
 
void addToListOfDimensions ()
 Add to singleton that controls the different types of physical dimensions. More...
 
agxPowerLine::ConnectionRefVector & getConnectionsWritable (agxPowerLine::Side side)
 
bool removeInputConnection (Connection *connection)
 
void removeNotification (agxPowerLine::PowerLine *powerLine)
 
void removeNotification (agxSDK::Simulation *simulation)
 
virtual void removeNotification (agxSDK::Simulation *simulation, agxUtil::ConstraintHolder *constraintHolder)
 Remove the PhysicalDimension from the simulation. More...
 
bool removeOutputConnection (Connection *connection)
 
bool restore (agxStream::StorageStream &in, const agx::Vec3 *direction)
 Some serialization versions stored the dimension axis direction in classes deriving from PhysicalDimension. More...
 
- Protected Member Functions inherited from agx::Referenced
virtual ~Referenced ()
 Destructor. More...
 
void allocateObserverVector () const
 
void deleteUsingDeleteHandler () const
 
- Protected Member Functions inherited from agxStream::Serializable
 Serializable ()
 Default constructor. More...
 
 Serializable (const Serializable &other)
 Copy constructor. More...
 
void generateUuid ()
 

Additional Inherited Members

- Public Types inherited from agxPowerLine::PhysicalDimension
typedef int Type
 
typedef agx::Vector< Type > TypeVector
 
- Static Protected Member Functions inherited from agx::Referenced
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 inherited from agxPowerLine::PhysicalDimension
ConnectionRefVector m_inputConnections
 
agx::Name m_name
 
ConnectionRefVector m_outputConnections
 
agxPowerLine::detail::PhysicalDimensionStateRef m_state
 
PhysicalDimension::Type m_type
 
Unit * m_unit
 
- Protected Attributes inherited from agx::Referenced
Mutex m_mutex
 
ObserverContainer m_observers
 
AtomicValue m_refCount
 

Detailed Description

A FlowDimension represents the flow of fluid through a FlowUnit.

Definition at line 53 of file FlowDimension.h.

Constructor & Destructor Documentation

◆ FlowDimension() [1/3]

agxHydraulics::FlowDimension::FlowDimension ( agxHydraulics::FlowUnit *  unit)

◆ FlowDimension() [2/3]

agxHydraulics::FlowDimension::FlowDimension ( agxHydraulics::FlowUnit *  unit,
agx::RigidBody *  body,
agx::UInt8  slot 
)

◆ FlowDimension() [3/3]

agxHydraulics::FlowDimension::FlowDimension ( )
protected

◆ ~FlowDimension()

virtual agxHydraulics::FlowDimension::~FlowDimension ( )
inlineprotectedvirtual

Definition at line 176 of file FlowDimension.h.

Member Function Documentation

◆ create() [1/2]

static agxStream::Serializable* agxHydraulics::FlowDimension::create ( )
inlinestatic

Definition at line 154 of file FlowDimension.h.

◆ create() [2/2]

static agxStream::Serializable* agxHydraulics::FlowDimension::create ( agxStream::InputArchive &  )
inlinestatic

Definition at line 154 of file FlowDimension.h.

◆ getClassName()

const char* agxHydraulics::FlowDimension::getClassName ( ) const
inlineoverridevirtual
Returns
the class name of this class.

Reimplemented from agxStream::Serializable.

Definition at line 154 of file FlowDimension.h.

◆ getConstructClassId()

static const char* agxHydraulics::FlowDimension::getConstructClassId ( )
inlinestatic

Definition at line 154 of file FlowDimension.h.

◆ getElementIndex()

agx::UInt8 agxHydraulics::FlowDimension::getElementIndex ( ) const

◆ getFlowConnector() [1/2]

agxHydraulics::FlowConnector* agxHydraulics::FlowDimension::getFlowConnector ( agxPowerLine::Side  side)
Returns
The FlowConnector occupying the given side of the FlowDimension, or nullptr if there is no such FlowConnector.

◆ getFlowConnector() [2/2]

const agxHydraulics::FlowConnector* agxHydraulics::FlowDimension::getFlowConnector ( agxPowerLine::Side  side) const

◆ getFlowState() [1/2]

agxPowerLine::detail::Translational1DofState* agxHydraulics::FlowDimension::getFlowState ( )

◆ getFlowState() [2/2]

const agxPowerLine::detail::Translational1DofState* agxHydraulics::FlowDimension::getFlowState ( ) const

◆ getFlowUnit() [1/2]

FlowUnit* agxHydraulics::FlowDimension::getFlowUnit ( )
Returns
The FlowUnit that owns this FlowDimension.

◆ getFlowUnit() [2/2]

const FlowUnit* agxHydraulics::FlowDimension::getFlowUnit ( ) const

◆ getInputFlowConnector() [1/2]

agxHydraulics::FlowConnector* agxHydraulics::FlowDimension::getInputFlowConnector ( )
Returns
The FlowConnector occupying the input side of the FlowDimension, or nullptr if there is no such FlowConnector.

◆ getInputFlowConnector() [2/2]

const agxHydraulics::FlowConnector* agxHydraulics::FlowDimension::getInputFlowConnector ( ) const

◆ getInputLoad()

virtual agx::Real agxHydraulics::FlowDimension::getInputLoad ( ) 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.

◆ getOutputFlowConnector() [1/2]

agxHydraulics::FlowConnector* agxHydraulics::FlowDimension::getOutputFlowConnector ( )
Returns
The FlowConnector occupying the output side of the FlowDimension, or nullptr if there is no such FlowConnector.

◆ getOutputFlowConnector() [2/2]

const agxHydraulics::FlowConnector* agxHydraulics::FlowDimension::getOutputFlowConnector ( ) const

◆ getOutputLoad()

virtual agx::Real agxHydraulics::FlowDimension::getOutputLoad ( ) 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.

◆ getPowerIn()

virtual agx::Real agxHydraulics::FlowDimension::getPowerIn ( ) const
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.

◆ getPowerOut()

virtual agx::Real agxHydraulics::FlowDimension::getPowerOut ( ) const
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.

◆ getStaticType()

static agxPowerLine::PhysicalDimension::Type agxHydraulics::FlowDimension::getStaticType ( )
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.

Returns
The ID of the flow dimension type.

◆ getStaticTypeName()

static std::string agxHydraulics::FlowDimension::getStaticTypeName ( )
static
Returns
The name of the flow dimension type.

◆ getStorageAgent()

agxStream::StorageAgent* agxHydraulics::FlowDimension::getStorageAgent ( ) const
inlineoverridevirtual
Returns
the storage agent

Implements agxStream::Serializable.

Definition at line 154 of file FlowDimension.h.

◆ getTypeName()

virtual std::string agxHydraulics::FlowDimension::getTypeName ( ) const
overridevirtual
Returns
The name of the flow dimension type.

Reimplemented from agxPowerLine::PhysicalDimension.

◆ restore() [1/2]

virtual void agxHydraulics::FlowDimension::restore ( agxStream::InputArchive &  in)
overridevirtual

Reimplemented from agxPowerLine::PhysicalDimension.

◆ restore() [2/2]

virtual bool agxHydraulics::FlowDimension::restore ( agxStream::StorageStream &  in)
overridevirtual

Restores internal data from stream.

Reimplemented from agxPowerLine::PhysicalDimension.

◆ store() [1/2]

virtual void agxHydraulics::FlowDimension::store ( agxStream::OutputArchive &  out) const
overridevirtual

Reimplemented from agxPowerLine::PhysicalDimension.

◆ store() [2/2]

virtual bool agxHydraulics::FlowDimension::store ( agxStream::StorageStream &  out) const
overridevirtual

Stores internal data into stream.

Reimplemented from agxPowerLine::PhysicalDimension.


The documentation for this class was generated from the following file: