-
Notifications
You must be signed in to change notification settings - Fork 56
new colors branch with clean history #841
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
Conversation
… data has been extracted
…MESAHub/mesa into features/nialljmiller/customcolors_data
| character(len=strlen) :: color_file_names !(max_num_color_files) | ||
| integer :: color_num_colors !(max_num_bcs_per_file) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we still use this variable at all, and it really is now scalar instead of array? Or should we just delete it entirely?
| character(len=strlen) :: color_file_names !(max_num_color_files) | |
| integer :: color_num_colors !(max_num_bcs_per_file) |
colors/private/hermite_interp.f90
Outdated
| min_dist = ABS(x_val - x_grid(1)) | ||
| i_x = 1 | ||
| DO i = 2, SIZE(x_grid) | ||
| dist = ABS(x_val - x_grid(i)) | ||
| IF (dist < min_dist) THEN | ||
| min_dist = dist | ||
| i_x = i | ||
| END IF | ||
| END DO |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we use the Fortran instrinsic MINLOC here? Something like
| min_dist = ABS(x_val - x_grid(1)) | |
| i_x = 1 | |
| DO i = 2, SIZE(x_grid) | |
| dist = ABS(x_val - x_grid(i)) | |
| IF (dist < min_dist) THEN | |
| min_dist = dist | |
| i_x = i | |
| END IF | |
| END DO | |
| i_x = MINLOC(ABS(x_val - x_grid)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, I have changed this. Thank you
colors/private/hermite_interp.f90
Outdated
| FUNCTION h00(t) RESULT(h) | ||
| REAL(dp), INTENT(IN) :: t | ||
| REAL(dp) :: h | ||
| h = 2.0_dp*t**3 - 3.0_dp*t**2 + 1.0_dp |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For bit-for-bit reproducibility, use pow or powN from our math_lib, or just write the multiplications out explicitly. E.g.
| h = 2.0_dp*t**3 - 3.0_dp*t**2 + 1.0_dp | |
| h = 2.0_dp*t*t*t - 3.0_dp*t*t + 1.0_dp |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you I did not know that
|
Many of the DEALLOCATE statements at the end of routines are superfluous -- allocatable arrays that are allocated inside a routine are automatically deallocated on exit (unless they are dummy arguments). |
…ed some of the interpolation code from Warricks suggestion.
| self.ax.set_ylim(self.ylim) | ||
| plt.tight_layout() | ||
|
|
||
| def parse_inlist_file(self, inlist_path="../inlist_colors"): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This function is already defined above in the class? Is this re-definition needed/used?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was a mistake as I was working to remove pandas dependency. I have changed this now.
…MESAHub/mesa into features/nialljmiller/customcolors_data
…out by andysantarelli
meant to replace: #786
Todo:
run_stars_extras.f90