BubbleProfiler
0.3.0
by Peter Athron, Csaba Balazs, Michael Bardsley, Andrew Fowlie, Dylan Harries & Graham White
|
Observes the profile during iteration and writes out profile, perturbations and action for each step to file. More...
#include <observers.hpp>
Public Member Functions | |
Profile_observer (const std::vector< std::string > &fields_, const std::string &output_path_, const Potential &potential_) | |
Profile_observer (const Profile_observer &)=delete | |
Profile_observer & | operator= (const Profile_observer &)=delete |
void | operator() (const Field_profiles &profile, const Field_profiles &perturbation) |
Private Member Functions | |
void | write_initial_action_to_file (const Field_profiles &profiles) |
void | write_initial_profiles_to_file (const Field_profiles &profiles) |
void | write_initial_perturbations_to_file () |
void | write_field_profiles_to_file (std::ofstream &stream, const Field_profiles &profiles) |
void | write_action_to_file (const Field_profiles &profiles) |
Private Attributes | |
int | iteration_count {0} |
std::vector< std::string > | fields {} |
std::string | output_path {} |
const Potential & | potential |
std::ofstream | action_file |
std::ofstream | profiles_file |
std::ofstream | perturbations_file |
logging::Basic_logger | logger {} |
Observes the profile during iteration and writes out profile, perturbations and action for each step to file.
Definition at line 50 of file observers.hpp.
BubbleProfiler::Profile_observer::Profile_observer | ( | const std::vector< std::string > & | fields_, |
const std::string & | output_path_, | ||
const Potential & | potential_ | ||
) |
Definition at line 29 of file observers.cpp.
References action_file, output_path, perturbations_file, and profiles_file.
|
delete |
void BubbleProfiler::Profile_observer::operator() | ( | const Field_profiles & | profile, |
const Field_profiles & | perturbation | ||
) |
Definition at line 115 of file observers.cpp.
References iteration_count, perturbations_file, profiles_file, write_action_to_file(), write_field_profiles_to_file(), write_initial_action_to_file(), write_initial_perturbations_to_file(), and write_initial_profiles_to_file().
|
delete |
|
private |
Definition at line 102 of file observers.cpp.
References gaussian_alpha_tests::action, action_file, BubbleProfiler::calculate_action(), iteration_count, BubbleProfiler::logging::Basic_logger::log_message(), logger, potential, and BubbleProfiler::logging::Trace.
Referenced by operator()(), and write_initial_action_to_file().
|
private |
Definition at line 79 of file observers.cpp.
References fields, BubbleProfiler::Field_profiles::get_field_profiles(), BubbleProfiler::Field_profiles::get_spatial_grid(), iteration_count, and gaussian_alpha_tests::n_fields.
Referenced by operator()(), and write_initial_profiles_to_file().
|
private |
Definition at line 42 of file observers.cpp.
References action_file, and write_action_to_file().
Referenced by operator()().
|
private |
Definition at line 68 of file observers.cpp.
References fields, and perturbations_file.
Referenced by operator()().
|
private |
Definition at line 52 of file observers.cpp.
References fields, BubbleProfiler::logging::Basic_logger::log_message(), logger, profiles_file, BubbleProfiler::logging::Trace, and write_field_profiles_to_file().
Referenced by operator()().
|
private |
Definition at line 65 of file observers.hpp.
Referenced by Profile_observer(), write_action_to_file(), and write_initial_action_to_file().
|
private |
Definition at line 62 of file observers.hpp.
Referenced by write_field_profiles_to_file(), write_initial_perturbations_to_file(), and write_initial_profiles_to_file().
|
private |
Definition at line 61 of file observers.hpp.
Referenced by operator()(), write_action_to_file(), and write_field_profiles_to_file().
|
private |
Definition at line 68 of file observers.hpp.
Referenced by write_action_to_file(), and write_initial_profiles_to_file().
|
private |
Definition at line 63 of file observers.hpp.
Referenced by Profile_observer().
|
private |
Definition at line 67 of file observers.hpp.
Referenced by operator()(), Profile_observer(), and write_initial_perturbations_to_file().
|
private |
Definition at line 64 of file observers.hpp.
Referenced by write_action_to_file().
|
private |
Definition at line 66 of file observers.hpp.
Referenced by operator()(), Profile_observer(), and write_initial_profiles_to_file().