821 int main(
int argc,
char** argv)
828 fprintf(stdout,
" %s\n",KSpaceSolver.
GetCodeName().c_str());
854 fprintf(stdout,
"........ Initialization ........\n");
855 fprintf(stdout,
"Memory allocation ..........");
866 fprintf(stdout,
"Failed!\nK-Wave panic: Not enough memory to run this simulation!\n%s\n",e.what());
867 fprintf(stderr,
"K-Wave panic: Not enough memory to run this simulation! \n%s\n",e.what());
870 fprintf(stdout,
"Done\n");
874 fprintf(stdout,
"Data loading................");
880 catch (ios::failure e)
882 fprintf(stdout,
"Failed!\nK-Wave panic: Data loading was not successful!\n%s\n",e.what());
883 fprintf(stderr,
"K-Wave panic: Data loading was not successful! \n%s\n",e.what());
886 fprintf(stdout,
"Done\n");
888 fprintf(stdout,
"Elapsed time: %8.2fs\n",KSpaceSolver.
GetDataLoadTime());
892 fprintf(stdout,
"Recovered from t_index: %8ld\n", Parameters->
Get_t_index());
897 fprintf(stdout,
".......... Computation .........\n");
902 fprintf(stdout,
"............ Summary ...........\n");
906 fprintf(stdout,
"This leg execution time:%7.2fs\n",KSpaceSolver.
GetTotalTime());
912 fprintf(stdout,
" End of computation \n");
void ParseCommandLine(int argc, char **argv)
Parse command line.
void PrintFullNameCodeAndLicense(FILE *file)
Print the code name and license.
double GetTotalTime() const
Get total simulation time.
size_t GetNumberOfThreads() const
Get number of threads.
void SetProcessorAffinity()
Set processor affinity.
int main(int argc, char **argv)
bool IsVersion() const
Is –version specified at the command line?
virtual size_t ShowMemoryUsageInMB()
Get memory usage in MB.
The header file containing the main class of the project responsible for the entire simulation...
static const char * FMT_SmallSeparator
separator
size_t Get_t_index() const
Get simulation time step.
Class storing all parameters of the simulation.
double GetCumulatedTotalTime() const
Get total simulation time cumulated over all legs.
virtual void LoadInputData()
Load simulation data from the input file.
virtual void PrintParametersOfSimulation(FILE *file)
Print parameters of the simulation.
string GetCodeName()
Get code name.
virtual void Compute()
Compute the 3D kspace first order simulation.
virtual void AllocateMemory()
Memory allocation.
double GetDataLoadTime() const
Get data load time.
Class responsible for running the k-space first order 3D method.
static TParameters * GetInstance()
Get instance of the singleton class.