ERF
Energy Research and Forecasting: An Atmospheric Modeling Code
ReadBndryPlanes Class Reference

#include <ERF_ReadBndryPlanes.H>

Collaboration diagram for ReadBndryPlanes:

Public Member Functions

 ReadBndryPlanes (const amrex::Geometry &geom, const amrex::Real &rdOcp_in)
 
void define_level_data (int lev)
 
void read_time_file ()
 
void read_input_files (double time, double dt, amrex::Array< amrex::Array< amrex::Real, AMREX_SPACEDIM *2 >, AMREX_SPACEDIM+NBCVAR_max > m_bc_extdir_vals)
 
void read_file (int idx, amrex::Vector< std::unique_ptr< PlaneVector >> &data_to_fill, amrex::Array< amrex::Array< amrex::Real, AMREX_SPACEDIM *2 >, AMREX_SPACEDIM+NBCVAR_max > m_bc_extdir_vals)
 
amrex::Vector< std::unique_ptr< PlaneVector > > & interp_in_time (const double &time)
 
amrex::Vector< std::unique_ptr< PlaneVector > > & get_tendency (const double &time)
 
double tinterp () const
 
int ingested_velocity () const
 
int ingested_theta () const
 
int ingested_density () const
 
int ingested_scalar () const
 
int ingested_q1 () const
 
int ingested_q2 () const
 
int ingested_KE () const
 

Static Public Member Functions

static int plane_slot (const std::string &var_name)
 

Private Attributes

double m_tn
 The times for which we currently have data. More...
 
double m_tnp1
 
double m_tnp2
 
amrex::Vector< std::unique_ptr< PlaneVector > > m_data_n
 Data at time m_tn. More...
 
amrex::Vector< std::unique_ptr< PlaneVector > > m_data_np1
 Data at time m_tnp1. More...
 
amrex::Vector< std::unique_ptr< PlaneVector > > m_data_np2
 Data at time m_tnp2. More...
 
amrex::Vector< std::unique_ptr< PlaneVector > > m_data_interp
 Data interpolated to the time requested. More...
 
amrex::Vector< std::unique_ptr< PlaneVector > > m_data_tendency
 Tendency between the n and np1 data. More...
 
double m_tinterp {-1.0}
 Time for plane at interpolation. More...
 
amrex::Geometry m_geom
 Geometry at level 0. More...
 
std::string m_filename {""}
 File name for IO. More...
 
std::string m_time_file {""}
 File name for file holding timesteps and times. More...
 
amrex::Vector< double > m_in_times
 The timesteps / times that we read from time.dat. More...
 
amrex::Vector< int > m_in_timesteps
 
amrex::Vector< std::string > m_var_names
 Variables to be read in. More...
 
int m_in_rad = 1
 Controls extents on native bndry output. More...
 
const int m_out_rad = 1
 
const int m_extent_rad = 0
 
bool m_use_real_bcs = false
 Are real BCs being used? More...
 
const amrex::Real m_rdOcp
 R_d/c_p is needed for reading boundary files. More...
 
int is_velocity_read
 
int is_density_read
 
int is_temperature_read
 
int is_theta_read
 
int is_scalar_read
 
int is_q1_read
 
int is_q2_read
 
int is_KE_read
 
int last_file_read
 

Detailed Description

Collection of data structures and operations for reading data

This class contains the inlet data structures and operations to read and interpolate inflow data.

Constructor & Destructor Documentation

◆ ReadBndryPlanes()

ReadBndryPlanes::ReadBndryPlanes ( const amrex::Geometry &  geom,
const amrex::Real &  rdOcp_in 
)
explicit

ReadBndryPlanes class constructor. Handles initialization from inputs file parameters.

