Skip to content

Commit 5da2ddc

Browse files
committed
Remove default constructors from SHOC/P3 data
In C++20 you cannot aggregate initialize a stuct which has a default constructor defined. We shouldn't need these constructors since views themselves have default constructors.
1 parent 0b58307 commit 5da2ddc

File tree

2 files changed

+0
-17
lines changed

2 files changed

+0
-17
lines changed

components/eamxx/src/physics/p3/p3_functions.hpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,6 @@ struct Functions
173173

174174
// This struct stores prognostic variables evolved by P3.
175175
struct P3PrognosticState {
176-
P3PrognosticState() = default;
177176
// Cloud mass mixing ratio [kg kg-1]
178177
view_2d<Spack> qc;
179178
// Cloud number mixing ratio [# kg-1]
@@ -198,7 +197,6 @@ struct Functions
198197

199198
// This struct stores diagnostic variables used by P3.
200199
struct P3DiagnosticInputs {
201-
P3DiagnosticInputs() = default;
202200
// CCN activated number tendency [kg-1 s-1]
203201
view_2d<const Spack> nc_nuceat_tend;
204202
// CCN prescribed number density [kg-1 s-1]
@@ -235,7 +233,6 @@ struct Functions
235233

236234
// This struct stores diagnostic outputs computed by P3.
237235
struct P3DiagnosticOutputs {
238-
P3DiagnosticOutputs() = default;
239236
// qitend due to deposition/sublimation
240237
view_2d<Spack> qv2qi_depos_tend;
241238
// Precipitation rate, liquid [m s-1]
@@ -264,7 +261,6 @@ struct Functions
264261

265262
// This struct stores time stepping and grid-index-related information.
266263
struct P3Infrastructure {
267-
P3Infrastructure() = default;
268264
// Model time step [s]
269265
Real dt;
270266
// Time step counter (1-based)
@@ -288,7 +284,6 @@ struct Functions
288284
// This struct stores tendencies computed by P3 and used by other
289285
// parameterizations.
290286
struct P3HistoryOnly {
291-
P3HistoryOnly() = default;
292287
// Sum of liq-ice phase change tendencies
293288
view_2d<Spack> liq_ice_exchange;
294289
// Sum of vap-liq phase change tendencies
@@ -329,7 +324,6 @@ struct Functions
329324

330325
#ifdef SCREAM_P3_SMALL_KERNELS
331326
struct P3Temporaries {
332-
P3Temporaries() = default;
333327
// shape parameter of rain
334328
view_2d<Spack> mu_r;
335329
// temperature at the beginning of the microphysics step [K]

components/eamxx/src/physics/shoc/shoc_functions.hpp

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,6 @@ struct Functions
7979

8080
// This struct stores runtime options for shoc_main
8181
struct SHOCRuntime {
82-
SHOCRuntime() = default;
8382
// Runtime options for isotropic_ts
8483
Scalar lambda_low;
8584
Scalar lambda_high;
@@ -99,8 +98,6 @@ struct Functions
9998

10099
// This struct stores input views for shoc_main.
101100
struct SHOCInput {
102-
SHOCInput() = default;
103-
104101
// Grid spacing of host model in x direction [m]
105102
view_1d<const Scalar> dx;
106103
// grid spacing of host model in y direction [m]
@@ -137,8 +134,6 @@ struct Functions
137134

138135
// This struct stores input/outputs views for shoc_main.
139136
struct SHOCInputOutput {
140-
SHOCInputOutput() = default;
141-
142137
// prognostic temp variable of host model
143138
// dry static energy [J/kg]
144139
// dse = Cp*T + g*z + phis
@@ -165,8 +160,6 @@ struct Functions
165160

166161
// This struct stores output only views for shoc_main.
167162
struct SHOCOutput {
168-
SHOCOutput() = default;
169-
170163
// planetary boundary layer depth [m]
171164
view_1d<Scalar> pblh;
172165
// surface friction velocity [m/s]
@@ -181,8 +174,6 @@ struct Functions
181174

182175
// This struct stores output views for SHOC diagnostics for shoc_main.
183176
struct SHOCHistoryOutput {
184-
SHOCHistoryOutput() = default;
185-
186177
// Turbulent length scale [m]
187178
view_2d<Spack> shoc_mix;
188179
// vertical velocity variance [m2/s2]
@@ -219,8 +210,6 @@ struct Functions
219210

220211
#ifdef SCREAM_SHOC_SMALL_KERNELS
221212
struct SHOCTemporaries {
222-
SHOCTemporaries() = default;
223-
224213
view_1d<Scalar> se_b;
225214
view_1d<Scalar> ke_b;
226215
view_1d<Scalar> wv_b;

0 commit comments

Comments
 (0)