1
0
Fork 0
mirror of https://github.com/cosmo-sims/monofonIC.git synced 2024-09-18 15:53:45 +02:00

minor refactoring

This commit is contained in:
Oliver Hahn 2020-08-30 12:16:34 +02:00
parent 2a99302172
commit 063a43d60e
3 changed files with 14 additions and 11 deletions

View file

@ -25,9 +25,9 @@
namespace ic_generator{
int Run( config_file& the_config );
int run( config_file& the_config );
int Initialise( config_file& the_config );
int initialise( config_file& the_config );
void reset();

View file

@ -40,7 +40,7 @@ std::unique_ptr<RNG_plugin> the_random_number_generator;
std::unique_ptr<output_plugin> the_output_plugin;
std::unique_ptr<cosmology::calculator> the_cosmo_calc;
int Initialise( config_file& the_config )
int initialise( config_file& the_config )
{
the_random_number_generator = std::move(select_RNG_plugin(the_config));
the_output_plugin = std::move(select_output_plugin(the_config));
@ -55,7 +55,7 @@ void reset () {
the_cosmo_calc.reset();
}
int Run( config_file& the_config )
int run( config_file& the_config )
{
//--------------------------------------------------------------------------------------------------------
// Read run parameters

View file

@ -221,12 +221,12 @@ int main( int argc, char** argv )
#else
music::ilog << "FFTW_ESTIMATE" << std::endl;
#endif
//--------------------------------------------------------------------
///////////////////////////////////////////////////////////////////////
// Initialise plug-ins
//--------------------------------------------------------------------
try
{
ic_generator::Initialise( the_config );
ic_generator::initialise( the_config );
}catch(...){
handle_eptr( std::current_exception() );
music::elog << "Problem during initialisation. See error(s) above. Exiting..." << std::endl;
@ -235,17 +235,20 @@ int main( int argc, char** argv )
#endif
return 1;
}
///////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////
// do the job...
///////////////////////////////////////////////////////////////////////
ic_generator::Run( the_config );
// particle::test_plt();
ic_generator::run( the_config );
///////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////
// call the destructor of plugins before tearing down MPI
ic_generator::reset();
///////////////////////////////////////////////////////////////////////
#if defined(USE_MPI)
MPI_Barrier(MPI_COMM_WORLD);