Skip to content

Commit

Permalink
Also make the change in PicardSolver.H
Browse files Browse the repository at this point in the history
  • Loading branch information
dpgrote committed Mar 10, 2025
1 parent f11caa0 commit a9b6649
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Source/NonlinearSolvers/PicardSolver.H
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,9 @@ void PicardSolver<Vec,Ops>::Define ( const Vec& a_U,
this->m_is_defined = true;

// Create diagnostic file and write header
if (!this->m_diagnostic_file.empty() && amrex::ParallelDescriptor::IOProcessor()) {
if (amrex::ParallelDescriptor::IOProcessor()
&& !this->m_diagnostic_file.empty()
&& !amrex::FileExists(this->m_diagnostic_file)) {

std::filesystem::path const diagnostic_path(this->m_diagnostic_file);
std::filesystem::path const diagnostic_dir = diagnostic_path.parent_path();
Expand Down

0 comments on commit a9b6649

Please sign in to comment.