1 #ifndef AMREX_COORDSYS_1D_C_H_
2 #define AMREX_COORDSYS_1D_C_H_
3 #include <AMReX_Config.H>
26 for (
int i = lo.x; i <= hi.x; ++i) {
32 const Real
pi = Real(3.1415926535897932);
34 for (
int i = lo.x; i <= hi.x; ++i) {
35 Real ri =
offset[0] + dx[0]*i;
37 Real v =
pi*(ro-ri)*(ro + ri);
43 const Real
pi = Real(3.1415926535897932);
45 for (
int i = lo.x; i <= hi.x; ++i) {
46 Real ri =
offset[0] + dx[0]*i;
48 Real v = (Real(4./3.)*
pi)*(ro-ri)*(ro*ro+ro*ri+ri*ri);
67 for (
int i = lo.x; i <= hi.x; ++i) {
73 const Real
pi = Real(3.1415926535897932);
75 for (
int i = lo.x; i <= hi.x; ++i) {
76 Real ri =
offset[0] + dx[0]*i;
77 Real a = (Real(2.)*
pi)*ri;
83 const Real
pi = Real(3.1415926535897932);
85 for (
int i = lo.x; i <= hi.x; ++i) {
86 Real ri =
offset[0] + dx[0]*i;
87 Real a = (Real(4.0)*
pi)*ri*ri;
106 for (
int i = lo.x; i <= hi.x; ++i) {
113 for (
int i = lo.x; i <= hi.x; ++i) {
114 Real rc =
offset[0] + dx[0]*(i+Real(0.5));
115 dloga(i,0,0) = Real(1.0)/rc;
121 for (
int i = lo.x; i <= hi.x; ++i) {
122 Real ri =
offset[0] + dx[0]*(i+Real(0.5));
123 dloga(i,0,0) = Real(2.0)/ri;
#define AMREX_PRAGMA_SIMD
Definition: AMReX_Extension.H:80
#define AMREX_GPU_HOST_DEVICE
Definition: AMReX_GpuQualifiers.H:20
Array4< int const > offset
Definition: AMReX_HypreMLABecLap.cpp:1089
constexpr std::enable_if_t< std::is_floating_point_v< T >, T > pi()
Definition: AMReX_Math.H:62
Definition: AMReX_Amr.cpp:49
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE T abs(const GpuComplex< T > &a_z) noexcept
Return the absolute value of a complex number.
Definition: AMReX_GpuComplex.H:356
AMREX_GPU_HOST_DEVICE void amrex_setvol(Box const &bx, Array4< Real > const &vol, GpuArray< Real, 1 > const &offset, GpuArray< Real, 1 > const &dx, const int coord) noexcept
Definition: AMReX_COORDSYS_1D_C.H:15
AMREX_GPU_HOST_DEVICE void amrex_setarea(Box const &bx, Array4< Real > const &area, GpuArray< Real, 1 > const &offset, GpuArray< Real, 1 > const &dx, const int, const int coord) noexcept
Definition: AMReX_COORDSYS_1D_C.H:57
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE Dim3 ubound(Array4< T > const &a) noexcept
Definition: AMReX_Array4.H:315
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE Dim3 lbound(Array4< T > const &a) noexcept
Definition: AMReX_Array4.H:308
AMREX_GPU_HOST_DEVICE void amrex_setdloga(Box const &bx, Array4< Real > const &dloga, GpuArray< Real, 1 > const &offset, GpuArray< Real, 1 > const &dx, const int, const int coord) noexcept
Definition: AMReX_COORDSYS_1D_C.H:96
Definition: AMReX_Array4.H:61
Definition: AMReX_Array.H:34