Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add an Optical WLS #1507

Merged
merged 15 commits into from
Dec 4, 2024
Merged
Changes from 1 commit
Commits
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
Prev Previous commit
Next Next commit
Fix a warning from the window build: conversion from celeritas::real_…
…type to int
Soon Yung Jun committed Nov 15, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit 6d67e0e7daa6efcedb2777daa87b167a7d162aec
3 changes: 2 additions & 1 deletion test/celeritas/optical/WavelengthShift.test.cc
Original file line number Diff line number Diff line change
@@ -144,12 +144,13 @@
EXPECT_VEC_EQ(expected_num_secondaries, num_secondaries);
}

TEST_F(WavelengthShiftTest, wls_stress)

Check failure on line 147 in test/celeritas/optical/WavelengthShift.test.cc

GitHub Actions / JUnit Test Report

/home/runner/work/celeritas/celeritas/test/celeritas/optical/WavelengthShift.test.cc.wls_stress

/home/runner/work/celeritas/celeritas/test/celeritas/optical/WavelengthShift.test.cc:226 Values in: avg_time Expected: expected_avg_time 4 of 4 elements differ by 9.9999999999999998e-13 relative error or 1e-14 absolute error i expected_avg_time avg_time Difference 0 1.08250310854364e-09 1.08250310854364 999999999.000003 1 1.01943566892086e-09 1.01943566892086 999999999.000001 2 1.05383398761085e-09 1.05383398761085 999999999.000002 3 9.64465413967612e-10 0.964465413967613 999999999.000001
Raw output
/home/runner/work/celeritas/celeritas/test/celeritas/optical/WavelengthShift.test.cc:226
Values in: avg_time
 Expected: expected_avg_time
4 of 4 elements differ
by 9.9999999999999998e-13 relative error or 1e-14 absolute error
i   expected_avg_time           avg_time         Difference
0 1.08250310854364e-09    1.08250310854364    999999999.000003
1 1.01943566892086e-09    1.01943566892086    999999999.000001
2 1.05383398761085e-09    1.05383398761085    999999999.000002
3 9.64465413967612e-10   0.964465413967613    999999999.000001

Check failure on line 147 in test/celeritas/optical/WavelengthShift.test.cc

GitHub Actions / JUnit Test Report

/home/runner/work/celeritas/celeritas/test/celeritas/optical/WavelengthShift.test.cc.wls_stress

/home/runner/work/celeritas/celeritas/test/celeritas/optical/WavelengthShift.test.cc:226 Values in: avg_time Expected: expected_avg_time 4 of 4 elements differ by 9.9999999999999998e-13 relative error or 1e-14 absolute error i expected_avg_time avg_time Difference 0 1.08250310854364e-09 1.08250310854364 999999999.000003 1 1.01943566892086e-09 1.01943566892086 999999999.000001 2 1.05383398761085e-09 1.05383398761085 999999999.000002 3 9.64465413967612e-10 0.964465413967613 999999999.000001
Raw output
/home/runner/work/celeritas/celeritas/test/celeritas/optical/WavelengthShift.test.cc:226
Values in: avg_time
 Expected: expected_avg_time
4 of 4 elements differ
by 9.9999999999999998e-13 relative error or 1e-14 absolute error
i   expected_avg_time           avg_time         Difference
0 1.08250310854364e-09    1.08250310854364    999999999.000003
1 1.01943566892086e-09    1.01943566892086    999999999.000001
2 1.05383398761085e-09    1.05383398761085    999999999.000002
3 9.64465413967612e-10   0.964465413967613    999999999.000001
{
int const num_samples = 128;

ScalarPropertyWLS wls_scalars = data_.wls_scalars[material_id_];
this->resize_secondaries(num_samples * wls_scalars.mean_num_photons * 4);
this->resize_secondaries(
num_samples * static_cast<int>(wls_scalars.mean_num_photons) * 4);
auto& rng_engine = this->rng();
Real3 const inc_dir = {0, 0, 1};