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


Classes | |
| struct | OutputParameters |
| Output parameters. More... | |
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 | Output () const |
| Return true if generating output. | |
| ChOutput::Type | GetOutputType () const |
| Return the output type. | |
| ChOutput::Mode | GetOutputMode () const |
| Return the output mode. | |
| virtual double | GetOutputFPS () const |
| Return the output frequency. | |
| virtual void | SaveOutput (int frame) |
| Save simulation output results at the current time. 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... | |
Protected Types | |
| enum | DataPathType { ABS, REL } |
Protected Member Functions | |
| void | ReadOutputParams (const YAML::Node &a) |
| Read output settings from specified YAML node. | |
| std::string | GetDatafilePath (const std::string &filename) |
| Return the path to the specified data file. | |
Static Protected Member Functions | |
| static void | CheckVersion (const YAML::Node &a) |
| static std::string | ToUpper (std::string in) |
| static YamlFileType | ReadYamlFileType (const YAML::Node &a) |
| Read the YAML file type. | |
| static DataPathType | ReadDataPathType (const YAML::Node &a) |
| Read the data path type (absolute or relative). | |
| static ChVector3d | ReadVector (const YAML::Node &a) |
| Load and return a ChVector3d from the specified node. | |
| static ChQuaterniond | ReadQuaternion (const YAML::Node &a) |
| Load and return a ChQuaternion from the specified node. | |
| static ChQuaterniond | ReadCardanAngles (const YAML::Node &a, bool use_degrees) |
| Load a Cardan angle sequence from the specified node and return as a quaternion. More... | |
| static ChQuaterniond | ReadRotation (const YAML::Node &a, bool use_degrees) |
| Return a quaternion loaded from the specified node. More... | |
| static ChCoordsysd | ReadCoordinateSystem (const YAML::Node &a, bool use_degrees) |
| Load and return a coordinate system from the specified node. | |
| static std::shared_ptr< ChFunction > | ReadFunction (const YAML::Node &a, bool use_degrees) |
| Load and return a ChFunction object from the specified node. | |
| static ChColor | ReadColor (const YAML::Node &a) |
| Load and return a ChColor from the specified node. | |
| static ChOutput::Type | ReadOutputType (const YAML::Node &a) |
| static ChOutput::Mode | ReadOutputMode (const YAML::Node &a) |
| static void | PrintNodeType (const YAML::Node &node) |
| Print YAML node 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) | |
| std::string | m_output_dir |
| root oputput directory | |
| std::shared_ptr< ChOutput > | m_output_db |
| output database | |
| DataPathType | m_data_path |
| std::string | m_rel_path |
| std::string | m_script_directory |
| OutputParameters | m_output |
Member Function Documentation
◆ ReadCardanAngles()
|
staticprotected |
Load a Cardan angle sequence from the specified node and return as a quaternion.
The sequence is assumed to be extrinsic rotations X-Y-Z.
◆ ReadRotation()
|
staticprotected |
Return a quaternion loaded from the specified node.
Data is assumed to provide a quaternion or a Cardan extrinsic X-Y-Z angle set.
◆ ReadYamlFileType()
|
static |
Peek in specified YAML file and read the fluid system type.
Throws a runtime error if the type is unknown.
◆ SaveOutput()
|
virtual |
Save simulation output results at the current time.
This base class implementation creates and initializes the output database. Derived classes must
Reimplemented in chrono::parsers::ChParserSphYAML, and chrono::parsers::ChParserTdpfYAML.
◆ SetOutputDir()
|
virtual |
Set root output directory (default: ".").
The specified directory must exist.
Reimplemented in chrono::parsers::ChParserFsiYAML.
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