Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
81b5dc6
Add SorClipper, FSorClipper and their tests.
gunney1 Jan 7, 2026
f0ef41b
Remove experimental code.
gunney1 Jan 7, 2026
09a9463
Discretize no longer changes the allocator id of the output array.
gunney1 Jan 7, 2026
04c3e3f
Discretizing SOR now allows curve to double back in z direction.
gunney1 Jan 7, 2026
a8f5090
Rename a private variable and a local variable.
gunney1 Jan 7, 2026
82faaec
Reformat.
gunney1 Jan 7, 2026
6cabb41
Merge remote-tracking branch 'gh/develop' into feature/gunney/sor-cli…
gunney1 Jan 7, 2026
398ab74
Remove obsolete test code.
gunney1 Jan 7, 2026
5b086ad
Merge remote-tracking branch 'gh/develop' into feature/gunney/sor-cli…
gunney1 Jan 7, 2026
4470cf7
Merge remote-tracking branch 'gh/feature/gunney/hex-clipper' into fea…
gunney1 Jan 9, 2026
14e79b6
Comment change from code review.
gunney1 Jan 9, 2026
0a2b6ce
Comment and doc relating to discretize respecting user's allocator ID.
gunney1 Jan 9, 2026
5545797
Merge remote-tracking branch 'gh/develop' into feature/gunney/sor-cli…
gunney1 Jan 9, 2026
6191266
Address warnings about calling host functions on devices.
gunney1 Jan 9, 2026
ef30071
Give output the correct allocator id, even if it's empty.
gunney1 Jan 9, 2026
c634d32
Rename SorClipper->SORClipper, FSorClipper->MonotonicZSORClipper.
gunney1 Jan 13, 2026
b2c6889
Reformat.
gunney1 Jan 13, 2026
45ca024
Merge remote-tracking branch 'gh/develop' into feature/gunney/sor-cli…
gunney1 Jan 13, 2026
7529304
I meant make the array empty, not check if it's empty.
gunney1 Jan 13, 2026
6294e7d
Merge remote-tracking branch 'gh/develop' into feature/gunney/sor-cli…
gunney1 Jan 13, 2026
07c5a67
Correct and clarify comments.
gunney1 Jan 13, 2026
c2c1402
Change function parameter name to match declaration of the function.
gunney1 Jan 14, 2026
df64c7d
Alternate way to compute angle range (which also fixes a bug).
gunney1 Jan 14, 2026
c389586
Clarify confusion caused by similar function names.
gunney1 Jan 14, 2026
554e17a
Autoformat.
gunney1 Jan 14, 2026
c00d301
Comment changes from code review.
gunney1 Jan 15, 2026
69238ac
Merge remote-tracking branch 'gh/develop' into feature/gunney/sor-cli…
gunney1 Jan 15, 2026
fa82a1e
Fix typo.
gunney1 Jan 16, 2026
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
3 changes: 3 additions & 0 deletions RELEASE-NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ The Axom project release numbers follow [Semantic Versioning](http://semver.org/


### Changed
- Version of `quest::discretize` that approximates a surface-of-revolution from a polyline
now respects the allocator ID of the output `Array`. It no longer resets the ID to the
execution space default.
- Evaluation methods for line integrals in `axom::primal` have been generalized, and
`evaluate_scalar_line_integral` has been renamed to `evaluate_line_integral`.
- Treatment of materials on strided-structured Blueprint meshes has changed in `axom::mir`.
Expand Down
7 changes: 4 additions & 3 deletions src/axom/primal/geometry/CoordinateTransformer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

#include "axom/core/numerics/Matrix.hpp"
#include "axom/core/utilities/Utilities.hpp"
#include "axom/core/NumericLimits.hpp"
#include "axom/core/numerics/floating_point_limits.hpp"
#include "axom/primal/geometry/Point.hpp"
#include "axom/primal/geometry/Vector.hpp"
Expand Down Expand Up @@ -157,7 +158,7 @@ class CoordinateTransformer
*
* Validity can be checked with isValid().
*/
AXOM_HOST_DEVICE void setInvalid() { m_P[0][0] = std::numeric_limits<T>::quiet_NaN(); }
AXOM_HOST_DEVICE void setInvalid() { m_P[0][0] = axom::numeric_limits<T>::quiet_NaN(); }

//! @brief Whether transformer is valid.
AXOM_HOST_DEVICE bool isValid() { return !std::isnan(m_P[0][0]); }
Expand Down Expand Up @@ -377,7 +378,7 @@ class CoordinateTransformer
* M = [ P v ]
* [ 0 1 ]
*
* Store m_P[0][0] = std::numeric_limits<T>::quiet_NaN() to set this
* Store m_P[0][0] = axom::numeric_limits<T>::quiet_NaN() to set this
* CoordinateTransformer as invalid. See \a setInvalid()
*/
Matrx m_P;
Expand Down Expand Up @@ -411,7 +412,7 @@ class CoordinateTransformer
}
else
{
m[0][0] = std::numeric_limits<T>::quiet_NaN();
m[0][0] = axom::numeric_limits<T>::quiet_NaN();
}
}

