libROM  v1.0
Data-driven physical simulation library
Static Public Member Functions | List of all members
CAROM::Utilities Struct Reference

#include <Utilities.h>

Static Public Member Functions

static void abort (const std::string &message, const std::string &filename, int line)
 Cleanly ends the program when something horrible happened and prints a message about what took place. Takes into account whether MPI is or isn't running to decide how to die. More...
 
static std::string processorToString (int processorID)
 Converts a processor ID to a string. Use this to ensure same width is used when converting a processor ID to a string representation. More...
 
static bool file_exist (const std::string &filename)
 Verifies if a file exists. More...
 

Detailed Description

Struct BasisGenerator defines Utilities contains basic, static, utility routines for error reporting, string manipulations, etc.

Definition at line 86 of file Utilities.h.

Member Function Documentation

◆ abort()

void CAROM::Utilities::abort ( const std::string &  message,
const std::string &  filename,
int  line 
)
static

Cleanly ends the program when something horrible happened and prints a message about what took place. Takes into account whether MPI is or isn't running to decide how to die.

Parameters
[in]messageMessage to print about the cause of the abort.
[in]filenameName of the file where the abort was called.
[in]lineLine number in the file where the abort was called.

Definition at line 25 of file Utilities.cpp.

◆ file_exist()

bool CAROM::Utilities::file_exist ( const std::string &  filename)
static

Verifies if a file exists.

Parameters
[in]filenameName of the file to be verified.
Returns
true if the file exists.

Definition at line 70 of file Utilities.cpp.

◆ processorToString()

std::string CAROM::Utilities::processorToString ( int  processorID)
static

Converts a processor ID to a string. Use this to ensure same width is used when converting a processor ID to a string representation.

Parameters
[in]processorIDof the processor
Returns
The string representation of processor ID of fixed width prepended with 0s.

Definition at line 55 of file Utilities.cpp.


The documentation for this struct was generated from the following files: