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

Move Minmod implementation into a .tpp file #1429

Merged
merged 4 commits into from Mar 15, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Evolution/Executables/Burgers/EvolveBurgers.hpp
Expand Up @@ -13,7 +13,7 @@
#include "Evolution/DiscontinuousGalerkin/DgElementArray.hpp" // IWYU pragma: keep
#include "Evolution/DiscontinuousGalerkin/InitializeElement.hpp"
#include "Evolution/DiscontinuousGalerkin/SlopeLimiters/LimiterActions.hpp"
#include "Evolution/DiscontinuousGalerkin/SlopeLimiters/Minmod.tpp"
#include "Evolution/DiscontinuousGalerkin/SlopeLimiters/Minmod.hpp"
#include "Evolution/DiscontinuousGalerkin/SlopeLimiters/Tags.hpp"
#include "Evolution/EventsAndTriggers/Actions/RunEventsAndTriggers.hpp" // IWYU pragma: keep
#include "Evolution/EventsAndTriggers/EventsAndTriggers.hpp" // IWYU pragma: keep
Expand Down
1 change: 1 addition & 0 deletions src/Evolution/Systems/Burgers/CMakeLists.txt
Expand Up @@ -6,6 +6,7 @@ set(LIBRARY Burgers)
set(LIBRARY_SOURCES
Equations.cpp
Fluxes.cpp
Minmod.cpp
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you think we should generalize this to LimiterInstantiations.cpp and instantiate all limiters there?

Copy link
Contributor Author

@fmahebert fmahebert Mar 14, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As I see it: the advantages to grouping the instantiations into a single file are (a) having fewer files and (b) making it easier to see what limiters are available for each system; the downside is having to re-instantiate all limiters when one limiter changes. Are there other considerations that I am missing?

At the moment I do not have a strong opinion on the matter, so I am happy to make the change if you prefer it. Just let me know what you think 🙂

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Those are the only two things I can think of. Given that the number of limiters we will have will be < 10 (or at least given the current literature it seems unlikely to exceed 10) I think having separate files so that the compilation can be parallelized better is a good thing :)

)

add_spectre_library(${LIBRARY} ${LIBRARY_SOURCES})
Expand Down
10 changes: 10 additions & 0 deletions src/Evolution/Systems/Burgers/Minmod.cpp
@@ -0,0 +1,10 @@
// Distributed under the MIT License.
// See LICENSE.txt for details.

#include "Evolution/DiscontinuousGalerkin/SlopeLimiters/Minmod.tpp" // IWYU pragma: keep
#include "Evolution/Systems/Burgers/Tags.hpp" // IWYU pragma: keep
#include "Utilities/TMPL.hpp"

// IWYU pragma: no_include "Evolution/DiscontinuousGalerkin/SlopeLimiters/Minmod.hpp"

template class SlopeLimiters::Minmod<1, tmpl::list<Burgers::Tags::U>>;