32 const int khi = geom.Domain().bigEnd()[AMREX_SPACEDIM-1];
33 const int Nz = geom.Domain().size()[AMREX_SPACEDIM-1];
43 amrex::Print() <<
"input_sponge file location : " <<
input_sponge_file << std::endl;
45 if(!input_sponge_reader.is_open()) {
46 amrex::Error(
"Error opening the input_sponge file.\n");
50 amrex::Print() <<
"Successfully opened the input_sponge file. Now reading... " << std::endl;
55 amrex::Vector<amrex::Real> z_inp_sponge_tmp, U_inp_sponge_tmp, V_inp_sponge_tmp;
58 z_inp_sponge_tmp.push_back(zbot);
59 U_inp_sponge_tmp.push_back(0);
60 V_inp_sponge_tmp.push_back(0);
64 while(std::getline(input_sponge_reader, line)) {
65 std::istringstream iss_z(line);
68 U_inp_sponge_tmp[0] =
U;
69 V_inp_sponge_tmp[0] =
V;
71 AMREX_ALWAYS_ASSERT(
z > z_inp_sponge_tmp[z_inp_sponge_tmp.size()-1]);
72 z_inp_sponge_tmp.push_back(
z);
73 U_inp_sponge_tmp.push_back(
U);
74 V_inp_sponge_tmp.push_back(
V);
81 const int Ninp = z_inp_sponge_tmp.size();
85 for (
int k=0; k < Nz; ++k) {
86 z_inp_sponge[k+1] = 0.5 * (zlevels_stag[k] + zlevels_stag[k+1]);
95 amrex::Print() <<
"Successfully read the input_sponge file..." << std::endl;
96 input_sponge_reader.close();
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::Real interpolate_1d(const amrex::Real *alpha, const amrex::Real *beta, const amrex::Real alpha_interp, const int alpha_size)
Definition: ERF_Interpolation_1D.H:12
amrex::Real Real
Definition: ERF_ShocInterface.H:19
@ U
Definition: ERF_IndexDefines.H:108
@ V
Definition: ERF_IndexDefines.H:109