Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix simple-solver-logging example #1066

Merged
merged 1 commit into from
Jun 30, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 1 addition & 10 deletions examples/simple-solver-logging/simple-solver-logging.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -165,16 +165,7 @@ int main(int argc, char* argv[])
// Solve system
solver->apply(lend(b), lend(x));

// Finally, get some data from `record_logger` and print the last memory
// location copied
auto& last_copy = record_logger->get().copy_completed.back();
std::cout << "Last memory copied was of size " << std::hex
<< std::get<0>(*last_copy).num_bytes << " FROM executor "
<< std::get<0>(*last_copy).exec << " pointer "
<< std::get<0>(*last_copy).location << " TO executor "
<< std::get<1>(*last_copy).exec << " pointer "
<< std::get<1>(*last_copy).location << std::dec << std::endl;
// Also print the residual of the last criterion check event (where
// Print the residual of the last criterion check event (where
// convergence happened)
auto residual =
record_logger->get().criterion_check_completed.back()->residual.get();
Expand Down