chrono::ChCheckpointASCII Class Reference

Description

ASCII text Chrono checkpoint database.

#include <ChCheckpointASCII.h>

Inheritance diagram for chrono::ChCheckpointASCII:
Collaboration diagram for chrono::ChCheckpointASCII:

Public Member Functions

 ChCheckpointASCII (Type type)
 
virtual void Initialize () override
 Initialize the checkpoint DB.
 
virtual void WriteState (ChSystem *sys) override
 Write the entire state of the provided Chrono system. More...
 
virtual void WriteTime (double time) override
 Write the checkpoint time. More...
 
virtual void WriteBodies (const std::vector< std::shared_ptr< ChBody >> &bodies) override
 Write states of the bodies in the provided list. More...
 
virtual void WriteShafts (const std::vector< std::shared_ptr< ChShaft >> &shafts) override
 Write states of the shafts in the provided list. More...
 
virtual void WriteJoints (const std::vector< std::shared_ptr< ChLink >> &joints) override
 Write states of the joints in the provided list. More...
 
virtual void WriteCouples (const std::vector< std::shared_ptr< ChShaftsCouple >> &couples) override
 Write states of the shaft couples in the provided list. More...
 
virtual void WriteLinSprings (const std::vector< std::shared_ptr< ChLinkTSDA >> &springs) override
 Write states of the linear springs (TSDAs) in the provided list. More...
 
virtual void WriteRotSprings (const std::vector< std::shared_ptr< ChLinkRSDA >> &springs) override
 Write states of the rotational springs (RSDAs) in the provided list. More...
 
virtual void WriteBodyBodyLoads (const std::vector< std::shared_ptr< ChLoadBodyBody >> &loads) override
 Write states of the body-body loads in the provided list. More...
 
virtual void WriteLinMotors (const std::vector< std::shared_ptr< ChLinkMotorLinear >> &motors) override
 Write states of the linear motors in the provided list. More...
 
virtual void WriteRotMotors (const std::vector< std::shared_ptr< ChLinkMotorRotation >> &motors) override
 Write states of the rotational motors in the provided list. More...
 
virtual void WriteFile (const std::string &filename) override
 Write the checkpoint database to a disk file with the specified name.
 
virtual void OpenFile (const std::string &filename) override
 Open the checkpoint database from the disk file with the specified name.
 
virtual void ReadState (ChSystem *sys) override
 Read the system-level state in the input checkpoint database and initialize the given system with that state. More...
 
virtual void ReadTime (double &time) override
 Read the checkpoint time from the input checkpoint database. More...
 
virtual void ReadBodies (std::vector< std::shared_ptr< ChBody >> &bodies) override
 Read body states from the input checkpoint database and set them to the bodies in the provided list. More...
 
virtual void ReadShafts (std::vector< std::shared_ptr< ChShaft >> &shafts) override
 Read shaft states from the input checkpoint database and set them to the shafts in the provided list. More...
 
virtual void ReadJoints (std::vector< std::shared_ptr< ChLink >> &joints) override
 Read joint states from the input checkpoint database and set them to the joints in the provided list. More...
 
virtual void ReadCouples (std::vector< std::shared_ptr< ChShaftsCouple >> &couples) override
 Read couple states from the input checkpoint database and set them to the shaft couples in the provided list. More...
 
virtual void ReadLinSprings (std::vector< std::shared_ptr< ChLinkTSDA >> &springs) override
 Read spring states from the input checkpoint database and set them to the TSDAs in the provided list. More...
 
virtual void ReadRotSprings (std::vector< std::shared_ptr< ChLinkRSDA >> &springs) override
 Read spring states from the input checkpoint database and set them to the RSDAs in the provided list. More...
 
virtual void ReadBodyBodyLoads (std::vector< std::shared_ptr< ChLoadBodyBody >> &loads) override
 Read body-body load states from the input checkpoint database and set them to the loads in the provided list. More...
 
virtual void ReadLinMotors (std::vector< std::shared_ptr< ChLinkMotorLinear >> &motors) override
 Read motor states from the input checkpoint database and set them to the linear motors in the provided list. More...
 
virtual void ReadRotMotors (std::vector< std::shared_ptr< ChLinkMotorRotation >> &motors) override
 Read motor states from the input checkpoint database and set them to the rotational motors in the provided list. More...
 

