Description
Base class for all YAML parsers.
#include <ChParserYAML.h>


Public Types | |
| enum | YamlFileType { MBS, SPH, TDPF, FSI, VEHICLE, UNKNOWN } |
| Type of a Chrono YAML specification file. | |
Public Member Functions | |
| void | SetVerbose (bool verbose) |
| Set verbose terminal output (default: false). | |
| virtual void | SetOutputDir (const std::string &out_dir) |
| Set root output directory (default: "."). More... | |
| const std::string & | GetName () const |
| Return the name of the YAML model. | |
| virtual bool | OutputEnabled () const |
| Return true if generating output. | |
| const ChOutput::Settings & | GetOutputSettings () const |
| Return all output settings. | |
| ChOutput::Format | GetOutputFormat () const |
| Return the output type. | |
| ChOutput::Mode | GetOutputMode () const |
| Return the output mode. | |
| virtual double | GetOutputFPS () const |
| Return the output frequency. | |
| virtual bool | VisualizationEnabled () const |
| Return true if visualization is enabled. | |
| const ChVisualSystem::Settings & | GetVisualizationSettings () const |
| Return all visualization settings. | |
| double | GetRenderFPS () const |
| CameraVerticalDir | GetCameraVerticalDir () const |
| const ChVector3d & | GetCameraLocation () const |
| const ChVector3d & | GetCameraTarget () const |
| bool | EnableShadows () const |
| bool | WriteImages () const |
| const std::string & | GetImageDir () const |
| virtual void | LoadSimData (const YAML::Node &yaml) |
| Load simulation settings for this parser from the specified YAML node. More... | |
| virtual void | WriteOutput (int frame, double time) |
| Write simulation output results at the current time. More... | |
| virtual void | Output (double time) |
| Generate output at the current frame. More... | |
| virtual bool | Render (ChVisualSystem &vis, double time) |
| Render the current frame using the specified visual system if run-time visualization is available and enabled. More... | |
Static Public Member Functions | |
| static YamlFileType | ReadYamlFileType (const std::string &yaml_filename) |
| Peek in specified YAML file and read the fluid system type. More... | |
Static Protected Member Functions | |
| static YamlFileType | ReadYamlFileType (const YAML::Node &a) |
| Read the YAML file type. | |
Protected Attributes | |
| std::string | m_name |
| name of the YAML model | |
| bool | m_verbose |
| verbose terminal output (default: false) | |
| bool | m_use_degrees |
| all angles given in degrees (default: true) | |
| ChVisualSystem::Settings | m_vis_settings |
| visualization settings | |
| ChOutput::Settings | m_output_settings |
| output settings | |
| std::string | m_output_dir |
| root output directory | |
| std::shared_ptr< ChOutput > | m_output_db |
| output database | |
| ChYamlFileHandler | m_file_handler |
| handler for data file paths | |
Member Function Documentation
◆ LoadSimData()
|
virtual |
Load simulation settings for this parser from the specified YAML node.
This function reads settings common to all Chrono YAML parsers (run-time visualization and output). A derived class must also read any additional parser-specific simulation settings.
Reimplemented in chrono::parsers::ChParserMbsYAML, chrono::parsers::ChParserTdpfYAML, chrono::parsers::ChParserSphYAML, and chrono::parsers::ChParserFsiYAML.
◆ Output()
|
virtual |
Generate output at the current frame.
This function ensures that output occurs at the specified frequency.
Reimplemented in chrono::parsers::ChParserFsiYAML.
◆ ReadYamlFileType()
|
static |
Peek in specified YAML file and read the fluid system type.
Throws a runtime error if the type is unknown.
◆ Render()
|
virtual |
Render the current frame using the specified visual system if run-time visualization is available and enabled.
Returns false if the visual system must shut down. This function ensures that frames are rendered at the specified frequency. If requested, snapshots are saved to disk.
◆ SetOutputDir()
|
virtual |
Set root output directory (default: ".").
The specified directory must exist.
Reimplemented in chrono::parsers::ChParserFsiYAML.
◆ WriteOutput()
|
virtual |
Write simulation output results at the current time.
This base class implementation creates and initializes the output database. Derived classes must
Reimplemented in chrono::parsers::ChParserMbsYAML, chrono::parsers::ChParserSphYAML, and chrono::parsers::ChParserTdpfYAML.
The documentation for this class was generated from the following files:
- /builds/uwsbel/chrono/src/chrono_parsers/yaml/ChParserYAML.h
- /builds/uwsbel/chrono/src/chrono_parsers/yaml/ChParserYAML.cpp