Content-Length: 386360 | pFad | http://github.com/ensonun/PelePhysics/commit/05dc43de5239a0f189ec73fd6a19588dffd0b99a

51 Fix some missing initializations and more warnings. (#297) · ensonun/PelePhysics@05dc43d · GitHub
Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 05dc43d

Browse files
authoredJun 8, 2022
Fix some missing initializations and more warnings. (AMReX-Combustion#297)
1 parent 40b7d10 commit 05dc43d

File tree

5 files changed

+8
-8
lines changed

5 files changed

+8
-8
lines changed
 

‎Reactions/ReactorCvodeJacobian.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -133,13 +133,15 @@ cJac(
133133

134134
// fill the sunMat and scale
135135
for (int i = 0; i < NUM_SPECIES; i++) {
136+
// cppcheck-suppress cstyleCast
136137
amrex::Real* J_col = SM_COLUMN_D(J, offset + i);
137138
for (int k = 0; k < NUM_SPECIES; k++) {
138139
J_col[offset + k] = Jmat_tmp[i * (NUM_SPECIES + 1) + k] * mw[k] / mw[i];
139140
}
140141
J_col[offset + NUM_SPECIES] =
141142
Jmat_tmp[i * (NUM_SPECIES + 1) + NUM_SPECIES] / mw[i];
142143
}
144+
// cppcheck-suppress cstyleCast
143145
amrex::Real* J_col = SM_COLUMN_D(J, offset + NUM_SPECIES);
144146
for (int i = 0; i < NUM_SPECIES; i++) {
145147
J_col[offset + i] = Jmat_tmp[NUM_SPECIES * (NUM_SPECIES + 1) + i] * mw[i];

‎Transport/Constant.H

+1-1
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ struct ConstTransport
9191
}
9292

9393
template <class... Args>
94-
AMREX_GPU_HOST_DEVICE ConstTransport(Args... /*unused*/)
94+
AMREX_GPU_HOST_DEVICE explicit ConstTransport(Args... /*unused*/)
9595
{
9696
}
9797
};

‎Transport/TransportParams.H

+1-1
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,7 @@ public:
351351

352352
private:
353353
TransParm<EosType, TransportType> m_h_trans_parm;
354-
TransParm<EosType, TransportType>* m_d_trans_parm;
354+
TransParm<EosType, TransportType>* m_d_trans_parm{nullptr};
355355
bool m_device_allocated{false};
356356
};
357357
} // namespace transport

‎Utility/PltFileManager/PltFileManager.H

+3-4
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,10 @@ public:
3232
protected:
3333
// MetaData
3434
std::string m_pltFile; // pltfile name
35-
int m_nvars; // number of variables
35+
int m_nvars{0}; // number of variables
3636
amrex::Vector<std::string> m_vars; // list of variable in the plotfile
37-
int m_nlevels; // number of levels
38-
amrex::Real m_time; // Simulation time
39-
amrex::Real m_nsteps; // Simulation step count
37+
int m_nlevels{0}; // number of levels
38+
amrex::Real m_time{0.0}; // Simulation time
4039

4140
amrex::Vector<amrex::BoxArray> m_grids;
4241
amrex::Vector<amrex::Geometry> m_geoms;

‎Utility/PltFileManager/PltFileManager.cpp

+1-2
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,8 @@ GotoNextLine(std::istream& is)
2222
}
2323

2424
PltFileManager::PltFileManager(const std::string& a_pltFile)
25+
: m_pltFile{a_pltFile}
2526
{
26-
m_pltFile = a_pltFile;
27-
2827
// Get the plt metadata and resize part of the data vectors
2928
std::string pltFileHeader(m_pltFile + "/Header");
3029
readGenericPlotfileHeader(pltFileHeader);

0 commit comments

Comments
 (0)
Failed to load comments.








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/ensonun/PelePhysics/commit/05dc43de5239a0f189ec73fd6a19588dffd0b99a

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy