Conversation
aburrell
left a comment
There was a problem hiding this comment.
Some comments, mostly on areas I'd like more comments :P. It'd probably be a good idea to run the files through a linter, too. I've never linted C/C++ code so any of my style suggestions are suspect. I made a few anyway, though, based on the dominant style of the current code.
aburrell
left a comment
There was a problem hiding this comment.
I found one small thing and made a suggestion. You can commit that suggestion directly, or edit it and commit it.
I am going to try and run this branch locally to ensure it runs on more than just your computer before approving. May be asking for help :P
include/constants.h
Outdated
| const float avogadros_number = 6.02214086e23; // | ||
| const float boltzmanns_constant = 1.38064852e-23; // m2 kg /s2 /K | ||
| const float mass_proton = 1.6726219e-27; // kg | ||
| const float avogadros_number = 6.02214086e23; // |
There was a problem hiding this comment.
| const float avogadros_number = 6.02214086e23; // | |
| const float avogadros_number = 6.02214086e23; // per mole |
|
Ok, I tried to compile the code and ran into a BUNCH of errors. If the code is not supposed to compile yet, I am ok approving. Otherwise, I can show you the errors. |
|
Ok. This is somewhat weird. I branched off of this branch to make the "indices" branch, and noticed a bunch of complication issues also. I wasn't sure if git got confused or whether I didn't commit things (or did commit things and didn't push them). So, I guess I should (a) check out the armadillo branch, (b) see if I can compile the code, (c) if I can/can't, fix the code, and commit changes, and (d) push the changes back to git hub. Right?????? |
|
Ok @aaronjridley I have been working on this with @Ionospheres and neither of us can get a working executable on the main branch. I am stuck with a compilation error and @Ionospheres fails in a more sinister fashion. So. I think we should perhaps get together and sort this out before changing more code. |
|
Ok, if I clone the repository and then checkout the armadillo branch then try to compile, is there where you all are stuck? |
|
When I do this, it definitely doesn't compile. Weird. I must have screwed up somewhere. I will fix, then commit and push. Then let you know when I finish this up. Sorry. |
|
Ok, the code should compile and run now. I had found all of these bugs in the "indices" branch. Oops. This must have been a mix-up in the commits and pushes and making new branches and stuff. I probably didn't push these or commit them or something and they got overwritten or something. But, it all works. |
|
I am having issues with netCDF/g++ so @aaronjridley I would recommend asking for a review from someone else. That way we can get this merged in whilst I continue to fix my setup. |
include/calc_chemistry.h
Outdated
| // Copyright 2020, the Aether Development Team (see doc/dev_team.md for members) | ||
| // Full license can be found in License.md | ||
|
|
||
| #ifndef AETHER_INCLUDE_CALC_CHEMISTRY_H_ |
There was a problem hiding this comment.
| #ifndef AETHER_INCLUDE_CALC_CHEMISTRY_H_ | |
| #ifndef INCLUDE_CALC_CHEMISTRY_H_ |
include/calc_chemistry.h
Outdated
| // Full license can be found in License.md | ||
|
|
||
| #ifndef AETHER_INCLUDE_CALC_CHEMISTRY_H_ | ||
| #define AETHER_INCLUDE_CALC_CHEMISTRY_H_ |
There was a problem hiding this comment.
| #define AETHER_INCLUDE_CALC_CHEMISTRY_H_ | |
| #define INCLUDE_CALC_CHEMISTRY_H_ |
include/calc_chemistry.h
Outdated
|
|
||
|
|
||
| #endif // AETHER_INCLUDE_CALC_CHEMISTRY_H_ | ||
| #endif // AETHER_INCLUDE_CALC_CHEMISTRY_H_ |
There was a problem hiding this comment.
| #endif // AETHER_INCLUDE_CALC_CHEMISTRY_H_ | |
| #endif // INCLUDE_CALC_CHEMISTRY_H_ |
include/grid.h
Outdated
| For example: | ||
| _s3gc : scalar variable, 3d, include ghost cells, cell centers | ||
| _31ne : | ||
| _31ne : |
There was a problem hiding this comment.
What would this one be an example of?
There was a problem hiding this comment.
Also there are _scgc in use later. This would be: scalar variable, cube?, include ghost cells, cell centers ?
include/euv.h
Outdated
| // Copyright 2020, the Aether Development Team (see doc/dev_team.md for members) | ||
| // Full license can be found in License.md | ||
|
|
||
| #ifndef AETHER_INCLUDE_EUV_H_ |
There was a problem hiding this comment.
| #ifndef AETHER_INCLUDE_EUV_H_ | |
| #ifndef INCLUDE_EUV_H_ |
include/euv.h
Outdated
| }; | ||
|
|
||
| #endif // AETHER_INCLUDE_EUV_H_ | ||
| #endif // AETHER_INCLUDE_EUV_H_ |
There was a problem hiding this comment.
| #endif // AETHER_INCLUDE_EUV_H_ | |
| #endif // INCLUDE_EUV_H_ |
Ionospheres
left a comment
There was a problem hiding this comment.
My first github review! Sorry for all of the update emails. Angeline showed me how to avoid that next time. Overall code looks good. I've made a few format suggestions so things are consistent between files. Outputs look reasonable given the resolutions, included physics, and the early state the model is in. It would be nice if the output netcdf files were formatted such that they work with panoply to facilitate quick viewing of simulation results. I'll learn how to make a feature request (?) and add that to our to-do list.
Description
Addresses #29 (at least partially, issue linked by @aburrell )
This brings in the changes of the code to go from 1d c-native arrays covering all three dimensions (with loops and look ups) to 3d armadillo arrays, which can be addressed directly (i, j, k) or through loop-less array math.
Type of change
How Has This Been Tested?
Yes, when you compare a 30 minute simulation with the c-native arrays and the armadillo arrays, they are very similar to each other, providing both thermospheric heating and ionization in the right places with the right magnitudes.
Test configuration
Checklist:
develop(notmaster) branchCHANGELOG.md, summarizing the changes