AGXDynamics  2.31.1.0
agxHydraulics::FlowDimension Class Reference

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)
 

Protected Member Functions

 FlowDimension ()
 
virtual ~FlowDimension ()
 
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...
 
void allocateObserverVector () const
 
void deleteUsingDeleteHandler () const
 
void generateUuid ()
 
agxPowerLine::ConnectionRefVector & getConnectionsWritable (agxPowerLine::Side side)
 
bool removeInputConnection (Connection *connection)
 
void removeNotification (agxPowerLine::PowerLine *powerLine)
 
void removeNotification (agxSDK::Simulation *simulation)
 Called when the Unit owning this PhysicalDimension is removed from a simulation. More...
 
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...
 

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
 

Detailed Description

A FlowDimension represents the flow of fluid through a FlowUnit.

Definition at line 53 of file FlowDimension.h.

Member Typedef Documentation

◆ Type

Definition at line 96 of file PhysicalDimension.h.

◆ TypeVector

Definition at line 97 of file PhysicalDimension.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

◆ addLoad()

virtual void agxPowerLine::PhysicalDimension::addLoad ( agx::Real  load)
virtualinherited

Add a load to the dimension.

The effect depends on the type of the dimension.

◆ addNotification() [1/2]

void agxPowerLine::PhysicalDimension::addNotification ( agxPowerLine::PowerLine *  powerLine)
protectedinherited

◆ addNotification() [2/2]

void agxPowerLine::PhysicalDimension::addNotification ( agxSDK::Simulation *  simulation)
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.

◆ addToListOfDimensions()

void agxPowerLine::PhysicalDimension::addToListOfDimensions ( )
protectedinherited

Add to singleton that controls the different types of physical dimensions.

(PowerLineDimensionNameSingleton)

◆ AGXSTREAM_DECLARE_ABSTRACT_SERIALIZABLE()

agxPowerLine::PhysicalDimension::AGXSTREAM_DECLARE_ABSTRACT_SERIALIZABLE ( agxPowerLine::PhysicalDimension  )
inherited

◆ allocateObserverVector()

void agx::Referenced::allocateObserverVector ( ) const
protectedinherited

◆ as() [1/2]

template<typename T >
T* agx::Referenced::as ( )
inherited

Subclass casting.

Template type must match actual type, dynamic_cast assertion will fail otherwise.

Referenced by agx::InternalData::get(), agxVehicle::Track::getNode(), agx::InternalData::getOrCreate(), and agx::InternalData::hasData().

◆ as() [2/2]

template<typename T >
const T* agx::Referenced::as ( ) const
inherited

◆ asSafe() [1/2]

template<typename T >
T* agx::Referenced::asSafe ( )
inherited

Safe subclass casting, return nullptr if template type does not match.

Referenced by agxUtil::CollectBodiesAndWiresVisitor::visit().

◆ asSafe() [2/2]

template<typename T >
const T* agx::Referenced::asSafe ( ) const
inherited

◆ calculateJacobian()

virtual void agxPowerLine::PhysicalDimension::calculateJacobian ( agx::Jacobian6DOFElement *  G,
const agx::Real  ratio,
const size_t  index 
) const
virtualinherited

Calculates jacobian for a physical dimension.

Parameters
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.

◆ clear()

virtual void agxPowerLine::PhysicalDimension::clear ( )
virtualinherited

Clear all reference pointers.

◆ connect()

bool agxPowerLine::PhysicalDimension::connect ( agxPowerLine::PhysicalDimension *  otherDimension,
agxPowerLine::Connector *  connector 
)
inherited

Connect to another dimension for possible power transfer.

Parameters
otherDimension- a physical dimension with a body defining another dof.
connector- defines the constraint between the dimensions

◆ 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.

◆ deleteUsingDeleteHandler()

void agx::Referenced::deleteUsingDeleteHandler ( ) const
protectedinherited

◆ generateUuid()

void agxStream::Serializable::generateUuid ( )
protectedinherited

