ERF
Energy Research and Forecasting: An Atmospheric Modeling Code
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
ERF_Advance.cpp File Reference
#include <ERF.H>
#include <ERF_Utils.H>
Include dependency graph for ERF_Advance.cpp:

Functions

void check_for_negative_theta (amrex::MultiFab &S_old)
 

Function Documentation

◆ check_for_negative_theta()

void check_for_negative_theta ( amrex::MultiFab &  S_old)

Function that advances the solution at one level for a single time step – this does some preliminaries then calls erf_advance

Parameters
[in]levlevel of refinement (coarsest level is 0)
[in]timestart time for time advance
[in]dt_levtime step for this time advance
297 {
298  // *****************************************************************************
299  // Test for negative (rho theta)
300  // *****************************************************************************
301  for (MFIter mfi(S_old); mfi.isValid(); ++mfi)
302  {
303  Box bx = mfi.tilebox();
304  const Array4<Real> &cell_data = S_old.array(mfi);
305  ParallelFor(bx, [=] AMREX_GPU_DEVICE (int i, int j, int k) noexcept
306  {
307 #ifdef AMREX_USE_GPU
308  if (cell_data(i,j,k,RhoTheta_comp) <= 0.) AMREX_DEVICE_PRINTF("BAD THETA AT %d %d %d %e %e \n",
309  i,j,k,cell_data(i,j,k,RhoTheta_comp),cell_data(i,j,k+1,RhoTheta_comp));
310 #else
311  if (cell_data(i,j,k,RhoTheta_comp) <= 0.) {
312  printf("BAD THETA AT %d %d %d %e %e \n",
313  i,j,k,cell_data(i,j,k,RhoTheta_comp),cell_data(i,j,k+1,RhoTheta_comp));
314  amrex::Abort("Bad theta in ERF_slow_rhs_pre");
315  }
316 #endif
317  });
318  } // mfi
319 }
#define RhoTheta_comp
Definition: ERF_IndexDefines.H:37

Referenced by ERF::Advance().

Here is the caller graph for this function: