Skip to content

Commit

Permalink
Formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
whorne committed Aug 6, 2024
1 parent 21fff8a commit 8eb1e55
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 18 deletions.
32 changes: 16 additions & 16 deletions include/matrix_free/PolynomialOrders.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,27 +56,27 @@ enum {
#define P_INVOKEABLE(func) \
template <int p, typename... Args> \
auto func(Args&&... args) \
-> decltype(IMPLNAME(func) < p > ::invoke(std::forward<Args>(args)...)) \
->decltype(IMPLNAME(func) < p > ::invoke(std::forward<Args>(args)...)) \
{ \
return IMPLNAME(func)<p>::invoke(std::forward<Args>(args)...); \
}

// can't return a value dependent on template parameter
#define SWITCH_INVOKEABLE(func) \
template <typename... Args> \
auto func(int p, Args&&... args) \
-> decltype(IMPLNAME(func) < inst::P1 > ::invoke(std::forward<Args>(args)...)) \
{ \
switch (p) { \
case inst::P2: \
return IMPLNAME(func)<inst::P2>::invoke(std::forward<Args>(args)...); \
case inst::P3: \
return IMPLNAME(func)<inst::P3>::invoke(std::forward<Args>(args)...); \
case inst::P4: \
return IMPLNAME(func)<inst::P4>::invoke(std::forward<Args>(args)...); \
default: \
return IMPLNAME(func)<inst::P1>::invoke(std::forward<Args>(args)...); \
} \
#define SWITCH_INVOKEABLE(func) \
template <typename... Args> \
auto func(int p, Args&&... args) \
->decltype(IMPLNAME(func) < inst::P1 > ::invoke(std::forward<Args>(args)...)) \
{ \
switch (p) { \
case inst::P2: \
return IMPLNAME(func)<inst::P2>::invoke(std::forward<Args>(args)...); \
case inst::P3: \
return IMPLNAME(func)<inst::P3>::invoke(std::forward<Args>(args)...); \
case inst::P4: \
return IMPLNAME(func)<inst::P4>::invoke(std::forward<Args>(args)...); \
default: \
return IMPLNAME(func)<inst::P1>::invoke(std::forward<Args>(args)...); \
} \
}

} // namespace matrix_free
Expand Down
4 changes: 2 additions & 2 deletions src/LowMachEquationSystem.C
Original file line number Diff line number Diff line change
Expand Up @@ -1389,8 +1389,8 @@ MomentumEquationSystem::register_interior_algorithm(stk::mesh::Part* part)

// Check if the user has requested CMM or LMM algorithms; if so, do not
// include Nodal Mass algorithms
std::vector<std::string> checkAlgNames = {"momentum_time_derivative",
"lumped_momentum_time_derivative"};
std::vector<std::string> checkAlgNames = {
"momentum_time_derivative", "lumped_momentum_time_derivative"};
bool elementMassAlg = supp_alg_is_requested(checkAlgNames);
// solver; time contribution (lumped mass matrix)
if (!elementMassAlg || nodal_src_is_requested()) {
Expand Down

0 comments on commit 8eb1e55

Please sign in to comment.