FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

optimising state container clearing shockflattening (tentative) · idefix-code/idefix@4cc2f96 · GitHub

Repository navigation

Commit 4cc2f96

Browse files
committed
optimising state container clearing shockflattening (tentative)
1 parent d4a36c3 commit 4cc2f96

4 files changed

Lines changed: 10 additions & 8 deletions

File tree

‎src/dataBlock/stateContainer.cpp‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ void StateContainer::PushArray(IdefixArray4D<real>& in,
7272
}
7373

7474

75-
void StateContainer::AddAndStore(real wl, real wr, StateContainer & in) {
75+
void StateContainer::AddAndStore(const real wl, const real wr, StateContainer & in) {
7676
idfx::pushRegion("StateContainer::AddAndStore");
7777

7878
if(in.stateVector.size() != this->stateVector.size()) {

‎src/dataBlock/stateContainer.hpp‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class StateContainer {
3030
void CopyFrom(StateContainer &); // Return a deepcopy of the current state container
3131
void AllocateAs(StateContainer &); // Return a deepcopy of the current state container
3232
void PushArray(IdefixArray4D<real> &, State::TypeLocation, std::string);
33-
void AddAndStore(real, real, StateContainer&);
33+
void AddAndStore(const real, const real, StateContainer&);
3434

3535

3636
private:

‎src/hydro/MHDsolvers/hlldMHD.hpp‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ void Hydro::HlldMHD() {
284284

285285
#if HAVE_ENERGY
286286
real Uhll[NVAR];
287-
real vs, pts, sqrL, sqrR, vsL, vsR, wsL, wsR;
287+
real pts, sqrL, sqrR, vsL, vsR, wsL, wsR;
288288

289289
// 3c. Compute U*(L), U^*(R)
290290
scrh = ONE_F/(sr - sl);

‎src/hydro/slopeLimiter.hpp‎

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -183,31 +183,33 @@ class SlopeLimiter {
183183
real dvp = Vc(nv,k,j,i)-Vc(nv,k-koffset,j-joffset,i-ioffset);
184184

185185
real dv;
186+
/*
186187
if(shockFlattening) {
187-
if(flags(k-koffset,j-joffset,i-ioffset) == FlagShock::Shock) {
188-
// Force slope limiter to minmod
188+
if(flags(k,j,i) == FlagShock::Shock) {
189189
dv = MinModLim(dvp,dvm);
190190
} else {
191191
dv = PLMLim(dvp,dvm);
192192
}
193193
} else { // No shock flattening
194+
*/
194195
dv = PLMLim(dvp,dvm);
195-
}
196+
//}
196197

197198
vL[nv] = Vc(nv,k-koffset,j-joffset,i-ioffset) + HALF_F*dv;
198199

199200
dvm = dvp;
200201
dvp = Vc(nv,k+koffset,j+joffset,i+ioffset) - Vc(nv,k,j,i);
201-
202+
/*
202203
if(shockFlattening) {
203204
if(flags(k,j,i) == FlagShock::Shock) {
204205
dv = MinModLim(dvp,dvm);
205206
} else {
206207
dv = PLMLim(dvp,dvm);
207208
}
208209
} else { // No shock flattening
210+
*/
209211
dv = PLMLim(dvp,dvm);
210-
}
212+
//}
211213

212214
vR[nv] = Vc(nv,k,j,i) - HALF_F*dv;
213215
} else if constexpr(order == 3) {

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL