chrono::parsers::ChParserSphYAML Class Reference

Description

Utility class to parse YAML specification files for Chrono::SPH models and simulations.

The parser caches model information and simulation settings from the corresponding YAML input files and then allows populating an FSI Chrono::SPH system and setting solver and simulation parameters.

#include <ChParserSphYAML.h>

Inheritance diagram for chrono::parsers::ChParserSphYAML:
Collaboration diagram for chrono::parsers::ChParserSphYAML:

Public Member Functions

 ChParserSphYAML (const std::string &yaml_model_filename, const std::string &yaml_sim_filename, bool verbose=false)
 Create a YAML parser and load the model from the specified input YAML file.
 
bool HasSimulationData () const
 Return true if a YAML simulation file has been loaded.
 
bool HasModelData () const
 Return true if a YAML model file has been loaded.
 
void LoadModelFile (const std::string &yaml_filename)
 Load the model from the specified input YAML model file.
 
void LoadSimulationFile (const std::string &yaml_filename)
 Load the simulation parameters from the specified input YAML simulation file.
 
const std::string & GetName () const
 Return the name of the YAML model.
 
double GetTimestep () const
 
double GetEndtime () const
 
std::shared_ptr< fsi::sph::ChFsiProblemSPHCreateFsiProblemSPH (bool initialize=true)
 Create and return a Chrono FSI problem configured from cached model and simulation parameters. More...
 
bool Render () const
 
bool UseSplashurf () const
 
ChOutput::Type GetOutputType () const
 
double GetOutputFPS () const
 
virtual bool Output () const override
 Return true if generating output.
 
void SetOutputDir (const std::string &out_dir)
 Set root output directory (default: "").
 
virtual void SaveOutput (int frame) override
 Save simulation output results at the current time.
 
- Public Member Functions inherited from chrono::parsers::ChParserCfdYAML
 ChParserCfdYAML (bool verbose=false)
 
void SetVerbose (bool verbose)
 Set verbose terminal output (default: false).
 
void SetOutputDir (const std::string &out_dir)
 Set root output directory (default: "").
 
FluidSystemType GetType () const
 Return the fluid system type.
 

Additional Inherited Members

- Public Types inherited from chrono::parsers::ChParserCfdYAML
enum  FluidSystemType { SPH, BEM }
 
- Static Public Member Functions inherited from chrono::parsers::ChParserCfdYAML
static void CheckVersion (const YAML::Node &a)
 Check version in YAML file against the Chrono version.
 
static std::string ToUpper (std::string in)
 Convert string to upper case.
 
static FluidSystemType ReadFluidSystemType (const std::string &yaml_filename)
 Peek in specified YAML file and read the fluid system type. More...
 
- Protected Attributes inherited from chrono::parsers::ChParserCfdYAML
bool m_verbose
 
FluidSystemType m_type
 
std::string m_output_dir
 

Member Function Documentation

◆ CreateFsiProblemSPH()

std::shared_ptr< fsi::sph::ChFsiProblemSPH > chrono::parsers::ChParserSphYAML::CreateFsiProblemSPH ( bool  initialize = true)

Create and return a Chrono FSI problem configured from cached model and simulation parameters.

By default, the Chrono FSI problem is initialized (with no associated MBS system). If a system is attached after creation, the caller must create the FSI problem with initialize=false, attach an MBS to the problem with ChFsiProblemSPH::AttachMultibodySystem, and then explictly invoke ChFsiProblemSPH::Initialize().


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