diff --git a/src/probe/private/probe.cpp b/src/probe/private/probe.cpp index 78d512a..3cbced4 100644 --- a/src/probe/private/probe.cpp +++ b/src/probe/private/probe.cpp @@ -58,25 +58,23 @@ void glVisView(mfem::GridFunction& u, mfem::Mesh& mesh, const std::string& windowTitle, const std::string& keyset) { Config& config = Config::getInstance(); quill::Logger* logger = LogManager::getInstance().getLogger("log"); - std::string usedKeyset; if (config.get("Probe:GLVis:Visualization", true)) { + std::string usedKeyset; LOG_INFO(logger, "Visualizing solution using GLVis..."); LOG_INFO(logger, "Window title: {}", windowTitle); - if (keyset == "") { + if (keyset.empty()) { usedKeyset = config.get("Probe:GLVis:DefaultKeyset", ""); } else { usedKeyset = keyset; } LOG_INFO(logger, "Keyset: {}", usedKeyset); - std::string vishost = config.get("Probe:GLVis:Host", "localhost"); - int visport = config.get("Probe:GLVis:Port", 19916); - std::cout << "GLVis visualization enabled. Opening GLVis window... " << std::endl; - std::cout << "Using host: " << vishost << " and port: " << visport << std::endl; + const auto vishost = config.get("Probe:GLVis:Host", "localhost"); + const auto visport = config.get("Probe:GLVis:Port", 19916); mfem::socketstream sol_sock(vishost.c_str(), visport); sol_sock.precision(8); - sol_sock << "solution\n" << mesh << u - << "window_title '" << windowTitle << - "'\n" << "keys " << usedKeyset << "\n"; + sol_sock << "mesh\n" << mesh << u + << "window_title '" << windowTitle << '\n'; + // "'\n" << "keys " << usedKeyset << "\n"; sol_sock << std::flush; } }