Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Constify: DownwardD* #5234

Merged
merged 1 commit into from
Sep 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
struct CartesianCKCAlgorithm {

static void InitializeStencilCoefficients (
std::array<amrex::Real,3>& cell_size,
std::array<amrex::Real, 3>& cell_size,
amrex::Vector<amrex::Real>& stencil_coefs_x,
amrex::Vector<amrex::Real>& stencil_coefs_y,
amrex::Vector<amrex::Real>& stencil_coefs_z ) {
Expand Down Expand Up @@ -129,7 +129,7 @@ struct CartesianCKCAlgorithm {
* Perform derivative along x on a cell-centered grid, from a nodal field `F` */
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE
static amrex::Real UpwardDx (
amrex::Array4<amrex::Real> const& F,
amrex::Array4<amrex::Real const> const& F,
amrex::Real const * const coefs_x, int const /*n_coefs_x*/,
int const i, int const j, int const k, int const ncomp=0 ) {

Expand Down Expand Up @@ -186,7 +186,7 @@ struct CartesianCKCAlgorithm {
* Perform derivative along y on a cell-centered grid, from a nodal field `F` */
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE
static amrex::Real UpwardDy (
amrex::Array4<amrex::Real> const& F,
amrex::Array4<amrex::Real const> const& F,
amrex::Real const * const coefs_y, int const n_coefs_y,
int const i, int const j, int const k, int const ncomp=0 ) {

Expand Down Expand Up @@ -244,7 +244,7 @@ struct CartesianCKCAlgorithm {
* Perform derivative along z on a cell-centered grid, from a nodal field `F` */
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE
static amrex::Real UpwardDz (
amrex::Array4<amrex::Real> const& F,
amrex::Array4<amrex::Real const> const& F,
amrex::Real const * const coefs_z, int const n_coefs_z,
int const i, int const j, int const k, int const ncomp=0 ) {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ struct CartesianNodalAlgorithm {
* account the staggering; but for `CartesianNodalAlgorithm`, they are equivalent) */
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE
static amrex::Real UpwardDx (
amrex::Array4<amrex::Real> const& F,
amrex::Array4<amrex::Real const> const& F,
amrex::Real const * const coefs_x, int const /*n_coefs_x*/,
int const i, int const j, int const k, int const ncomp=0 ) {

Expand All @@ -89,7 +89,7 @@ struct CartesianNodalAlgorithm {
* account the staggering; but for `CartesianNodalAlgorithm`, they are equivalent) */
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE
static amrex::Real DownwardDx (
amrex::Array4<amrex::Real> const& F,
amrex::Array4<amrex::Real const> const& F,
amrex::Real const * const coefs_x, int const n_coefs_x,
int const i, int const j, int const k, int const ncomp=0 ) {

Expand All @@ -109,7 +109,7 @@ struct CartesianNodalAlgorithm {
* account the staggering; but for `CartesianNodalAlgorithm`, they are equivalent) */
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE
static amrex::Real UpwardDy (
amrex::Array4<amrex::Real> const& F,
amrex::Array4<amrex::Real const> const& F,
amrex::Real const * const coefs_y, int const /*n_coefs_y*/,
int const i, int const j, int const k, int const ncomp=0 ) {

Expand All @@ -129,7 +129,7 @@ struct CartesianNodalAlgorithm {
* account the staggering; but for `CartesianNodalAlgorithm`, they are equivalent) */
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE
static amrex::Real DownwardDy (
amrex::Array4<amrex::Real> const& F,
amrex::Array4<amrex::Real const> const& F,
amrex::Real const * const coefs_y, int const n_coefs_y,
int const i, int const j, int const k, int const ncomp=0 ) {

Expand All @@ -143,7 +143,7 @@ struct CartesianNodalAlgorithm {
* account the staggering; but for `CartesianNodalAlgorithm`, they are equivalent) */
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE
static amrex::Real UpwardDz (
amrex::Array4<amrex::Real> const& F,
amrex::Array4<amrex::Real const> const& F,
amrex::Real const * const coefs_z, int const /*n_coefs_z*/,
int const i, int const j, int const k, int const ncomp=0 ) {

Expand All @@ -164,7 +164,7 @@ struct CartesianNodalAlgorithm {
* account the staggering; but for `CartesianNodalAlgorithm`, they are equivalent) */
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE
static amrex::Real DownwardDz (
amrex::Array4<amrex::Real> const& F,
amrex::Array4<amrex::Real const> const& F,
amrex::Real const * const coefs_z, int const n_coefs_z,
int const i, int const j, int const k, int const ncomp=0 ) {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ struct CartesianYeeAlgorithm {
* Perform derivative along x on a cell-centered grid, from a nodal field `F`*/
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE
static amrex::Real UpwardDx (
amrex::Array4<amrex::Real> const& F,
amrex::Array4<amrex::Real const> const& F,
amrex::Real const * const coefs_x, int const /*n_coefs_x*/,
int const i, int const j, int const k, int const ncomp=0 ) {

Expand Down Expand Up @@ -123,7 +123,7 @@ struct CartesianYeeAlgorithm {
* Perform derivative along y on a cell-centered grid, from a nodal field `F`*/
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE
static amrex::Real UpwardDy (
amrex::Array4<amrex::Real> const& F,
amrex::Array4<amrex::Real const> const& F,
amrex::Real const * const coefs_y, int const n_coefs_y,
int const i, int const j, int const k, int const ncomp=0 ) {

Expand Down Expand Up @@ -189,7 +189,7 @@ struct CartesianYeeAlgorithm {
* Perform derivative along z on a cell-centered grid, from a nodal field `F`*/
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE
static amrex::Real UpwardDz (
amrex::Array4<amrex::Real> const& F,
amrex::Array4<amrex::Real const> const& F,
amrex::Real const * const coefs_z, int const /*n_coefs_z*/,
int const i, int const j, int const k, int const ncomp=0 ) {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ struct CylindricalYeeAlgorithm {
* The input parameter `r` is given at the cell-centered position */
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE
static amrex::Real UpwardDrr_over_r (
amrex::Array4<amrex::Real> const& F,
amrex::Array4<amrex::Real const> const& F,
amrex::Real const r, amrex::Real const dr,
amrex::Real const * const coefs_r, int const n_coefs_r,
int const i, int const j, int const k, int const comp ) {
Expand All @@ -92,7 +92,7 @@ struct CylindricalYeeAlgorithm {
* The input parameter `r` is given at the cell-centered position */
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE
static amrex::Real DownwardDrr_over_r (
amrex::Array4<amrex::Real> const& F,
amrex::Array4<amrex::Real const> const& F,
amrex::Real const r, amrex::Real const dr,
amrex::Real const * const coefs_r, int const n_coefs_r,
int const i, int const j, int const k, int const comp ) {
Expand All @@ -108,7 +108,7 @@ struct CylindricalYeeAlgorithm {
* Perform derivative along r on a cell-centered grid, from a nodal field `F` */
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE
static amrex::Real UpwardDr (
amrex::Array4<amrex::Real> const& F,
amrex::Array4<amrex::Real const> const& F,
amrex::Real const * const coefs_r, int const n_coefs_r,
int const i, int const j, int const k, int const comp ) {

Expand All @@ -123,7 +123,7 @@ struct CylindricalYeeAlgorithm {
* Perform derivative along r on a nodal grid, from a cell-centered field `F` */
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE
static amrex::Real DownwardDr (
amrex::Array4<amrex::Real> const& F,
amrex::Array4<amrex::Real const> const& F,
amrex::Real const * const coefs_r, int const n_coefs_r,
int const i, int const j, int const k, int const comp ) {

Expand Down Expand Up @@ -156,7 +156,7 @@ struct CylindricalYeeAlgorithm {
* Perform derivative along z on a cell-centered grid, from a nodal field `F` */
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE
static amrex::Real UpwardDz (
amrex::Array4<amrex::Real> const& F,
amrex::Array4<amrex::Real const> const& F,
amrex::Real const * const coefs_z, int const n_coefs_z,
int const i, int const j, int const k, int const comp ) {

Expand All @@ -170,7 +170,7 @@ struct CylindricalYeeAlgorithm {
* Perform derivative along z on a nodal grid, from a cell-centered field `F` */
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE
static amrex::Real DownwardDz (
amrex::Array4<amrex::Real> const& F,
amrex::Array4<amrex::Real const> const& F,
amrex::Real const * const coefs_z, int const n_coefs_z,
int const i, int const j, int const k, int const comp ) {

Expand Down
Loading