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

Gray vs multigroup #5

Open
wants to merge 27 commits into
base: develop
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
41c4a45
ryan's mean singularity-opac
brryan Dec 18, 2024
acb2cfd
Multiple initialize commands
brryan Dec 18, 2024
86a9111
fix some issues
brryan Dec 18, 2024
a72bded
Sample MG CDF
brryan Dec 18, 2024
da7c6ec
n_nubinsd, emis poison fix, work on transporters
brryan Dec 18, 2024
a4b0491
Fixing little errors
brryan Dec 19, 2024
3ded5a3
Need to fix UpdateDerivedTransportFields
brryan Dec 20, 2024
f9f2a71
multiply Jnu by dnu
brryan Dec 20, 2024
0fc595b
fix cdf integration
brryan Dec 20, 2024
4d38f84
inf example cycles
brryan Dec 20, 2024
3643bc9
Modified inputs... but stepdiff is nan...
brryan Dec 20, 2024
d264ed0
OK stepdiff runs now but the test fails
brryan Dec 20, 2024
57f4fe1
Merge branch 'develop' into brryan/gray_vs_mg
brryan Jan 21, 2025
f026b92
Apply suggestions from code review
RyanWollaeger Jan 21, 2025
8ed3161
Make a few minor updates.
RyanWollaeger Jan 22, 2025
33d68b9
Cancel more exp(log()) occurrences.
RyanWollaeger Jan 22, 2025
5bffda0
Do not divide particle energy weight by frequency.
RyanWollaeger Jan 29, 2025
a11cc40
+ Update singularity-eos submodule for spiner (databox) update.
RyanWollaeger Feb 6, 2025
9a4c1f2
Include generated headers and add_subdirectory for singularity-eos.
RyanWollaeger Feb 6, 2025
9376c83
Attempt to fix grey DDMC.
RyanWollaeger Feb 6, 2025
b3149b0
Merge remote-tracking branch 'origin/develop' into brryan/gray_vs_mg
Feb 11, 2025
52d1d31
Use null initialization about constexpr branching
Feb 11, 2025
cd8a11c
Fix scope issue in tasklist construction
Feb 11, 2025
e641386
Update patch path
Feb 11, 2025
27f5216
Add frequency redistribution from effective scattering to transport.cpp.
RyanWollaeger Feb 12, 2025
116f682
Add 16-group multigroup version of inf.in (infinite medium) input.
RyanWollaeger Feb 12, 2025
ded7e89
Bump parth and singularity-eos
Feb 20, 2025
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
Apply suggestions from code review
+ Cancel log and exponential where possible.
+ Add comment explaining nu formula is log-space group midpoint.
RyanWollaeger authored Jan 21, 2025
commit f026b921f21aba497a72b10a978a969ea876c40b
8 changes: 5 additions & 3 deletions src/jaybenne/sourcing.cpp
Original file line number Diff line number Diff line change
@@ -116,14 +116,16 @@ TaskStatus SourcePhotons(T *md, const Real t_start, const Real dt) {
} else if constexpr (FT == FrequencyType::multigroup) {
// Construct emission CDF
const Real dlnu = (std::log(numaxd) - std::log(numind)) / n_nubinsd;
Real nu = std::exp(std::log(numind) + 0.5 * dlnu);
// this is the mid-point of the 1st group in log-space: nu=exp(log(numin) + 0.5*dlnu)
Real nu = numind * std::exp(0.5 * dlnu);
Real dnu = nu * dlnu;
vmesh(b, fj::emission_cdf(0), k, j, i) =
opac.EmissivityPerNu(rho, temp,
std::exp(std::log(numind) + 0.5 * dlnu)) *
numind * std::exp(0.5 * dlnu)) *
dnu;
for (int n = 1; n < n_nubinsd; n++) {
nu = std::exp(std::log(numind) + (n + 0.5) * dlnu);
// this is the mid-point of group n in log-space: nu=exp(log(numin)+(n+0.5)*dlnu)
nu = numind * std::exp((n + 0.5) * dlnu);
dnu = dlnu * nu;
vmesh(b, fj::emission_cdf(n), k, j, i) =
opac.EmissivityPerNu(rho, temp, nu) * dnu +