chrono::synchrono::SynSCMTerrain Class Reference

Description

Class that wraps and synchronizes deformable terrain between Chrono Systems.

#include <SynSCMTerrain.h>

Inheritance diagram for chrono::synchrono::SynSCMTerrain:
Collaboration diagram for chrono::synchrono::SynSCMTerrain:

Public Member Functions

 SynSCMTerrain (std::shared_ptr< vehicle::SCMDeformableTerrain > terrain, ChSystem *system)
 Create SynSCMTerrain by optionally adding an underlying SCMDeformableTerrain. More...
 
 SynSCMTerrain (ChSystem *system, const std::string &filename)
 NOT YET SUPPORTED - Construct deformable terrain on a particular system from a json file.
 
 ~SynSCMTerrain ()
 Empty destructor.
 
void SetSoilParametersFromStruct (SCMParameters *params)
 Set terrain's soil parameters from the passed struct. More...
 
void Advance (double step) override
 Call terrain.Advance(step) and save any new nodes that were changed into our m_scm_terrain record of them. More...
 
virtual void ProcessMessage (SynMessage *message) override
 Apply a list of received node changes to our underlying terrain object. More...
 
virtual void GenerateMessagesToSend (std::vector< SynMessage * > &messages, int rank) override
 Pack all changes we have made to our SCMDeformableTerrain in the preceding heartbeat into a message. More...
 
void SetTerrain (std::shared_ptr< vehicle::SCMDeformableTerrain > terrain)
 
virtual std::shared_ptr< vehicle::ChTerrainGetTerrain () override
 Get the terrain.
 
std::shared_ptr< vehicle::SCMDeformableTerrainGetSCMTerrain ()
 
- Public Member Functions inherited from chrono::synchrono::SynTerrain
virtual void Synchronize (double time)
 Advance the state of the terrain system by the specified duration.
 
double GetHeight (const ChVector<> &loc)
 Get the terrain height below the specified location.
 

Additional Inherited Members

- Static Public Member Functions inherited from chrono::synchrono::SynTerrain
static rapidjson::Document ParseTerrainFileJSON (const std::string &filename)
 

Constructor & Destructor Documentation

◆ SynSCMTerrain()

chrono::synchrono::SynSCMTerrain::SynSCMTerrain ( std::shared_ptr< vehicle::SCMDeformableTerrain terrain,
ChSystem system 
)
inline

Create SynSCMTerrain by optionally adding an underlying SCMDeformableTerrain.

Parameters
terrainShared pointer to the terrain object this class will use and sync

Member Function Documentation

◆ Advance()

void chrono::synchrono::SynSCMTerrain::Advance ( double  step)
overridevirtual

Call terrain.Advance(step) and save any new nodes that were changed into our m_scm_terrain record of them.

Parameters
stepduration to advance the state of the terrain

Reimplemented from chrono::synchrono::SynTerrain.

◆ GenerateMessagesToSend()

void chrono::synchrono::SynSCMTerrain::GenerateMessagesToSend ( std::vector< SynMessage * > &  messages,
int  rank 
)
overridevirtual

Pack all changes we have made to our SCMDeformableTerrain in the preceding heartbeat into a message.

Clear out our record of changes to start recording fresh for the next heartbeat

Parameters
messagesWhere to add this data to
rankWhich rank we are attached to (only our agent knows)

Implements chrono::synchrono::SynTerrain.

◆ ProcessMessage()

void chrono::synchrono::SynSCMTerrain::ProcessMessage ( SynMessage message)
overridevirtual

Apply a list of received node changes to our underlying terrain object.

This happens via SCMDeformableTerrain::SetModifiedNodes(changed_nodes)

Parameters
messageSynMessage* with terrain data on nodes changed by a different rank

Implements chrono::synchrono::SynTerrain.

◆ SetSoilParametersFromStruct()

void chrono::synchrono::SynSCMTerrain::SetSoilParametersFromStruct ( SCMParameters params)

Set terrain's soil parameters from the passed struct.

Parameters
paramsPhysical parameters for terrain, see SCMParameters struct

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