User-defined log file.
This class can be used to generate log files to track the progress of the simulation. It will be very helpful in debugging during plugin development. In the plugin class, you can declare a pointer to this class as
plugin_log_utility::PFPLUGIN* txt_log;
Then it can allocated in the load_arguments() method as:
string logfile_name(args_ext.calc_name() + ".txt");
string logfile_path( args_ext.vtk_dir() + "/");
A C++ interpretor for phase-field model arguments PF_ARGS.
Definition: PanPhaseFieldArguments.h:227
User-defined log file.
Definition: pfm_writers.h:1581
Then anywhere in the code, custom log messages can be printed using the following syntax
txt_log->write("String can be printed like this");
double value=0.5;
txt_log->write("Variable value",value);
Also, kindly delete its memory at the end of the simulation in the destructor of the plugin.
if(txt_log!=NULL) {
delete txt_log;
txt_log=NULL;
}