Lognormal radii from the pre-drawn radii list ignore the family's min and max radius
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 78/100
Research direction
Start in addRadii() in DFNGen/fractureEstimating.cpp and put its lognormal rejection loop side by side with the one in generatePoly() in DFNGen/insertShape.cpp, which already tests shapeFam.logMin and shapeFam.logMax. Decide whether the 3 * h floor and the h floor should match, then rerun the reproduction case (lognormal ellipse, stopCondition = 0, nPoly = 120, min 1.0 / max 10.0) and check the smallest value in dfnGen_output/radii.dat is at least min_radius. Done means the listed radii respect both bounds and the lognormal regression baselines have been regenerated.
Written by the indexing model from the issue text.
Description
Summary
For lognormal families, radii drawn into the pre-sampled radii list are not limited to the family's min_radius / max_radius. Accepted fractures can therefore be smaller than the prescribed minimum (or larger than the prescribed maximum).
Where
DFNGen/fractureEstimating.cpp, addRadii(), lognormal case:
double minRadius = 3 * h;
...
do {
radius = logDistribution(generator);
...
} while (radius < minRadius);
The only bound is 3 * h. shapeFam.logMin and shapeFam.logMax are never checked.
The on-demand sampler in DFNGen/insertShape.cpp (generatePoly()), used once the list is exhausted, does apply both bounds:
} while (radius < h || radius < shapeFam.logMin || radius > shapeFam.logMax);
The truncated power-law and exponential cases in addRadii() are not affected, because their bounds are passed to the sampler itself.
Which runs are affected
stopCondition = 0(nPoly): the whole radii list is built byaddRadii()throughgenerateRadiiLists_nPolyOption(), so every listed radius is unbounded.stopCondition = 1(P32): the extra radii added byaddRadiiToLists()(radiiListIncrease) are unbounded.
How to reproduce
One lognormal ellipse family, stopCondition = 0, nPoly = 120, radiiListIncrease = 0:
- domain 15 x 15 x 15,
h = 0.1 log_mean = ln(2),log_std = 0.5,min_radius = 1.0,max_radius = 10.0
Averaged over 20 seeds, the smallest accepted radius in dfnGen_output/radii.dat was 0.55, below the prescribed minimum of 1.0. The Kolmogorov-Smirnov distance between accepted radii and the truncated lognormal was 0.098, compared with 0.017 for a truncated power-law family run the same way.
Expected
Radii in the pre-drawn list respect logMin and logMax, as the on-demand sampler does.
Suggested fix
Use the same rejection condition in addRadii() as in generatePoly():
} while (radius < minRadius || radius < shapeFam.logMin || radius > shapeFam.logMax);
Two things to decide while fixing:
addRadii()uses a floor of3 * handgeneratePoly()usesh; these could be made consistent.- Fixing this changes the radii drawn for a given seed, so regression baselines for lognormal cases will need updating.
- Dominant language
- Python
- Stars
- 101
- Forks
- 56
- Avg merge
- 1m
- Merged PRs (30d)
- 9
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from lanl/dfnWorks
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Add Mesh Parameter ChecksMay be free again @hymanjd claimed this 477 days ago, and no pull request is open. Open
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
-
Indexing error when fractures are rejectedMay be free again @hymanjd claimed this 662 days ago, and no pull request is open. Open
-
Can't run particle tracking after pruning is completeMay be free again @hymanjd claimed this 759 days ago, and no pull request is open. Open
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
software-mansion-labs/Diplomat#20 ·
Maintainers usually reply within 1 day
-
[Windows] Hidden title bar: a maximized window restored from minimized on a secondary monitor gets the primary monitor's work area as its client areaPossibly taken @lijy91 claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
libnativeapi/nativeapi#53 · 1 reaction ·
Maintainers usually reply within 1 day
-
View Counts discarded due to field name mismatchPossibly taken @rsiva0400 claimed this today. Opensite-bug triage
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Model version publishes the new UK firm entity as a personPossibly taken @vahid-ahmadi claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
PolicyEngine/policyengine.py#764 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
spcl/HPCAgent-Bench#264 ·
Maintainers usually reply within 1 day