Additional Inherited Members

- Public Types inherited from chrono::ChCheckpoint
enum  Format { Format::ASCII }
 Checkpoint output format. More...
 
enum  Type { Type::SYSTEM, Type::COMPONENT }
 Checkpoint type. More...
 
- Static Public Member Functions inherited from chrono::ChCheckpoint
static std::string GetFormatAsString (Format format)
 Return the provided checkpoint format as a string.
 
static std::string GetTypeAsString (Type type)
 Return the provided checkpoint type as a string.
 
- Protected Member Functions inherited from chrono::ChCheckpoint
 ChCheckpoint (Type type)
 
void CheckIfSystemType () const
 Verify that the checkpoint is of type SYSTEM.
 
void CheckIfComponentType () const
 Verify that the checkpoint is of type COMPONENT.
 
- Protected Attributes inherited from chrono::ChCheckpoint
Type m_type
 checkpoint database type
 

Member Function Documentation

◆ ReadBodies()

void chrono::ChCheckpointASCII::ReadBodies ( std::vector< std::shared_ptr< ChBody >> &  bodies)
overridevirtual

Read body states from the input checkpoint database and set them to the bodies in the provided list.

Only for a COMPONENT type checkpoint DB.

Implements chrono::ChCheckpoint.

◆ ReadBodyBodyLoads()

void chrono::ChCheckpointASCII::ReadBodyBodyLoads ( std::vector< std::shared_ptr< ChLoadBodyBody >> &  loads)
overridevirtual

Read body-body load states from the input checkpoint database and set them to the loads in the provided list.

Only for a COMPONENT type checkpoint DB.

Implements chrono::ChCheckpoint.

◆ ReadCouples()

void chrono::ChCheckpointASCII::ReadCouples ( std::vector< std::shared_ptr< ChShaftsCouple >> &  couples)
overridevirtual

Read couple states from the input checkpoint database and set them to the shaft couples in the provided list.

Only for a COMPONENT type checkpoint DB. Note that this list should only include kinematic shaft couples (i.e., no motors).

Implements chrono::ChCheckpoint.

◆ ReadJoints()

void chrono::ChCheckpointASCII::ReadJoints ( std::vector< std::shared_ptr< ChLink >> &  joints)
overridevirtual

Read joint states from the input checkpoint database and set them to the joints in the provided list.

Only for a COMPONENT type checkpoint DB. Note that this list should only include kinematic joints (i.e., no motors, springs, bushings).

Implements chrono::ChCheckpoint.

◆ ReadLinMotors()

void chrono::ChCheckpointASCII::ReadLinMotors ( std::vector< std::shared_ptr< ChLinkMotorLinear >> &  motors)
overridevirtual

Read motor states from the input checkpoint database and set them to the linear motors in the provided list.

Only for a COMPONENT type checkpoint DB.

Implements chrono::ChCheckpoint.

◆ ReadLinSprings()

void chrono::ChCheckpointASCII::ReadLinSprings ( std::vector< std::shared_ptr< ChLinkTSDA >> &  springs)
overridevirtual

Read spring states from the input checkpoint database and set them to the TSDAs in the provided list.

Only for a COMPONENT type checkpoint DB.

Implements chrono::ChCheckpoint.

◆ ReadRotMotors()

void chrono::ChCheckpointASCII::ReadRotMotors ( std::vector< std::shared_ptr< ChLinkMotorRotation >> &  motors)
overridevirtual

Read motor states from the input checkpoint database and set them to the rotational motors in the provided list.

Only for a COMPONENT type checkpoint DB.

Implements chrono::ChCheckpoint.

◆ ReadRotSprings()

void chrono::ChCheckpointASCII::ReadRotSprings ( std::vector< std::shared_ptr< ChLinkRSDA >> &  springs)
overridevirtual

Read spring states from the input checkpoint database and set them to the RSDAs in the provided list.

Only for a COMPONENT type checkpoint DB.

Implements chrono::ChCheckpoint.

◆ ReadShafts()

void chrono::ChCheckpointASCII::ReadShafts ( std::vector< std::shared_ptr< ChShaft >> &  shafts)
overridevirtual

Read shaft states from the input checkpoint database and set them to the shafts in the provided list.

Only for a COMPONENT type checkpoint DB.

Implements chrono::ChCheckpoint.

◆ ReadState()

