Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

don't compute hybrid momentum sources unless needed #2929

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions Source/hydro/Castro_hybrid.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ Castro::construct_old_hybrid_source(MultiFab& source, MultiFab& state_old, Real

BL_PROFILE("Castro::construct_old_hybrid_source()");

if (! castro::hybrid_hydro) {
return;
}

const Real strt_time = ParallelDescriptor::second();

Real mult_factor = 1.0;
Expand Down Expand Up @@ -49,6 +53,10 @@ Castro::construct_new_hybrid_source(MultiFab& source, MultiFab& state_old, Multi

BL_PROFILE("Castro::construct_new_hybrid_source()");

if (! castro::hybrid_hydro) {
return;
}

const Real strt_time = ParallelDescriptor::second();

// Start by subtracting off the old-time data.
Expand Down
6 changes: 5 additions & 1 deletion Source/sources/Castro_sources.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,11 @@ Castro::source_flag(int src)

#ifdef HYBRID_MOMENTUM
case hybrid_src:
return true;
if (castro::hybrid_hydro) {
return true;
} else {
return false;
}
#endif

#ifdef GRAVITY
Expand Down