diff --git a/Docs/sphinx_documentation/source/AmrCore.rst b/Docs/sphinx_documentation/source/AmrCore.rst index 6aadd62250e..0e4e6932126 100644 --- a/Docs/sphinx_documentation/source/AmrCore.rst +++ b/Docs/sphinx_documentation/source/AmrCore.rst @@ -648,11 +648,11 @@ interface to a Fortran routine that tags cells (in this case, :fortran:`state_er const int* thi = tilebox.hiVect(); // tag cells for refinement - state_error(tptr, ARLIM_3D(tlo), ARLIM_3D(thi), + state_error(tptr, AMREX_ARLIM_3D(tlo), AMREX_ARLIM_3D(thi), BL_TO_FORTRAN_3D(state[mfi]), &tagval, &clearval, - ARLIM_3D(tilebox.loVect()), ARLIM_3D(tilebox.hiVect()), - ZFILL(dx), ZFILL(prob_lo), &time, &phierr[lev]); + AMREX_ARLIM_3D(tilebox.loVect()), AMREX_ARLIM_3D(tilebox.hiVect()), + AMREX_ZFILL(dx), AMREX_ZFILL(prob_lo), &time, &phierr[lev]); // // Now update the tags in the TagBox in the tilebox region // to be equal to itags diff --git a/Docs/sphinx_documentation/source/AmrLevel.rst b/Docs/sphinx_documentation/source/AmrLevel.rst index 6f0a1f6fb18..dfbae5cde25 100644 --- a/Docs/sphinx_documentation/source/AmrLevel.rst +++ b/Docs/sphinx_documentation/source/AmrLevel.rst @@ -110,7 +110,7 @@ the :cpp:`AmrLevelAdv` class, e.g., int lo_bc[BL_SPACEDIM]; int hi_bc[BL_SPACEDIM]; for (int i = 0; i < BL_SPACEDIM; ++i) { - lo_bc[i] = hi_bc[i] = INT_DIR; // periodic boundaries + lo_bc[i] = hi_bc[i] = amrex::BCType::int_dir; // periodic boundaries } BCRec bc(lo_bc, hi_bc); diff --git a/Src/Base/AMReX_ArrayLim.H b/Src/Base/AMReX_ArrayLim.H index 2654f511a9b..7b32363d7fc 100644 --- a/Src/Base/AMReX_ArrayLim.H +++ b/Src/Base/AMReX_ArrayLim.H @@ -8,37 +8,6 @@ #include -/* -** C++ stuff ... -*/ - -#ifndef AMREX_XSDK - -#if AMREX_SPACEDIM==1 -#define ARLIM_P(x) const int& -#define ARLIM(x) (x)[0] -#define ARLIM_3D(x) amrex::GpuArray{(x)[0], 0, 0}.data() -#define ARLIM_ANYD(x) amrex::GpuArray{(x)[0], 0, 0}.data() -#define ZFILL(x) amrex::GpuArray{(x)[0], 0., 0.}.data() -#define AMREX_REAL_ANYD(x) AMREX_ZFILL(x) -#elif AMREX_SPACEDIM==2 -#define ARLIM_P(x) const int&,const int& -#define ARLIM(x) (x)[0],(x)[1] -#define ARLIM_3D(x) amrex::GpuArray{(x)[0], (x)[1], 0}.data() -#define ARLIM_ANYD(x) amrex::GpuArray{(x)[0], (x)[1], 0}.data() -#define ZFILL(x) amrex::GpuArray{(x)[0], (x)[1], 0.}.data() -#define AMREX_REAL_ANYD(x) AMREX_ZFILL(x) -#elif AMREX_SPACEDIM==3 -#define ARLIM_P(x) const int&,const int&,const int& -#define ARLIM(x) (x)[0],(x)[1],(x)[2] -#define ARLIM_3D(x) x -#define ARLIM_ANYD(x) x -#define ZFILL(x) x -#define AMREX_REAL_ANYD(x) AMREX_ZFILL(x) -#endif - -#endif /* ndef AMREX_XSDK */ - #if AMREX_SPACEDIM==1 #define AMREX_ARLIM_P(x) const int& #define AMREX_ARLIM(x) (x)[0] @@ -81,133 +50,6 @@ #define BL_TO_FORTRAN_BOX(x) AMREX_ARLIM_3D((x).loVect()), AMREX_ARLIM_3D((x).hiVect()) -#else - -#if !defined(BL_LANG_FORT) - -#ifndef AMREX_XSDK - -/* C stuff */ -#if AMREX_SPACEDIM == 1 -#define ARLIM_P(x) const int* -#elif AMREX_SPACEDIM == 2 -#define ARLIM_P(x) const int*, const int* -#else -#define ARLIM_P(x) const int*, const int*, const int* -#endif - -#endif /* ndef AMREX_XSDK */ - -#if AMREX_SPACEDIM == 1 -#define AMREX_ARLIM_P(x) const int* -#elif AMREX_SPACEDIM == 2 -#define AMREX_ARLIM_P(x) const int*, const int* -#else -#define AMREX_ARLIM_P(x) const int*, const int*, const int* -#endif - -#else - -#ifndef AMREX_XSDK - -/* -** Fortran stuff ... -*/ - -#if __STDC__==1 || defined(__INTEL_COMPILER) - -#if (AMREX_SPACEDIM == 1) -#define DIMS(a) a##_l1, a##_h1 -#define DIMDEC(a) a##_l1, a##_h1 -#define DIMV(a) a##_l1:a##_h1 -#define DIM1(a) a##_l1:a##_h1 -#define ARG_L1(a) a##_l1 -#define ARG_H1(a) a##_h1 -#define DIMARG(a) a##(1) -#endif - -#if (AMREX_SPACEDIM == 2) -#define DIMS(a) a##_l1, a##_l2, a##_h1, a##_h2 -#define DIMDEC(a) a##_l1, a##_l2, a##_h1, a##_h2 -#define DIMV(a) a##_l1:a##_h1, a##_l2:a##_h2 -#define DIM1(a) a##_l1:a##_h1 -#define DIM2(a) a##_l2:a##_h2 -#define ARG_L1(a) a##_l1 -#define ARG_L2(a) a##_l2 -#define ARG_H1(a) a##_h1 -#define ARG_H2(a) a##_h2 -#define DIMARG(a) a##(1),a##(2) -#endif - -#if (AMREX_SPACEDIM == 3) -#define DIMS(a) a##_l1, a##_l2, a##_l3, a##_h1, a##_h2, a##_h3 -#define DIMDEC(a) a##_l1, a##_l2, a##_l3, a##_h1, a##_h2, a##_h3 -#define DIMV(a) a##_l1:a##_h1, a##_l2:a##_h2, a##_l3:a##_h3 -#define DIM1(a) a##_l1:a##_h1 -#define DIM2(a) a##_l2:a##_h2 -#define DIM3(a) a##_l3:a##_h3 -#define DIM12(a) a##_l1:a##_h1, a##_l2:a##_h2 -#define DIM23(a) a##_l2:a##_h2, a##_l3:a##_h3 -#define DIM13(a) a##_l1:a##_h1, a##_l3:a##_h3 -#define ARG_L1(a) a##_l1 -#define ARG_L2(a) a##_l2 -#define ARG_L3(a) a##_l3 -#define ARG_H1(a) a##_h1 -#define ARG_H2(a) a##_h2 -#define ARG_H3(a) a##_h3 -#define DIMARG(a) a##(1),a##(2),a##(3) -#endif - -#else - -#if (AMREX_SPACEDIM == 1) -#define DIMS(a) a/**/_l1, a/**/_h1 -#define DIMDEC(a) a/**/_l1, a/**/_h1 -#define DIMV(a) a/**/_l1:a/**/_h1 -#define DIM1(a) a/**/_l1:a/**/_h1 -#define ARG_L1(a) a/**/_l1 -#define ARG_H1(a) a/**/_h1 -#define DIMARG(a) a/**/(1) -#endif - -#if (AMREX_SPACEDIM == 2) -#define DIMS(a) a/**/_l1, a/**/_l2, a/**/_h1, a/**/_h2 -#define DIMDEC(a) a/**/_l1, a/**/_l2, a/**/_h1, a/**/_h2 -#define DIMV(a) a/**/_l1:a/**/_h1, a/**/_l2:a/**/_h2 -#define DIM1(a) a/**/_l1:a/**/_h1 -#define DIM2(a) a/**/_l2:a/**/_h2 -#define ARG_L1(a) a/**/_l1 -#define ARG_L2(a) a/**/_l2 -#define ARG_H1(a) a/**/_h1 -#define ARG_H2(a) a/**/_h2 -#define DIMARG(a) a/**/(1),a/**/(2) -#endif - -#if (AMREX_SPACEDIM == 3) -#define DIMS(a) a/**/_l1, a/**/_l2, a/**/_l3, a/**/_h1, a/**/_h2, a/**/_h3 -#define DIMDEC(a) a/**/_l1, a/**/_l2, a/**/_l3, a/**/_h1, a/**/_h2, a/**/_h3 -#define DIMV(a) a/**/_l1:a/**/_h1, a/**/_l2:a/**/_h2, a/**/_l3:a/**/_h3 -#define DIM1(a) a/**/_l1:a/**/_h1 -#define DIM2(a) a/**/_l2:a/**/_h2 -#define DIM3(a) a/**/_l3:a/**/_h3 -#define DIM12(a) a/**/_l1:a/**/_h1, a/**/_l2:a/**/_h2 -#define DIM23(a) a/**/_l2:a/**/_h2, a/**/_l3:a/**/_h3 -#define DIM13(a) a/**/_l1:a/**/_h1, a/**/_l3:a/**/_h3 -#define ARG_L1(a) a/**/_l1 -#define ARG_L2(a) a/**/_l2 -#define ARG_L3(a) a/**/_l3 -#define ARG_H1(a) a/**/_h1 -#define ARG_H2(a) a/**/_h2 -#define ARG_H3(a) a/**/_h3 -#define DIMARG(a) a/**/(1),a/**/(2),a/**/(3) -#endif - -#endif /*__STDC__==1*/ - -#endif /* ndef AMREX_XSDK */ - -#endif /*else of !defined(BL_LANG_FORT)*/ - -#endif /*else of __cplusplus*/ +#endif /* __cplusplus */ -#endif /*BL_ARRAYLIM_H*/ +#endif /* AMREX_ARRAYLIM_H_ */ diff --git a/Src/Base/AMReX_BC_TYPES.H b/Src/Base/AMReX_BC_TYPES.H index 00fadd5e6d0..f35175be450 100644 --- a/Src/Base/AMReX_BC_TYPES.H +++ b/Src/Base/AMReX_BC_TYPES.H @@ -82,26 +82,4 @@ enum mathematicalBndryTypes : int { } #endif -#ifndef AMREX_XSDK - -#define BOGUS_BC (-666) - -#define REFLECT_ODD (-1) -#define INT_DIR 0 -#define REFLECT_EVEN 1 -#define FOEXTRAP 2 -#define EXT_DIR 3 -#define HOEXTRAP 4 -#define HOEXTRAPCC 5 -#define EXT_DIR_CC 6 - -#define Interior 0 -#define Inflow 1 -#define Outflow 2 -#define Symmetry 3 -#define SlipWall 4 -#define NoSlipWall 5 - -#endif - #endif diff --git a/Src/Base/AMReX_CONSTANTS.H b/Src/Base/AMReX_CONSTANTS.H index d50153275e6..648d3da5c94 100644 --- a/Src/Base/AMReX_CONSTANTS.H +++ b/Src/Base/AMReX_CONSTANTS.H @@ -4,41 +4,7 @@ #include - -#ifdef BL_LANG_FORT - -#ifndef AMREX_XSDK - -#define bigreal BL_REAL_E(1.0,30) -#define zero BL_REAL(0.0) -#define one BL_REAL(1.0) -#define two BL_REAL(2.0) -#define three BL_REAL(3.0) -#define four BL_REAL(4.0) -#define five BL_REAL(5.0) -#define six BL_REAL(6.0) -#define seven BL_REAL(7.0) -#define eight BL_REAL(8.0) -#define nine BL_REAL(9.0) -#define ten BL_REAL(10.0) -#define twelve BL_REAL(12.0) -#define fifteen BL_REAL(15.0) -#define sixteen BL_REAL(16.0) -#define twenty BL_REAL(20.0) -#define seventy BL_REAL(70.0) -#define ninety BL_REAL(90.0) -#define tenth BL_REAL(0.1) -#define eighth BL_REAL(0.125) -#define sixth BL_REAL(0.16666666666666667) -#define fifth BL_REAL(0.2) -#define fourth BL_REAL(0.25) -#define third BL_REAL(0.33333333333333333) -#define half BL_REAL(0.5) -#define two3rd BL_REAL(0.66666666666666667) -#define Pi BL_REAL(3.1415926535897932) - -#endif /* ndef AMREX_XSDK */ - -#endif /*BL_LANG_FORT*/ +/* Maybe in the future we will add some constants here. */ +/* If we do, make sure this file is Fortran safe. */ #endif /*BL_CONSTANTS_H*/ diff --git a/Src/Base/AMReX_FILCC_1D.F90 b/Src/Base/AMReX_FILCC_1D.F90 deleted file mode 100644 index 76e90a8d7a1..00000000000 --- a/Src/Base/AMReX_FILCC_1D.F90 +++ /dev/null @@ -1,44 +0,0 @@ -#include - -! ----------------------------------------------------------- -!> This routine is intended to be a generic fill function -!! for cell-centered data. It knows how to extrapolate -!! and reflect data and is used to supplement the problem-specific -!! fill functions which call it. -!! -!! \param q <= array to fill -!! \param lo,hi => index extent of q array -!! \param domlo,domhi => index extent of problem domain -!! \param dx => cell spacing -!! \param xlo => physical location of lower left hand -!! corner of q array -!! \param bc => array of boundary flags bc(SPACEDIM,lo:hi) -!! -!! NOTE: all corner as well as edge data is filled if not EXT_DIR/EXT_DIR_CC -! ----------------------------------------------------------- - -#ifndef AMREX_XSDK - -subroutine filcc(q,q_l1,q_h1,domlo,domhi,dx,xlo,bc) - - use amrex_fort_module - use amrex_filcc_module, only: filccn - - implicit none - - integer q_l1, q_h1 - integer domlo(1), domhi(1) - integer bc(1,2) - real(amrex_real) xlo(1), dx(1) - real(amrex_real) q(q_l1:q_h1) - - integer :: q_lo(3), q_hi(3) - - q_lo = [q_l1, 0, 0] - q_hi = [q_h1, 0, 0] - - call filccn(q_lo, q_hi, q, q_lo, q_hi, 1, domlo, domhi, dx, xlo, bc) - -end subroutine filcc - -#endif diff --git a/Src/Base/AMReX_FILCC_2D.F90 b/Src/Base/AMReX_FILCC_2D.F90 deleted file mode 100644 index c2ca8f7ddaf..00000000000 --- a/Src/Base/AMReX_FILCC_2D.F90 +++ /dev/null @@ -1,60 +0,0 @@ -#include - -#ifndef AMREX_XSDK - -! ----------------------------------------------------------- -!> This routine is intended to be a generic fill function -!! for cell-centered data. It knows how to extrapolate -!! and reflect data and is used to supplement the problem-specific -!! fill functions which call it. -!! -!! \param q <= array to fill -!! \param lo,hi => index extent of q array -!! \param domlo,domhi => index extent of problem domain -!! \param dx => cell spacing -!! \param xlo => physical location of lower left hand -!! corner of q array -!! \param bc => array of boundary flags bc(SPACEDIM,lo:hi) -!! -!! NOTE: all corner as well as edge data is filled if not EXT_DIR/EXT_DIR_CC -! ----------------------------------------------------------- - -subroutine filcc(q,q_l1,q_l2,q_h1,q_h2,domlo,domhi,dx,xlo,bc) - - use amrex_fort_module - use amrex_filcc_module, only: filccn - - implicit none - - integer q_l1, q_l2, q_h1, q_h2 - integer domlo(2), domhi(2) - integer bc(2,2) - real(amrex_real) xlo(2), dx(2) - real(amrex_real) q(q_l1:q_h1,q_l2:q_h2) - - integer :: q_lo(3), q_hi(3) - - q_lo = [q_l1, q_l2, 0] - q_hi = [q_h1, q_h2, 0] - - call filccn(q_lo, q_hi, q, q_lo, q_hi, 1, domlo, domhi, dx, xlo, bc) - -end subroutine filcc - -subroutine hoextraptocc(q,q_l1,q_l2,q_h1,q_h2,domlo,domhi,dx,xlo) - - use amrex_fort_module - use amrex_filcc_module, only : amrex_hoextraptocc_2d - - implicit none - - integer q_l1, q_l2, q_h1, q_h2 - integer domlo(2), domhi(2) - real(amrex_real) xlo(2), dx(2) - real(amrex_real) q(q_l1:q_h1,q_l2:q_h2) - - call amrex_hoextraptocc_2d(q,q_l1,q_l2,q_h1,q_h2,domlo,domhi,dx,xlo) - -end subroutine hoextraptocc - -#endif diff --git a/Src/Base/AMReX_FILCC_3D.F90 b/Src/Base/AMReX_FILCC_3D.F90 deleted file mode 100644 index 59ce83d469d..00000000000 --- a/Src/Base/AMReX_FILCC_3D.F90 +++ /dev/null @@ -1,63 +0,0 @@ -#include - -#ifndef AMREX_XSDK - -! ----------------------------------------------------------- -!> This routine is intended to be a generic fill function -!! for cell centered data. It knows how to exrapolate, -!! and reflect data and can be used to supplement problem -!! specific fill functions (ie. EXT_DIR/EXT_DIR_CC). -!! -!! \param q <= array to fill -!! \param q_l1,q_l2,q_l3,q_h1,q_h2,q_h3 => index extent of q array -!! \param domlo,hi => index extent of problem domain -!! \param dx => cell spacing -!! \param xlo => physical location of lower left hand -!! corner of q array -!! \param bc => array of boundary flags bc(SPACEDIM,lo:hi) -!! -!! NOTE: corner data not used in computing soln but must have -!! reasonable values for arithmetic to live -! ----------------------------------------------------------- - -subroutine filcc(q,q_l1,q_l2,q_l3,q_h1,q_h2,q_h3,domlo,domhi,dx,xlo,bc) - - use amrex_fort_module, only: rt => amrex_real - use amrex_filcc_module, only: filccn - - implicit none - - integer, intent(in ) :: q_l1, q_l2, q_l3, q_h1, q_h2, q_h3 - integer, intent(in ) :: domlo(3), domhi(3) - real(rt), intent(in ) :: xlo(3), dx(3) - real(rt), intent(inout) :: q(q_l1:q_h1,q_l2:q_h2,q_l3:q_h3) - integer, intent(in ) :: bc(3,2) - - integer :: q_lo(3), q_hi(3) - - q_lo = [q_l1, q_l2, q_l3] - q_hi = [q_h1, q_h2, q_h3] - - call filccn(q_lo, q_hi, q, q_lo, q_hi, 1, domlo, domhi, dx, xlo, bc) - -end subroutine filcc - - - -subroutine hoextraptocc(q,q_l1,q_l2,q_l3,q_h1,q_h2,q_h3,domlo,domhi,dx,xlo) - - use amrex_fort_module, only: rt => amrex_real - use amrex_filcc_module, only : amrex_hoextraptocc_3d - - implicit none - - integer, intent(in ) :: q_l1, q_l2, q_l3, q_h1, q_h2, q_h3 - integer, intent(in ) :: domlo(3), domhi(3) - real(rt), intent(in ) :: xlo(3), dx(3) - real(rt), intent(inout) :: q(q_l1:q_h1,q_l2:q_h2,q_l3:q_h3) - - call amrex_hoextraptocc_3d(q,q_l1,q_l2,q_l3,q_h1,q_h2,q_h3,domlo,domhi,dx,xlo) - -end subroutine hoextraptocc - -#endif diff --git a/Src/Base/AMReX_REAL.H b/Src/Base/AMReX_REAL.H index 6383808a3de..54815fa3da1 100644 --- a/Src/Base/AMReX_REAL.H +++ b/Src/Base/AMReX_REAL.H @@ -127,44 +127,6 @@ inline namespace literals { } // namespace amrex #endif -#else - -#ifndef AMREX_XSDK - -/* - The REAL_T macro specifies the precision of the floating-point - calculations in Fortran code. It will be either real*4 or - real*8 depending upon which of the symbols BL_USE_FLOAT or - BL_USE_DOUBLE, respectively, is defined during compilations. For - portability, you should write floating-point code in terms of this - macro, instead of using real*4 or real*8 directly. - - Note that exactly one of these macros must be defined - when compiling any module that uses floating-point. -*/ - -#ifdef BL_USE_FLOAT -# define REAL_T REAL -#if __STDC__==1 || defined(__INTEL_COMPILER) -# define BL_REAL(a) a##E0 -# define BL_REAL_E(a,b) a##E##b -#else -# define BL_REAL(a) a/**/E0 -# define BL_REAL_E(a,b) a/**/E/**/b -#endif -#else -# define REAL_T DOUBLE PRECISION -#if __STDC__==1 || defined(__INTEL_COMPILER) -# define BL_REAL(a) a##D0 -# define BL_REAL_E(a,b) a##D##b -#else -# define BL_REAL(a) a/**/D0 -# define BL_REAL_E(a,b) a/**/D/**/b -#endif -#endif - -#endif /* ndef AMREX_XSDK */ - #endif /* !BL_LANG_FORT */ #endif /*BL_REAL_H*/ diff --git a/Src/Base/AMReX_Random.cpp b/Src/Base/AMReX_Random.cpp index 506ec582544..690d98b208b 100644 --- a/Src/Base/AMReX_Random.cpp +++ b/Src/Base/AMReX_Random.cpp @@ -316,30 +316,6 @@ void FillRandomNormal (Real* p, Long N, Real mean, Real stddev) } // namespace amrex - -// -// Fortran entry points for amrex::Random(). -// - -#if !defined(AMREX_XSDK) && !defined(BL_NO_FORT) -BL_FORT_PROC_DECL(BLUTILINITRAND,blutilinitrand)(const int* sd) -{ - amrex::ULong seed = *sd; - amrex::InitRandom(seed); -} - -BL_FORT_PROC_DECL(BLINITRAND,blinitrand)(const int* sd) -{ - amrex::ULong seed = *sd; - amrex::InitRandom(seed); -} - -BL_FORT_PROC_DECL(BLUTILRAND,blutilrand)(amrex::Real* rn) -{ - *rn = amrex::Random(); -} -#endif - extern "C" { double amrex_random () { diff --git a/Src/Base/AMReX_SPACE.H b/Src/Base/AMReX_SPACE.H index 91c4cc3a222..5328bb40b06 100644 --- a/Src/Base/AMReX_SPACE.H +++ b/Src/Base/AMReX_SPACE.H @@ -161,29 +161,6 @@ namespace amrex # define AMREX_D_PICK(a,b,c) c #endif -#ifndef AMREX_XSDK - -/* for backward compatibility */ -#if (AMREX_SPACEDIM == 1) -# define D_DECL(a,b,c) a -# define D_EXPR(a,b,c) ((void)((a),0)) -# define D_PICK(a,b,c) a -# define D_TERM(a,b,c) a -#elif (AMREX_SPACEDIM == 2) -# define D_DECL(a,b,c) a,b -# define D_EXPR(a,b,c) ((void)((a),(b),0)) -# define D_PICK(a,b,c) b -# define D_TERM(a,b,c) a b -#elif (AMREX_SPACEDIM == 3) -# define D_DECL(a,b,c) a,b,c -# define D_EXPR(a,b,c) ((void)((a),(b),(c),0)) -# define D_PICK(a,b,c) c -# define D_TERM(a,b,c) a b c -#endif - -#endif - - #if (AMREX_SPACEDIM == 1) # define AMREX_1D_ONLY(a) a # define AMREX_2D_ONLY(a) ((void)0) diff --git a/Src/Base/AMReX_Utility.H b/Src/Base/AMReX_Utility.H index ea81210e0a3..70a2a93f37d 100644 --- a/Src/Base/AMReX_Utility.H +++ b/Src/Base/AMReX_Utility.H @@ -132,16 +132,6 @@ namespace amrex * WWW URL: http://www.math.uio.no/~jacklam * "p" MUST be in the open interval (0,1). - - * Entry points for Fortran: - - * REAL_T val - * call blinvnormdist(val) - - * Internally, the Fortran entry point calls a static Mersenne Twister - * object (the same one called by blutilrand()) to get a random number in - * the open interval (0,1), and then sets "val" to the result of calling - * amrex::InvNormDist() with that random number. */ double InvNormDist (double p); /** @@ -165,16 +155,6 @@ namespace amrex * is roughly 30% more costly than InvNormDist() above. * * "p" MUST be in the open interval (0,1). - * - * Entry points for Fortran: - * - * REAL_T val - * call blinvnormdistbest(val) - * - * Internally, the Fortran entry point calls a static Mersenne Twister - * object (the same one called by blutilrand()) to get a random number in - * the open interval (0,1), and then sets "val" to the result of calling - * amrex::InvNormDist() with that random number. */ double InvNormDistBest (double p); diff --git a/Src/Base/AMReX_filcc_mod.F90 b/Src/Base/AMReX_filcc_mod.F90 index 1cca9b84090..26af52bb605 100644 --- a/Src/Base/AMReX_filcc_mod.F90 +++ b/Src/Base/AMReX_filcc_mod.F90 @@ -23,10 +23,6 @@ module amrex_filcc_module public :: amrex_hoextraptocc_2d #endif -#ifndef AMREX_XSDK - public :: filccn -#endif - contains subroutine amrex_filcc_n(q,qlo,qhi,domlo,domhi,dx,xlo,bclo,bchi) @@ -105,20 +101,6 @@ subroutine amrex_fab_filcc (q, qlo, qhi, nq, domlo, domhi, dx, xlo, bc) & end subroutine amrex_fab_filcc -#ifndef AMREX_XSDK - subroutine filccn(lo, hi, q, q_lo, q_hi, ncomp, domlo, domhi, dx, xlo, bc) - implicit none - integer, intent(in ) :: lo(3), hi(3) - integer, intent(in ) :: q_lo(3), q_hi(3) - integer, intent(in ) :: ncomp - integer, intent(in ) :: domlo(amrex_spacedim), domhi(amrex_spacedim) - real(amrex_real), intent(in ) :: xlo(amrex_spacedim), dx(amrex_spacedim) - real(amrex_real), intent(inout) :: q(q_lo(1):q_hi(1),q_lo(2):q_hi(2),q_lo(3):q_hi(3),ncomp) - integer, intent(in ) :: bc(amrex_spacedim,2,ncomp) - call amrex_filccn(lo, hi, q, q_lo, q_hi, ncomp, domlo, domhi, dx, xlo, bc) - end subroutine filccn -#endif - subroutine amrex_filccn(lo, hi, q, q_lo, q_hi, ncomp, domlo, domhi, dx, xlo, bc) implicit none diff --git a/Src/Base/CMakeLists.txt b/Src/Base/CMakeLists.txt index 459ec3bd7c4..0c523ce6083 100644 --- a/Src/Base/CMakeLists.txt +++ b/Src/Base/CMakeLists.txt @@ -292,7 +292,6 @@ foreach(D IN LISTS AMReX_SPACEDIM) AMReX_filcc_f.H AMReX_BLutil_F.F90 AMReX_BLProfiler_F.F90 - AMReX_FILCC_${D}D.F90 AMReX_filcc_mod.F90 AMReX_omp_mod.F90 AMReX_acc_mod.F90 diff --git a/Src/Base/Make.package b/Src/Base/Make.package index 276887ebd79..4c5cc4149d2 100644 --- a/Src/Base/Make.package +++ b/Src/Base/Make.package @@ -223,7 +223,6 @@ C$(AMREX_BASE)_headers += AMReX_Slopes_K.H # Fortran interface routines. # ifneq ($(BL_NO_FORT),TRUE) - F90$(AMREX_BASE)_sources += AMReX_FILCC_${DIM}D.F90 F90$(AMREX_BASE)_headers += AMReX_filcc_f.H F90$(AMREX_BASE)_sources += AMReX_BLutil_F.F90 diff --git a/Src/Boundary/AMReX_LO_BCTYPES.H b/Src/Boundary/AMReX_LO_BCTYPES.H index 2b4e9178bb2..a642d663f45 100644 --- a/Src/Boundary/AMReX_LO_BCTYPES.H +++ b/Src/Boundary/AMReX_LO_BCTYPES.H @@ -2,16 +2,6 @@ #define AMREX_LO_BCTYPES_H_ #include -#ifndef AMREX_XSDK - -#define LO_DIRICHLET 101 -#define LO_NEUMANN 102 -#define LO_REFLECT_ODD 103 -#define LO_MARSHAK 104 -#define LO_SANCHEZ_POMRANING 105 - -#endif - #define AMREX_LO_DIRICHLET 101 #define AMREX_LO_NEUMANN 102 #define AMREX_LO_REFLECT_ODD 103 @@ -48,4 +38,3 @@ namespace amrex { #endif #endif - diff --git a/Src/Extern/ProfParser/AMReX_AVGDOWN_1D.F b/Src/Extern/ProfParser/AMReX_AVGDOWN_1D.F index 2e91364a729..37abbb83d3a 100644 --- a/Src/Extern/ProfParser/AMReX_AVGDOWN_1D.F +++ b/Src/Extern/ProfParser/AMReX_AVGDOWN_1D.F @@ -4,17 +4,24 @@ #endif #include "AMReX_REAL.H" -#include "AMReX_CONSTANTS.H" #include "AMReX_AVGDOWN_F.H" #include "AMReX_ArrayLim.H" -#undef AMREX_XSDK +#ifdef BL_USE_FLOAT +#define REAL_T real +#define zero 0.0e0 +#define one 1.0e0 +#else +#define REAL_T double precision +#define zero 0.0d0 +#define one 1.0d0 +#endif #define SDIM 1 subroutine FORT_CV_AVGDOWN ( - & crse,DIMS(crse),nvar, - & fine,DIMS(fine), + & crse,crse_l1,crse_h1,nvar, + & fine,fine_l1,fine_h1, & lo,hi,ratios) c ---------------------------------------------------------- c Average the fine grid data onto the coarse @@ -26,13 +33,14 @@ subroutine FORT_CV_AVGDOWN ( c lo,hi = index limits of overlap (crse grid) c ratios = IntVect refinement ratio c ---------------------------------------------------------- - integer DIMDEC(crse) - integer DIMDEC(fine) + implicit none + integer crse_l1,crse_h1 + integer fine_l1,fine_h1 integer lo(SDIM), hi(SDIM) integer nvar integer ratios(SDIM) - REAL_T crse(DIMV(crse),nvar) - REAL_T fine(DIMV(fine),nvar) + REAL_T crse(crse_l1:crse_h1,nvar) + REAL_T fine(fine_l1:fine_h1,nvar) integer i, j, n, ic, jc, ioff, joff integer lratx @@ -68,8 +76,8 @@ subroutine FORT_CV_AVGDOWN ( subroutine FORT_CV_AVGDOWN_STAG ( & nodal_dir, - & crse,DIMS(crse),nvar, - & fine,DIMS(fine), + & crse,crse_l1,crse_h1,nvar, + & fine,fine_l1,fine_h1, & lo,hi,ratios) c ---------------------------------------------------------- c Average the fine grid data onto the coarse @@ -81,14 +89,15 @@ subroutine FORT_CV_AVGDOWN_STAG ( c lo,hi = index limits of overlap (crse grid) c ratios = IntVect refinement ratio c ---------------------------------------------------------- + implicit none integer nodal_dir - integer DIMDEC(crse) - integer DIMDEC(fine) + integer crse_l1,crse_h1 + integer fine_l1,fine_h1 integer lo(SDIM), hi(SDIM) integer nvar integer ratios(SDIM) - REAL_T crse(DIMV(crse),nvar) - REAL_T fine(DIMV(fine),nvar) + REAL_T crse(crse_l1:crse_h1,nvar) + REAL_T fine(fine_l1:fine_h1,nvar) integer i, j, n, ic, jc, ioff, joff integer lrat @@ -135,10 +144,10 @@ subroutine FORT_CV_AVGDOWN_STAG ( end subroutine FORT_AVGDOWN ( - & crse,DIMS(crse),nvar, - & fine,DIMS(fine), - & cv,DIMS(cv), - & fv,DIMS(fv), + & crse,crse_l1,crse_h1,nvar, + & fine,fine_l1,fine_h1, + & cv,cv_l1,cv_h1, + & fv,fv_l1,fv_h1, & lo,hi,ratios) c ---------------------------------------------------------- c Volume-weight average the fine grid data onto the coarse @@ -152,17 +161,18 @@ subroutine FORT_AVGDOWN ( c lo,hi = index limits of overlap (crse grid) c ratios = IntVect refinement ratio c ---------------------------------------------------------- - integer DIMDEC(crse) - integer DIMDEC(cv) - integer DIMDEC(fine) - integer DIMDEC(fv) + implicit none + integer crse_l1,crse_h1 + integer cv_l1,cv_h1 + integer fine_l1,fine_h1 + integer fv_l1,fv_h1 integer lo(SDIM), hi(SDIM) integer nvar integer ratios(SDIM) - REAL_T crse(DIMV(crse),nvar) - REAL_T cv(DIMV(cv)) - REAL_T fine(DIMV(fine),nvar) - REAL_T fv(DIMV(fv)) + REAL_T crse(crse_l1:crse_h1,nvar) + REAL_T cv(cv_l1:cv_h1) + REAL_T fine(fine_l1:fine_h1,nvar) + REAL_T fv(fv_l1:fv_h1) integer i, j, n, ic, jc, ioff, joff integer lratx diff --git a/Src/Extern/ProfParser/AMReX_AVGDOWN_2D.F b/Src/Extern/ProfParser/AMReX_AVGDOWN_2D.F index 7bf28b49bcd..88c665924e9 100644 --- a/Src/Extern/ProfParser/AMReX_AVGDOWN_2D.F +++ b/Src/Extern/ProfParser/AMReX_AVGDOWN_2D.F @@ -6,15 +6,24 @@ #undef AMREX_XSDK #include "AMReX_REAL.H" -#include "AMReX_CONSTANTS.H" #include "AMReX_AVGDOWN_F.H" #include "AMReX_ArrayLim.H" +#ifdef BL_USE_FLOAT +#define REAL_T real +#define zero 0.0e0 +#define one 1.0e0 +#else +#define REAL_T double precision +#define zero 0.0d0 +#define one 1.0d0 +#endif + #define SDIM 2 subroutine FORT_MAXVAL_AVGDOWN ( - & crse,DIMS(crse),nvar, - & fine,DIMS(fine), + & crse,crse_l1,crse_l2,crse_h1,crse_h2,nvar, + & fine,fine_l1,fine_l2,fine_h1,fine_h2, & lo,hi,ratios) c ---------------------------------------------------------- c Average the fine grid data onto the coarse @@ -26,13 +35,14 @@ subroutine FORT_MAXVAL_AVGDOWN ( c lo,hi = index limits of overlap (crse grid) c ratios = IntVect refinement ratio c ---------------------------------------------------------- - integer DIMDEC(crse) - integer DIMDEC(fine) + implicit none + integer crse_l1,crse_l2,crse_h1,crse_h2 + integer fine_l1,fine_l2,fine_h1,fine_h2 integer lo(SDIM), hi(SDIM) integer nvar integer ratios(SDIM) - REAL_T crse(DIMV(crse),nvar) - REAL_T fine(DIMV(fine),nvar) + REAL_T crse(crse_l1:crse_h1,crse_l2:crse_h2,nvar) + REAL_T fine(fine_l1:fine_h1,fine_l2:fine_h2,nvar) integer i, j, n, ic, jc, ioff, joff integer lratx,lraty @@ -71,8 +81,8 @@ subroutine FORT_MAXVAL_AVGDOWN ( subroutine FORT_CV_AVGDOWN ( - & crse,DIMS(crse),nvar, - & fine,DIMS(fine), + & crse,crse_l1,crse_l2,crse_h1,crse_h2,nvar, + & fine,fine_l1,fine_l2,fine_h1,fine_h2, & lo,hi,ratios) c ---------------------------------------------------------- c Average the fine grid data onto the coarse @@ -84,13 +94,14 @@ subroutine FORT_CV_AVGDOWN ( c lo,hi = index limits of overlap (crse grid) c ratios = IntVect refinement ratio c ---------------------------------------------------------- - integer DIMDEC(crse) - integer DIMDEC(fine) + implicit none + integer crse_l1,crse_l2,crse_h1,crse_h2 + integer fine_l1,fine_l2,fine_h1,fine_h2 integer lo(SDIM), hi(SDIM) integer nvar integer ratios(SDIM) - REAL_T crse(DIMV(crse),nvar) - REAL_T fine(DIMV(fine),nvar) + REAL_T crse(crse_l1:crse_h1,crse_l2:crse_h2,nvar) + REAL_T fine(fine_l1:fine_h1,fine_l2:fine_h2,nvar) integer i, j, n, ic, jc, ioff, joff integer lratx,lraty @@ -139,8 +150,8 @@ subroutine FORT_CV_AVGDOWN ( subroutine FORT_CV_AVGDOWN_STAG ( & nodal_dir, - & crse,DIMS(crse),nvar, - & fine,DIMS(fine), + & crse,crse_l1,crse_l2,crse_h1,crse_h2,nvar, + & fine,fine_l1,fine_l2,fine_h1,fine_h2, & lo,hi,ratios) c ---------------------------------------------------------- c Average the fine grid data onto the coarse @@ -152,14 +163,15 @@ subroutine FORT_CV_AVGDOWN_STAG ( c lo,hi = index limits of overlap (crse grid) c ratios = IntVect refinement ratio c ---------------------------------------------------------- + implicit none integer nodal_dir - integer DIMDEC(crse) - integer DIMDEC(fine) + integer crse_l1,crse_l2,crse_h1,crse_h2 + integer fine_l1,fine_l2,fine_h1,fine_h2 integer lo(SDIM), hi(SDIM) integer nvar integer ratios(SDIM) - REAL_T crse(DIMV(crse),nvar) - REAL_T fine(DIMV(fine),nvar) + REAL_T crse(crse_l1:crse_h1,crse_l2:crse_h2,nvar) + REAL_T fine(fine_l1:fine_h1,fine_l2:fine_h2,nvar) integer i, j, n, ic, jc, ioff, joff integer lrat @@ -220,10 +232,10 @@ subroutine FORT_CV_AVGDOWN_STAG ( end subroutine FORT_AVGDOWN ( - & crse,DIMS(crse),nvar, - & fine,DIMS(fine), - & cv,DIMS(cv), - & fv,DIMS(fv), + & crse,crse_l1,crse_l2,crse_h1,crse_h2,nvar, + & fine,fine_l1,fine_l2,fine_h1,fine_h2, + & cv,cv_l1,cv_l2,cv_h1,cv_h2, + & fv,fv_l1,fv_l2,fv_h1,fv_h2, & lo,hi,ratios) c ---------------------------------------------------------- c Volume-weight average the fine grid data onto the coarse @@ -237,17 +249,18 @@ subroutine FORT_AVGDOWN ( c lo,hi = index limits of overlap (crse grid) c ratios = IntVect refinement ratio c ---------------------------------------------------------- - integer DIMDEC(crse) - integer DIMDEC(cv) - integer DIMDEC(fine) - integer DIMDEC(fv) + implicit none + integer crse_l1,crse_l2,crse_h1,crse_h2 + integer cv_l1,cv_l2,cv_h1,cv_h2 + integer fine_l1,fine_l2,fine_h1,fine_h2 + integer fv_l1,fv_l2,fv_h1,fv_h2 integer lo(SDIM), hi(SDIM) integer nvar integer ratios(SDIM) - REAL_T crse(DIMV(crse),nvar) - REAL_T cv(DIMV(cv)) - REAL_T fine(DIMV(fine),nvar) - REAL_T fv(DIMV(fv)) + REAL_T crse(crse_l1:crse_h1,crse_l2:crse_h2,nvar) + REAL_T cv(cv_l1:cv_h1,cv_l2:cv_h2) + REAL_T fine(fine_l1:fine_h1,fine_l2:fine_h2,nvar) + REAL_T fv(fv_l1:fv_h1,fv_l2:fv_h2) integer i, j, n, ic, jc, ioff, joff integer lratx,lraty diff --git a/Src/Extern/ProfParser/AMReX_AVGDOWN_3D.F b/Src/Extern/ProfParser/AMReX_AVGDOWN_3D.F index babb3729799..a02dafcdd3f 100644 --- a/Src/Extern/ProfParser/AMReX_AVGDOWN_3D.F +++ b/Src/Extern/ProfParser/AMReX_AVGDOWN_3D.F @@ -3,19 +3,26 @@ #define BL_LANG_FORT #endif -#undef AMREX_XSDK - #include "AMReX_REAL.H" -#include "AMReX_CONSTANTS.H" #include "AMReX_AVGDOWN_F.H" #include "AMReX_ArrayLim.H" +#ifdef BL_USE_FLOAT +#define REAL_T real +#define zero 0.0e0 +#define one 1.0e0 +#else +#define REAL_T double precision +#define zero 0.0d0 +#define one 1.0d0 +#endif + #define SDIM 3 subroutine FORT_CV_AVGDOWN ( - & crse,DIMS(crse), + & crse,crse_l1,crse_l2,crse_l3,crse_h1,crse_h2,crse_h3, & nvar, - & fine,DIMS(fine), + & fine,fine_l1,fine_l2,fine_l3,fine_h1,fine_h2,fine_h3, & lo,hi,ratios) c ---------------------------------------------------------- c Average the fine grid data onto the coarse @@ -27,15 +34,14 @@ subroutine FORT_CV_AVGDOWN ( c lo,hi = index limits of overlap (crse grid) c ratios = IntVect refinement ratio c ---------------------------------------------------------- - integer DIMDEC(crse) - integer DIMDEC(fine) + implicit none + integer crse_l1,crse_l2,crse_l3,crse_h1,crse_h2,crse_h3 + integer fine_l1,fine_l2,fine_l3,fine_h1,fine_h2,fine_h3 integer lo(SDIM), hi(SDIM) integer nvar integer ratios(SDIM) - REAL_T - $ crse(DIMV(crse),nvar) - REAL_T - $ fine(DIMV(fine),nvar) + REAL_T crse(crse_l1:crse_h1,crse_l2:crse_h2,crse_l3:crse_h3,nvar) + REAL_T fine(fine_l1:fine_h1,fine_l2:fine_h2,fine_l3:fine_h3,nvar) integer i, j, k, n, ic, jc, kc, ioff, joff, koff integer lratx,lraty,lratz @@ -91,9 +97,9 @@ subroutine FORT_CV_AVGDOWN ( end subroutine FORT_CV_AVGDOWN_STAG ( & nodal_dir, - & crse,DIMS(crse), + & crse,crse_l1,crse_l2,crse_l3,crse_h1,crse_h2,crse_h3, & nvar, - & fine,DIMS(fine), + & fine,fine_l1,fine_l2,fine_l3,fine_h1,fine_h2,fine_h3, & lo,hi,ratios) c ---------------------------------------------------------- c Average the fine grid data onto the coarse @@ -105,16 +111,15 @@ subroutine FORT_CV_AVGDOWN_STAG ( c lo,hi = index limits of overlap (crse grid) c ratios = IntVect refinement ratio c ---------------------------------------------------------- + implicit none integer nodal_dir - integer DIMDEC(crse) - integer DIMDEC(fine) + integer crse_l1,crse_l2,crse_l3,crse_h1,crse_h2,crse_h3 + integer fine_l1,fine_l2,fine_l3,fine_h1,fine_h2,fine_h3 integer lo(SDIM), hi(SDIM) integer nvar integer ratios(SDIM) - REAL_T - $ crse(DIMV(crse),nvar) - REAL_T - $ fine(DIMV(fine),nvar) + REAL_T crse(crse_l1:crse_h1,crse_l2:crse_h2,crse_l3:crse_h3,nvar) + REAL_T fine(fine_l1:fine_h1,fine_l2:fine_h2,fine_l3:fine_h3,nvar) integer i, j, k, n, ic, jc, kc, ioff, joff, koff integer lrat @@ -200,11 +205,11 @@ subroutine FORT_CV_AVGDOWN_STAG ( subroutine FORT_AVGDOWN ( - & crse,DIMS(crse), + & crse,crse_l1,crse_l2,crse_l3,crse_h1,crse_h2,crse_h3, & nvar, - & fine,DIMS(fine), - & cv,DIMS(cv), - & fv,DIMS(fv), + & fine,fine_l1,fine_l2,fine_l3,fine_h1,fine_h2,fine_h3, + & cv,cv_l1,cv_l2,cv_l3,cv_h1,cv_h2,cv_h3, + & fv,fv_l1,fv_l2,fv_l3,fv_h1,fv_h2,fv_h3, & lo,hi,ratios) c ---------------------------------------------------------- c Volume-weight average the fine grid data onto the coarse @@ -218,19 +223,18 @@ subroutine FORT_AVGDOWN ( c lo,hi = index limits of overlap (crse grid) c ratios = IntVect refinement ratio c ---------------------------------------------------------- - integer DIMDEC(crse) - integer DIMDEC(cv) - integer DIMDEC(fine) - integer DIMDEC(fv) + implicit none + integer crse_l1,crse_l2,crse_l3,crse_h1,crse_h2,crse_h3 + integer cv_l1,cv_l2,cv_l3,cv_h1,cv_h2,cv_h3 + integer fine_l1,fine_l2,fine_l3,fine_h1,fine_h2,fine_h3 + integer fv_l1,fv_l2,fv_l3,fv_h1,fv_h2,fv_h3 integer lo(SDIM), hi(SDIM) integer nvar integer ratios(SDIM) - REAL_T - $ crse(DIMV(crse),nvar) - REAL_T cv(DIMV(cv)) - REAL_T - $ fine(DIMV(fine),nvar) - REAL_T fv(DIMV(fv)) + REAL_T crse(crse_l1:crse_h1,crse_l2:crse_h2,crse_l3:crse_h3,nvar) + REAL_T cv(cv_l1:cv_h1,cv_l2:cv_h2,cv_l3:cv_h3) + REAL_T fine(fine_l1:fine_h1,fine_l2:fine_h2,fine_l3:fine_h3,nvar) + REAL_T fv(fv_l1:fv_h1,fv_l2:fv_h2,fv_l3:fv_h3) integer i, j, k, n, ic, jc, kc, ioff, joff, koff integer lratx,lraty,lratz diff --git a/Src/Extern/amrdata/AMReX_FABUTIL_1D.F b/Src/Extern/amrdata/AMReX_FABUTIL_1D.F index 5692a76831b..42824b08963 100644 --- a/Src/Extern/amrdata/AMReX_FABUTIL_1D.F +++ b/Src/Extern/amrdata/AMReX_FABUTIL_1D.F @@ -3,16 +3,29 @@ #define FORT_CINTERP cinterp1d #define FORT_PCINTERP pcinterp1d -#undef AMREX_XSDK - #include "AMReX_REAL.H" -#include "AMReX_CONSTANTS.H" + +#ifdef BL_USE_FLOAT +#define REAL_T real +#define bigreal 1.0e30 +#define zero 0.0e0 +#define one 1.0e0 +#define half 0.5e0 +#else +#define REAL_T double precision +#define bigreal 1.0d30 +#define zero 0.0d0 +#define one 1.0d0 +#define half 0.5d0 +#endif c ::: -------------------------------------------------------------- subroutine FORT_CINTERP (fine,floi1,floi2,fhii1,fhii2, fblo,fbhi, $ nvar,lratio, crse,clo,chi,cblo,cbhi,fslo,fshi, cslope,clen, $ fslope,fdat,flen,voff) + implicit none + integer floi1,floi2, fhii1,fhii2 integer fblo(2), fbhi(2) @@ -204,6 +217,8 @@ subroutine FORT_CINTERP (fine,floi1,floi2,fhii1,fhii2, fblo,fbhi, subroutine FORT_PCINTERP (fine,floi1,fhii1,fblo, fbhi,lrat, $ nvar, crse,cloi1,chii1,cblo, cbhi,temp,tloi,thii) + implicit none + integer floi1 integer fhii1 integer cloi1 diff --git a/Src/Extern/amrdata/AMReX_FABUTIL_2D.F b/Src/Extern/amrdata/AMReX_FABUTIL_2D.F index 31391d8733d..8748760ff35 100644 --- a/Src/Extern/amrdata/AMReX_FABUTIL_2D.F +++ b/Src/Extern/amrdata/AMReX_FABUTIL_2D.F @@ -3,16 +3,29 @@ #define FORT_CINTERP cinterp2d #define FORT_PCINTERP pcinterp2d -#undef AMREX_XSDK - #include "AMReX_REAL.H" -#include "AMReX_CONSTANTS.H" + +#ifdef BL_USE_FLOAT +#define REAL_T real +#define bigreal 1.0e30 +#define zero 0.0e0 +#define one 1.0e0 +#define half 0.5e0 +#else +#define REAL_T double precision +#define bigreal 1.0d30 +#define zero 0.0d0 +#define one 1.0d0 +#define half 0.5d0 +#endif c ::: -------------------------------------------------------------- subroutine FORT_CINTERP (fine,floi1,floi2,fhii1,fhii2, fblo,fbhi, $ nvar,lratio, crse,clo,chi,cblo,cbhi,fslo,fshi, cslope,clen, $ fslope,fdat,flen,voff) + implicit none + integer floi1,floi2, fhii1,fhii2 integer fblo(2), fbhi(2) @@ -203,6 +216,8 @@ subroutine FORT_PCINTERP (fine,floi1,floi2,fhii1,fhii2,fblo, $ fbhi,lrat,nvar,crse,cloi1,cloi2,chii1,chii2,cblo, $ cbhi,temp,tloi,thii) + implicit none + integer floi1,floi2 integer fhii1,fhii2 integer cloi1,cloi2 diff --git a/Src/Extern/amrdata/AMReX_FABUTIL_3D.F b/Src/Extern/amrdata/AMReX_FABUTIL_3D.F index cdc8cce9ff6..8a6ff561577 100644 --- a/Src/Extern/amrdata/AMReX_FABUTIL_3D.F +++ b/Src/Extern/amrdata/AMReX_FABUTIL_3D.F @@ -5,10 +5,21 @@ #define FORT_VCINTERP vcinterp3d #define FORT_CARTGRIDMINMAX cartgridminmax3d -#undef AMREX_XSDK - #include "AMReX_REAL.H" -#include "AMReX_CONSTANTS.H" + +#ifdef BL_USE_FLOAT +#define REAL_T real +#define bigreal 1.0e30 +#define zero 0.0e0 +#define one 1.0e0 +#define half 0.5e0 +#else +#define REAL_T double precision +#define bigreal 1.0d30 +#define zero 0.0d0 +#define one 1.0d0 +#define half 0.5d0 +#endif #define IX_PROJ(A,B) (A+B*iabs(A))/B-iabs(A) @@ -48,6 +59,8 @@ subroutine FORT_CINTERP (fine,floi1,floi2,floi3,fhii1,fhii2,fhii3, $ fblo,fbhi,nvar,lratio, crse,clo,chi,cblo,cbhi,fslo,fshi, cslope, $ clen,fslope,fdat,flen,voff) + implicit none + integer floi1,floi2,floi3, fhii1,fhii2,fhii3 integer fblo(3), fbhi(3) integer cblo(3), cbhi(3) @@ -348,6 +361,8 @@ subroutine FORT_PCINTERP (fine,floi1,floi2,floi3,fhii1,fhii2, $ fhii3,fblo,fbhi,lrat,nvar,crse,cloi1,cloi2,cloi3,chii1,chii2, $ chii3,cblo,cbhi,temp,tloi,thii) + implicit none + integer floi1,floi2,floi3 integer fhii1,fhii2,fhii3 integer cloi1,cloi2,cloi3 @@ -408,6 +423,8 @@ subroutine FORT_VCINTERP (fine,floi1,floi2,floi3,fhii1,fhii2, $ cvhii2,cvhii3, cslope,clen,fslope,fdat,flen,voff, cvc1,fvc1,cvc2, $ fvc2,cvc3,fvc3) + implicit none + integer floi1,floi2,floi3 integer fhii1,fhii2,fhii3 integer fbloi1,fbloi2,fbloi3 diff --git a/Tests/Amr/Advection_AmrCore/Source/AmrCoreAdv.cpp b/Tests/Amr/Advection_AmrCore/Source/AmrCoreAdv.cpp index e79d8615c18..450315fa802 100644 --- a/Tests/Amr/Advection_AmrCore/Source/AmrCoreAdv.cpp +++ b/Tests/Amr/Advection_AmrCore/Source/AmrCoreAdv.cpp @@ -52,8 +52,8 @@ AmrCoreAdv::AmrCoreAdv () /* // walls (Neumann) - int bc_lo[] = {FOEXTRAP, FOEXTRAP, FOEXTRAP}; - int bc_hi[] = {FOEXTRAP, FOEXTRAP, FOEXTRAP}; + int bc_lo[] = {amrex::BCType::foextrap, amrex::BCType::foextrap, amrex::BCType::foextrap}; + int bc_hi[] = {amrex::BCType::foextrap, amrex::BCType::foextrap, amrex::BCType::foextrap}; */ bcs.resize(1); // Setup 1-component diff --git a/Tools/C_util/Convergence/DiffFab.cpp b/Tools/C_util/Convergence/DiffFab.cpp index 0794583bde8..a21eb8d7f6c 100644 --- a/Tools/C_util/Convergence/DiffFab.cpp +++ b/Tools/C_util/Convergence/DiffFab.cpp @@ -123,10 +123,10 @@ main (int argc, FArrayBox exactAvg(domainI,nComp); FORT_CV_AVGDOWN(exactAvg.dataPtr(), - ARLIM(exactAvg.loVect()), - ARLIM(exactAvg.hiVect()), &nComp, + AMREX_ARLIM(exactAvg.loVect()), + AMREX_ARLIM(exactAvg.hiVect()), &nComp, dataE.dataPtr(), - ARLIM(dataE.loVect()), ARLIM(dataE.hiVect()), + AMREX_ARLIM(dataE.loVect()), AMREX_ARLIM(dataE.hiVect()), domainI.loVect(), domainI.hiVect(), refine_ratio.getVect()); diff --git a/Tools/C_util/Convergence/DiffSameDomainRefined.cpp b/Tools/C_util/Convergence/DiffSameDomainRefined.cpp index 5e4051b03fe..609dfd6c314 100644 --- a/Tools/C_util/Convergence/DiffSameDomainRefined.cpp +++ b/Tools/C_util/Convergence/DiffSameDomainRefined.cpp @@ -225,11 +225,11 @@ main (int argc, int ncCoarse = 1; FORT_CV_AVGDOWN(data2Coarse.dataPtr(), - ARLIM(bx.loVect()), ARLIM(bx.hiVect()), + AMREX_ARLIM(bx.loVect()), AMREX_ARLIM(bx.hiVect()), &ncCoarse, data2Fine[mfi].dataPtr(), - ARLIM(data2Fine[mfi].loVect()), - ARLIM(data2Fine[mfi].hiVect()), + AMREX_ARLIM(data2Fine[mfi].loVect()), + AMREX_ARLIM(data2Fine[mfi].hiVect()), bx.loVect(), bx.hiVect(), refine_ratio.getVect()); @@ -379,4 +379,3 @@ getRefRatio(const Box& crse, ref_ratio = IntVect(); return ref_ratio; } - diff --git a/Tools/C_util/Convergence/DiffSameDomainRefinedComposite.cpp b/Tools/C_util/Convergence/DiffSameDomainRefinedComposite.cpp index 1e490d817b6..92433136be6 100644 --- a/Tools/C_util/Convergence/DiffSameDomainRefinedComposite.cpp +++ b/Tools/C_util/Convergence/DiffSameDomainRefinedComposite.cpp @@ -241,11 +241,11 @@ main (int argc, FORT_CV_AVGDOWN(data2Coarse.dataPtr(), - ARLIM(bx.loVect()), ARLIM(bx.hiVect()), + AMREX_ARLIM(bx.loVect()), AMREX_ARLIM(bx.hiVect()), &ncCoarse, data2Fine[mfi].dataPtr(), - ARLIM(data2Fine[mfi].loVect()), - ARLIM(data2Fine[mfi].hiVect()), + AMREX_ARLIM(data2Fine[mfi].loVect()), + AMREX_ARLIM(data2Fine[mfi].hiVect()), bx.loVect(), bx.hiVect(), refine_ratio.getVect()); @@ -414,4 +414,3 @@ getRefRatio(const Box& crse, ref_ratio = IntVect(); return ref_ratio; } - diff --git a/Tools/C_util/Convergence/DiffSameDomainRefinedStag.cpp b/Tools/C_util/Convergence/DiffSameDomainRefinedStag.cpp index 0f5cf0226e4..25736b2f7e9 100644 --- a/Tools/C_util/Convergence/DiffSameDomainRefinedStag.cpp +++ b/Tools/C_util/Convergence/DiffSameDomainRefinedStag.cpp @@ -250,12 +250,12 @@ main (int argc, FORT_CV_AVGDOWN_STAG(&nodal_dir, data2Coarse.dataPtr(), - ARLIM(data2Coarse.loVect()), - ARLIM(data2Coarse.hiVect()), + AMREX_ARLIM(data2Coarse.loVect()), + AMREX_ARLIM(data2Coarse.hiVect()), &ncCoarse, data2Fine[mfi].dataPtr(), - ARLIM(data2Fine[mfi].loVect()), - ARLIM(data2Fine[mfi].hiVect()), + AMREX_ARLIM(data2Fine[mfi].loVect()), + AMREX_ARLIM(data2Fine[mfi].hiVect()), loiv.getVect(), hiiv.getVect(), refine_ratio.getVect()); @@ -406,4 +406,3 @@ getRefRatio(const Box& crse, ref_ratio = IntVect(); return ref_ratio; } - diff --git a/Tools/C_util/Convergence/DiffSameGridRefined.cpp b/Tools/C_util/Convergence/DiffSameGridRefined.cpp index 3d8da3162a2..3e6b4e2815e 100644 --- a/Tools/C_util/Convergence/DiffSameGridRefined.cpp +++ b/Tools/C_util/Convergence/DiffSameGridRefined.cpp @@ -219,11 +219,11 @@ main (int argc, int ncCoarse = data2Coarse.nComp(); FORT_CV_AVGDOWN(data2Coarse.dataPtr(), - ARLIM(bx.loVect()), ARLIM(bx.hiVect()), + AMREX_ARLIM(bx.loVect()), AMREX_ARLIM(bx.hiVect()), &ncCoarse, data2Fine[mfi].dataPtr(), - ARLIM(data2Fine[mfi].loVect()), - ARLIM(data2Fine[mfi].hiVect()), + AMREX_ARLIM(data2Fine[mfi].loVect()), + AMREX_ARLIM(data2Fine[mfi].hiVect()), bx.loVect(), bx.hiVect(), refine_ratio.getVect()); @@ -372,4 +372,3 @@ getRefRatio(const Box& crse, ref_ratio = IntVect(); return ref_ratio; } - diff --git a/Tools/C_util/Convergence/DiffUniform.cpp b/Tools/C_util/Convergence/DiffUniform.cpp index fd749365581..4598aff4aa3 100644 --- a/Tools/C_util/Convergence/DiffUniform.cpp +++ b/Tools/C_util/Convergence/DiffUniform.cpp @@ -159,9 +159,9 @@ main (int argc, const int* e_lo = exact[amfi].loVect(); const int* e_hi = exact[amfi].hiVect(); FORT_CV_AVGDOWN(aveExact[amfi].dataPtr(), - ARLIM(a_lo), ARLIM(a_hi), &nc, + AMREX_ARLIM(a_lo), AMREX_ARLIM(a_hi), &nc, exact[amfi].dataPtr(), - ARLIM(e_lo), ARLIM(e_hi), + AMREX_ARLIM(e_lo), AMREX_ARLIM(e_hi), crseBox.loVect(), crseBox.hiVect(), refine_ratio.getVect()); } @@ -265,4 +265,3 @@ amrDatasHaveSameDerives(const AmrData& amrd1, return false; return true; } - diff --git a/Tools/C_util/Convergence/RichardsonConvergenceTest.cpp b/Tools/C_util/Convergence/RichardsonConvergenceTest.cpp index 1974605e1ee..1ca1cf2673f 100644 --- a/Tools/C_util/Convergence/RichardsonConvergenceTest.cpp +++ b/Tools/C_util/Convergence/RichardsonConvergenceTest.cpp @@ -278,11 +278,11 @@ getErrorNorms(Vector& a_norms, //one for each comp FORT_CV_AVGDOWN(data2Coarse.dataPtr(), - ARLIM(bx.loVect()), ARLIM(bx.hiVect()), + AMREX_ARLIM(bx.loVect()), AMREX_ARLIM(bx.hiVect()), &ncCoarse, data2Fine[mfi].dataPtr(), - ARLIM(data2Fine[mfi].loVect()), - ARLIM(data2Fine[mfi].hiVect()), + AMREX_ARLIM(data2Fine[mfi].loVect()), + AMREX_ARLIM(data2Fine[mfi].hiVect()), bx.loVect(), bx.hiVect(), refine_ratio.getVect()); diff --git a/Tools/Postprocessing/C_Src/PlotfileToTurb.cpp b/Tools/Postprocessing/C_Src/PlotfileToTurb.cpp index 826fe69b2f6..8672c529226 100644 --- a/Tools/Postprocessing/C_Src/PlotfileToTurb.cpp +++ b/Tools/Postprocessing/C_Src/PlotfileToTurb.cpp @@ -17,7 +17,7 @@ #include extern "C" { - void fliprowsy(amrex_real* u, ARLIM_P(ulo), ARLIM_P(uhi)); + void fliprowsy(amrex_real* u, AMREX_ARLIM_P(ulo), AMREX_ARLIM_P(uhi)); } using namespace amrex;