From cc0af83ee46d6f58bb6c4385b71138aac9bcf307 Mon Sep 17 00:00:00 2001 From: Yoo Date: Wed, 28 Aug 2024 15:00:53 -0600 Subject: [PATCH] Removed #ifndef condition for GPU use since we no longer use amrex::PrintToFile, it seems like we don't need this condition for GPU --- Src/EB/AMReX_EB2_3D_C.cpp | 52 ++++++++++++++------------------------- 1 file changed, 18 insertions(+), 34 deletions(-) diff --git a/Src/EB/AMReX_EB2_3D_C.cpp b/Src/EB/AMReX_EB2_3D_C.cpp index c9d4b47491d..6dbed6bf6cc 100644 --- a/Src/EB/AMReX_EB2_3D_C.cpp +++ b/Src/EB/AMReX_EB2_3D_C.cpp @@ -471,18 +471,12 @@ int build_faces (Box const& bx, Array4 const& cell, if (plt_multiple_cuts){ mt_fcx(i,j,k,0) = 10.0; - #ifndef AMREX_USE_GPU - std::ofstream fout("dat_multicuts.txt", std::ios::app); - fout << "xbx = " << xbx << std::endl; - fout << "-> fx: (i,j,k) = (" << i << ","<< j << "," << k << ") / " - << "(x,y,z) = (" << - problo[0]+(i)*dx[0] << ","<< problo[1]+(j)*dx[1] << "," << problo[2]+(k)*dx[2] << ")" - << std::endl; - - // amrex::PrintToFile("loc_multicuts") << "xbx = " << xbx << "\n"; - // amrex::PrintToFile("loc_multicuts") << "-> fx: (i,j,k) = (" << i << ","<< j << "," << k << ") / " - // << "(x,y,z) = (" << problo[0]+(i)*dx[0] << ","<< problo[1]+(j)*dx[1] << "," << problo[2]+(k)*dx[2] << ") \n"; - #endif + std::ofstream fout("dat_multicuts.txt", std::ios::app); + fout << "xbx = " << xbx << std::endl; + fout << "-> fx: (i,j,k) = (" << i << ","<< j << "," << k << ") / " + << "(x,y,z) = (" << + problo[0]+(i)*dx[0] << ","<< problo[1]+(j)*dx[1] << "," << problo[2]+(k)*dx[2] << ")" + << std::endl; } } @@ -595,17 +589,12 @@ int build_faces (Box const& bx, Array4 const& cell, if (plt_multiple_cuts){ mt_fcy(i,j,k,0) = 10.0; - #ifndef AMREX_USE_GPU - std::ofstream fout("dat_multicuts.txt", std::ios::app); - fout << "ybx = " << ybx << std::endl; - fout << "-> fy: (i,j,k) = (" << i << ","<< j << "," << k << ") / " - << "(x,y,z) = (" << - problo[0]+(i)*dx[0] << ","<< problo[1]+(j)*dx[1] << "," << problo[2]+(k)*dx[2] << ")" - << std::endl; - // amrex::PrintToFile("loc_multicuts") << "ybx = " << ybx << "\n"; - // amrex::PrintToFile("loc_multicuts") << "-> fy: (i,j,k) = (" << i << ","<< j << "," << k << ") / " - // << "(x,y,z) = (" << problo[0]+(i)*dx[0] << ","<< problo[1]+(j)*dx[1] << "," << problo[2]+(k)*dx[2] << ") \n"; - #endif + std::ofstream fout("dat_multicuts.txt", std::ios::app); + fout << "ybx = " << ybx << std::endl; + fout << "-> fy: (i,j,k) = (" << i << ","<< j << "," << k << ") / " + << "(x,y,z) = (" << + problo[0]+(i)*dx[0] << ","<< problo[1]+(j)*dx[1] << "," << problo[2]+(k)*dx[2] << ")" + << std::endl; } } @@ -718,17 +707,12 @@ int build_faces (Box const& bx, Array4 const& cell, if (plt_multiple_cuts){ mt_fcz(i,j,k,0) = 10.0; - #ifndef AMREX_USE_GPU - std::ofstream fout("dat_multicuts.txt", std::ios::app); - fout << "zbx = " << zbx << std::endl; - fout << "-> fz: (i,j,k) = (" << i << ","<< j << "," << k << ") / " - << "(x,y,z) = (" << - problo[0]+(i)*dx[0] << ","<< problo[1]+(j)*dx[1] << "," << problo[2]+(k)*dx[2] << ")" - << std::endl; - // amrex::PrintToFile("loc_multicuts") << "zbx = " << zbx << "\n"; - // amrex::PrintToFile("loc_multicuts") << "-> fz: (i,j,k) = (" << i << ","<< j << "," << k << ") / " - // << "(x,y,z) = (" << problo[0]+(i)*dx[0] << ","<< problo[1]+(j)*dx[1] << "," << problo[2]+(k)*dx[2] << ") \n"; - #endif + std::ofstream fout("dat_multicuts.txt", std::ios::app); + fout << "zbx = " << zbx << std::endl; + fout << "-> fz: (i,j,k) = (" << i << ","<< j << "," << k << ") / " + << "(x,y,z) = (" << + problo[0]+(i)*dx[0] << ","<< problo[1]+(j)*dx[1] << "," << problo[2]+(k)*dx[2] << ")" + << std::endl; } }