◆ get1DofState() [1/2]

agxPowerLine::detail::AbstractDimensionState1Dof* agxPowerLine::PhysicalDimension::get1DofState ( )
inherited

Access the DimensionState as a 1-dimensional state.

Will return nullptr if the PhysicalDimension has a 3-dimensional DimensionState.

See also
get3DofState

◆ get1DofState() [2/2]

const agxPowerLine::detail::AbstractDimensionState1Dof* agxPowerLine::PhysicalDimension::get1DofState ( ) const
inherited

◆ get3DofState() [1/2]

agxPowerLine::detail::AbstractDimensionState3Dof* agxPowerLine::PhysicalDimension::get3DofState ( )
inherited

Access the DimensionState as a 3-dimensional state.

Will return nullptr if the PhysicalDimension has a 1-dimensional DimensionState.

See also
get1DofState

◆ get3DofState() [2/2]

const agxPowerLine::detail::AbstractDimensionState3Dof* agxPowerLine::PhysicalDimension::get3DofState ( ) const
inherited

◆ getBodyIndexIn()

size_t agxPowerLine::PhysicalDimension::getBodyIndexIn ( const RigidBodyPtrIntHashVector &  bodyToIndexTable)
inherited

◆ 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.

◆ getConnections()

const agxPowerLine::ConnectionRefVector& agxPowerLine::PhysicalDimension::getConnections ( agxPowerLine::Side  side) const
inherited

◆ getConnectionsWritable()

agxPowerLine::ConnectionRefVector& agxPowerLine::PhysicalDimension::getConnectionsWritable ( agxPowerLine::Side  side)
protectedinherited

◆ getConstraint()

agxPowerLine::PhysicalDimensionMultiBodyConstraintImplementation* agxPowerLine::PhysicalDimension::getConstraint ( size_t  outputConnection = 0) const
inherited
Returns
pointer to a constraint going out from this dimension (one constraint for each output connection)

◆ getConstructClassId()

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

Definition at line 154 of file FlowDimension.h.

◆ getDeleteHandler()

static DeleteHandler* agx::Referenced::getDeleteHandler ( )
staticprotectedinherited
Returns
a DeleteHandler.

◆ getElementIndex()

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

◆ getEnableSerialization()

bool agxStream::Serializable::getEnableSerialization ( ) const
inherited
Returns
true if serialization is enabled for this object

Definition at line 273 of file Serializable.h.

◆ getEnableUuidGeneration()

bool agxStream::Serializable::getEnableUuidGeneration ( )
inherited
Returns
true if Uuid:s should be generated for each new Serializable object

◆ 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

◆ getGradient()

virtual agx::Real agxPowerLine::PhysicalDimension::getGradient ( ) const
virtualinherited

◆ getIndex()

agx::UInt32 agxStream::Serializable::getIndex ( ) const
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.

Returns
an instance index of this object. This is unique for the lifetime of this library instance.

Definition at line 247 of file Serializable.h.

◆ getInputConnection() [1/6]

const agxPowerLine::Connection* agxPowerLine::PhysicalDimension::getInputConnection ( size_t  inputIndex = 0) const
inherited

Traversing helper functions.

Has to be public. Do NOT use them.

◆ getInputConnection() [2/6]

Connection* agxPowerLine::PhysicalDimension::getInputConnection ( const Connector *  connector)
inherited

◆ getInputConnection() [3/6]

Connection* agxPowerLine::PhysicalDimension::getInputConnection ( const Unit *  unit)
inherited

◆ getInputConnection() [4/6]

const Connection* agxPowerLine::PhysicalDimension::getInputConnection ( const Connector *  connector) const
inherited

◆ getInputConnection() [5/6]

const Connection* agxPowerLine::PhysicalDimension::getInputConnection ( const Unit *  unit) const
inherited

◆ getInputConnection() [6/6]

agxPowerLine::Connection* agxPowerLine::PhysicalDimension::getInputConnection ( size_t  inputIndex = 0)
inherited

