Skip to content
This repository was archived by the owner on Jul 14, 2022. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
216 commits
Select commit Hold shift + click to select a range
486f4e0
add the kripke
mclarsen Oct 31, 2020
be0f23f
add missing file
mclarsen Oct 31, 2020
50c0f8b
adding more files
mclarsen Oct 31, 2020
b328c2d
a lot
mclarsen Nov 9, 2020
985f0d7
working
mclarsen Nov 9, 2020
06b9843
going down rabbit hole
mclarsen Nov 10, 2020
bab071a
omg. constant order
mclarsen Nov 10, 2020
4cbf504
about to add some visual debugging
mclarsen Nov 12, 2020
fb2fef2
about to try transparency
mclarsen Nov 15, 2020
01bb7d3
there was a long way to go for transparency
mclarsen Nov 15, 2020
62e4602
change light
mclarsen Nov 16, 2020
ddbce50
fix mpi version on pascal
mclarsen Nov 16, 2020
61ef4f4
something
mclarsen Nov 16, 2020
075c8c0
attenuation is key
mclarsen Nov 16, 2020
c051a23
don't add light hits for indirect
mclarsen Nov 17, 2020
117f3be
mark
mclarsen Nov 21, 2020
15b3529
light sampling working, but rays are slipping through the mesh
mclarsen Nov 21, 2020
d039c62
lets do triangles
mclarsen Nov 21, 2020
ae9edc2
russian
mclarsen Nov 22, 2020
c606986
whoops
mclarsen Nov 22, 2020
866fce1
adding grid
mclarsen Nov 22, 2020
5ab0a5c
adjust line thickness
mclarsen Nov 23, 2020
d94341b
I don't understand what a sub domain is
mclarsen Nov 23, 2020
8c9282f
words
mclarsen Nov 24, 2020
ba2c709
something
mclarsen Nov 25, 2020
daa5cc5
commenting source
mclarsen Nov 25, 2020
04a367d
trying cornell box
mclarsen Nov 27, 2020
f433e7d
about to switch to light container
mclarsen Nov 29, 2020
aa1f702
about to refactor samples/ray data
mclarsen Dec 5, 2020
18ed48b
moved to struct for samples
mclarsen Dec 5, 2020
495cf65
actually add the files
mclarsen Dec 5, 2020
bef5727
switch to ray data struct
mclarsen Dec 5, 2020
a0a7779
add a source field
mclarsen Dec 7, 2020
94d233d
add function for view extraction
mclarsen Dec 7, 2020
3e0a56f
Attempt to bring LowOrder (path_lengths) to updated kripke branch
maxishii Dec 11, 2020
4ffe430
Improve LazyProp
maxishii Dec 11, 2020
330b31e
Bring in low-order blueprint importing. Unimplemented to_node().
maxishii Dec 11, 2020
781135b
mcnd
mclarsen Dec 14, 2020
fabed04
Merge branch 'render_test' into kripke_uniform
maxishii Dec 15, 2020
0e7a9f1
Separate importer to get UniformTopology
maxishii Dec 15, 2020
e8273ef
Merge branch 'kripke_uniform' into kripke
maxishii Dec 15, 2020
293eea2
no new source, need scattering source
mclarsen Dec 16, 2020
7f8bbec
Merge branch 'kripke' of github.com:LLNL/devil_ray into kripke
mclarsen Dec 16, 2020
be22ba9
cleanup
mclarsen Dec 16, 2020
b4f78bb
remove rendering files
mclarsen Dec 16, 2020
542f7f5
something
mclarsen Dec 17, 2020
7b4f854
outputting moment 0
mclarsen Dec 18, 2020
bb10e59
Spherical harmonics. Individually evaluated on cube map.
maxishii Dec 18, 2020
d8c12e9
Attempt sh reconstruction 20th order.
maxishii Dec 18, 2020
d860bd0
double, order 30, save depth
maxishii Dec 19, 2020
b16db6c
Fix normalization constants
maxishii Dec 19, 2020
b14a28e
Accept input image, fix artifacts by normalizing + clamp
maxishii Dec 22, 2020
a4b55d1
Fixup clamping all channels, don't want grayscale
maxishii Dec 22, 2020
8891116
Allow multi-component in Array, add accessor with DeviceArray
maxishii Dec 29, 2020
f0c693b
make kripke depend on devil ray
mclarsen Dec 30, 2020
8d1d9c6
Merge branch 'kripke' of github.com:LLNL/devil_ray into kripke
mclarsen Dec 30, 2020
b2db352
Fix device_array.hpp includes and namespace
maxishii Dec 30, 2020
ddd2a9c
ConstDeviceArray and NonConstDeviceArray
maxishii Dec 30, 2020
7feaa96
array_utils.hpp: index_any_nonzero, index_all_nonzero
maxishii Dec 30, 2020
4684847
Brute force first-scatter using DDA. TODO insert SphericalHarmonics here
maxishii Dec 31, 2020
6453daa
Copy SphericalHarmonics from the test into the filter. std::vector ->…
maxishii Dec 31, 2020
f1c44dd
prototype aton importing interface in a new driver
maxishii Dec 31, 2020
08ed2f4
adding first scatter source field
mclarsen Jan 5, 2021
66bb342
Merge branch 'kripke' of github.com:LLNL/devil_ray into kripke
mclarsen Jan 5, 2021
ec8a147
generify gather moment
mclarsen Jan 5, 2021
75d8a7d
compute destination offsets
maxishii Jan 5, 2021
824e2df
Merge branch 'kripke' of github.com:LLNL/devil_ray into kripke
maxishii Jan 5, 2021
ed92420
Copy the values
maxishii Jan 7, 2021
654dda3
Import collection
maxishii Jan 11, 2021
822a6cf
First scatter emission must have moments
maxishii Jan 11, 2021
4d94caf
execute FirstScatter on imported data test
maxishii Jan 11, 2021
78dd7c8
Stub for scattering after integration
maxishii Jan 12, 2021
218845b
Update external_source.json after running kripke with first_scatter f…
maxishii Jan 14, 2021
bab85e5
Refactor import, add export
maxishii Jan 14, 2021
99bb3fe
(wip) Move SphericalHarmonics to its own class. But error: inline fun…
maxishii Jan 20, 2021
476050e
Move defninitions of all SphericalHarmonics member functions to heade…
maxishii Jan 20, 2021
edf0203
Move import/export out of unit test and into wip import/export source…
maxishii Jan 20, 2021
97e6905
Update t_dray_test_aton.cpp, where all the import/export was moved from
maxishii Jan 20, 2021
3820cbc
add kAdd
mclarsen Jan 20, 2021
6244f06
Merge branch 'kripke' of github.com:LLNL/devil_ray into kripke
maxishii Jan 20, 2021
61b788d
make things right for first_scatter
mclarsen Jan 21, 2021
30ec55e
Merge branch 'kripke' of github.com:LLNL/devil_ray into kripke
mclarsen Jan 21, 2021
779ab9e
only write out solution
mclarsen Jan 21, 2021
5960feb
Don't force input window block meta to all be same integer type.
maxishii Jan 22, 2021
c61c247
Note that first_scatter input and output fields can be the same field
maxishii Jan 22, 2021
6e11d26
Skip source==dest to workaround nans, fix counting race, fix use of i…
maxishii Jan 22, 2021
7e90063
Merge branch 'kripke' of github.com:LLNL/devil_ray into kripke
maxishii Jan 22, 2021
fcf61ca
Add raytracing to steady state solver
maxishii Jan 22, 2021
3357742
Solve for uncollided flux, not first scatter
maxishii Jan 27, 2021
e06cf5d
Merge remote-tracking branch 'origin/develop' into kripke
mclarsen Jan 28, 2021
2534dc1
get the mpi comm
mclarsen Jan 28, 2021
f71d2a8
ridiculous
mclarsen Jan 29, 2021
692dda6
Rename first_scatter field as phi_uc; cmdline --first_scatter; clean …
maxishii Jan 29, 2021
f2c8a1b
ray-tracing max distance (stop at destination)
maxishii Feb 2, 2021
96e7cc3
saving work
mclarsen Feb 3, 2021
360fd45
Merge branch 'kripke' of github.com:LLNL/devil_ray into kripke
mclarsen Feb 3, 2021
28f61a0
weird
mclarsen Feb 5, 2021
0678be9
more commenting
mclarsen Feb 5, 2021
87c3e5a
fixed badness
mclarsen Feb 8, 2021
9b0630c
going b
mclarsen Feb 9, 2021
ac4013f
save
mclarsen Feb 16, 2021
a88bac7
Face centers hanging out in a unit test t_dray_isp
maxishii Feb 17, 2021
752d18b
Merge branch 'kripke' of github.com:LLNL/devil_ray into kripke
maxishii Feb 17, 2021
8a8be7c
update tests for new conduit
mclarsen Mar 1, 2021
67f71d3
fix something
mclarsen Mar 3, 2021
e96498b
fix the ridiculous
mclarsen Mar 4, 2021
988b337
fix the ridiculous
mclarsen Mar 4, 2021
a887b44
use raja sort
mclarsen Mar 4, 2021
b38cbcf
Verify orthonormality of spherical harmonics. Compute factorials with…
maxishii Mar 4, 2021
c8eebe6
Merge branch 'kripke' of github.com:LLNL/devil_ray into kripke
maxishii Mar 4, 2021
6287929
don't use crazy offsets
mclarsen Mar 4, 2021
ce692d2
Merge branch 'kripke' of github.com:LLNL/devil_ray into kripke
mclarsen Mar 4, 2021
cdae468
Dray pop count
maxishii Mar 5, 2021
ffc71b0
Merge branch 'kripke' of github.com:LLNL/devil_ray into kripke
maxishii Mar 5, 2021
b471702
blueprint update save_mesh() in furnace
maxishii Mar 11, 2021
8a67484
(wip) devil ray broomstick
maxishii Mar 11, 2021
dfab577
spherical harmonics project delta and project isotropic integral
maxishii Mar 17, 2021
3bac454
broomstick with Devil Ray datasets, use more moments
maxishii Mar 17, 2021
09e2bc0
Point source test is good
maxishii Mar 17, 2021
c3e56e5
More configurable broomstick
maxishii Mar 18, 2021
6cf174a
Refactor equation for analytical broomstick flux
maxishii Mar 18, 2021
18b9ef1
save
mclarsen Mar 18, 2021
0ed6c27
Merge branch 'kripke' of github.com:LLNL/devil_ray into kripke
mclarsen Mar 18, 2021
8317503
add moment check to point source test, looks good
maxishii Mar 23, 2021
c318d8d
Uniform faces iterator
maxishii Mar 24, 2021
2f23a49
another step in the process
mclarsen Mar 25, 2021
3468489
moving to final moments
mclarsen Mar 25, 2021
f3c4311
almost
mclarsen Mar 25, 2021
6f30ae4
I think I have it
mclarsen Mar 29, 2021
75794dd
cell averaged fluxes in first_scatter filter; note: negative fluxes o…
maxishii Apr 2, 2021
a76bda2
Merge branch 'kripke' of github.com:LLNL/devil_ray into kripke
maxishii Apr 2, 2021
42ae5e1
Beginning internal-face quadrature
maxishii Apr 13, 2021
e826cf8
Check point source with internal-face quadrature, achieve flux>0
maxishii Apr 13, 2021
8e7430d
add to blueprint
mclarsen Apr 15, 2021
6f565ee
cell dims to node dims
maxishii Apr 15, 2021
784fa88
point source test to_blueprint
maxishii Apr 16, 2021
d1356c1
Add self-emission to cell-averaged uc flux
maxishii Apr 16, 2021
cf170a6
merge
mclarsen Apr 26, 2021
38c8377
class to nudge face points toward source (unused)
maxishii Apr 28, 2021
d670680
Merge branch 'kripke' of github.com:LLNL/devil_ray into kripke
maxishii Apr 28, 2021
de7cb7f
In dataset wrapper, name the mesh 'topo' for blueprint
maxishii Apr 28, 2021
b92f84c
LowOrder locate() and eval() test (no eval yet)
maxishii Apr 30, 2021
5291faa
LowOrderField::eval()
maxishii May 3, 2021
93c5972
LowOrderField::eval() with ncomp
maxishii May 4, 2021
f1562f3
UniformTopology multiple public inheritance
maxishii May 5, 2021
38cbcbe
Z-normal faces first, X-normal faces last.
maxishii May 7, 2021
5a59132
Begin uniform faces Quadtree
maxishii Jun 7, 2021
0024298
More integration-quadtree tests with orientation-dependent functions
maxishii Jun 7, 2021
7e63ab2
t_dray_quadtree Test gauss law boundary surface integration on fine cube
maxishii Jun 8, 2021
f28a878
Clean up commented code
maxishii Jun 8, 2021
03dec9a
quadtree refinement mechanism
maxishii Jun 9, 2021
3a39b5c
array summaries to std::ostream
maxishii Jun 9, 2021
761043a
array_resize_copy with default fill value
maxishii Jun 9, 2021
68eb19c
fix quadtree valid() and child init during refinement
maxishii Jun 9, 2021
3fd0544
gauss law test with uniform refinement on boundary faces
maxishii Jun 9, 2021
0674afd
Quadtree integration: preliminary variant of PAGANI algorithm
maxishii Jun 15, 2021
1506c34
Refactor pagani refinement loop monolith as a stateful iterator
maxishii Jun 15, 2021
ccbc1e8
PaganiIteration state exposed in loop in test driver
maxishii Jun 16, 2021
a32f966
Output quadtree forest quads to blueprint as disconnected quads
maxishii Jun 16, 2021
aaabf76
Evaluate error only for new leafs
maxishii Jun 22, 2021
8f55dd8
Pagani: Refactor m_total as m_partial, m_working, and m_finalizing. A…
maxishii Jun 23, 2021
c1c6d1b
Pagani: Add threshold classifier
maxishii Jun 23, 2021
4c5431f
Consolidate pagani test, plan for uniform override
maxishii Jun 24, 2021
24909cd
New test case for pagani, tweak absolute thresholding parameters
maxishii Jun 24, 2021
5d86f95
Plot the tree depth resulting from pagani, on a reference-space image…
maxishii Jun 29, 2021
36b646a
Output quadtree as collage of reference-space tiles
maxishii Jun 29, 2021
49138b4
Fix SignVec::inverse()
maxishii Jun 29, 2021
8c08b07
consolidate plots
maxishii Jun 29, 2021
7fa75fc
effect of different coefficients on the refinement
maxishii Jun 29, 2021
3f8ac8f
Per-face integration using atomicAdd
maxishii Jun 30, 2021
4c0152a
Begin shadow blocker test
maxishii Jul 8, 2021
4de3479
Delete blueprint before shadow test
maxishii Jul 8, 2021
c542a54
Shadow test with vertex resolution
maxishii Jul 8, 2021
e65b206
png output
maxishii Jul 8, 2021
d692bd9
Interpolate shadow as argument of exponential
maxishii Jul 13, 2021
aac1e27
move quadtree template functions to header file, don't include cpp
maxishii Jul 13, 2021
1321c09
Quadtree to_blueprint() make copy of memory, since arrays often tempo…
maxishii Jul 13, 2021
018fed2
Begin shadow quadtree
maxishii Jul 13, 2021
b55ddf2
t_dray_shadow: Adaptive quadtree for interpolation surface
maxishii Jul 13, 2021
36e50ed
print level in shadow quadtree refinement
maxishii Jul 14, 2021
d511e7b
Begin interpolation_surfaces integration ground truth
maxishii Jul 28, 2021
a80c074
Promote Vec<T> + Vec<U> to Vec<T+U> using scalar promotion rules
maxishii Aug 11, 2021
e994860
Interpolation surface: res controlled by geometry and D[func composit…
maxishii Aug 11, 2021
2c7224f
slight refactor of I.S. test driver
maxishii Aug 11, 2021
28f9abf
Fix t_dray_interpolation_surface Quad::child()
maxishii Aug 12, 2021
7950cbf
cpu-only quadtree forest with on-the-fly subdivision
maxishii Aug 12, 2021
2a0ce31
QuadTreeQuadrant<Float>
maxishii Aug 12, 2021
c068a54
quadtree refspace blueprint 2D (no z component)
maxishii Aug 12, 2021
061c440
Write I.S. quadtree to blueprint to disk
maxishii Aug 12, 2021
36281f1
Use RAJA-ified QuadTreeForest when possible
maxishii Aug 12, 2021
838d0d8
One more digit in I.S. threshold. Results:
maxishii Aug 12, 2021
ff1607a
Fix to make interpolation consistent with storage. Changed answer by …
maxishii Aug 12, 2021
ea76562
Try interpolating uniform Sigma_t
maxishii Aug 16, 2021
1581b6f
Fix store_samples() to not diminish stored value by factor of 1/4.
maxishii Aug 16, 2021
70402ab
Empty arrays have size 0
maxishii Aug 17, 2021
79ede5a
Able to query LazyProp on is_calculated
maxishii Aug 17, 2021
07533cb
Reset LazyProp leafs on QuadTreeForest construction and copy
maxishii Aug 17, 2021
1eb6898
Add quadtree refiner based on expected improvement (with TODOs)
maxishii Aug 17, 2021
7ea8119
Begin egg carton multi-domain dataset to test interpolation surfaces
maxishii Sep 2, 2021
0d6c2cf
Solve multidomain adjacency (uniform only)
maxishii Sep 10, 2021
6d702c7
Propagating interpolation of <Sigma_t>
maxishii Sep 23, 2021
918c0da
Factor graphs out of the driver
maxishii Sep 30, 2021
4491cf9
Refactor array ops, rm prints, comment next steps
maxishii Nov 2, 2021
b7b496c
Let there be uniform indexing. Straightforward face currents.
maxishii Nov 10, 2021
3258cee
fixup: Multiply quadrature summand by weight
maxishii Nov 10, 2021
01dae3f
undef macros after done creating structs
maxishii Nov 10, 2021
d14360e
all face currents
maxishii Nov 10, 2021
9cddd35
Cell fluxes from current and source
maxishii Nov 10, 2021
5e8e6be
Per-domain check for conservation. So far so good.
maxishii Nov 10, 2021
3db1f02
Test leakage over entire problem.
maxishii Nov 10, 2021
361a451
Mirror test for UniformIndexer SideFaces and SideVerts
maxishii Nov 11, 2021
63adb91
Mirror normals test
maxishii Nov 11, 2021
e1e5e48
Also print a sum of the current that is supposed to cancel.
maxishii Nov 11, 2021
a394d64
sanity: Print statements showing discrepancies at outflow boundaries
maxishii Nov 11, 2021
42468cd
Fix UniformIndexer::side_verts and add more tests
maxishii Nov 11, 2021
573fdc4
fix: uninitialized interpolation surface. Beware separated constructi…
maxishii Nov 12, 2021
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
142 changes: 142 additions & 0 deletions debug/external_source.json

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ packages:
# LLNL toss3 mvapich2
mvapich2:
paths:
mvapich2@2.2%[email protected]: /usr/tce/packages/mvapich2/mvapich2-2.2-gcc-4.9.3
mvapich2@2.3%[email protected]: /usr/tce/packages/mvapich2/mvapich2-2.3-gcc-4.9.3
[email protected]%[email protected]: /usr/tce/packages/mvapich2/mvapich2-2.2-intel-17.0.0
[email protected]%[email protected]: /usr/tce/packages/mvapich2/mvapich2-2.2-clang-4.0.0
buildable: False
8 changes: 8 additions & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ option(BUILD_SHARED_LIBS "Build shared libraries" OFF)
option(DRAY_ENABLE_TESTS "Build tests" ON)
option(DRAY_ENABLE_UTILS "Build utilities" ON)
option(ENABLE_OPENMP "Build OpenMP Support" ON)
option(ENABLE_EXAMPLES "Build Examples" ON)
option(ENABLE_MPI "Build MPI Support" ON)
option(ENABLE_CUDA "Build CUDA Support" ON)
option(ENABLE_MFEM "Build MFEM Support" ON)
Expand Down Expand Up @@ -85,6 +86,13 @@ else()
message(STATUS "Dray Tests Disabled")
endif()

if(ENABLE_EXAMPLES)
message(STATUS "Dray Examples Enabled")
add_subdirectory(examples)
else()
message(STATUS "Dray Examples Disabled")
endif()

add_subdirectory(config)
add_subdirectory(docs)

Expand Down
47 changes: 47 additions & 0 deletions src/dray/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,26 @@ set(dray_headers dray.hpp
array_internals_base.hpp
array_registry.hpp
array_utils.hpp
device_array.hpp
host_array.hpp
color_map.hpp
color_table.hpp
graph/cpu_graph.hpp
graph/topological_order.hpp
uniform_topology.hpp
uniform_faces.hpp
uniform_indexer.hpp
quadtree.hpp
integrate.hpp
pagani.hpp
sign_vec.hpp
face_location.hpp
dray_node_to_dataset.hpp
exports.hpp
error.hpp
error_check.hpp
halton.hpp
lazy_prop.hpp
linear_bvh_builder.hpp
location.hpp
math.hpp
Expand All @@ -30,6 +43,7 @@ set(dray_headers dray.hpp
ray_hit.hpp
ref_point.hpp
simple_tensor.hpp
spherical_harmonics.hpp
template_tag.hpp
types.hpp
transform_3d.hpp
Expand All @@ -40,6 +54,9 @@ set(dray_headers dray.hpp
io/mfem_reader.hpp
io/blueprint_reader.hpp
io/blueprint_low_order.hpp
io/blueprint_moments.hpp
io/blueprint_uniform_topology.hpp
io/array_mapping.hpp
import_order_policy.hpp

rendering/annotator.hpp
Expand All @@ -56,9 +73,11 @@ set(dray_headers dray.hpp
rendering/point_light.hpp
rendering/traceable.hpp
rendering/renderer.hpp
rendering/path_data.hpp
rendering/scalar_buffer.hpp
rendering/scalar_renderer.hpp
rendering/slice_plane.hpp
rendering/sphere_light.hpp
rendering/surface.hpp
rendering/text_annotator.hpp
rendering/volume.hpp
Expand All @@ -78,6 +97,7 @@ set(dray_headers dray.hpp
utils/mpi_utils.hpp
utils/timer.hpp
utils/yaml_writer.hpp
utils/point_writer.hpp

ambient_occlusion.hpp
intersection_context.hpp
Expand Down Expand Up @@ -106,6 +126,7 @@ set(dray_headers dray.hpp
data_model/subpatch.hpp
data_model/mesh_utils.hpp
data_model/field.hpp
data_model/low_order_field.hpp
data_model/unstructured_field.hpp
data_model/grid_function.hpp
data_model/unstructured_mesh.hpp
Expand All @@ -122,6 +143,13 @@ set(dray_headers dray.hpp

#filters/attractor_map.hpp
filters/surface_triangle.hpp
filters/path_lengths.hpp
filters/first_scatter.hpp
filters/matt_scatter.hpp

transport/dda.hpp
transport/uniform_partials.hpp
transport/compose_domain_segment.hpp

synthetic/affine_radial.hpp
synthetic/spiral_sample.hpp
Expand All @@ -135,13 +163,19 @@ set(dray_sources dray.cpp
array_registry.cpp
color_map.cpp
color_table.cpp
uniform_topology.cpp
uniform_faces.cpp
quadtree.cpp
integrate.cpp
face_location.cpp
dray_node_to_dataset.cpp
linear_bvh_builder.cpp
location.cpp
matrix.cpp
subdivision_search.cpp
ray.cpp
ray_hit.cpp
spherical_harmonics.cpp
triangle_mesh.cpp
vec.cpp
utils/color_buffer_utils.cpp
Expand All @@ -150,6 +184,7 @@ set(dray_sources dray.cpp
utils/png_decoder.cpp
utils/png_compare.cpp
utils/ray_utils.cpp
utils/point_writer.cpp
utils/string_utils.cpp
utils/mpi_utils.cpp

Expand All @@ -163,6 +198,9 @@ set(dray_sources dray.cpp
io/mfem_reader.cpp
io/blueprint_reader.cpp
io/blueprint_low_order.cpp
io/blueprint_moments.cpp
io/blueprint_uniform_topology.cpp
io/array_mapping.cpp

rendering/annotator.cpp
rendering/camera.cpp
Expand All @@ -175,10 +213,12 @@ set(dray_sources dray.cpp
rendering/traceable.cpp
rendering/point_light.cpp
rendering/renderer.cpp
rendering/path_data.cpp
rendering/scalar_buffer.cpp
rendering/scalar_renderer.cpp
rendering/slice_plane.cpp
rendering/surface.cpp
rendering/sphere_light.cpp
rendering/text_annotator.cpp
rendering/volume.cpp
rendering/volume_partial.cpp
Expand All @@ -199,6 +239,7 @@ set(dray_sources dray.cpp
data_model/unstructured_mesh.cpp
data_model/mesh_utils.cpp
data_model/unstructured_field.cpp
data_model/low_order_field.cpp

filters/mesh_boundary.cpp
filters/reflect.cpp
Expand All @@ -211,6 +252,12 @@ set(dray_sources dray.cpp

#filters/attractor_map.cpp
filters/surface_triangle.cpp
filters/path_lengths.cpp
filters/first_scatter.cpp
filters/matt_scatter.cpp

transport/uniform_partials.cpp
transport/compose_domain_segment.cpp

synthetic/affine_radial.cpp
synthetic/spiral_sample.cpp
Expand Down
42 changes: 37 additions & 5 deletions src/dray/aabb.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,23 @@ template <int32 dim = 3> class AABB
m_ranges[d].reset ();
}

// return true if all ranges are empty
// return true if all ranges are initial
DRAY_EXEC
bool is_initial() const
{
bool initial = true;
for (int32 d = 0; d < dim; d++)
initial &= m_ranges[d].is_initial();
return initial;
}

// return true if any range is empty
DRAY_EXEC
bool is_empty() const
{
bool empty = true;
bool empty = false;
for (int32 d = 0; d < dim; d++)
empty &= m_ranges[d].is_empty();
empty |= m_ranges[d].is_empty();
return empty;
}

Expand Down Expand Up @@ -74,7 +84,7 @@ template <int32 dim = 3> class AABB
}

DRAY_EXEC
bool contains (const AABB &other)
bool contains (const AABB &other) const
{
bool ret = true;
for (int32 d = 0; d < dim; d++)
Expand All @@ -83,14 +93,21 @@ template <int32 dim = 3> class AABB
}

DRAY_EXEC
bool contains (const Vec<Float,dim> &point)
bool contains (const Vec<Float,dim> &point) const
{
bool ret = true;
for (int32 d = 0; d < dim; d++)
ret &= m_ranges[d].contains (point[d]);
return ret;
}

DRAY_EXEC
void clamp(Vec<Float, dim> &point) const
{
for (int32 d = 0; d < dim; ++d)
m_ranges[d].clamp(point[d]);
}

DRAY_EXEC
void expand (const float32 &epsilon)
{
Expand Down Expand Up @@ -170,6 +187,21 @@ template <int32 dim = 3> class AABB
return max_length;
}

DRAY_EXEC
float32 min_length () const
{
float32 min_length = m_ranges[0].length ();
for (int32 d = 1; d < dim; d++)
{
float32 length = m_ranges[d].length ();
if (length < min_length)
{
min_length = length;
}
}
return min_length;
}

DRAY_EXEC
float32 volume() const
{
Expand Down
58 changes: 49 additions & 9 deletions src/dray/array.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,30 @@
#include <dray/array.hpp>
#include <dray/array_internals.hpp>

#include <iostream>

namespace dray
{

template <typename T>
Array<T>::Array () : m_internals (new ArrayInternals<T> ()){};
Array<T>::Array ()
: m_internals (new ArrayInternals<T> ()),
m_size(0),
m_ncomp(0)
{ }

template <typename T>
Array<T>::Array (const T *data, const int32 size)
: m_internals (new ArrayInternals<T> (data, size)){};
Array<T>::Array (const T *data, const int32 size, const int32 ncomp)
: m_internals (new ArrayInternals<T> (data, size * ncomp)),
m_size(size),
m_ncomp(ncomp)
{ };

template <typename T> void Array<T>::set (const T *data, const int32 size)
template <typename T> void Array<T>::set (const T *data, const int32 size, const int32 ncomp)
{
m_internals->set (data, size);
m_internals->set (data, size * ncomp);
m_size = size;
m_ncomp = ncomp;
};

template <typename T> Array<T>::~Array ()
Expand All @@ -28,16 +39,30 @@ template <typename T> Array<T>::~Array ()
template <typename T> void Array<T>::operator= (const Array<T> &other)
{
m_internals = other.m_internals;
m_size = other.m_size;
m_ncomp = other.m_ncomp;
}

template <typename T> size_t Array<T>::size() const
{
return m_size;
}

template <typename T> int32 Array<T>::ncomp() const
{
return m_ncomp;
}

template <typename T> size_t Array<T>::size () const
template <typename T> size_t Array<T>::total_size () const
{
return m_internals->size ();
}

template <typename T> void Array<T>::resize (const size_t size)
template <typename T> void Array<T>::resize (const size_t size, const int32 ncomp)
{
m_internals->resize (size);
m_internals->resize (size * ncomp);
m_size = size;
m_ncomp = ncomp;
}

template <typename T> T *Array<T>::get_host_ptr ()
Expand All @@ -62,14 +87,20 @@ template <typename T> const T *Array<T>::get_device_ptr_const () const

template <typename T> void Array<T>::summary ()
{
m_internals->summary ();
m_internals->summary (std::cout);
}

template <typename T> void Array<T>::summary (std::ostream &out)
{
m_internals->summary (out);
}

template <typename T> T Array<T>::get_value (const int32 i) const
{
return m_internals->get_value (i);
}


// Type Explicit instatiations
template class Array<uint8>;
template class Array<int32>;
Expand Down Expand Up @@ -104,6 +135,7 @@ template class dray::Array<dray::Vec<dray::float32, 4>>;
template class dray::Array<dray::Vec<dray::float64, 4>>;

template class dray::Array<dray::Vec<dray::int32, 2>>;
template class dray::Array<dray::Vec<dray::int32, 3>>;
template class dray::Array<dray::Vec<dray::int32, 4>>;

#include <dray/matrix.hpp>
Expand Down Expand Up @@ -150,6 +182,9 @@ template class dray::Array<dray::RayHit>;
#include <dray/location.hpp>
template class dray::Array<dray::Location>;

#include <dray/face_location.hpp>
template class dray::Array<dray::FaceLocation>;

#include <dray/intersection_context.hpp>
template class dray::Array<dray::IntersectionContext>;

Expand All @@ -162,5 +197,10 @@ template class dray::Array<dray::stats::Stats>;
#include <dray/rendering/point_light.hpp>
template class dray::Array<dray::PointLight>;

#include <dray/rendering/path_data.hpp>
template class dray::Array<dray::Material>;
template class dray::Array<dray::RayData>;
template class dray::Array<dray::Sample>;

#include <dray/rendering/volume_partial.hpp>
template class dray::Array<dray::VolumePartial>;
Loading