Skip to content

Commit e7dd8c0

Browse files
Bump submods/amrex from 85adcdd to 3c1f1c7 (#1781)
* Bump submods/amrex from `85adcdd` to `3c1f1c7` Bumps [submods/amrex](https://github.com/AMReX-Codes/amrex) from `85adcdd` to `3c1f1c7`. - [Release notes](https://github.com/AMReX-Codes/amrex/releases) - [Commits](AMReX-Codes/amrex@85adcdd...3c1f1c7) --- updated-dependencies: - dependency-name: submods/amrex dependency-version: 3c1f1c78f60530e4ee17f766cf195c2c776f7b00 dependency-type: direct:production ... Signed-off-by: dependabot[bot] <[email protected]> * fix some * more * fixes --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Marc Henry de Frahan <[email protected]>
1 parent 32a4a58 commit e7dd8c0

File tree

10 files changed

+36
-37
lines changed

10 files changed

+36
-37
lines changed

amr-wind/boundary_conditions/BCInterface.cpp

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ void BCIface::read_bctype()
4242
amrex::ParmParse pp(bcid);
4343
std::string bcstr = "null";
4444
pp.query("type", bcstr);
45-
pp.query(key.c_str(), bcstr);
45+
pp.query(key, bcstr);
4646
bcstr = amrex::toLower(bcstr);
4747

4848
// Protect against copy/paste errors where user intended to add a BC but
@@ -133,9 +133,9 @@ amrex::Array<const std::string, 3> BCIface::get_dirichlet_udfs()
133133
amrex::ParmParse pp(bcid);
134134

135135
if (bct == BC::mass_inflow) {
136-
if (pp.contains(inflow_key.c_str())) {
136+
if (pp.contains(inflow_key)) {
137137
std::string val;
138-
pp.get(inflow_key.c_str(), val);
138+
pp.get(inflow_key, val);
139139

140140
if (has_inflow_udf && (inflow_udf != val)) {
141141
amrex::Abort(
@@ -148,9 +148,9 @@ amrex::Array<const std::string, 3> BCIface::get_dirichlet_udfs()
148148
}
149149

150150
if (bct == BC::mass_inflow_outflow) {
151-
if (pp.contains(inflow_outflow_key.c_str())) {
151+
if (pp.contains(inflow_outflow_key)) {
152152
std::string val;
153-
pp.get(inflow_outflow_key.c_str(), val);
153+
pp.get(inflow_outflow_key, val);
154154

155155
if (has_inflow_outflow_udf && (inflow_outflow_udf != val)) {
156156
amrex::Abort(
@@ -164,9 +164,9 @@ amrex::Array<const std::string, 3> BCIface::get_dirichlet_udfs()
164164
}
165165

166166
if (bct == BC::slip_wall) {
167-
if (pp.contains(wall_key.c_str())) {
167+
if (pp.contains(wall_key)) {
168168
std::string val;
169-
pp.get(wall_key.c_str(), val);
169+
pp.get(wall_key, val);
170170

171171
if (has_wall_udf && (wall_udf != val)) {
172172
amrex::Abort(
@@ -276,7 +276,7 @@ void BCVelocity::read_values()
276276
const auto bct = bctype[ori];
277277

278278
amrex::ParmParse pp(bcid);
279-
pp.queryarr(fname.c_str(), bcval[ori], 0, ndim);
279+
pp.queryarr(fname, bcval[ori], 0, ndim);
280280
if (bct == BC::no_slip_wall) {
281281
// Set normal component to zero
282282
bcval[ori][ori.coordDir()] = 0.0;
@@ -366,9 +366,9 @@ void BCScalar::read_values()
366366
if (((bct == BC::mass_inflow) && (const_dirichlet_inflow)) ||
367367
((bct == BC::mass_inflow_outflow) &&
368368
(const_dirichlet_inflow_outflow))) {
369-
pp.getarr(fname.c_str(), bcval[ori], 0, ndim);
369+
pp.getarr(fname, bcval[ori], 0, ndim);
370370
} else {
371-
pp.queryarr(fname.c_str(), bcval[ori], 0, ndim);
371+
pp.queryarr(fname, bcval[ori], 0, ndim);
372372
}
373373
}
374374
}
@@ -386,7 +386,7 @@ void BCPressure::read_values()
386386

387387
amrex::ParmParse pp(bcid);
388388
if ((bct == BC::pressure_outflow)) {
389-
pp.queryarr(fname.c_str(), bcval[ori], 0, ndim);
389+
pp.queryarr(fname, bcval[ori], 0, ndim);
390390
}
391391
}
392392
}

amr-wind/core/MultiParser.H

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,7 @@ public:
3030
//! Check if the keyword is present in either namespace
3131
bool contains(const std::string& name) const
3232
{
33-
return m_pp.contains(name.c_str()) ||
34-
m_pp_default.contains(name.c_str());
33+
return m_pp.contains(name) || m_pp_default.contains(name);
3534
}
3635

3736
/** Get a vector from the input file
@@ -115,39 +114,39 @@ public:
115114
template <typename T>
116115
void get(const std::string& name, T& value) const
117116
{
118-
if (m_pp.contains(name.c_str())) {
119-
m_pp.get(name.c_str(), value);
117+
if (m_pp.contains(name)) {
118+
m_pp.get(name, value);
120119
} else {
121-
m_pp_default.get(name.c_str(), value);
120+
m_pp_default.get(name, value);
122121
}
123122
}
124123

125124
//! Get a vector of values for the given keyword entry from either namespace
126125
template <typename T>
127126
void getarr(const std::string& name, T& value) const
128127
{
129-
if (m_pp.contains(name.c_str())) {
130-
m_pp.getarr(name.c_str(), value);
128+
if (m_pp.contains(name)) {
129+
m_pp.getarr(name, value);
131130
} else {
132-
m_pp_default.getarr(name.c_str(), value);
131+
m_pp_default.getarr(name, value);
133132
}
134133
}
135134

136135
//! Query the value for the keyword entry from either namespace
137136
template <typename T>
138137
void query(const std::string& name, T& value) const
139138
{
140-
m_pp_default.query(name.c_str(), value);
141-
m_pp.query(name.c_str(), value);
139+
m_pp_default.query(name, value);
140+
m_pp.query(name, value);
142141
}
143142

144143
//! Query a vector of values for the given keyword entry from either
145144
//! namespace
146145
template <typename T>
147146
void queryarr(const std::string& name, T& value) const
148147
{
149-
m_pp_default.queryarr(name.c_str(), value);
150-
m_pp.queryarr(name.c_str(), value);
148+
m_pp_default.queryarr(name, value);
149+
m_pp.queryarr(name, value);
151150
}
152151

153152
private:

amr-wind/equation_systems/vof/vof_bciface.H

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,9 @@ protected:
8484

8585
amrex::ParmParse pp(bcid);
8686
if (bct == BC::mass_inflow || bct == BC::mass_inflow_outflow) {
87-
pp.getarr(fname.c_str(), bcval[ori], 0, ndim);
87+
pp.getarr(fname, bcval[ori], 0, ndim);
8888
} else {
89-
pp.queryarr(fname.c_str(), bcval[ori], 0, ndim);
89+
pp.queryarr(fname, bcval[ori], 0, ndim);
9090
}
9191
}
9292
}
@@ -165,9 +165,9 @@ protected:
165165

166166
amrex::ParmParse pp(bcid);
167167
if (bct == BC::mass_inflow || bct == BC::mass_inflow_outflow) {
168-
pp.getarr(fname.c_str(), bcval[ori], 0, ndim);
168+
pp.getarr(fname, bcval[ori], 0, ndim);
169169
} else {
170-
pp.queryarr(fname.c_str(), bcval[ori], 0, ndim);
170+
pp.queryarr(fname, bcval[ori], 0, ndim);
171171
}
172172
}
173173
}

amr-wind/physics/FreeStream.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ std::unique_ptr<udf::UDF> process_field_func(Field& fld)
1313
std::string udf_name{"ConstValue"};
1414
amrex::ParmParse pp("FreeStream");
1515
const std::string key = fld.name() + "_type";
16-
pp.query(key.c_str(), udf_name);
16+
pp.query(key, udf_name);
1717

1818
return udf::UDF::create(udf_name, fld);
1919
}

amr-wind/physics/udfs/UDF.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ ConstValue::ConstValue(Field& fld) : m_field(fld)
1717
{
1818
amrex::ParmParse pp_old("incflo");
1919
amrex::ParmParse pp(identifier() + "." + m_field.name());
20-
pp_old.queryarr(m_field.name().c_str(), m_value);
20+
pp_old.queryarr(m_field.name(), m_value);
2121
pp.queryarr("value", m_value);
2222

2323
if (fld.num_comp() != m_value.size()) {

amr-wind/transport_models/ConstTransport.H

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ public:
101101
amrex::ParmParse pp("transport");
102102
const std::string key = scalar_name + "_laminar_schmidt";
103103
amrex::Real lam_schmidt = 1.0;
104-
pp.query(key.c_str(), lam_schmidt);
104+
pp.query(key, lam_schmidt);
105105
return lam_schmidt;
106106
}
107107

@@ -110,7 +110,7 @@ public:
110110
amrex::ParmParse pp("transport");
111111
const std::string key = scalar_name + "_turbulent_schmidt";
112112
amrex::Real turb_schmidt = 1.0;
113-
pp.query(key.c_str(), turb_schmidt);
113+
pp.query(key, turb_schmidt);
114114
return turb_schmidt;
115115
}
116116

amr-wind/transport_models/TwoPhaseTransport.H

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ public:
114114
amrex::ParmParse pp("transport");
115115
const std::string key = scalar_name + "_laminar_schmidt";
116116
amrex::Real lam_schmidt = 1.0;
117-
pp.query(key.c_str(), lam_schmidt);
117+
pp.query(key, lam_schmidt);
118118
return lam_schmidt;
119119
}
120120

@@ -123,7 +123,7 @@ public:
123123
amrex::ParmParse pp("transport");
124124
const std::string key = scalar_name + "_turbulent_schmidt";
125125
amrex::Real turb_schmidt = 1.0;
126-
pp.query(key.c_str(), turb_schmidt);
126+
pp.query(key, turb_schmidt);
127127
return turb_schmidt;
128128
}
129129

amr-wind/utilities/tagging/BoxRefiner.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ namespace {
1111
inline vs::Vector parse_vector(amrex::ParmParse& pp, const std::string& key)
1212
{
1313
amrex::Vector<amrex::Real> tmp;
14-
pp.getarr(key.data(), tmp);
14+
pp.getarr(key, tmp);
1515
AMREX_ALWAYS_ASSERT(tmp.size() == 3U);
1616

1717
return vs::Vector{tmp[0], tmp[1], tmp[2]};

submods/amrex

Submodule amrex updated 195 files

unit_tests/aw_test_utils/pp_utils.H

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ namespace amr_wind_tests::pp_utils {
1010
template <typename T>
1111
void set_default(amrex::ParmParse& pp, const std::string& key, const T& val)
1212
{
13-
if (!pp.contains(key.data())) {
13+
if (!pp.contains(key)) {
1414
pp.add(key.data(), val);
1515
}
1616
}
@@ -19,7 +19,7 @@ template <typename T>
1919
void set_default(
2020
amrex::ParmParse& pp, const std::string& key, const amrex::Vector<T>& val)
2121
{
22-
if (!pp.contains(key.data())) {
22+
if (!pp.contains(key)) {
2323
pp.addarr(key.data(), val);
2424
}
2525
}

0 commit comments

Comments
 (0)