diff --git a/CMakeLists.txt b/CMakeLists.txt index 32aa589..632820b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -18,8 +18,17 @@ if( NOT CMAKE_CXX_FLAGS_DEBUG ) set(CMAKE_CXX_FLAGS_DEBUG "-g") endif() +if (BMX_DEBUG EQUAL TRUE) + add_compile_definitions(DEBUG) +endif() + + if( NOT CMAKE_CXX_FLAGS_RELEASE ) - set(CMAKE_CXX_FLAGS_RELEASE "-O2 -DNDEBUG") + if (BMX_DEBUG EQUAL TRUE) + set(CMAKE_CXX_FLAGS_RELEASE "-O2") + else() + set(CMAKE_CXX_FLAGS_RELEASE "-O2 -DNDEBUG") + endif() endif() # Load utilities and BMX options module @@ -93,8 +102,7 @@ elseif (BMX_GPU_BACKEND STREQUAL HIP) elseif () set(BMX_DPCPP OFF ) set(BMX_CUDA OFF ) - set(BMX_HIP OFF ) -endif () +endif() # CSG support option( BMX_CSG "Build with CSG support" OFF) diff --git a/SUBMODULE.md b/SUBMODULE.md index 1059356..c6fcc45 100644 --- a/SUBMODULE.md +++ b/SUBMODULE.md @@ -3,7 +3,7 @@ cd subprojects/amrex git checkout development git pull cd ../ -git add +git add amrex git commit git push ``` diff --git a/src/bmx.H b/src/bmx.H index fe998dc..39ae54f 100644 --- a/src/bmx.H +++ b/src/bmx.H @@ -141,6 +141,9 @@ class bmx : public AmrCore Real time, int ngrow) override; + // Evaluate gradients of all concentration fields + void compute_grad_X (int lev, Real time, MultiFab& gradx_X_k, MultiFab& grady_X_k, MultiFab& gradz_X_k); + //////////////////////////////////////////////////////////////////////////// // // Diffusion @@ -197,8 +200,6 @@ class bmx : public AmrCore void GetDataVolFrac (int lev, Real time, Vector & data, int icomp, Vector & datatime); - void compute_grad_X (int lev, Real time, MultiFab& gradx_X_k, MultiFab& grady_X_k, MultiFab& gradz_X_k); - void AllocateArrays (int lev); void RegridArrays (int lev);