1 #ifndef AMREX_FLUXREG_2D_C_H_
2 #define AMREX_FLUXREG_2D_C_H_
3 #include <AMReX_Config.H>
28 Array4<Real const>
const& flx,
const int fcomp,
const int ncomp,
29 const int dir, Dim3
const& ratio,
const Real mult) noexcept
38 const int i = ic*ratio.x;
39 for (
int n = 0; n < ncomp; ++n) {
40 for (
int jc = lo.y; jc <= hi.y; ++jc) {
41 for (
int joff = 0; joff < ratio.y; ++joff) {
42 const int j = ratio.y*jc + joff;
43 reg(ic,jc,0,n+rcomp) += mult*flx(i,j,0,n+fcomp);
52 const int j = jc*ratio.y;
53 for (
int n = 0; n < ncomp; ++n) {
54 for (
int ic = lo.x; ic <= hi.x; ++ic) {
55 for (
int ioff = 0; ioff < ratio.x; ++ioff) {
56 const int i = ratio.x*ic + ioff;
57 reg(ic,jc,0,n+rcomp) += mult*flx(i,j,0,n+fcomp);
85 Array4<Real const>
const& area,
86 Array4<Real const>
const& flx,
const int fcomp,
const int ncomp,
87 const int dir, Dim3
const& ratio,
const Real mult) noexcept
96 const int i = ic*ratio.x;
97 for (
int n = 0; n < ncomp; ++n) {
98 for (
int jc = lo.y; jc <= hi.y; ++jc) {
99 for (
int joff = 0; joff < ratio.y; ++joff) {
100 const int j = ratio.y*jc + joff;
101 reg(ic,jc,0,n+rcomp) += mult*area(i,j,0)
102 * flx(i,j,0,n+fcomp);
111 const int j = jc*ratio.y;
112 for (
int n = 0; n < ncomp; ++n) {
113 for (
int ic = lo.x; ic <= hi.x; ++ic) {
114 for (
int ioff = 0; ioff < ratio.x; ++ioff) {
115 const int i = ratio.x*ic + ioff;
116 reg(ic,jc,0,n+rcomp) += mult*area(i,j,0)
117 * flx(i,j,0,n+fcomp);
128 Array4<Real const>
const&
f, Array4<Real const>
const& v,
129 const int ncomp,
const Real mult,
const Orientation face) noexcept
135 const int dir = face.coordDir();
139 for (
int n = 0; n < ncomp; ++n) {
140 for (
int j = lo.y; j <= hi.y; ++j) {
141 for (
int i = lo.x; i <= hi.x; ++i) {
142 s(i,j,0,n+scomp) += -mult*(
f(i+1,j,0,n)/v(i,j,0));
150 for (
int n = 0; n < ncomp; ++n) {
151 for (
int j = lo.y; j <= hi.y; ++j) {
152 for (
int i = lo.x; i <= hi.x; ++i) {
153 s(i,j,0,n+scomp) += -mult*(
f(i,j+1,0,n)/v(i,j,0));
161 for (
int n = 0; n < ncomp; ++n) {
162 for (
int j = lo.y; j <= hi.y; ++j) {
163 for (
int i = lo.x; i <= hi.x; ++i) {
164 s(i,j,0,n+scomp) += mult*(
f(i,j,0,n)/v(i,j,0));
#define AMREX_GPU_HOST_DEVICE
Definition: AMReX_GpuQualifiers.H:20
static int f(amrex::Real t, N_Vector y_data, N_Vector y_rhs, void *user_data)
Definition: AMReX_SundialsIntegrator.H:44
Definition: AMReX_Amr.cpp:49
AMREX_GPU_HOST_DEVICE void fluxreg_fineadd(Box const &bx, Array4< Real > const ®, const int rcomp, Array4< Real const > const &flx, const int fcomp, const int ncomp, const int, Dim3 const &ratio, const Real mult) noexcept
Add fine grid flux to flux register. Flux array is a fine grid edge based object, Register is a coars...
Definition: AMReX_FluxReg_1D_C.H:26
BoxND< AMREX_SPACEDIM > Box
Definition: AMReX_BaseFwd.H:27
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 fluxreg_fineareaadd(Box const &bx, Array4< Real > const ®, const int rcomp, Array4< Real const > const &area, Array4< Real const > const &flx, const int fcomp, const int ncomp, const int, Dim3 const &ratio, const Real mult) noexcept
Add fine grid flux times area to flux register. Flux array is a fine grid edge based object,...
Definition: AMReX_FluxReg_1D_C.H:56
AMREX_GPU_HOST_DEVICE void fluxreg_reflux(Box const &bx, Array4< Real > const &s, const int scomp, Array4< Real const > const &f, Array4< Real const > const &v, const int ncomp, const Real mult, const Orientation face) noexcept
Definition: AMReX_FluxReg_1D_C.H:70