Parameters
geomGeometry for the domain
rdOcp_inReal constant for the Rhydberg constant ($R_d$) divided by the specific heat at constant pressure ($c_p$)
222 :
223  m_geom(geom),
224  m_rdOcp(rdOcp_in)
225 {
226  ParmParse pp("erf");
227 
228  // Get the radius inside the domain
229  pp.queryAdd("in_rad",m_in_rad);
230 
231  // Are we using real bcs?
232  pp.queryAdd("use_real_bcs", m_use_real_bcs);
233 
234  last_file_read = -1;
235 
236  m_tinterp = -1.0;
237 
238  // What folder will the time series of planes be read from
239  pp.get("bndry_file", m_filename);
240 
241  is_velocity_read = 0;
242  is_density_read = 0;
244  is_theta_read = 0;
245  is_scalar_read = 0;
246  is_q1_read = 0;
247  is_q2_read = 0;
248  is_KE_read = 0;
249 
250  if (pp.contains("bndry_input_var_names"))
251  {
252  int num_vars = pp.countval("bndry_input_var_names");
253  m_var_names.resize(num_vars);
254  pp.queryarr("bndry_input_var_names",m_var_names,0,num_vars);
255  for (int i = 0; i < m_var_names.size(); i++) {
256  if (m_var_names[i] == "velocity") is_velocity_read = 1;
257  if (m_var_names[i] == "density") is_density_read = 1;
258  if (m_var_names[i] == "temperature") is_temperature_read = 1;
259  if (m_var_names[i] == "theta") is_theta_read = 1;
260  if (m_var_names[i] == "scalar") is_scalar_read = 1;
261  if (m_var_names[i] == "qv") is_q1_read = 1;
262  if (m_var_names[i] == "qc") is_q2_read = 1;
263  if (m_var_names[i] == "ke") is_KE_read = 1;
264  if (plane_slot(m_var_names[i]) < 0) {
265  Abort("erf.bndry_input_var_names: unknown variable \"" + m_var_names[i] +
266  "\"; the names read are velocity, density, temperature, theta, scalar, qv, qc and ke");
267  }
268  }
269  // The passive scalars share one boundary condition, so an ingested scalar
270  // plane fills every one of them; the writer saves only the first.
271  // (if constexpr: with one scalar the body is compiled out, so clang's
272  // -Wunreachable-code does not flag it.)
273  if constexpr (NSCALARS > 1) {
274  if (is_scalar_read) {
275  Print() << "WARNING: erf.bndry_input_var_names reads \"scalar\": the plane of the first "
276  << "passive scalar (rhoadv_0) fills all " << NSCALARS << " passive scalars at the "
277  << "ingested faces, the extra ones (such as dust or smoke) included" << std::endl;
278  }
279  }
280  }
281 
282  // time.dat will be in the same folder as the time series of data
283  m_time_file = m_filename + "/time.dat";
284 
285  // each pointer (at at given time) has 6 components, one for each orientation
286  // TODO: we really only need 4 not 6
287  int size = 2*AMREX_SPACEDIM;
288  m_data_n.resize(size);
289  m_data_np1.resize(size);
290  m_data_np2.resize(size);
291  m_data_interp.resize(size);
292  m_data_tendency.resize(size);
293 }
#define NSCALARS
Definition: ERF_IndexDefines.H:26
ParmParse pp("prob")
int is_velocity_read
Definition: ERF_ReadBndryPlanes.H:125
int is_q2_read
Definition: ERF_ReadBndryPlanes.H:131
int is_theta_read
Definition: ERF_ReadBndryPlanes.H:128
bool m_use_real_bcs
Are real BCs being used?
Definition: ERF_ReadBndryPlanes.H:120
std::string m_filename
File name for IO.
Definition: ERF_ReadBndryPlanes.H:102
int is_temperature_read
Definition: ERF_ReadBndryPlanes.H:127
int is_density_read
Definition: ERF_ReadBndryPlanes.H:126
amrex::Vector< std::unique_ptr< PlaneVector > > m_data_np2
Data at time m_tnp2.
Definition: ERF_ReadBndryPlanes.H:87
amrex::Vector< std::unique_ptr< PlaneVector > > m_data_interp
Data interpolated to the time requested.
Definition: ERF_ReadBndryPlanes.H:90
static int plane_slot(const std::string &var_name)
Definition: ERF_ReadBndryPlanes.H:29
int last_file_read
Definition: ERF_ReadBndryPlanes.H:134
int is_KE_read
Definition: ERF_ReadBndryPlanes.H:132
const amrex::Real m_rdOcp
R_d/c_p is needed for reading boundary files.
Definition: ERF_ReadBndryPlanes.H:123
std::string m_time_file
File name for file holding timesteps and times.
Definition: ERF_ReadBndryPlanes.H:105
amrex::Vector< std::unique_ptr< PlaneVector > > m_data_tendency
Tendency between the n and np1 data.
Definition: ERF_ReadBndryPlanes.H:93
amrex::Vector< std::string > m_var_names
Variables to be read in.
Definition: ERF_ReadBndryPlanes.H:112
int is_scalar_read
Definition: ERF_ReadBndryPlanes.H:129
int is_q1_read
Definition: ERF_ReadBndryPlanes.H:130
amrex::Vector< std::unique_ptr< PlaneVector > > m_data_n
Data at time m_tn.
Definition: ERF_ReadBndryPlanes.H:81
amrex::Vector< std::unique_ptr< PlaneVector > > m_data_np1
Data at time m_tnp1.
Definition: ERF_ReadBndryPlanes.H:84
int m_in_rad
Controls extents on native bndry output.
Definition: ERF_ReadBndryPlanes.H:115
amrex::Geometry m_geom
Geometry at level 0.
Definition: ERF_ReadBndryPlanes.H:99
double m_tinterp
Time for plane at interpolation.
Definition: ERF_ReadBndryPlanes.H:96
Here is the call graph for this function:

Member Function Documentation

◆ define_level_data()

void ReadBndryPlanes::define_level_data ( int  lev)

Function in ReadBndryPlanes class for allocating space for the boundary plane data ERF will need.

52 {
53  Print() << "ReadBndryPlanes::define_level_data" << std::endl;
54  // *********************************************************
55  // Allocate space for all of the boundary planes we may need
56  // *********************************************************
57  int ncomp = BCVars::NumTypes;
58  const Box& domain = m_geom.Domain();
59  for (OrientationIter oit; oit != nullptr; ++oit) {
60  auto ori = oit();
61  if (ori.coordDir() < 2) {
62 
63  m_data_n[ori] = std::make_unique<PlaneVector>();
64  m_data_np1[ori] = std::make_unique<PlaneVector>();
65  m_data_np2[ori] = std::make_unique<PlaneVector>();
66  m_data_interp[ori] = std::make_unique<PlaneVector>();
67  m_data_tendency[ori] = std::make_unique<PlaneVector>();
68 
69  const auto& lo = domain.loVect();
70  const auto& hi = domain.hiVect();
71 
72  IntVect plo(lo);
73  IntVect phi(hi);
74  const int normal = ori.coordDir();
75  plo[normal] = ori.isHigh() ? hi[normal] - (m_in_rad - 1) : lo[normal] - m_out_rad;
76  phi[normal] = ori.isHigh() ? hi[normal] + (m_out_rad ) : lo[normal] + (m_in_rad - 1);
77  const Box pbx(plo, phi);
78  m_data_n[ori]->push_back(FArrayBox(pbx, ncomp));
79  m_data_np1[ori]->push_back(FArrayBox(pbx, ncomp));
80  m_data_np2[ori]->push_back(FArrayBox(pbx, ncomp));
81  m_data_interp[ori]->push_back(FArrayBox(pbx, ncomp));
82  m_data_tendency[ori]->push_back(FArrayBox(pbx, ncomp));
83  }
84  }
85 }
const int m_out_rad
Definition: ERF_ReadBndryPlanes.H:116
@ NumTypes
Definition: ERF_IndexDefines.H:129
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::Real phi(amrex::Real d, amrex::Real z0, amrex::Real psi) noexcept
Definition: ERF_ImmersedWallCell.H:142

Referenced by read_time_file().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_tendency()

Vector< std::unique_ptr< PlaneVector > > & ReadBndryPlanes::get_tendency ( const double &  time_in)

Function in ReadBndryPlanes class for interpolating boundary data in time.