void chrono::ChCheckpointASCII::ReadState ( ChSystem sys)
overridevirtual

Read the system-level state in the input checkpoint database and initialize the given system with that state.

Only for a SYSTEM type checkpoint DB.

Implements chrono::ChCheckpoint.

◆ ReadTime()

void chrono::ChCheckpointASCII::ReadTime ( double &  time)
overridevirtual

Read the checkpoint time from the input checkpoint database.

Only for a COMPONENT type checkpoint DB.

Implements chrono::ChCheckpoint.

◆ WriteBodies()

void chrono::ChCheckpointASCII::WriteBodies ( const std::vector< std::shared_ptr< ChBody >> &  bodies)
overridevirtual

Write states of the bodies in the provided list.

Only for a COMPONENT type checkpoint DB.

Implements chrono::ChCheckpoint.

◆ WriteBodyBodyLoads()

void chrono::ChCheckpointASCII::WriteBodyBodyLoads ( const std::vector< std::shared_ptr< ChLoadBodyBody >> &  loads)
overridevirtual

Write states of the body-body loads in the provided list.

Only for a COMPONENT type checkpoint DB.

Implements chrono::ChCheckpoint.

◆ WriteCouples()

void chrono::ChCheckpointASCII::WriteCouples ( const std::vector< std::shared_ptr< ChShaftsCouple >> &  couples)
overridevirtual

Write states of the shaft couples in the provided list.

Only for a COMPONENT type checkpoint DB. Note that this list should only include kinematic shaft couples (i.e., no motors).

Implements chrono::ChCheckpoint.

◆ WriteJoints()

void chrono::ChCheckpointASCII::WriteJoints ( const std::vector< std::shared_ptr< ChLink >> &  joints)
overridevirtual

Write states of the joints in the provided list.

Only for a COMPONENT type checkpoint DB. Note that this list should only include kinematic joints (i.e., no motors, springs, bushings).

Implements chrono::ChCheckpoint.

◆ WriteLinMotors()

void chrono::ChCheckpointASCII::WriteLinMotors ( const std::vector< std::shared_ptr< ChLinkMotorLinear >> &  motors)
overridevirtual

Write states of the linear motors in the provided list.

Only for a COMPONENT type checkpoint DB.

Implements chrono::ChCheckpoint.

◆ WriteLinSprings()

void chrono::ChCheckpointASCII::WriteLinSprings ( const std::vector< std::shared_ptr< ChLinkTSDA >> &  springs)
overridevirtual

Write states of the linear springs (TSDAs) in the provided list.

Only for a COMPONENT type checkpoint DB.

Implements chrono::ChCheckpoint.

◆ WriteRotMotors()

void chrono::ChCheckpointASCII::WriteRotMotors ( const std::vector< std::shared_ptr< ChLinkMotorRotation >> &  motors)
overridevirtual

Write states of the rotational motors in the provided list.

Only for a COMPONENT type checkpoint DB.

Implements chrono::ChCheckpoint.

◆ WriteRotSprings()

void chrono::ChCheckpointASCII::WriteRotSprings ( const std::vector< std::shared_ptr< ChLinkRSDA >> &  springs)
overridevirtual

Write states of the rotational springs (RSDAs) in the provided list.

Only for a COMPONENT type checkpoint DB.

Implements chrono::ChCheckpoint.

◆ WriteShafts()

void chrono::ChCheckpointASCII::WriteShafts ( const std::vector< std::shared_ptr< ChShaft >> &  shafts)
overridevirtual

Write states of the shafts in the provided list.

Only for a COMPONENT type checkpoint DB.

Implements chrono::ChCheckpoint.

◆ WriteState()

void chrono::ChCheckpointASCII::WriteState ( ChSystem sys)
overridevirtual

Write the entire state of the provided Chrono system.

Only for a SYSTEM type checkpoint DB.

Implements chrono::ChCheckpoint.

◆ WriteTime()

void chrono::ChCheckpointASCII::WriteTime ( double  time)
overridevirtual

Write the checkpoint time.

Only for a COMPONENT type checkpoint DB.

Implements chrono::ChCheckpoint.


The documentation for this class was generated from the following files:
  • /builds/uwsbel/chrono/src/chrono/output/ChCheckpointASCII.h
  • /builds/uwsbel/chrono/src/chrono/output/ChCheckpointASCII.cpp