◆ getInputConnections()

const agxPowerLine::ConnectionRefVector& agxPowerLine::PhysicalDimension::getInputConnections ( ) const
inherited

◆ getInputConstraint()

agxPowerLine::PhysicalDimensionMultiBodyConstraintImplementation* agxPowerLine::PhysicalDimension::getInputConstraint ( size_t  inputConnection = 0) const
inherited
Returns
a constraint going into this dimension. It's properties are defined by the parent dimension.

◆ 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.

◆ getMassProperty()

virtual agx::Real agxPowerLine::PhysicalDimension::getMassProperty ( ) const
virtualinherited

returns the mass property of the dimension body.

( Inertia for the rotational dimension, mass for translational dimension, ... )

Reimplemented in agxPowerLine::RotationalDimension.

◆ getName()

const agx::Name& agxPowerLine::PhysicalDimension::getName ( ) const
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.

See also
getTypeName
getActualTypeName
Returns
This PhysicalDimension's name.

◆ getNumberOfPhysicalDimensions()

static int agxPowerLine::PhysicalDimension::getNumberOfPhysicalDimensions ( )
staticinherited
Returns
the total number of different types of physical dimensions in the simulation

◆ getNumConnections() [1/2]

size_t agxPowerLine::PhysicalDimension::getNumConnections ( agxPowerLine::Side  side) const
inherited

◆ getNumConnections() [2/2]

size_t agxPowerLine::PhysicalDimension::getNumConnections ( ) const
inherited

◆ getNumInputConnections()

size_t agxPowerLine::PhysicalDimension::getNumInputConnections ( ) const
inherited

◆ getNumOutputConnections()

size_t agxPowerLine::PhysicalDimension::getNumOutputConnections ( ) const
inherited

◆ getOrReserveBody()

agx::RigidBody* agxPowerLine::PhysicalDimension::getOrReserveBody ( )
inherited

Return a body that is guaranteed to not be shared with any other PhysicalDimension.

May create a new body for this PhysicalDimension.

See also
reserveBody
getReservedBody

◆ getOutputConnection() [1/6]

const agxPowerLine::Connection* agxPowerLine::PhysicalDimension::getOutputConnection ( size_t  outputIndex = 0) const
inherited

◆ getOutputConnection() [2/6]

Connection* agxPowerLine::PhysicalDimension::getOutputConnection ( const Connector *  connector)
inherited

◆ getOutputConnection() [3/6]

Connection* agxPowerLine::PhysicalDimension::getOutputConnection ( const Unit *  unit)
inherited

◆ getOutputConnection() [4/6]

const Connection* agxPowerLine::PhysicalDimension::getOutputConnection ( const Connector *  connector) const
inherited

◆ getOutputConnection() [5/6]

const Connection* agxPowerLine::PhysicalDimension::getOutputConnection ( const Unit *  unit) const
inherited

◆ getOutputConnection() [6/6]

agxPowerLine::Connection* agxPowerLine::PhysicalDimension::getOutputConnection ( size_t  outputIndex = 0)
inherited

◆ getOutputConnections()

const agxPowerLine::ConnectionRefVector& agxPowerLine::PhysicalDimension::getOutputConnections ( ) const
inherited

◆ 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.

◆ getReferenceCount()

int agx::Referenced::getReferenceCount ( ) const
inherited
Returns
the number pointers currently referencing this object.

◆ getReservedBody() [1/2]

agx::RigidBody* agxPowerLine::PhysicalDimension::getReservedBody ( )
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.

See also
reserveBody

◆ getReservedBody() [2/2]

const agx::RigidBody* agxPowerLine::PhysicalDimension::getReservedBody ( ) const
inherited

◆ getSecondGradient()

virtual agx::Real agxPowerLine::PhysicalDimension::getSecondGradient ( ) const
virtualinherited

◆ getState() [1/2]