Parameters
time_inConstant specifying the time for interpolation
160 {
161  // A restart that lands exactly on a boundary-plane time can request a time a few
162  // ULP outside [m_tn, m_tnp2] because per-level t_new drifts under subcycling.
163  // Tolerate that drift, then clamp into the valid window before interpolating.
164  const double eps = 1.0e-8 * (m_tnp2 - m_tn);
165  AMREX_ALWAYS_ASSERT(m_tn - eps <= time_in && time_in <= m_tnp2 + eps);
166  const double time = std::min(std::max(time_in, m_tn), m_tnp2);
167 
168  if (time < m_tnp1) {
169  Real idt = static_cast<Real>(1.0 / (m_tnp1 - m_tn));
170  for (OrientationIter oit; oit != nullptr; ++oit) {
171  auto ori = oit();
172  if (ori.coordDir() < 2) {
173  const int nlevels = static_cast<int>(m_data_n[ori]->size());
174  for (int lev = 0; lev < nlevels; ++lev) {
175  auto& fabt = (*m_data_tendency[ori])[lev];
176  Box bx = fabt.box();
177  int ncomp = fabt.nComp();
178 
179  const auto& datt = fabt.array();
180  const auto& datn = (*m_data_n[ori])[lev].array();
181  const auto& datnp1 = (*m_data_np1[ori])[lev].array();
182  ParallelFor(bx, ncomp, [=] AMREX_GPU_DEVICE (int i, int j, int k, int n) noexcept
183  {
184  datt(i,j,k,n) = (datnp1(i,j,k,n) - datn(i,j,k,n)) * idt;
185  });
186  }
187  }
188  }
189  } else {
190  Real idt = static_cast<Real>(1.0 / (m_tnp2 - m_tnp1));
191  for (OrientationIter oit; oit != nullptr; ++oit) {
192  auto ori = oit();
193  if (ori.coordDir() < 2) {
194  const int nlevels = static_cast<int>(m_data_n[ori]->size());
195  for (int lev = 0; lev < nlevels; ++lev) {
196  auto& fabt = (*m_data_tendency[ori])[lev];
197  Box bx = fabt.box();
198  int ncomp = fabt.nComp();
199 
200  const auto& datt = fabt.array();
201  const auto& datnp1 = (*m_data_np1[ori])[lev].array();
202  const auto& datnp2 = (*m_data_np2[ori])[lev].array();
203  ParallelFor(bx, ncomp, [=] AMREX_GPU_DEVICE (int i, int j, int k, int n) noexcept
204  {
205  datt(i,j,k,n) = (datnp2(i,j,k,n) - datnp1(i,j,k,n)) * idt;
206  });
207  }
208  }
209  }
210  }
211 
212  return m_data_tendency;
213 }
AMREX_ALWAYS_ASSERT(bx.length()[2]==khi+1)
ParallelFor(fab_box, [=] AMREX_GPU_DEVICE(int i, int j, int k) { qrcuten_arr(i, j, k)=Real(0);qscuten_arr(i, j, k)=Real(0);qicuten_arr(i, j, k)=Real(0);})
amrex::Real Real
Definition: ERF_ShocInterface.H:19
double m_tnp1
Definition: ERF_ReadBndryPlanes.H:77
double m_tnp2
Definition: ERF_ReadBndryPlanes.H:78
double m_tn
The times for which we currently have data.
Definition: ERF_ReadBndryPlanes.H:76
Here is the call graph for this function:

◆ ingested_density()

int ReadBndryPlanes::ingested_density ( ) const
inline
67 {return is_density_read;}

Referenced by read_file().

Here is the caller graph for this function:

◆ ingested_KE()

int ReadBndryPlanes::ingested_KE ( ) const
inline
71 {return is_KE_read;}

◆ ingested_q1()

int ReadBndryPlanes::ingested_q1 ( ) const
inline
69 {return is_q1_read;}

◆ ingested_q2()

int ReadBndryPlanes::ingested_q2 ( ) const
inline
70 {return is_q2_read;}

◆ ingested_scalar()

int ReadBndryPlanes::ingested_scalar ( ) const
inline
68 {return is_scalar_read;}

◆ ingested_theta()

int ReadBndryPlanes::ingested_theta ( ) const
inline

◆ ingested_velocity()

int ReadBndryPlanes::ingested_velocity ( ) const
inline
65 {return is_velocity_read;}

◆ interp_in_time()

Vector< std::unique_ptr< PlaneVector > > & ReadBndryPlanes::interp_in_time ( const double &  time_in)

Function in ReadBndryPlanes class for interpolating boundary data in time.

Parameters
time_inConstant specifying the time for interpolation
95 {
96  // A restart that lands exactly on a boundary-plane time can request a time a few
97  // ULP outside [m_tn, m_tnp2] because per-level t_new drifts under subcycling.
98  // Tolerate that drift, then clamp into the valid window before interpolating.
99  const double eps = 1.0e-8 * (m_tnp2 - m_tn);
100  AMREX_ALWAYS_ASSERT(m_tn - eps <= time_in && time_in <= m_tnp2 + eps);
101  const double time = std::min(std::max(time_in, m_tn), m_tnp2);
102 
103  //Print() << "interp_in_time at time " << time << " given " << m_tn << " " << m_tnp1 << " " << m_tnp2 << std::endl;
104  //Print() << "m_tinterp " << m_tinterp << std::endl;
105 
106  if (time == m_tinterp) {
107  // We have already interpolated to this time
108  return m_data_interp;
109 
110  } else {
111 
112  // We must now interpolate to a new time
113  m_tinterp = time;
114 
115  if (time < m_tnp1) {
116  for (OrientationIter oit; oit != nullptr; ++oit) {
117  auto ori = oit();
118  if (ori.coordDir() < 2) {
119  const int nlevels = static_cast<int>(m_data_n[ori]->size());
120  for (int lev = 0; lev < nlevels; ++lev) {
121  const auto& datn = (*m_data_n[ori])[lev];
122  const auto& datnp1 = (*m_data_np1[ori])[lev];
123  auto& dati = (*m_data_interp[ori])[lev];
124  dati.linInterp<RunOn::Device>(datn, 0, datnp1, 0,
125  static_cast<Real>(m_tn), static_cast<Real>(m_tnp1),
126  static_cast<Real>(m_tinterp),
127  datn.box(), 0, dati.nComp());
128  }
129  }
130  }
131  } else {
132  for (OrientationIter oit; oit != nullptr; ++oit) {
133  auto ori = oit();
134  if (ori.coordDir() < 2) {
135  const int nlevels = static_cast<int>(m_data_n[ori]->size());
136  for (int lev = 0; lev < nlevels; ++lev) {
137  const auto& datnp1 = (*m_data_np1[ori])[lev];
138  const auto& datnp2 = (*m_data_np2[ori])[lev];
139  auto& dati = (*m_data_interp[ori])[lev];
140  dati.linInterp<RunOn::Device>(datnp1, 0, datnp2, 0,
141  static_cast<Real>(m_tnp1), static_cast<Real>(m_tnp2),
142  static_cast<Real>(m_tinterp),
143  datnp1.box(), 0, dati.nComp());
144  }
145  }
146  }
147  }
148  }
149  return m_data_interp;
150 }
Here is the call graph for this function:

◆ plane_slot()

