-
+
diff --git a/Interpolation__1D_8H_a803d0d35d4ca4791556cbe02bbf51cbb_icgraph.map b/Interpolation__1D_8H_a803d0d35d4ca4791556cbe02bbf51cbb_icgraph.map
index 417123832b..aa6a6413cf 100644
--- a/Interpolation__1D_8H_a803d0d35d4ca4791556cbe02bbf51cbb_icgraph.map
+++ b/Interpolation__1D_8H_a803d0d35d4ca4791556cbe02bbf51cbb_icgraph.map
@@ -4,7 +4,7 @@
-
+
diff --git a/Interpolation__1D_8H_a803d0d35d4ca4791556cbe02bbf51cbb_icgraph.md5 b/Interpolation__1D_8H_a803d0d35d4ca4791556cbe02bbf51cbb_icgraph.md5
index fcf567e51c..ca525f3fd0 100644
--- a/Interpolation__1D_8H_a803d0d35d4ca4791556cbe02bbf51cbb_icgraph.md5
+++ b/Interpolation__1D_8H_a803d0d35d4ca4791556cbe02bbf51cbb_icgraph.md5
@@ -1 +1 @@
-246f64441d33164d66f46d9051f902b6
\ No newline at end of file
+4e323dff84afe7bbfae229d6db32e016
\ No newline at end of file
diff --git a/MOSTAverage_8H_source.html b/MOSTAverage_8H_source.html
index d72871d055..8c41f59869 100644
--- a/MOSTAverage_8H_source.html
+++ b/MOSTAverage_8H_source.html
@@ -118,7 +118,7 @@
-
+
@@ -128,223 +128,231 @@
40 amrex::Vector<std::unique_ptr<
amrex::MultiFab>>& Theta_prim,
41 amrex::Vector<std::unique_ptr<
amrex::MultiFab>>& Qv_prim);
-
-
+
+
-
-
-
-
-
+
+
+
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
- 87 [[nodiscard]]
const amrex::MultiFab*
get_average (
int lev,
int comp)
const {
return m_averages[lev][comp].get(); }
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 104 AMREX_GPU_HOST_DEVICE AMREX_INLINE
-
- 106 const amrex::Real& yp,
- 107 const amrex::Real& zp,
- 108 amrex::Real* interp_vals,
- 109 amrex::Array4<amrex::Real const>
const& interp_array,
- 110 amrex::Array4<amrex::Real const>
const& z_arr,
- 111 const amrex::GpuArray<amrex::Real, AMREX_SPACEDIM>& plo,
- 112 const amrex::GpuArray<amrex::Real, AMREX_SPACEDIM>& dxi,
- 113 const int interp_comp)
-
-
-
- 117 amrex::Real zval= 0.0;
- 118 int kmax = ubound(z_arr).z;
- 119 int i_new = (int) (xp * dxi[0] - 0.5);
- 120 int j_new = (int) (yp * dxi[1] - 0.5);
- 121 amrex::Real z_target = zp;
- 122 for (
int lk(0); lk<kmax; ++lk) {
- 123 amrex::Real z_lo = 0.25 * ( z_arr(i_new,j_new ,lk ) + z_arr(i_new+1,j_new ,lk )
- 124 + z_arr(i_new,j_new+1,lk ) + z_arr(i_new+1,j_new+1,lk ) );
- 125 amrex::Real z_hi = 0.25 * ( z_arr(i_new,j_new ,lk+1) + z_arr(i_new+1,j_new ,lk+1)
- 126 + z_arr(i_new,j_new+1,lk+1) + z_arr(i_new+1,j_new+1,lk+1) );
- 127 if (z_target > z_lo && z_target < z_hi){
-
- 129 zval = (amrex::Real) lk + ((z_target - z_lo) / (z_hi - z_lo)) + 0.5;
-
-
-
-
- 134 amrex::ignore_unused(found);
- 135 AMREX_ASSERT_WITH_MESSAGE(found,
"MOSTAverage: Height above terrain not found, try increasing z_ref!");
+
+ 90 [[nodiscard]]
const amrex::MultiFab*
get_average (
int lev,
int comp)
const {
return m_averages[lev][comp].get(); }
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 107 AMREX_GPU_HOST_DEVICE AMREX_INLINE
+
+ 109 const amrex::Real& yp,
+ 110 const amrex::Real& zp,
+ 111 amrex::Real* interp_vals,
+ 112 amrex::Array4<amrex::Real const>
const& interp_array,
+ 113 amrex::Array4<amrex::Real const>
const& z_arr,
+ 114 const amrex::GpuArray<amrex::Real, AMREX_SPACEDIM>& plo,
+ 115 const amrex::GpuArray<amrex::Real, AMREX_SPACEDIM>& dxi,
+ 116 const int interp_comp)
+
+
+
+ 120 amrex::Real zval= 0.0;
+ 121 int kmax = ubound(z_arr).z;
+ 122 int i_new = (int) (xp * dxi[0] - 0.5);
+ 123 int j_new = (int) (yp * dxi[1] - 0.5);
+ 124 amrex::Real z_target = zp;
+ 125 for (
int lk(0); lk<kmax; ++lk) {
+ 126 amrex::Real z_lo = 0.25 * ( z_arr(i_new,j_new ,lk ) + z_arr(i_new+1,j_new ,lk )
+ 127 + z_arr(i_new,j_new+1,lk ) + z_arr(i_new+1,j_new+1,lk ) );
+ 128 amrex::Real z_hi = 0.25 * ( z_arr(i_new,j_new ,lk+1) + z_arr(i_new+1,j_new ,lk+1)
+ 129 + z_arr(i_new,j_new+1,lk+1) + z_arr(i_new+1,j_new+1,lk+1) );
+ 130 if (z_target > z_lo && z_target < z_hi){
+
+ 132 zval = (amrex::Real) lk + ((z_target - z_lo) / (z_hi - z_lo)) + 0.5;
+
+
+
- 137 const amrex::RealVect lx((xp - plo[0])*dxi[0] + 0.5,
- 138 (yp - plo[1])*dxi[1] + 0.5,
-
-
- 141 const amrex::IntVect ijk = lx.floor();
-
- 143 int i = ijk[0];
int j = ijk[1];
int k = ijk[2];
-
-
- 146 const amrex::RealVect sx_hi = lx - ijk;
- 147 const amrex::RealVect sx_lo = 1.0 - sx_hi;
-
- 149 for (
int n = 0; n < interp_comp; n++)
- 150 interp_vals[n] = sx_lo[0]*sx_lo[1]*sx_lo[2]*interp_array(i-1, j-1, k-1,n) +
- 151 sx_lo[0]*sx_lo[1]*sx_hi[2]*interp_array(i-1, j-1, k ,n) +
- 152 sx_lo[0]*sx_hi[1]*sx_lo[2]*interp_array(i-1, j , k-1,n) +
- 153 sx_lo[0]*sx_hi[1]*sx_hi[2]*interp_array(i-1, j , k ,n) +
- 154 sx_hi[0]*sx_lo[1]*sx_lo[2]*interp_array(i , j-1, k-1,n) +
- 155 sx_hi[0]*sx_lo[1]*sx_hi[2]*interp_array(i , j-1, k ,n) +
- 156 sx_hi[0]*sx_hi[1]*sx_lo[2]*interp_array(i , j , k-1,n) +
- 157 sx_hi[0]*sx_hi[1]*sx_hi[2]*interp_array(i , j , k ,n);
-
-
-
-
-
-
- 164 const amrex::Vector<amrex::Geometry>
m_geom;
- 165 amrex::Vector<amrex::Vector<amrex::MultiFab*>>
m_fields;
-
-
-
-
-
-
-
-
-
-
- 176 amrex::Vector<std::unique_ptr<amrex::MultiFab>>
m_x_pos;
- 177 amrex::Vector<std::unique_ptr<amrex::MultiFab>>
m_y_pos;
- 178 amrex::Vector<std::unique_ptr<amrex::MultiFab>>
m_z_pos;
- 179 amrex::Vector<std::unique_ptr<amrex::iMultiFab>>
m_i_indx;
- 180 amrex::Vector<std::unique_ptr<amrex::iMultiFab>>
m_j_indx;
- 181 amrex::Vector<std::unique_ptr<amrex::iMultiFab>>
m_k_indx;
- 182 amrex::Vector<amrex::Vector<std::unique_ptr<amrex::MultiFab>>>
m_averages;
-
-
-
-
-
+ 137 amrex::ignore_unused(found);
+ 138 AMREX_ASSERT_WITH_MESSAGE(found,
"MOSTAverage: Height above terrain not found, try increasing z_ref!");
+
+ 140 const amrex::RealVect lx((xp - plo[0])*dxi[0] + 0.5,
+ 141 (yp - plo[1])*dxi[1] + 0.5,
+
+
+ 144 const amrex::IntVect ijk = lx.floor();
+
+ 146 int i = ijk[0];
int j = ijk[1];
int k = ijk[2];
+
+
+ 149 const amrex::RealVect sx_hi = lx - ijk;
+ 150 const amrex::RealVect sx_lo = 1.0 - sx_hi;
+
+ 152 for (
int n = 0; n < interp_comp; n++)
+ 153 interp_vals[n] = sx_lo[0]*sx_lo[1]*sx_lo[2]*interp_array(i-1, j-1, k-1,n) +
+ 154 sx_lo[0]*sx_lo[1]*sx_hi[2]*interp_array(i-1, j-1, k ,n) +
+ 155 sx_lo[0]*sx_hi[1]*sx_lo[2]*interp_array(i-1, j , k-1,n) +
+ 156 sx_lo[0]*sx_hi[1]*sx_hi[2]*interp_array(i-1, j , k ,n) +
+ 157 sx_hi[0]*sx_lo[1]*sx_lo[2]*interp_array(i , j-1, k-1,n) +
+ 158 sx_hi[0]*sx_lo[1]*sx_hi[2]*interp_array(i , j-1, k ,n) +
+ 159 sx_hi[0]*sx_hi[1]*sx_lo[2]*interp_array(i , j , k-1,n) +
+ 160 sx_hi[0]*sx_hi[1]*sx_hi[2]*interp_array(i , j , k ,n);
+
+
+
+
+
+
+ 167 const amrex::Vector<amrex::Geometry>
m_geom;
+ 168 amrex::Vector<amrex::Vector<amrex::MultiFab*>>
m_fields;
+
+
+
+
+
+
+
+
+
+
+
+ 180 amrex::Vector<std::unique_ptr<amrex::MultiFab>>
m_x_pos;
+ 181 amrex::Vector<std::unique_ptr<amrex::MultiFab>>
m_y_pos;
+ 182 amrex::Vector<std::unique_ptr<amrex::MultiFab>>
m_z_pos;
+ 183 amrex::Vector<std::unique_ptr<amrex::iMultiFab>>
m_i_indx;
+ 184 amrex::Vector<std::unique_ptr<amrex::iMultiFab>>
m_j_indx;
+ 185 amrex::Vector<std::unique_ptr<amrex::iMultiFab>>
m_k_indx;
+ 186 amrex::Vector<amrex::Vector<std::unique_ptr<amrex::MultiFab>>>
m_averages;
+ 187 amrex::Vector<amrex::Vector<std::unique_ptr<amrex::MultiFab>>>
m_rot_fields;
-
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
+
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
Definition: MOSTAverage.H:12
-int m_navg
Definition: MOSTAverage.H:171
-bool m_t_avg
Definition: MOSTAverage.H:202
-int m_policy
Definition: MOSTAverage.H:173
-amrex::Vector< amrex::Vector< std::unique_ptr< amrex::MultiFab > > > m_averages
Definition: MOSTAverage.H:182
-void set_k_indices_T()
Definition: MOSTAverage.cpp:302
-amrex::Vector< std::unique_ptr< amrex::MultiFab > > m_y_pos
Definition: MOSTAverage.H:177
-void set_region_normalization()
Definition: MOSTAverage.H:47
-void write_xz_positions(int lev, int j)
Definition: MOSTAverage.cpp:1066
-void set_norm_indices_T()
Definition: MOSTAverage.cpp:359
-int m_radius
Definition: MOSTAverage.H:191
-amrex::Vector< std::unique_ptr< amrex::iMultiFab > > m_i_indx
Definition: MOSTAverage.H:179
-amrex::Vector< amrex::MultiFab * > m_z_phys_nd
Definition: MOSTAverage.H:166
-amrex::Vector< int > m_t_init
Definition: MOSTAverage.H:203
-amrex::Vector< std::unique_ptr< amrex::MultiFab > > m_x_pos
Definition: MOSTAverage.H:176
-void set_plane_normalization()
Definition: MOSTAverage.cpp:198
-amrex::Real get_zref() const
Definition: MOSTAverage.H:90
-void write_k_indices(int lev)
Definition: MOSTAverage.cpp:978
+int m_navg
Definition: MOSTAverage.H:174
+bool m_t_avg
Definition: MOSTAverage.H:207
+int m_policy
Definition: MOSTAverage.H:176
+amrex::Vector< amrex::Vector< std::unique_ptr< amrex::MultiFab > > > m_averages
Definition: MOSTAverage.H:186
+void set_k_indices_T()
Definition: MOSTAverage.cpp:390
+amrex::Vector< std::unique_ptr< amrex::MultiFab > > m_y_pos
Definition: MOSTAverage.H:181
+void set_region_normalization()
Definition: MOSTAverage.H:50
+void write_xz_positions(int lev, int j)
Definition: MOSTAverage.cpp:1164
+void set_norm_indices_T()
Definition: MOSTAverage.cpp:447
+int m_radius
Definition: MOSTAverage.H:196
+amrex::Vector< std::unique_ptr< amrex::iMultiFab > > m_i_indx
Definition: MOSTAverage.H:183
+void set_rotated_fields(int lev)
Definition: MOSTAverage.cpp:227
+amrex::Vector< amrex::MultiFab * > m_z_phys_nd
Definition: MOSTAverage.H:169
+amrex::Vector< int > m_t_init
Definition: MOSTAverage.H:208
+amrex::Vector< std::unique_ptr< amrex::MultiFab > > m_x_pos
Definition: MOSTAverage.H:180
+void set_plane_normalization()
Definition: MOSTAverage.cpp:286
+amrex::Real get_zref() const
Definition: MOSTAverage.H:93
+void write_k_indices(int lev)
Definition: MOSTAverage.cpp:1076
MOSTAverage(amrex::Vector< amrex::Geometry > geom, amrex::Vector< amrex::Vector< amrex::MultiFab >> &vars_old, amrex::Vector< std::unique_ptr< amrex::MultiFab >> &Theta_prim, amrex::Vector< std::unique_ptr< amrex::MultiFab >> &Qv_prim, amrex::Vector< std::unique_ptr< amrex::MultiFab >> &z_phys_nd)
-void set_norm_positions_T()
Definition: MOSTAverage.cpp:478
-void compute_averages(int lev)
Definition: MOSTAverage.cpp:540
-amrex::Vector< amrex::Vector< amrex::Real > > m_plane_average
Definition: MOSTAverage.H:187
-amrex::Vector< std::unique_ptr< amrex::MultiFab > > m_z_pos
Definition: MOSTAverage.H:178
-void set_k_indices_N()
Definition: MOSTAverage.cpp:243
-amrex::Vector< amrex::Vector< int > > m_ncell_plane
Definition: MOSTAverage.H:186
-std::string m_pp_prefix
Definition: MOSTAverage.H:175
-bool m_norm_vec
Definition: MOSTAverage.H:198
-int m_nvar
Definition: MOSTAverage.H:170
-amrex::Real m_fact_new
Definition: MOSTAverage.H:205
-void set_z_positions_T()
Definition: MOSTAverage.cpp:432
-const amrex::MultiFab * get_average(int lev, int comp) const
Definition: MOSTAverage.H:87
-void compute_region_averages(int lev)
Definition: MOSTAverage.cpp:754
-int m_ncell_region
Definition: MOSTAverage.H:192
-void compute_plane_averages(int lev)
Definition: MOSTAverage.cpp:564
-void write_norm_indices(int lev)
Definition: MOSTAverage.cpp:1017
-int m_maxlev
Definition: MOSTAverage.H:172
-void write_averages(int lev)
Definition: MOSTAverage.cpp:1096
+void set_norm_positions_T()
Definition: MOSTAverage.cpp:566
+amrex::Vector< amrex::Vector< std::unique_ptr< amrex::MultiFab > > > m_rot_fields
Definition: MOSTAverage.H:187
+void compute_averages(int lev)
Definition: MOSTAverage.cpp:628
+bool m_rotate
Definition: MOSTAverage.H:177
+amrex::Vector< amrex::Vector< amrex::Real > > m_plane_average
Definition: MOSTAverage.H:192
+amrex::Vector< std::unique_ptr< amrex::MultiFab > > m_z_pos
Definition: MOSTAverage.H:182
+void set_k_indices_N()
Definition: MOSTAverage.cpp:331
+amrex::Vector< amrex::Vector< int > > m_ncell_plane
Definition: MOSTAverage.H:191
+std::string m_pp_prefix
Definition: MOSTAverage.H:179
+bool m_norm_vec
Definition: MOSTAverage.H:203
+int m_nvar
Definition: MOSTAverage.H:173
+amrex::Real m_fact_new
Definition: MOSTAverage.H:210
+void set_z_positions_T()
Definition: MOSTAverage.cpp:520
+const amrex::MultiFab * get_average(int lev, int comp) const
Definition: MOSTAverage.H:90
+void compute_region_averages(int lev)
Definition: MOSTAverage.cpp:848
+int m_ncell_region
Definition: MOSTAverage.H:197
+void compute_plane_averages(int lev)
Definition: MOSTAverage.cpp:654
+void write_norm_indices(int lev)
Definition: MOSTAverage.cpp:1115
+int m_maxlev
Definition: MOSTAverage.H:175
+void write_averages(int lev)
Definition: MOSTAverage.cpp:1194
~MOSTAverage()
Definition: MOSTAverage.H:21
-amrex::Real m_time_window
Definition: MOSTAverage.H:204
-void update_field_ptrs(int lev, amrex::Vector< amrex::Vector< amrex::MultiFab >> &vars_old, amrex::Vector< std::unique_ptr< amrex::MultiFab >> &Theta_prim, amrex::Vector< std::unique_ptr< amrex::MultiFab >> &Qv_prim)
Definition: MOSTAverage.cpp:181
-amrex::Vector< std::unique_ptr< amrex::iMultiFab > > m_j_indx
Definition: MOSTAverage.H:180
+amrex::Real m_time_window
Definition: MOSTAverage.H:209
+void update_field_ptrs(int lev, amrex::Vector< amrex::Vector< amrex::MultiFab >> &vars_old, amrex::Vector< std::unique_ptr< amrex::MultiFab >> &Theta_prim, amrex::Vector< std::unique_ptr< amrex::MultiFab >> &Qv_prim)
Definition: MOSTAverage.cpp:209
+amrex::Vector< std::unique_ptr< amrex::iMultiFab > > m_j_indx
Definition: MOSTAverage.H:184
MOSTAverage(MOSTAverage &&) noexcept=default
-amrex::Vector< amrex::Vector< amrex::MultiFab * > > m_fields
Definition: MOSTAverage.H:165
-amrex::Vector< int > m_k_in
Definition: MOSTAverage.H:193
-amrex::Real m_fact_old
Definition: MOSTAverage.H:205
-bool m_interp
Definition: MOSTAverage.H:197
-const amrex::Vector< amrex::Geometry > m_geom
Definition: MOSTAverage.H:164
-AMREX_GPU_HOST_DEVICE static AMREX_INLINE void trilinear_interp_T(const amrex::Real &xp, const amrex::Real &yp, const amrex::Real &zp, amrex::Real *interp_vals, amrex::Array4< amrex::Real const > const &interp_array, amrex::Array4< amrex::Real const > const &z_arr, const amrex::GpuArray< amrex::Real, AMREX_SPACEDIM > &plo, const amrex::GpuArray< amrex::Real, AMREX_SPACEDIM > &dxi, const int interp_comp)
Definition: MOSTAverage.H:105
-amrex::Real m_zref
Definition: MOSTAverage.H:174
-amrex::Vector< std::unique_ptr< amrex::iMultiFab > > m_k_indx
Definition: MOSTAverage.H:181
+amrex::Vector< amrex::Vector< amrex::MultiFab * > > m_fields
Definition: MOSTAverage.H:168
+amrex::Vector< int > m_k_in
Definition: MOSTAverage.H:198
+amrex::Real m_fact_old
Definition: MOSTAverage.H:210
+bool m_interp
Definition: MOSTAverage.H:202
+const amrex::Vector< amrex::Geometry > m_geom
Definition: MOSTAverage.H:167
+AMREX_GPU_HOST_DEVICE static AMREX_INLINE void trilinear_interp_T(const amrex::Real &xp, const amrex::Real &yp, const amrex::Real &zp, amrex::Real *interp_vals, amrex::Array4< amrex::Real const > const &interp_array, amrex::Array4< amrex::Real const > const &z_arr, const amrex::GpuArray< amrex::Real, AMREX_SPACEDIM > &plo, const amrex::GpuArray< amrex::Real, AMREX_SPACEDIM > &dxi, const int interp_comp)
Definition: MOSTAverage.H:108
+amrex::Real m_zref
Definition: MOSTAverage.H:178
+amrex::Vector< std::unique_ptr< amrex::iMultiFab > > m_k_indx
Definition: MOSTAverage.H:185
Definition: console_io.cpp:12