File tree Expand file tree Collapse file tree 1 file changed +13
-11
lines changed
Expand file tree Collapse file tree 1 file changed +13
-11
lines changed Original file line number Diff line number Diff line change @@ -328,19 +328,21 @@ void initialize(Simulation* simulation, Vector<double>& timeP)
328328 dmsg.banner ();
329329 #endif
330330
331- std::string hist_file_name;
331+ // Setup logging to history file.
332+ if (!simulation->com_mod .cm .slv (simulation->cm_mod )) {
333+ std::string hist_file_name;
332334
333- if (chnl_mod.appPath != " " ) {
334- auto mkdir_arg = std::string (" mkdir -p " ) + chnl_mod.appPath ;
335- std::system (mkdir_arg.c_str ());
336- hist_file_name = chnl_mod.appPath + " /" + simulation->history_file_name ;
337- } else {
338- hist_file_name = simulation->history_file_name ;
339- }
335+ if (chnl_mod.appPath != " " ) {
336+ auto mkdir_arg = std::string (" mkdir -p " ) + chnl_mod.appPath ;
337+ std::system (mkdir_arg.c_str ());
338+ hist_file_name = chnl_mod.appPath + " /" + simulation->history_file_name ;
339+ } else {
340+ hist_file_name = simulation->history_file_name ;
341+ }
340342
341- // Setup logging to history file.
342- bool output_to_cout = true ;
343- simulation-> logger . initialize (hist_file_name, output_to_cout);
343+ bool output_to_cout = true ;
344+ simulation-> logger . initialize (hist_file_name, output_to_cout) ;
345+ }
344346
345347 #ifdef debug_initialize
346348 dmsg << " Set time " << std::endl;
You can’t perform that action at this time.
0 commit comments