static int ReadBndryPlanes::plane_slot ( const std::string &  var_name)
inlinestatic

The slot (BCVars) a plane of variable var_name is stored in, the same slot fill_from_bndryregs reads it from (cons_bc_comp of the component it fills); -1 for a name that is not a plane variable.

30  {
31  if (var_name == "density") { return BCVars::Rho_bc_comp; }
32  if (var_name == "theta") { return BCVars::RhoTheta_bc_comp; }
33  if (var_name == "temperature") { return BCVars::RhoTheta_bc_comp; }
34  if (var_name == "ke") { return BCVars::RhoKE_bc_comp; }
35  if (var_name == "scalar") { return BCVars::RhoScalar_bc_comp; }
36  if (var_name == "qv") { return BCVars::RhoQ1_bc_comp; }
37  if (var_name == "qc") { return BCVars::RhoQ2_bc_comp; }
38  if (var_name == "velocity") { return BCVars::xvel_bc; }
39  return -1;
40  }
@ RhoScalar_bc_comp
Definition: ERF_IndexDefines.H:114
@ RhoQ1_bc_comp
Definition: ERF_IndexDefines.H:115
@ RhoKE_bc_comp
Definition: ERF_IndexDefines.H:113
@ RhoTheta_bc_comp
Definition: ERF_IndexDefines.H:112
@ RhoQ2_bc_comp
Definition: ERF_IndexDefines.H:116
@ Rho_bc_comp
Definition: ERF_IndexDefines.H:111
@ xvel_bc
Definition: ERF_IndexDefines.H:126

Referenced by read_file(), and ReadBndryPlanes().

Here is the caller graph for this function:

◆ read_file()

void ReadBndryPlanes::read_file ( int  idx,
amrex::Vector< std::unique_ptr< PlaneVector >> &  data_to_fill,
amrex::Array< amrex::Array< amrex::Real, AMREX_SPACEDIM *2 >, AMREX_SPACEDIM+NBCVAR_max >  m_bc_extdir_vals 
)

Function in ReadBndryPlanes to read boundary data for each face and variable from files.

Parameters
idxSpecifies the index corresponding to the timestep we want
data_to_fillContainer for face data on boundaries
m_bc_extdir_valsContainer storing the external dirichlet boundary conditions we are reading from the input files
446 {
447  if (idx >= m_in_timesteps.size()) {
448  Print() << "Asking for index " << idx << " but m_in_timesteps only has size " << m_in_timesteps.size() << std::endl;
449  Abort();
450  }
451  const int t_step = m_in_timesteps[idx];
452  const std::string chkname1 = m_filename + Concatenate("/bndry_output", t_step);
453 
454  const std::string level_prefix = "Level_";
455  const int lev = 0;
456 
457  const Box& domain = m_geom.Domain();
458  BoxArray ba(domain);
459  DistributionMapping dm{ba};
460 
461  GpuArray<GpuArray<Real, AMREX_SPACEDIM*2>, AMREX_SPACEDIM+NBCVAR_max> l_bc_extdir_vals_d;
462 
463  for (int i = 0; i < BCVars::NumTypes; i++)
464  {
465  for (OrientationIter oit; oit != nullptr; ++oit) {
466  auto ori = oit();
467  l_bc_extdir_vals_d[i][ori] = m_bc_extdir_vals[i][ori];
468  }
469  }
470 
471  int n_for_density = -1;
472  for (int i = 0; i < m_var_names.size(); i++)
473  {
474  if (m_var_names[i] == "density") n_for_density = i;
475  }
476 
477  // We need to initialize all the components because we may not fill all of them from files,
478  // but the loop in the interpolate routine goes over all the components anyway
479  int ncomp_for_bc = BCVars::NumTypes;
480  for (OrientationIter oit; oit != nullptr; ++oit) {
481  auto ori = oit();
482  if (ori.coordDir() < 2) {
483  FArrayBox& d = (*data_to_fill[ori])[lev];
484  const auto& bx = d.box();
485  Array4<Real> d_arr = d.array();
486  ParallelFor(
487  bx, ncomp_for_bc, [=] AMREX_GPU_DEVICE(int i, int j, int k, int n) noexcept {
488  d_arr(i,j,k,n) = zero;
489  });
490  }
491  }
492 
493  // Read density for primitive to conserved conversions
494  std::string filenamer = MultiFabFileFullPrefix(lev, chkname1, level_prefix, "density");
495  BndryRegister bndry_r(ba, dm, m_in_rad, m_out_rad, m_extent_rad, 1);
496  bndry_r.setVal(bogus_large_value);
497  for (OrientationIter oit; oit != nullptr; ++oit) {
498  auto ori = oit();
499  if (ori.coordDir() < 2) {
500  std::string facenamer = Concatenate(filenamer + '_', ori, 1);
501  bndry_r[ori].read(facenamer);
502  }
503  }
504 
505  // A moist writer computes the temperature plane with qv (erf_dermoisttemp), so the conversion
506  // back to theta below needs the same qv: read its plane too when both are read. Otherwise qv
507  // is zero there, as for a dry writer.
508  BndryRegister bndry_qv(ba, dm, m_in_rad, m_out_rad, m_extent_rad, 1);
509  bndry_qv.setVal(zero);
511  std::string filenameqv = MultiFabFileFullPrefix(lev, chkname1, level_prefix, "qv");
512  for (OrientationIter oit; oit != nullptr; ++oit) {
513  auto ori = oit();
514  if (ori.coordDir() < 2) {
515  std::string facenameqv = Concatenate(filenameqv + '_', ori, 1);
516  bndry_qv[ori].read(facenameqv);
517  }
518  }
519  }
520 
521  // A temperature plane written with qv cannot be converted back to theta without it
523  const std::string qv_header = Concatenate(MultiFabFileFullPrefix(lev, chkname1, level_prefix, "qv") + '_',
524  Orientation(0, Orientation::low), 1) + "_H";
525  if (FileExists(qv_header)) {
526  Abort("erf.bndry_input_var_names reads temperature but not qv, and " + m_filename +
527  " holds qv planes: the writer was moist, so its temperature includes qv. Add qv to"
528  " erf.bndry_input_var_names, or write and read theta instead of temperature");
529  }
530  }
531 
532  // Expose for GPU
533  bool real_bcs = m_use_real_bcs;
534 
535  for (int ivar = 0; ivar < m_var_names.size(); ivar++)
536  {
537  std::string var_name = m_var_names[ivar];
538 
539  std::string filename1 = MultiFabFileFullPrefix(lev, chkname1, level_prefix, var_name);
540 
541  int ncomp;
542  if (var_name == "velocity") {
543  ncomp = AMREX_SPACEDIM;
544  } else {
545  ncomp = 1;
546  }
547 
548  // The slot the plane is stored in; every name was checked against
549  // plane_slot in the constructor, so it is never -1 here.
550  const int n_offset = plane_slot(var_name);
551 
552  // Print() << "Reading " << chkname1 << " for variable " << var_name << " with n_offset == " << n_offset << std::endl;
553 
554  BndryRegister bndry(ba, dm, m_in_rad, m_out_rad, m_extent_rad, ncomp);
555  bndry.setVal(bogus_large_value);
556 
557  // *********************************************************
558  // Read in the BndryReg for all non-z faces
559  // *********************************************************
560  for (OrientationIter oit; oit != nullptr; ++oit) {
561  auto ori = oit();
562  if (ori.coordDir() < 2) {
563 
564  std::string facename1 = Concatenate(filename1 + '_', ori, 1);
565  bndry[ori].read(facename1);
566 
567  int normal = ori.coordDir();
568  IntVect v_offset = offset(ori.faceDir(), normal);
569  if (real_bcs) { v_offset = IntVect(0); }
570 
571  const auto& bbx = (*data_to_fill[ori])[lev].box();
572 
573  // *********************************************************
574  // Copy from the BndryReg into a MultiFab then use copyTo
575  // to write from the MultiFab to a single FAB for each face
576  // *********************************************************
577  MultiFab bndryMF(
578  bndry[ori].boxArray(), bndry[ori].DistributionMap(),
579  ncomp, 0, MFInfo());
580 
581  for (MFIter mfi(bndryMF); mfi.isValid(); ++mfi) {
582 
583  const auto& vbx = mfi.validbox();
584  const auto& bndry_read_arr = bndry[ori].array(mfi);
585  const auto& bndry_read_r_arr = bndry_r[ori].array(mfi);
586  const auto& bndry_read_qv_arr = bndry_qv[ori].array(mfi);
587  const auto& bndry_mf_arr = bndryMF.array(mfi);
588 
589  const auto& bx = bbx & vbx;
590  if (bx.isEmpty()) {
591  continue;
592  }
593 
594  // Split the 2-cell-thick working box into ghost and interior
595  // slots so the (i+v_offset) neighbor access stays in-bounds.
596  // Both slots are filled with the same face-averaged Dirichlet
597  // value; the interior slot just needs the opposite neighbor.
598  Box bx_ghost = bx;
599  Box bx_int = bx;
600  if (ori.isLow()) {
601  bx_ghost.setBig (normal, domain.smallEnd(normal) - 1);
602  bx_int .setSmall(normal, domain.smallEnd(normal));
603  } else {
604  bx_ghost.setSmall(normal, domain.bigEnd(normal) + 1);
605  bx_int .setBig (normal, domain.bigEnd(normal));
606  }
607  const IntVect v_offset_int = -v_offset;
608 
609  // We average the two cell-centered data points in the normal direction
610  // to define a Dirichlet value on the face itself.
611 
612  // This is the scalars -- they all get multiplied by rho, and in the case of
613  // reading in temperature, we must convert to theta first
614  Real rdOcp = m_rdOcp;
615  if (n_for_density >= 0) {
616  if (var_name == "temperature") {
617  ParallelFor(
618  bx_ghost, [=] AMREX_GPU_DEVICE(int i, int j, int k) noexcept {
619  Real R1 = bndry_read_r_arr(i, j, k, 0);
620  Real R2 = bndry_read_r_arr(i+v_offset[0],j+v_offset[1],k+v_offset[2],0);
621  Real T1 = bndry_read_arr(i, j, k, 0);
622  Real T2 = bndry_read_arr(i+v_offset[0],j+v_offset[1],k+v_offset[2],0);
623  Real Q1 = bndry_read_qv_arr(i, j, k, 0);
624  Real Q2 = bndry_read_qv_arr(i+v_offset[0],j+v_offset[1],k+v_offset[2],0);
625  Real Th1 = getThgivenRandT(R1,T1,rdOcp,Q1);
626  Real Th2 = getThgivenRandT(R2,T2,rdOcp,Q2);
627  bndry_mf_arr(i, j, k, 0) = (real_bcs) ? bndry_read_arr(i, j, k, 0) :
628  myhalf * (R1*Th1 + R2*Th2);
629  });
630  } else if (var_name == "theta" || var_name == "ke" || var_name == "scalar" ||
631  var_name == "qv" || var_name == "qc") {
632  ParallelFor(
633  bx_ghost, [=] AMREX_GPU_DEVICE(int i, int j, int k) noexcept {
634  Real R1 = bndry_read_r_arr(i, j, k, 0);
635  Real R2 = bndry_read_r_arr(i+v_offset[0],j+v_offset[1],k+v_offset[2],0);
636  bndry_mf_arr(i, j, k, 0) = (real_bcs) ? bndry_read_arr(i, j, k, 0) :
637  myhalf * ( R1 * bndry_read_arr(i, j, k, 0) +
638  R2 * bndry_read_arr(i+v_offset[0],j+v_offset[1],k+v_offset[2], 0));
639  });
640  } else if (var_name == "density") {
641  ParallelFor(
642  bx_ghost, [=] AMREX_GPU_DEVICE(int i, int j, int k) noexcept {
643  bndry_mf_arr(i, j, k, 0) = (real_bcs) ? bndry_read_arr(i, j, k, 0) :
644  myhalf * ( bndry_read_arr(i, j, k, 0) +
645  bndry_read_arr(i+v_offset[0],j+v_offset[1],k+v_offset[2], 0));
646  });
647  }
648  } else if (!ingested_density()) {
649  if (var_name == "temperature") {
650  ParallelFor(
651  bx_ghost, [=] AMREX_GPU_DEVICE(int i, int j, int k) noexcept {
652  Real R1 = l_bc_extdir_vals_d[BCVars::Rho_bc_comp][ori];
653  Real R2 = l_bc_extdir_vals_d[BCVars::Rho_bc_comp][ori];
654  Real T1 = bndry_read_arr(i, j, k, 0);
655  Real T2 = bndry_read_arr(i+v_offset[0],j+v_offset[1],k+v_offset[2], 0);
656  Real Q1 = bndry_read_qv_arr(i, j, k, 0);
657  Real Q2 = bndry_read_qv_arr(i+v_offset[0],j+v_offset[1],k+v_offset[2],0);
658  Real Th1 = getThgivenRandT(R1,T1,rdOcp,Q1);
659  Real Th2 = getThgivenRandT(R2,T2,rdOcp,Q2);
660  bndry_mf_arr(i, j, k, 0) = (real_bcs) ? bndry_read_arr(i, j, k, 0) :
661  myhalf * (R1*Th1 + R2*Th2);
662  });
663  } else if (var_name == "theta" || var_name == "ke" || var_name == "scalar" ||
664  var_name == "qv" || var_name == "qc") {
665  ParallelFor(
666  bx_ghost, [=] AMREX_GPU_DEVICE(int i, int j, int k) noexcept {
667  Real R1 = l_bc_extdir_vals_d[BCVars::Rho_bc_comp][ori];
668  Real R2 = l_bc_extdir_vals_d[BCVars::Rho_bc_comp][ori];
669  bndry_mf_arr(i, j, k, 0) = (real_bcs) ? bndry_read_arr(i, j, k, 0) :
670  myhalf * (R1 * bndry_read_arr(i, j, k, 0) +
671  R2 * bndry_read_arr(i+v_offset[0],j+v_offset[1],k+v_offset[2], 0));
672  });
673  }
674  }
675 
676  // This is velocity
677  if (var_name == "velocity") {
678  ParallelFor(
679  bx_ghost, ncomp, [=] AMREX_GPU_DEVICE(int i, int j, int k, int n) noexcept {
680  bndry_mf_arr(i, j, k, n) = (real_bcs) ? bndry_read_arr(i, j, k, n) :
681  myhalf * (bndry_read_arr(i, j, k, n) +
682  bndry_read_arr(i+v_offset[0],j+v_offset[1],k+v_offset[2], n));
683  });
684  }
685 
686  // --- interior-slot fill (same face-averaged Dirichlet value;
687  // neighbor offset is flipped because the "other cell"
688  // is now on the opposite side of the boundary face) ---
689  if (n_for_density >= 0) {
690  if (var_name == "temperature") {
691  ParallelFor(
692  bx_int, [=] AMREX_GPU_DEVICE(int i, int j, int k) noexcept {
693  Real R1 = bndry_read_r_arr(i, j, k, 0);
694  Real R2 = bndry_read_r_arr(i+v_offset_int[0],j+v_offset_int[1],k+v_offset_int[2],0);
695  Real T1 = bndry_read_arr(i, j, k, 0);
696  Real T2 = bndry_read_arr(i+v_offset_int[0],j+v_offset_int[1],k+v_offset_int[2],0);
697  Real Q1 = bndry_read_qv_arr(i, j, k, 0);
698  Real Q2 = bndry_read_qv_arr(i+v_offset_int[0],j+v_offset_int[1],k+v_offset_int[2],0);
699  Real Th1 = getThgivenRandT(R1,T1,rdOcp,Q1);
700  Real Th2 = getThgivenRandT(R2,T2,rdOcp,Q2);
701  bndry_mf_arr(i, j, k, 0) = (real_bcs) ? bndry_read_arr(i, j, k, 0) :
702  myhalf * (R1*Th1 + R2*Th2);
703  });
704  } else if (var_name == "theta" || var_name == "ke" || var_name == "scalar" ||
705  var_name == "qv" || var_name == "qc") {
706  ParallelFor(
707  bx_int, [=] AMREX_GPU_DEVICE(int i, int j, int k) noexcept {
708  Real R1 = bndry_read_r_arr(i, j, k, 0);
709  Real R2 = bndry_read_r_arr(i+v_offset_int[0],j+v_offset_int[1],k+v_offset_int[2],0);
710  bndry_mf_arr(i, j, k, 0) = (real_bcs) ? bndry_read_arr(i, j, k, 0) :
711  myhalf * ( R1 * bndry_read_arr(i, j, k, 0) +
712  R2 * bndry_read_arr(i+v_offset_int[0],j+v_offset_int[1],k+v_offset_int[2], 0));
713  });
714  } else if (var_name == "density") {
715  ParallelFor(
716  bx_int, [=] AMREX_GPU_DEVICE(int i, int j, int k) noexcept {
717  bndry_mf_arr(i, j, k, 0) = (real_bcs) ? bndry_read_arr(i, j, k, 0) :
718  myhalf * ( bndry_read_arr(i, j, k, 0) +
719  bndry_read_arr(i+v_offset_int[0],j+v_offset_int[1],k+v_offset_int[2], 0));
720  });
721  }
722  } else if (!ingested_density()) {
723  if (var_name == "temperature") {
724  ParallelFor(
725  bx_int, [=] AMREX_GPU_DEVICE(int i, int j, int k) noexcept {
726  Real R1 = l_bc_extdir_vals_d[BCVars::Rho_bc_comp][ori];
727  Real R2 = l_bc_extdir_vals_d[BCVars::Rho_bc_comp][ori];
728  Real T1 = bndry_read_arr(i, j, k, 0);
729  Real T2 = bndry_read_arr(i+v_offset_int[0],j+v_offset_int[1],k+v_offset_int[2], 0);
730  Real Q1 = bndry_read_qv_arr(i, j, k, 0);
731  Real Q2 = bndry_read_qv_arr(i+v_offset_int[0],j+v_offset_int[1],k+v_offset_int[2],0);
732  Real Th1 = getThgivenRandT(R1,T1,rdOcp,Q1);
733  Real Th2 = getThgivenRandT(R2,T2,rdOcp,Q2);
734  bndry_mf_arr(i, j, k, 0) = (real_bcs) ? bndry_read_arr(i, j, k, 0) :
735  myhalf * (R1*Th1 + R2*Th2);
736  });
737  } else if (var_name == "theta" || var_name == "ke" || var_name == "scalar" ||
738  var_name == "qv" || var_name == "qc") {
739  ParallelFor(
740  bx_int, [=] AMREX_GPU_DEVICE(int i, int j, int k) noexcept {
741  Real R1 = l_bc_extdir_vals_d[BCVars::Rho_bc_comp][ori];
742  Real R2 = l_bc_extdir_vals_d[BCVars::Rho_bc_comp][ori];
743  bndry_mf_arr(i, j, k, 0) = (real_bcs) ? bndry_read_arr(i, j, k, 0) :
744  myhalf * (R1 * bndry_read_arr(i, j, k, 0) +
745  R2 * bndry_read_arr(i+v_offset_int[0],j+v_offset_int[1],k+v_offset_int[2], 0));
746  });
747  }
748  }
749 
750  if (var_name == "velocity") {
751  ParallelFor(
752  bx_int, ncomp, [=] AMREX_GPU_DEVICE(int i, int j, int k, int n) noexcept {
753  bndry_mf_arr(i, j, k, n) = (real_bcs) ? bndry_read_arr(i, j, k, n) :
754  myhalf * (bndry_read_arr(i, j, k, n) +
755  bndry_read_arr(i+v_offset_int[0],j+v_offset_int[1],k+v_offset_int[2], n));
756  });
757  }
758 
759  } // mfi
760  bndryMF.copyTo((*data_to_fill[ori])[lev], 0, n_offset, ncomp);
761  } // coordDir < 2
762  } // ori
763  } // var_name
764 }
constexpr amrex::Real bogus_large_value
Definition: ERF_Constants.H:19
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::Real getThgivenRandT(const amrex::Real rho, const amrex::Real T, const amrex::Real rdOcp, const amrex::Real qv=amrex::Real(0))
Definition: ERF_EOS.H:64
#define NBCVAR_max
Definition: ERF_IndexDefines.H:42
const Real rdOcp
Definition: ERF_InitCustomPert_ABL.H:72
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE int idx(int i, int j, int k, int nx, int ny)
Definition: ERF_InitForEnsemble.cpp:404
constexpr amrex::Real zero
Definition: ERF_NumericalConstants.H:36
constexpr amrex::Real myhalf
Definition: ERF_NumericalConstants.H:41
AMREX_FORCE_INLINE IntVect offset(const int face_dir, const int normal)
Definition: ERF_ReadBndryPlanes.cpp:36
amrex::Vector< int > m_in_timesteps
Definition: ERF_ReadBndryPlanes.H:109
int ingested_density() const
Definition: ERF_ReadBndryPlanes.H:67
const int m_extent_rad
Definition: ERF_ReadBndryPlanes.H:117