Expand Down
4 changes: 4 additions & 0 deletions src/axom/quest/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -154,13 +154,17 @@ if(AXOM_ENABLE_KLEE AND AXOM_ENABLE_SIDRE)
detail/clipping/TetClipper.hpp
detail/clipping/HexClipper.hpp
detail/clipping/SphereClipper.hpp
detail/clipping/MonotonicZSORClipper.hpp
detail/clipping/SORClipper.hpp
detail/clipping/MeshClipperImpl.hpp)
list(APPEND quest_sources MeshClipper.cpp
MeshClipperStrategy.cpp
detail/clipping/Plane3DClipper.cpp
detail/clipping/TetClipper.cpp
detail/clipping/HexClipper.cpp
detail/clipping/SphereClipper.cpp
detail/clipping/MonotonicZSORClipper.cpp
detail/clipping/SORClipper.cpp
detail/clipping/MeshClipperImpl.hpp)
endif()
endif()
Expand Down
3 changes: 2 additions & 1 deletion src/axom/quest/IntersectionShaper.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -824,7 +824,8 @@ class IntersectionShaper : public Shaper
axom::fmt::format("{:-^80}", axom::fmt::format(" Refinement level set to {} ", m_level)));

// Generate the Octahedra
// (octahedra m_octs will be on device)
// (Set m_octs's allocator id to where we want its data to live.)
m_octs = axom::Array<OctahedronType>(0, 0, axom::execution_space<ExecSpace>::allocatorID());
const bool disc_status =
axom::quest::discretize<ExecSpace>(polyline, polyline_size, m_level, m_octs, m_octcount);

Expand Down
22 changes: 12 additions & 10 deletions src/axom/quest/detail/Discretize_detail.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#define AXOM_QUEST_DISCRETIZE_DETAIL_

#include "axom/primal/constants.hpp"
#include "math.h"

namespace
{
Expand Down Expand Up @@ -152,12 +153,11 @@ int discrSeg(const Point2D &a, const Point2D &b, int levels, axom::ArrayView<Oct
int hostAllocID = axom::execution_space<axom::SEQ_EXEC>::allocatorID();

// Assert input assumptions
SLIC_ASSERT(b[0] - a[0] >= 0);
SLIC_ASSERT(a[1] >= 0);
SLIC_ASSERT(b[1] >= 0);

// Deal with degenerate segments
if(b[0] - a[0] < axom::primal::PRIMAL_TINY)
if(fabs(b[0] - a[0]) < axom::primal::PRIMAL_TINY)
{
return 0;
}
Expand Down Expand Up @@ -256,7 +256,7 @@ namespace quest
* less than the polyline's length). That is exponential growth. Use
* appropriate caution.
*
* This routine initializes an Array pointed to by \a out.
* This routine resizes and populates an Array pointed to by \a out.
*/
template <typename ExecSpace>
bool discretize(const axom::ArrayView<Point2D> &polyline,
Expand All @@ -265,19 +265,18 @@ bool discretize(const axom::ArrayView<Point2D> &polyline,
axom::Array<OctType> &out,
int &octcount)
{
int allocId = axom::execution_space<ExecSpace>::allocatorID();
SLIC_ERROR_IF(!axom::execution_space<ExecSpace>::usesAllocId(out.getAllocatorID()),
axom::fmt::format("Execution space {} cannot access allocator id {}",
axom::execution_space<ExecSpace>::name(),
out.getAllocatorID()));

// Check for invalid input. If any segment is invalid, exit returning false.
bool stillValid = true;
int segmentcount = pointcount - 1;
for(int seg = 0; seg < segmentcount && stillValid; ++seg)
{
const Point2D &a = polyline[seg];
const Point2D &b = polyline[seg + 1];
// invalid if a.x > b.x
if(a[0] > b[0])
{
stillValid = false;
}
if(a[1] < 0 || b[1] < 0)
{
stillValid = false;
Expand All @@ -293,7 +292,8 @@ bool discretize(const axom::ArrayView<Point2D> &polyline,
// That was the octahedron count for one segment. Multiply by the number
// of segments we will compute.
int totaloctcount = segoctcount * segmentcount;
out = axom::Array<OctType>(totaloctcount, totaloctcount, allocId);
out.clear();
out.resize(axom::ArrayOptions::Uninitialized(), totaloctcount);
axom::ArrayView<OctType> out_view = out.view();
octcount = 0;

Expand All @@ -303,6 +303,8 @@ bool discretize(const axom::ArrayView<Point2D> &polyline,
discrSeg<ExecSpace>(polyline[seg], polyline[seg + 1], levels, out_view, octcount);
octcount += segment_prism_count;
}
// octcount may be < totaloctcount if there are degenerate segments.
out.resize(octcount);

// TODO check for errors in each segment's computation
return true;
Expand Down
9 changes: 8 additions & 1 deletion src/axom/quest/detail/clipping/MeshClipperImpl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -109,12 +109,19 @@ class MeshClipperImpl : public MeshClipper::Impl
});
}

//! @brief Make a list of indices where labels have value LABEL_ON.
/*!
* @brief Make a list of indices where labels have value LABEL_ON,
* stored in the same allocator id as the labels.
*/
void collectOnIndices(const axom::ArrayView<LabelType>& labels,
axom::Array<axom::IndexType>& onIndices) override
{
if(labels.empty())
{
if(onIndices.getAllocatorID() != labels.getAllocatorID())
{
onIndices = axom::Array<IndexType>(0, 0, labels.getAllocatorID());
}
return;
};

Expand Down
Loading