diff --git a/src/axom/core/utilities/System.cpp b/src/axom/core/utilities/System.cpp index 8737ff792f..10b81c2eba 100644 --- a/src/axom/core/utilities/System.cpp +++ b/src/axom/core/utilities/System.cpp @@ -25,12 +25,12 @@ namespace utilities #ifdef WIN32 std::string TCharToString(TCHAR* buf) { -#ifndef UNICODE - return std::string(buf); -#else - const auto wStr = std::wstring(buf); - return std::string(wStr.begin(), wStr.end()); -#endif + #ifndef UNICODE + return std::string(buf); + #else + const auto wStr = std::wstring(buf); + return std::string(wStr.begin(), wStr.end()); + #endif } #endif diff --git a/src/axom/quest/PointInCell.hpp b/src/axom/quest/PointInCell.hpp index 88e22161fb..f7594fc6c5 100644 --- a/src/axom/quest/PointInCell.hpp +++ b/src/axom/quest/PointInCell.hpp @@ -338,18 +338,19 @@ class PointInCell * \returns A std::vector of the candidates associated with \a pt * \note If the query point is 2D and the spatial index is 3D, we use 0 for the z-coordinate */ - std::vector getCandidatesForPt(axom::primal::Point const& pt) + std::vector getCandidatesForPt(axom::primal::Point const& pt) { switch(m_meshWrapper.meshDimension()) { case 2: return m_pointFinder2D->getCandidates(pt); case 3: - return m_pointFinder3D->getCandidates(axom::primal::Point(pt.data(), 2)); + return m_pointFinder3D->getCandidates( + axom::primal::Point(pt.data(), 2)); default: SLIC_ERROR("Point in Cell query only defined for 2D or 3D meshes."); return std::vector {}; - } + } } /*! @@ -365,7 +366,8 @@ class PointInCell switch(m_meshWrapper.meshDimension()) { case 2: - return m_pointFinder2D->getCandidates(axom::primal::Point(pt.data(), 2)); + return m_pointFinder2D->getCandidates( + axom::primal::Point(pt.data(), 2)); case 3: return m_pointFinder3D->getCandidates(pt); default: diff --git a/src/axom/quest/tests/quest_point_in_cell_mfem.cpp b/src/axom/quest/tests/quest_point_in_cell_mfem.cpp index 1e0be00fcb..d3d0c9be2d 100644 --- a/src/axom/quest/tests/quest_point_in_cell_mfem.cpp +++ b/src/axom/quest/tests/quest_point_in_cell_mfem.cpp @@ -499,10 +499,8 @@ class PointInCellTest : public ::testing::Test // Check that we found a cell EXPECT_NE(MeshTraits::NO_CELL, foundCellId) - << "element: " << eltId - << "\n -- isopar: " << isoparCenter - << "\n -- foundIsopar: " << foundIsoPar - << "\n -- spacePt: " << spacePt + << "element: " << eltId << "\n -- isopar: " << isoparCenter + << "\n -- foundIsopar: " << foundIsoPar << "\n -- spacePt: " << spacePt << "\n -- isBdry: " << (isBdry ? "yes" : "no") << "\n -- bbox of element: " << this->m_boundingBoxes[eltId] << axom::fmt::format(" ({} point)", @@ -788,7 +786,9 @@ class PointInCell2DTest : public PointInCellTest<2, ExecSpace> // compute bounding boxes this->m_boundingBoxes.resize(mesh->GetNE()); axom::quest::detail::PointInCellMeshWrapper meshWrapper(mesh); - meshWrapper.computeBoundingBoxes(1.+ 1e-8, this->m_boundingBoxes.data(), this->m_meshBoundingBox); + meshWrapper.computeBoundingBoxes(1. + 1e-8, + this->m_boundingBoxes.data(), + this->m_meshBoundingBox); } private: @@ -1006,11 +1006,12 @@ class PointInCell3DTest : public PointInCellTest<3, ExecSpace> // Dump mesh to disk this->outputMesh(this->m_meshDescriptorStr); - // compute bounding boxes this->m_boundingBoxes.resize(mesh->GetNE()); axom::quest::detail::PointInCellMeshWrapper meshWrapper(mesh); - meshWrapper.computeBoundingBoxes(1 + 1e-8, this->m_boundingBoxes.data(), this->m_meshBoundingBox); + meshWrapper.computeBoundingBoxes(1 + 1e-8, + this->m_boundingBoxes.data(), + this->m_meshBoundingBox); } private: diff --git a/src/axom/slam/BitSet.hpp b/src/axom/slam/BitSet.hpp index 157201d43d..4bbdf85b78 100644 --- a/src/axom/slam/BitSet.hpp +++ b/src/axom/slam/BitSet.hpp @@ -115,11 +115,12 @@ class BitSet public: using Index = int; - #if(defined(__x86_64__) && defined(__GNUC__)) || (defined(_WIN64) && (_MSC_VER >= 1600)) +#if(defined(__x86_64__) && defined(__GNUC__)) || \ + (defined(_WIN64) && (_MSC_VER >= 1600)) using Word = std::uint64_t; - #else +#else using Word = std::uint32_t; - #endif +#endif // TODO: update using a policy using ArrayType = axom::Array; diff --git a/src/axom/slam/tests/slam_set_BitSet.cpp b/src/axom/slam/tests/slam_set_BitSet.cpp index 90e1f71710..30be346b0f 100644 --- a/src/axom/slam/tests/slam_set_BitSet.cpp +++ b/src/axom/slam/tests/slam_set_BitSet.cpp @@ -41,17 +41,17 @@ std::vector testSizes() { std::vector vals; - vals.push_back(0); // empty bitset - vals.push_back(23); // less than one word - vals.push_back(31); // one bit less than a 4-byte word - vals.push_back(32); // exactly one 4-byte word - vals.push_back(33); // one bit more than a 4-byte word - vals.push_back(63); // one bit less than an 8-byte word - vals.push_back(64); // exactly one 8-byte word - vals.push_back(65); // one bit more than an 8-byte word - vals.push_back(127); // one bit less than two words - vals.push_back(128); // two words - vals.push_back(129); // more than two words + vals.push_back(0); // empty bitset + vals.push_back(23); // less than one word + vals.push_back(31); // one bit less than a 4-byte word + vals.push_back(32); // exactly one 4-byte word + vals.push_back(33); // one bit more than a 4-byte word + vals.push_back(63); // one bit less than an 8-byte word + vals.push_back(64); // exactly one 8-byte word + vals.push_back(65); // one bit more than an 8-byte word + vals.push_back(127); // one bit less than two words + vals.push_back(128); // two words + vals.push_back(129); // more than two words vals.push_back(153); vals.push_back(1547); // large bitset //vals.push_back(1234567); // large bitset @@ -269,7 +269,7 @@ TEST_P(SlamBitSet, atomicOps) slam::BitSet bitset2(NBITS); for(Index i = 0; i < NBITS; ++i) { - if(bitset1.test(i)) + if(bitset1.test(i)) { bitset2.atomicSet(i); } @@ -286,7 +286,7 @@ TEST_P(SlamBitSet, atomicOps) EXPECT_EQ(bitset1, bitset2); // Apply several atomic operations w/ checks - for(int i=0; i< NBITS; ++i) + for(int i = 0; i < NBITS; ++i) { EXPECT_EQ(bitset1.test(i), bitset2.test(i)); diff --git a/src/axom/spin/ImplicitGrid.hpp b/src/axom/spin/ImplicitGrid.hpp index bda5d7926f..549983ec9b 100644 --- a/src/axom/spin/ImplicitGrid.hpp +++ b/src/axom/spin/ImplicitGrid.hpp @@ -1065,7 +1065,8 @@ ImplicitGrid::QueryObject::visitCandidates( int currBit = axom::utilities::countr_zero(currWord); while(currBit < numBits) { - bool found = getVisitResult(candidatePredicate, iword * bitsPerWord + currBit); + bool found = + getVisitResult(candidatePredicate, iword * bitsPerWord + currBit); currBit++; currBit += axom::utilities::countr_zero(currWord >> currBit); if(found) @@ -1134,7 +1135,8 @@ ImplicitGrid::QueryObject::visitCandidates( int currBit = axom::utilities::countr_zero(currWord); while(currBit < numBits) { - bool found = getVisitResult(candidatePredicate, iword * bitsPerWord + currBit); + bool found = + getVisitResult(candidatePredicate, iword * bitsPerWord + currBit); currBit++; currBit += axom::utilities::countr_zero(currWord >> currBit); if(found)