forked from AMReX-Codes/amrex
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove various deprecated stuff not prefixed by amrex or bl
Most codes should not be affected by the removal. Some old codes that used to use BoxLib might need updates. AMReX_ArrayLim.H contains macros that are useful for calling Fortran subroutines from C++. The old macros that do not start with `AMREX_` or `BL_` have been moved to AMReX_ArrayLim_Old.H, which is only available if one uses the amrex source directly. Some macros defining BC types in AMReX_BC_TYPES.H have been removed. One should use the C++ enum types (e.g., amrex::BCType::reflect_odd) or Fortran module amrex_bc_types_module. Macros defined in AMReX_CONSTANTS.H for Fortran have been removed. One should use amrex_constants_module instead. Fortran subroutines filcc and filccn have been removed. One should use amrex_filcc and amrex_filccn instead. The REAL_T macro for Fortran has been removed. One should use amrex_real in amrex_fort_module instead. The blutilrand function has been removed. If one needs random numbers in Fortran, one should amrex_random in amrex_fort_module. Apparently this function is very old. Recently, we had a multiple definition problem when we tried to use amrex in a code containing this function that was copied from BoxLib many years ago. Macros like D_DECL have been removed from AMReX_SPACE.H. One should use the AMREX_ version instead. Macros like LO_DIRICHLET have been removed from AMReX_LO_BCTYPES.H. One should use the AMREX_ version instead.
- Loading branch information
1 parent
022f97e
commit ae384d6
Showing
21 changed files
with
257 additions
and
552 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,148 @@ | ||
#ifndef AMREX_ARRAYLIM_OLD_H_ | ||
#define AMREX_ARRAYLIM_OLD_H_ | ||
#include <AMReX_Config.H> | ||
|
||
#include <AMReX_ArrayLim.H> | ||
|
||
#ifdef __cplusplus | ||
|
||
#include <AMReX_Array.H> | ||
|
||
/* | ||
** C++ stuff ... | ||
*/ | ||
|
||
#if AMREX_SPACEDIM==1 | ||
#define ARLIM_P(x) const int& | ||
#define ARLIM(x) (x)[0] | ||
#define ARLIM_3D(x) amrex::GpuArray<int,3>{(x)[0], 0, 0}.data() | ||
#define ARLIM_ANYD(x) amrex::GpuArray<int,3>{(x)[0], 0, 0}.data() | ||
#define ZFILL(x) amrex::GpuArray<amrex::Real,3>{(x)[0], 0., 0.}.data() | ||
#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<int,3>{(x)[0], (x)[1], 0}.data() | ||
#define ARLIM_ANYD(x) amrex::GpuArray<int,3>{(x)[0], (x)[1], 0}.data() | ||
#define ZFILL(x) amrex::GpuArray<amrex::Real,3>{(x)[0], (x)[1], 0.}.data() | ||
#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 | ||
#endif | ||
|
||
#else | ||
|
||
#if !defined(BL_LANG_FORT) | ||
|
||
/* 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 | ||
|
||
#else | ||
|
||
/* | ||
** 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 /*else of !defined(BL_LANG_FORT)*/ | ||
|
||
#endif /*else of __cplusplus*/ | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.