agxPowerLine::detail::DimensionState* agxPowerLine::PhysicalDimension::getState ( )
inherited

Provides direct access to the underlying DimensionState.

This should be considered an implementation detail and not called in user code.

◆ getState() [2/2]

const agxPowerLine::detail::DimensionState* agxPowerLine::PhysicalDimension::getState ( ) const
inherited

◆ 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.

◆ getType()

agxPowerLine::PhysicalDimension::Type agxPowerLine::PhysicalDimension::getType ( ) const
inherited

returns the PhysicalDimension::Type of this dimension

◆ getTypeName()

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

Reimplemented from agxPowerLine::PhysicalDimension.

◆ getUnit() [1/2]

const agxPowerLine::Unit* agxPowerLine::PhysicalDimension::getUnit ( ) const
inherited

Returns pointer to the Unit that contains this dimension.

◆ getUnit() [2/2]

agxPowerLine::Unit* agxPowerLine::PhysicalDimension::getUnit ( )
inherited

◆ getUuid()

agx::Uuid agxStream::Serializable::getUuid ( ) const
inherited
Returns
a unique id for this instance.

Definition at line 268 of file Serializable.h.

Referenced by agxSDK::UuidHashCollisionFilter::match().

◆ getValue()

virtual agx::Real agxPowerLine::PhysicalDimension::getValue ( ) const
virtualinherited

Physical properties of the dimension.

Implement these in child class. (value is for example angle or position. gradient is velocity ...)

◆ getVelocityDamping()

float agxPowerLine::PhysicalDimension::getVelocityDamping ( ) const
inherited

◆ getWorldDirection()

agx::Vec3 agxPowerLine::PhysicalDimension::getWorldDirection ( ) const
inherited

◆ hasReservedBody()

bool agxPowerLine::PhysicalDimension::hasReservedBody ( ) const
inherited
Returns
True if this PhysicalDimension has a reserved body, false otherwise.

◆ is()

template<typename T >
bool agx::Referenced::is ( ) const
inherited

◆ isExternalBody()

bool agxPowerLine::PhysicalDimension::isExternalBody ( ) const
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.

◆ isFinished()

bool agxStream::Serializable::isFinished ( ) const
inherited
Returns
true if this class is restored correctly and should not be deleted during destruction of an Archive.

Definition at line 252 of file Serializable.h.

References AGX_FORCE_INLINE.

◆ reference()

void agx::Referenced::reference ( void *  ptr = nullptr) const
inherited

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.

◆ removeInputConnection()

bool agxPowerLine::PhysicalDimension::removeInputConnection ( Connection *  connection)
protectedinherited

◆ removeNotification() [1/3]

void agxPowerLine::PhysicalDimension::removeNotification ( agxPowerLine::PowerLine *  powerLine)
protectedinherited

◆ removeNotification() [2/3]

void agxPowerLine::PhysicalDimension::removeNotification ( agxSDK::Simulation *  simulation)
protectedinherited

Called when the Unit owning this PhysicalDimension is removed from a simulation.

/

◆ removeNotification() [3/3]

virtual void agxPowerLine::PhysicalDimension::removeNotification ( agxSDK::Simulation *  simulation,
agxUtil::ConstraintHolder *  constraintHolder 
)
protectedvirtualinherited

Remove the PhysicalDimension from the simulation.

May only be called if there are no connections to or from the dimension.

◆ removeOutputConnection()

bool agxPowerLine::PhysicalDimension::removeOutputConnection ( Connection *  connection)
protectedinherited

◆ renderDebug()

virtual void agxPowerLine::PhysicalDimension::renderDebug ( )
virtualinherited

Implement this to render Your physical dimension.

Reimplemented in agxPowerLine::RotationalDimension.

◆ reserveBody()

void agxPowerLine::PhysicalDimension::reserveBody ( )
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.

◆ restore() [1/4]

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

Reimplemented from agxPowerLine::PhysicalDimension.

◆ restore() [2/4]

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

