1#ifndef AMREX_FLUXREG_2D_C_H_
2#define AMREX_FLUXREG_2D_C_H_
3#include <AMReX_Config.H>
5#if (AMREX_SPACEDIM == 2)
30 Array4<Real const>
const& flx,
const int fcomp,
const int ncomp,
31 const int dir, Dim3
const& ratio,
const Real mult)
noexcept
40 const int i = ic*ratio.x;
41 for (
int n = 0; n < ncomp; ++n) {
42 for (
int jc = lo.y; jc <= hi.y; ++jc) {
43 for (
int joff = 0; joff < ratio.y; ++joff) {
44 const int j = ratio.y*jc + joff;
45 reg(ic,jc,0,n+rcomp) += mult*flx(i,j,0,n+fcomp);
54 const int j = jc*ratio.y;
55 for (
int n = 0; n < ncomp; ++n) {
56 for (
int ic = lo.x; ic <= hi.x; ++ic) {
57 for (
int ioff = 0; ioff < ratio.x; ++ioff) {
58 const int i = ratio.x*ic + ioff;
59 reg(ic,jc,0,n+rcomp) += mult*flx(i,j,0,n+fcomp);
87 Array4<Real const>
const& area,
88 Array4<Real const>
const& flx,
const int fcomp,
const int ncomp,
89 const int dir, Dim3
const& ratio,
const Real mult)
noexcept
98 const int i = ic*ratio.x;
99 for (
int n = 0; n < ncomp; ++n) {
100 for (
int jc = lo.y; jc <= hi.y; ++jc) {
101 for (
int joff = 0; joff < ratio.y; ++joff) {
102 const int j = ratio.y*jc + joff;
103 reg(ic,jc,0,n+rcomp) += mult*area(i,j,0)
104 * flx(i,j,0,n+fcomp);
113 const int j = jc*ratio.y;
114 for (
int n = 0; n < ncomp; ++n) {
115 for (
int ic = lo.x; ic <= hi.x; ++ic) {
116 for (
int ioff = 0; ioff < ratio.x; ++ioff) {
117 const int i = ratio.x*ic + ioff;
118 reg(ic,jc,0,n+rcomp) += mult*area(i,j,0)
119 * flx(i,j,0,n+fcomp);
130 Array4<Real const>
const& f, Array4<Real const>
const& v,
131 const int ncomp,
const Real mult,
const Orientation face)
noexcept
137 const int dir = face.coordDir();
141 for (
int n = 0; n < ncomp; ++n) {
142 for (
int j = lo.y; j <= hi.y; ++j) {
143 for (
int i = lo.x; i <= hi.x; ++i) {
144 s(i,j,0,n+scomp) += -mult*(f(i+1,j,0,n)/v(i,j,0));
152 for (
int n = 0; n < ncomp; ++n) {
153 for (
int j = lo.y; j <= hi.y; ++j) {
154 for (
int i = lo.x; i <= hi.x; ++i) {
155 s(i,j,0,n+scomp) += -mult*(f(i,j+1,0,n)/v(i,j,0));
163 for (
int n = 0; n < ncomp; ++n) {
164 for (
int j = lo.y; j <= hi.y; ++j) {
165 for (
int i = lo.x; i <= hi.x; ++i) {
166 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
Definition AMReX_Amr.cpp:49
__host__ __device__ Dim3 ubound(Array4< T > const &a) noexcept
Definition AMReX_Array4.H:319
__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_3D_C.H:185
BoxND< 3 > Box
Definition AMReX_BaseFwd.H:27
__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 dir, 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_3D_C.H:27
__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 dir, 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_3D_C.H:113
__host__ __device__ Dim3 lbound(Array4< T > const &a) noexcept
Definition AMReX_Array4.H:312