Merged
Conversation
systems. For qhull at least this is reflected in optional lines in the Makefile; however it is a bit clunky to constantly have to hack this. Thus I've added some lines to the Makefile which test the presence of an envar ALLEGRO. This should be seen as a temporary solution: eventually we should perhaps have a proper config script.
…ectives at the start of grid.c and smooth.c.
… can set a TEST flag at the compilation step which initializes the GSL random number generators with fixed-value seeds, rather than using the output of time(0), which however remains the default. This should make it easier to examine the effect of ongoing code modifications because with fixed seeds, the output of the program should not vary from one run to another. The modifications were performed to the src/ files aux.c, grid.c, predefgrid.c and raytrace.c.
…hem with simple products. Modules and (starting) line numbers affected: aux.c: line 306. getclosest.c: line 36. grid.c: lines 127, 211, 461. magfieldfit.c: lines 175, 342, 348, 520. molint.c: lines 100, 103. photon.c: lines 74, 80, 163. raytrace.c: line 145. report.c: lines 39, 85. smooth.c: lines 42, 71. sourcefunc.c: lines 87, 90, 92. velospline.c: line 43. writefits.c: lines 103, 107. The fits output looks unchanged.
…irly radically modified 2 nested loops to avoid unnecessary calls to sqrt() and to have a more robust starting condition for finding the extrema of a list.
aux.c: added a warning when no lines. aux.c: removed a bit of white space. curses.c: #include "lime.h" curses.c: remove unused argument specnumber from collpartmesg(). grid.c: fixed bug in which .neigh attribute of a struct grid, which is a double pointer to struct grid, was malloc'd to the size of the struct, not a pointer to the struct. grid.c: pts[i].vps is now initialized to 0 at line 306. grid.c: test pts[i].vps>0 with exit on failure at line 355. grid.c: incorrect grid attribute mallocs fixed at line 458. photon.c: fixed some inconsistent indenting and got rid of some unnecessary whitespace. predefgrid.c: incorrect grid attribute malloc fixed at line 47. ratraninput.c: fixed bug at line 42 in which char was incremented rather than its pointer. stateq.c: fixed some inconsistent indenting. stateq.c: Added an exception at line 102 for when m[ispec].nlev<=0. # Please enter the commit message for your changes. Lines starting
aux.c:85 Set the values of new attributes radiusSqu and minScaleSqu to inputPars. lime.h:58 Added new attributes radiusSqu and minScaleSqu to inputPars. grid.c, ratraninput.c, raytrace.c, smooth.c, stokesangles.c: replaced unnecessary calls to sqrt(), sin(), cos().
getclosest.c:35 grid.c:271 * I fixed some inconsistent indenting in smooth.c and velospline.c. * The velocity() function in example/model.c should be much faster now!
- Made raytracing faster by moving the sine/cosine calculation outside the loop at line 113.
- Halved the number of calls to exp() in photon.photon() and photon.getjbar().
Contributor
|
A note on commit messages: a common practice for Git is to start the message with a short (50 char of less) description of the commit, followed by a more complete description of the changes, if needed. This makes the code changes easier to follow both on GitHub, and with the command line ( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
(i) Replaced unnecessary calls to pow(), sqrt(), sin(), cos().
(ii) Introduced a test condition which fixes all the random seeds.
(iii) Increased the platform flexibility slightly.