|
MADNESS 0.10.1
|
small class for pretty printing of test output More...
#include <test_utilities.h>
Public Member Functions | |
| test_output (std::string line, bool print=true) | |
| ~test_output () | |
| void | checkpoint (bool success, std::string message, double time=-1.0) |
| void | checkpoint (double error, double tol, std::string message, double time=-1.0) |
| void | checkpoint (double value, double reference, double tol, std::string message, double time=-1.0) |
| int | end (bool success=true) |
| bool | get_final_success () const |
| void | print_and_clear_log () |
| void | print_success_fail (std::ostream &os, bool success, double time, double error) const |
| void | set_cout_to_logger () |
| void | set_cout_to_terminal (bool newline=true) |
| newline for use by user, not for internal use (e.g. checkpoint()) | |
| void | set_do_print (bool print) |
Static Public Member Functions | |
| static std::string | ltrim_to_length (std::string line, long length=70) |
Public Attributes | |
| std::stringstream | logger |
Private Attributes | |
| bool | cout_set_to_logger =false |
| bool | do_print =true |
| bool | final_success =true |
| bool | have_checkpoints =false |
| std::streambuf * | stream_buffer_cout |
| double | time_begin =0.0 |
| double | time_last_checkpoint =0.0 |
small class for pretty printing of test output
|
inline |
| [in] | use | as if (world.rank()==0) to avoid printing on all ranks |
References madness::cpu_time(), do_print, logger, ltrim_to_length(), set_cout_to_logger(), time_begin, and time_last_checkpoint.
|
inline |
References set_cout_to_terminal().
|
inline |
|
inline |
References cout_set_to_logger, madness::cpu_time(), do_print, madness::error(), final_success, have_checkpoints, ltrim_to_length(), madness::print(), print_and_clear_log(), print_success_fail(), set_cout_to_logger(), set_cout_to_terminal(), and time_last_checkpoint.
Referenced by run_all_calculations(), test_arithmetic(), test_combined_operators(), test_consolidate(), test_construction_optimization(), test_constructor(), test_conversion(), test_copy_function_from_other_world(), test_copy_function_from_other_world_through_cloud(), test_custom_serialization(), test_deferred(), test_ethylene(), test_full_rank_functor(), test_hartree_product(), test_immediate(), test_inner(), test_inner(), test_integration(), test_load_store(), test_molecular_grid(), test_mpi_group(), test_multiply(), test_multiply(), test_multiply_with_f12(), test_node_replicated_function(), test_norm(), test_operator_apply(), test_partial_inner_3d(), test_partial_inner_6d(), test_pointer_to_funcimpl(), test_projector(), test_projector(), test_projector_outer(), test_Q12_projector(), test_replication_policy(), test_scalar_multiplication(), test_simple(), test_swap_particles(), test_transform(), test_transformations(), test_vector_composite(), test_with_function(), and test_with_function_vector().
|
inline |
|
inline |
References madness::cpu_time(), do_print, final_success, have_checkpoints, ltrim_to_length(), print_and_clear_log(), print_success_fail(), set_cout_to_terminal(), and time_begin.
Referenced by chunk_example(), main(), madness::OEP::selftest(), test_apply(), test_arithmetic(), test_combined_operators(), test_consolidate(), test_construction(), test_construction_optimization(), test_constructor(), test_conversion(), test_copy_function_from_other_world(), test_copy_function_from_other_world_through_cloud(), test_custom_serialization(), test_custom_worldobject(), test_deferred(), test_ethylene(), madness::Diamagnetic_potential_factor::test_factor(), test_full_rank_functor(), madness::Diamagnetic_potential_factor::test_harmonic_potential(), test_hartree_product(), test_host_rank_map(), test_immediate(), test_inner(), test_inner(), test_integration(), test_Kcommutator(), test_load_store(), test_lowrank_function(), madness::Diamagnetic_potential_factor::test_lz_commutator(), test_molecular_grid(), test_mpi_group(), test_multiply(), test_multiply(), test_multiply_with_f12(), test_ne_boys(), test_node_replicated_function(), test_norm(), test_operator_apply(), test_partial_inner_3d(), test_partial_inner_6d(), test_pointer_to_funcimpl(), test_projector(), test_projector(), test_projector_outer(), test_Q12_projector(), test_replication_policy(), test_scalar_multiplication(), madness::Diamagnetic_potential_factor::test_scalar_potentials(), test_simple(), test_size(), test_swap_particles(), test_transform(), test_transformations(), madness::Znemo::test_U_potentials(), test_vector_composite(), madness::Diamagnetic_potential_factor::test_vector_potentials(), test_with_function(), and test_with_function_vector().
|
inline |
References final_success.
|
inlinestatic |
References length.
Referenced by test_output(), checkpoint(), checkpoint(), checkpoint(), and end().
|
inline |
References logger, and set_cout_to_terminal().
Referenced by checkpoint(), checkpoint(), checkpoint(), and end().
|
inline |
References do_print, and madness::error().
Referenced by checkpoint(), checkpoint(), checkpoint(), and end().
|
inline |
References cout_set_to_logger, logger, and stream_buffer_cout.
Referenced by test_output(), checkpoint(), checkpoint(), and checkpoint().
|
inline |
newline for use by user, not for internal use (e.g. checkpoint())
References cout_set_to_logger, and stream_buffer_cout.
Referenced by ~test_output(), checkpoint(), checkpoint(), checkpoint(), end(), print_and_clear_log(), run_all_calculations(), test_arithmetic(), test_construction_optimization(), test_conversion(), test_custom_serialization(), test_deferred(), test_full_rank_functor(), test_host_rank_map(), test_Kcommutator(), test_lowrank_function(), test_molecular_grid(), test_mpi_group(), test_multiply(), test_node_replicated_function(), test_Q12_projector(), test_replication_policy(), test_size(), test_transform(), and test_with_function_vector().
|
inline |
References do_print, and madness::print().
Referenced by test_node_replicated_function().
|
private |
Referenced by checkpoint(), checkpoint(), checkpoint(), set_cout_to_logger(), and set_cout_to_terminal().
|
private |
Referenced by test_output(), checkpoint(), checkpoint(), checkpoint(), end(), print_success_fail(), and set_do_print().
|
private |
Referenced by checkpoint(), checkpoint(), checkpoint(), end(), and get_final_success().
|
private |
Referenced by checkpoint(), checkpoint(), checkpoint(), and end().
| std::stringstream madness::test_output::logger |
Referenced by test_output(), main(), print_and_clear_log(), madness::OEP::selftest(), set_cout_to_logger(), madness::Diamagnetic_potential_factor::test_factor(), madness::Diamagnetic_potential_factor::test_harmonic_potential(), madness::Diamagnetic_potential_factor::test_lz_commutator(), test_pointer_to_funcimpl(), madness::Diamagnetic_potential_factor::test_scalar_potentials(), madness::Znemo::test_U_potentials(), and madness::Diamagnetic_potential_factor::test_vector_potentials().
|
private |
Referenced by set_cout_to_logger(), and set_cout_to_terminal().
|
private |
Referenced by test_output(), and end().
|
private |
Referenced by test_output(), checkpoint(), checkpoint(), and checkpoint().