src/io.cc
//! Return input file name of mesh/submesh/soil particles
//! or an empty string if specified file for the key is not found
Return input file name of mesh/submesh/soil particles
or an empty string if specified file for the key is not found
Return input file name of mesh / submesh / soil particles or an empty string if specified file for the key is not found
std::string mpm::IO::file_name(const std::string& filename) {
  std::string file_name;
  try {
    file_name = working_dir_ +
                json_["input_files"][filename].template get<std::string>();
  } catch (const std::exception& except) {
    console_->warn("Invalid JSON argument: {}; error: {}", filename,
                   except.what());
    file_name.clear();
    return file_name;
  }
  if (!this->check_file(file_name)) file_name.clear();
  return file_name;
}
std :: string mpm :: IO :: file_name ( const std :: string & filename ) { std :: string file_name ; try { file_name = working_dir_ + json_ [ " " ] [ filename ] . template get < std :: string > ( ) ; } catch ( const std :: exception & except ) { console_ -> warn ( " " , filename , except . what ( ) ) ; file_name . clear ( ) ; return file_name ; } if ( ! this -> check_file ( file_name ) ) file_name . clear ( ) ; return file_name ; }
Return input file name of mesh/submesh/soil particles
or an empty string if specified file for the key is not found
Return input file name of mesh / submesh / soil particles or an empty string if specified file for the key is not found
// Read input file name from the JSON object // Check if a file is present, if not set file_name to empty