Referenced by read_input_files().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ read_input_files()

void ReadBndryPlanes::read_input_files ( double  time,
double  dt,
amrex::Array< amrex::Array< amrex::Real, AMREX_SPACEDIM *2 >, AMREX_SPACEDIM+NBCVAR_max >  m_bc_extdir_vals 
)

Function in ReadBndryPlanes for reading boundary data at a specific time and at the next timestep from input files.

Parameters
timeCurrent time
dtCurrent timestep
m_bc_extdir_valsContainer storing the external dirichlet boundary conditions we are reading from the input files
372 {
373  BL_PROFILE("ERF::ReadBndryPlanes::read_input_files");
374 
375  // Assert that both the current time and the next time are within the bounds
376  // of the data that we can read
377  AMREX_ALWAYS_ASSERT((m_in_times[0] <= time) && (time <= m_in_times.back()));
378  AMREX_ALWAYS_ASSERT((m_in_times[0] <= time+dt) && (time+dt <= m_in_times.back()));
379 
380  int ncomp = 1;
381 
382  const Box& domain = m_geom.Domain();
383  BoxArray ba(domain);
384  DistributionMapping dm{ba};
385  BndryRegister bndryn(ba, dm, m_in_rad, m_out_rad, m_extent_rad, ncomp);
386  bndryn.setVal(bogus_large_value);
387 
388  // The first time we enter this routine we read the first three files
389  if (last_file_read == -1)
390  {
391  int idx_init = 0;
392  read_file(idx_init,m_data_n ,m_bc_extdir_vals);
393  read_file(idx_init,m_data_interp,m_bc_extdir_vals); // We want to start with this filled
394  m_tn = m_in_times[idx_init];
395 
396  idx_init = 1;
397  read_file(idx_init,m_data_np1,m_bc_extdir_vals);
398  m_tnp1 = m_in_times[idx_init];
399 
400  idx_init = 2;
401  read_file(idx_init,m_data_np2,m_bc_extdir_vals);
402  m_tnp2 = m_in_times[idx_init];
403 
404  last_file_read = idx_init;
405  }
406 
407  // Compute the index such that time falls between times[idx] and times[idx+1]
408  const int idx = closest_index(m_in_times, time);
409 
410  // Advance the read window until it spans the requested time.
411  while (idx >= last_file_read-1 && last_file_read != m_in_times.size()-1) {
412  int new_read = last_file_read+1;
413 
414  // We need to change which data the pointers point to before we read in the new data
415  // This doesn't actually move the data, just swaps the pointers
416  for (OrientationIter oit; oit != nullptr; ++oit) {
417  auto ori = oit();
418  std::swap(m_data_n[ori] ,m_data_np1[ori]);
419  std::swap(m_data_np1[ori],m_data_np2[ori]);
420  }
421 
422  // Set the times corresponding to the post-swap pointers
423  m_tn = m_tnp1;
424  m_tnp1 = m_tnp2;
425  m_tnp2 = m_in_times[new_read];
426 
427  read_file(new_read,m_data_np2,m_bc_extdir_vals);
428  last_file_read = new_read;
429  }
430 
431  AMREX_ASSERT(time >= m_tn && time <= m_tnp2);
432  AMREX_ASSERT(time+dt >= m_tn && time+dt <= m_tnp2);
433 }
AMREX_FORCE_INLINE int closest_index(const Vector< double > &vec, const double value)
Definition: ERF_ReadBndryPlanes.cpp:19
amrex::Vector< double > m_in_times
The timesteps / times that we read from time.dat.
Definition: ERF_ReadBndryPlanes.H:108
void read_file(int idx, amrex::Vector< std::unique_ptr< PlaneVector >> &data_to_fill, amrex::Array< amrex::Array< amrex::Real, AMREX_SPACEDIM *2 >, AMREX_SPACEDIM+NBCVAR_max > m_bc_extdir_vals)
Definition: ERF_ReadBndryPlanes.cpp:443
Here is the call graph for this function:

◆ read_time_file()

void ReadBndryPlanes::read_time_file ( )

Function in ReadBndryPlanes class for reading the external file specifying time data and broadcasting this data across MPI ranks.

300 {
301  BL_PROFILE("ERF::ReadBndryPlanes::read_time_file");
302 
303  // *********************************************************
304  // Read the time.data file and store the timesteps and times
305  // *********************************************************
306  int time_file_length = 0;
307 
308  if (ParallelDescriptor::IOProcessor()) {
309 
310  std::string line;
311  std::ifstream time_file(m_time_file);
312  if (!time_file.good()) {
313  Abort("Cannot find time file: " + m_time_file);
314  }
315  while (std::getline(time_file, line)) {
316  ++time_file_length;
317  }
318 
319  time_file.close();
320  }
321 
322  ParallelDescriptor::Bcast(
323  &time_file_length, 1,
324  ParallelDescriptor::IOProcessorNumber(),
325  ParallelDescriptor::Communicator());
326 
327  m_in_times.resize(time_file_length);
328  m_in_timesteps.resize(time_file_length);
329 
330  if (ParallelDescriptor::IOProcessor()) {
331  std::ifstream time_file(m_time_file);
332  for (int i = 0; i < time_file_length; ++i) {
333  time_file >> m_in_timesteps[i] >> m_in_times[i];
334  }
335  // Sanity check that there are no duplicates or mis-orderings
336  for (int i = 1; i < time_file_length; ++i) {
337  if (m_in_timesteps[i] <= m_in_timesteps[i-1])
338  Error("Bad timestep in time.dat file");
339  if (m_in_times[i] <= m_in_times[i-1])
340  Error("Bad time in time.dat file");
341  }
342  time_file.close();
343  }
344 
345  ParallelDescriptor::Bcast(
346  m_in_timesteps.data(), time_file_length,
347  ParallelDescriptor::IOProcessorNumber(),
348  ParallelDescriptor::Communicator());
349 
350  ParallelDescriptor::Bcast(
351  m_in_times.data(), time_file_length,
352  ParallelDescriptor::IOProcessorNumber(),
353  ParallelDescriptor::Communicator());
354 
355  // Allocate data we will need -- for now just at one level
356  int lev = 0;
357  define_level_data(lev);
358  Print() << "Successfully read time file and allocated data" << std::endl;
359 }
void define_level_data(int lev)
Definition: ERF_ReadBndryPlanes.cpp:51
Here is the call graph for this function:

