Skip to content

Commit

Permalink
Formatting codes for git style
Browse files Browse the repository at this point in the history
  • Loading branch information
hidekb committed Jan 10, 2025
1 parent d40edca commit 75e9e17
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
3 changes: 2 additions & 1 deletion src/utils/tests/Vector_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@
using Utils::Vector;

/* Number of nontrivial Baxter permutations of length 2n-1. (A001185) */
#define TEST_NUMBERS {0, 1, 1, 7, 21, 112, 456, 2603, 13203}
#define TEST_NUMBERS \
{ 0, 1, 1, 7, 21, 112, 456, 2603, 13203 }

constexpr int test_numbers[] = TEST_NUMBERS;
constexpr std::size_t n_test_numbers = sizeof(test_numbers) / sizeof(int);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@
#pragma clang diagnostic ignored "-Wunused-variable"
#endif

#include <config/config.hpp>
#include <caliper/cali.h>
#include <config/config.hpp>

namespace walberla {
namespace lbm {
Expand Down Expand Up @@ -339,7 +339,7 @@ inline void add(GhostLayerField<double, uint_t{3u}> *vec_field,
inline void initialize(GhostLayerField<double, uint_t{3u}> *vec_field,
Vector3<double> const &vec) {
#ifdef CALIPER
CALI_CXX_MARK_FUNCTION;
CALI_CXX_MARK_FUNCTION;
#endif
WALBERLA_FOR_ALL_CELLS_INCLUDING_GHOST_LAYER_XYZ(vec_field, {
double &xyz0 = vec_field->get(x, y, z, uint_t{0u});
Expand All @@ -352,7 +352,7 @@ inline void initialize(GhostLayerField<double, uint_t{3u}> *vec_field,
inline void add_to_all(GhostLayerField<double, uint_t{3u}> *vec_field,
Vector3<double> const &vec) {
#ifdef CALIPER
CALI_CXX_MARK_FUNCTION;
CALI_CXX_MARK_FUNCTION;
#endif
WALBERLA_FOR_ALL_CELLS_INCLUDING_GHOST_LAYER_XYZ(vec_field, {
double &xyz0 = vec_field->get(x, y, z, uint_t{0u});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,11 +106,11 @@ boost::test_tools::predicate_result almost_equal(R const &val, R const &ref,
for (auto i = 0ul; i < val.size(); ++i) {
if (auto const diff = std::abs(val[i] - ref[i]); diff > atol) {
res = false;
res.message() << "val{" << print_first_n(val) << "} and "
<< "ref{" << print_first_n(ref) << "} mismatch: "
<< "val[" << i << "]{" << val[i] << "} != "
<< "ref[" << i << "]{" << ref[i] << "} "
<< "(difference{" << diff << "} > delta{" << atol << "})";
res.message() << "val{" << print_first_n(val) << "} and " << "ref{"
<< print_first_n(ref) << "} mismatch: " << "val[" << i
<< "]{" << val[i] << "} != " << "ref[" << i << "]{"
<< ref[i] << "} " << "(difference{" << diff << "} > delta{"
<< atol << "})";
break;
}
}
Expand Down

0 comments on commit 75e9e17

Please sign in to comment.