Restores internal data from stream.

Reimplemented from agxPowerLine::PhysicalDimension.

◆ restore() [3/4]

void agxPowerLine::PhysicalDimension::restore ( agxStream::InputArchive &  in,
agx::RigidBody *&  body,
bool &  externalBody 
)
inherited

◆ restore() [4/4]

bool agxPowerLine::PhysicalDimension::restore ( agxStream::StorageStream &  in,
const agx::Vec3 *  direction 
)
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.

◆ setDeleteHandler()

static void agx::Referenced::setDeleteHandler ( DeleteHandler *  handler)
staticprotectedinherited

Internal: Set a DeleteHandler to which deletion of all referenced counted objects will be delegated to.

◆ setEnableSerialization()

void agxStream::Serializable::setEnableSerialization ( bool  flag)
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.

◆ setEnableUuidGeneration()

static void agxStream::Serializable::setEnableUuidGeneration ( bool  flag)
staticinherited

Specify if there should be UUID:s generated for each new Serializable object. By default it is enabled.

◆ setFinished()

void agxStream::Serializable::setFinished ( )
inherited

Tells this class that it is restored correctly and should not be deleted during destruction of an Archive.

◆ setGradient()

virtual void agxPowerLine::PhysicalDimension::setGradient ( agx::Real  value)
virtualinherited

◆ setMassProperty()

virtual void agxPowerLine::PhysicalDimension::setMassProperty ( agx::Real  massProperty)
virtualinherited

Set the mass property of the dimension.

◆ setName()

void agxPowerLine::PhysicalDimension::setName ( const agx::Name &  name)
inherited

◆ setUuid()

void agxStream::Serializable::setUuid ( const agx::Uuid &  uuid)
inherited

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!

◆ setValue()

virtual void agxPowerLine::PhysicalDimension::setValue ( agx::Real  value)
virtualinherited

◆ setVelocityDamping()

void agxPowerLine::PhysicalDimension::setVelocityDamping ( float  damping)
inherited

◆ 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.

◆ unreference()

void agx::Referenced::unreference ( void *  ptr = nullptr) const
inherited

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.

Referenced by agxData::EntityRef< ContactMaterialPtr >::~EntityRef().

◆ unreference_nodelete()

void agx::Referenced::unreference_nodelete ( ) const
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.

◆ ValidateCast()

template<typename T >
static bool agx::Referenced::ValidateCast ( const Referenced *  object)
staticinherited

Member Data Documentation

◆ m_inputConnections

ConnectionRefVector agxPowerLine::PhysicalDimension::m_inputConnections
protectedinherited

Definition at line 437 of file PhysicalDimension.h.

◆ m_mutex

Mutex agx::Referenced::m_mutex
mutableprotectedinherited

Definition at line 240 of file Referenced.h.

◆ m_name

agx::Name agxPowerLine::PhysicalDimension::m_name
protectedinherited

Definition at line 441 of file PhysicalDimension.h.

◆ m_observers

ObserverContainer agx::Referenced::m_observers
mutableprotectedinherited

Definition at line 239 of file Referenced.h.

◆ m_outputConnections

ConnectionRefVector agxPowerLine::PhysicalDimension::m_outputConnections
protectedinherited

Definition at line 438 of file PhysicalDimension.h.

◆ m_refCount

AtomicValue agx::Referenced::m_refCount
mutableprotectedinherited

Definition at line 241 of file Referenced.h.

◆ m_state

agxPowerLine::detail::PhysicalDimensionStateRef agxPowerLine::PhysicalDimension::m_state
protectedinherited

Definition at line 440 of file PhysicalDimension.h.

◆ m_type

PhysicalDimension::Type agxPowerLine::PhysicalDimension::m_type
protectedinherited

Definition at line 436 of file PhysicalDimension.h.

◆ m_unit

Unit* agxPowerLine::PhysicalDimension::m_unit
protectedinherited

Definition at line 439 of file PhysicalDimension.h.


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