◆ tinterp()

double ReadBndryPlanes::tinterp ( ) const
inline
63 { return m_tinterp; }

Member Data Documentation

◆ is_density_read

int ReadBndryPlanes::is_density_read
private

◆ is_KE_read

int ReadBndryPlanes::is_KE_read
private

Referenced by ingested_KE(), and ReadBndryPlanes().

◆ is_q1_read

int ReadBndryPlanes::is_q1_read
private

◆ is_q2_read

int ReadBndryPlanes::is_q2_read
private

Referenced by ingested_q2(), and ReadBndryPlanes().

◆ is_scalar_read

int ReadBndryPlanes::is_scalar_read
private

Referenced by ingested_scalar(), and ReadBndryPlanes().

◆ is_temperature_read

int ReadBndryPlanes::is_temperature_read
private

◆ is_theta_read

int ReadBndryPlanes::is_theta_read
private

Referenced by ingested_theta(), and ReadBndryPlanes().

◆ is_velocity_read

int ReadBndryPlanes::is_velocity_read
private

◆ last_file_read

int ReadBndryPlanes::last_file_read
private

◆ m_data_interp

amrex::Vector<std::unique_ptr<PlaneVector> > ReadBndryPlanes::m_data_interp
private

Data interpolated to the time requested.

Referenced by read_input_files(), and ReadBndryPlanes().

◆ m_data_n

amrex::Vector<std::unique_ptr<PlaneVector> > ReadBndryPlanes::m_data_n
private

Data at time m_tn.

Referenced by read_input_files(), and ReadBndryPlanes().

◆ m_data_np1

amrex::Vector<std::unique_ptr<PlaneVector> > ReadBndryPlanes::m_data_np1
private

Data at time m_tnp1.

Referenced by read_input_files(), and ReadBndryPlanes().

◆ m_data_np2

amrex::Vector<std::unique_ptr<PlaneVector> > ReadBndryPlanes::m_data_np2
private

Data at time m_tnp2.

Referenced by read_input_files(), and ReadBndryPlanes().

◆ m_data_tendency

amrex::Vector<std::unique_ptr<PlaneVector> > ReadBndryPlanes::m_data_tendency
private

Tendency between the n and np1 data.

Referenced by ReadBndryPlanes().

◆ m_extent_rad

const int ReadBndryPlanes::m_extent_rad = 0
private

Referenced by read_file(), and read_input_files().

◆ m_filename

std::string ReadBndryPlanes::m_filename {""}
private

File name for IO.

Referenced by read_file(), and ReadBndryPlanes().

◆ m_geom

amrex::Geometry ReadBndryPlanes::m_geom
private

Geometry at level 0.

Referenced by read_file(), and read_input_files().

◆ m_in_rad

int ReadBndryPlanes::m_in_rad = 1
private

Controls extents on native bndry output.

Referenced by read_file(), read_input_files(), and ReadBndryPlanes().

◆ m_in_times

amrex::Vector<double> ReadBndryPlanes::m_in_times
private

The timesteps / times that we read from time.dat.

Referenced by read_input_files(), and read_time_file().

◆ m_in_timesteps

amrex::Vector<int> ReadBndryPlanes::m_in_timesteps
private

Referenced by read_file(), and read_time_file().

◆ m_out_rad

const int ReadBndryPlanes::m_out_rad = 1
private

Referenced by read_file(), and read_input_files().

◆ m_rdOcp

const amrex::Real ReadBndryPlanes::m_rdOcp
private

R_d/c_p is needed for reading boundary files.

Referenced by read_file().

◆ m_time_file

std::string ReadBndryPlanes::m_time_file {""}
private

File name for file holding timesteps and times.

Referenced by read_time_file(), and ReadBndryPlanes().

◆ m_tinterp

double ReadBndryPlanes::m_tinterp {-1.0}
private

Time for plane at interpolation.

Referenced by ReadBndryPlanes(), and tinterp().

◆ m_tn

double ReadBndryPlanes::m_tn
private

The times for which we currently have data.

Referenced by read_input_files().

◆ m_tnp1

double ReadBndryPlanes::m_tnp1
private

Referenced by read_input_files().

◆ m_tnp2

double ReadBndryPlanes::m_tnp2
private

Referenced by read_input_files().

◆ m_use_real_bcs

bool ReadBndryPlanes::m_use_real_bcs = false
private

Are real BCs being used?

Referenced by read_file(), and ReadBndryPlanes().

◆ m_var_names

amrex::Vector<std::string> ReadBndryPlanes::m_var_names
private

Variables to be read in.

Referenced by read_file(), and ReadBndryPlanes().


The documentation for this class was generated from the following files: