Skip to content

Commit fb4d9ea

Browse files
committed
minor update
1 parent 5431467 commit fb4d9ea

2 files changed

Lines changed: 9 additions & 4 deletions

File tree

‎symx/src/compile/Compilation.h‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,6 @@ namespace symx
7272
bool was_cached() const;
7373
Info get_info() const;
7474

75-
// Compiler validation and diagnostics
76-
// (Static methods removed, use global functions in symx namespace)
77-
7875
template<typename FLOAT>
7976
bool load_if_cached(const std::string& name, const std::string& folder, const std::string& cache_id);
8077
template<typename FLOAT>

‎symx/src/solver/NewtonsMethod.cpp‎

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -644,6 +644,12 @@ void NewtonsMethod::print_summary(double total_time) const
644644
{
645645
auto* out = this->output.get();
646646

647+
// Exit if no iterations were performed
648+
const int total_n_newton = logger->get_stats("newton_iterations").total;
649+
if (total_n_newton == 0) {
650+
out->print_with_new_line("No Newton iterations were performed. No summary to show.\n");
651+
return;
652+
}
647653

648654
out->print_with_new_line("");
649655
out->print_with_new_line(fmt::format(" {:<24} {:>10} {:>8} {:>8} {:>8}", "Solve", "Total", "Avg", "Min", "Max"));
@@ -688,7 +694,9 @@ void NewtonsMethod::print_summary(double total_time) const
688694

689695
// Add rest not accounted for
690696
const double misc = total_time - acc;
691-
timer_entries.push_back({"misc", misc});
697+
if (misc / total_time >= 0.001) {
698+
timer_entries.push_back({"misc", misc});
699+
}
692700

693701
// Sort
694702
std::sort(timer_entries.begin(), timer_entries.end(),

0 commit comments

Comments
 (0)