30 #ifndef _UTILITIES_HPP_ 31 #define _UTILITIES_HPP_ 54 std::cout <<
" COMMAND LINE FLAGS TO PROVIDE: \n";
55 std::cout <<
" -dir : Location of the working directory. \n";
56 std::cout <<
" -file : Name of the SeismoVLAB file to be loaded. \n";
58 std::cout <<
" \x1B[33mRun \x1B[0m: mpirun -np n ./SeismoVLAB.exe -dir '/path/to/files' -file 'model.#.$.json'\n\n";
68 tm *timePtr = localtime(&t);
69 unsigned int year = timePtr->tm_year + 1900;
73 std::cout <<
" ███████╗ ░░░░ ░░░░ ░░░░░░░ ░░░░ ██╗ ██╗ ██╗ ░░░ ░░░░ \n";
74 std::cout <<
" ██╔════╝ ░ ░ ░ ░ ░ ░ ░ ░ ██║ ██║ ██║ ░ ░ ░ ░ \n";
75 std::cout <<
" ███████╗ ░░░ ░ ░░░░ ░ ░ ░ ░███╗██║ ██║ ██║ ░ ░ ░░░░ \n";
76 std::cout <<
" ╚════██║ ░ ░ ░ ░ ░ ░ ░╚═░╝╚██╗ ██╔╝ ██║ ░░░░░ ░ ░ \n";
77 std::cout <<
" ███████║ ░░░░ ░ ░░░░ ░ ░ ░ ░░░░ ╚████╔╝ ███████╗ ░ ░░░░ \n";
78 std::cout <<
" ╚══════╝ ╚═══╝ ╚══════╝ \n";
79 std::cout <<
" Seismo Virtual Laboratory \n";
80 std::cout <<
" Module for Serial and Parallel Analysis of seismic \n";
81 std::cout <<
" wave propagation and soil-structure interaction simulation \n";
82 std::cout <<
" Copyright (C) " << year <<
", The California Institute of Technology\n";
83 std::cout <<
" All Rights Reserved. \n";
85 std::cout <<
" \033[1;34mWritten by: \033[1;0m\n";
86 std::cout <<
" Danilo S. Kusanovic (dkusanov@caltech.edu) \n";
87 std::cout <<
" Elnaz E. Seylabi (elnaze@unr.edu) \n";
89 std::cout <<
" \033[1;33mSupervised by: \033[1;0m\n";
90 std::cout <<
" Domniki M. Asimaki (domniki@caltech.edu) \n";
108 if(strcasecmp(argv[iter],
"--help") == 0){
111 else if(strcasecmp(argv[iter],
"--h") == 0){
121 if(strcasecmp(argv[iter],
"-file") == 0){
126 std::string jsonfile = std::string(argv[iter + nfile]);
130 if((iter + nfile + 1) < argc){
131 if(strcasecmp(argv[iter + nfile + 1],
"--h" ) == 0)
break;
132 if(strcasecmp(argv[iter + nfile + 1],
"-dir" ) == 0)
break;
133 if(strcasecmp(argv[iter + nfile + 1],
"--help") == 0)
break;
142 if(strcasecmp(argv[iter],
"-dir") == 0){
143 filePath = std::string(argv[iter + 1]);
157 std::cout <<
"\x1B[31m ERROR: \x1B[0mNOT ENOUGH Command line input arguments.\n";
void printHelp(bool &help)
Prints out Command Line help.
Definition: Utilities.hpp:50
int rank
The processor number.
This file sets the global variables to be used during SeismoVLAB execution.
std::vector< std::string > fileName
The file name to be loaded.
void CommandLine(int argc, char **argv)
Parse Command Line Inputs.
Definition: Utilities.hpp:97
bool driverFile
Whether the driver (JSON) file is provided.
std::string filePath
The folder path where the file is loaded.
void printLogo()
Prints Seismo-VLAB software header.
Definition: Utilities.hpp:64