Comments (1)
So FRENDY does seem to behave better than NJOY, as I have yet to see a TSL ACE produced by FRENDY which has a negative PDF (though that doesn't mean it isn't possible). That being said, after testing all of the TSLs at all temperatures in Lib80x, it appeared that all of the negative values had a magnitude smaller than 1.E-15
, and most were to the order of 1.E-20
. From this, I now check the magnitude of the negative value: if the value has a magnitude smaller than 1.E-15
, it is simply set to zero, otherwise the exception is still thrown. This maybe isn't the ideal solution, but if PNDL is going to be able to read/use any TSLs produced with NJOY, it seems necessary.
After correcting this problem, other errors were encountered, as there were many instances of the equiprobable discrete angles not being sorted. This could be a problem when performing the smearing operation. To fix this, I simply sort the angles if they are not sorted, and then continue with the other checks (like making sure all angles are in [-1, 1], etc.). While FRENDY didn't seem to produce negative PDF values, it did generate some files where the cosines also were not sorted.
With these two modifications, it is now possible to read all of the TSLs from Lib80x, without any exceptions being thrown.
from papillon-ndl.
Related Issues (8)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from papillon-ndl.