Skip to content

Commit

Permalink
Create tests of Star classes (#13)
Browse files Browse the repository at this point in the history
* only minor edits to stars

* many star tests working

* up to mesa tests passing

* update cppcheck step to checkout@v4

* undo makefile change

* fixup! undo makefile change

un-re-undo the makefile change

* try test listener directly

* try updating homebrew

* fixup! try updating homebrew

undo changes to try to make cxxtets work on maxos runners

* windows build works now

---------

Co-authored-by: rboston628@gmail.com <grpulse@GRPulse.local>
Co-authored-by: rboston628@gmail.com <grpulse@GRPulse.attlocal.net>
  • Loading branch information
3 people authored May 1, 2024
1 parent 66f31bc commit 1381a0e
Show file tree
Hide file tree
Showing 11 changed files with 980 additions and 323 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ If you adapt parts of this code, do not remove the attributions in the source.

If you borrow parts of this code, in addition to citing the above in publication, include attribution `borrowed from THRAIN, Reece Boston 2022` in your source code.

![image](https://github.com/rboston628/THRAIN/blob/main/documentation/thrain.png)
![image](https://github.com/rboston628/THRAIN/blob/main/documentation/thrain.png)
8 changes: 4 additions & 4 deletions lib/chandra.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ double Chandrasekhar::factor_f(double x){
}

double Chandrasekhar::factor_g(double x){
return 8.*x*x*x*(sqrt(1.+x*x) - 1.0) - factor_f(x);
return 8.*x*x*x*(sqrt(1.+x*x) - 1.0) - factor_f(x);
}

// double factor_h(double x){
// return x*x*x + (A0/B0/C_CGS/C_CGS)*factor_g(x);
// }
double Chandrasekhar::factor_h(double x, double sigma, double mue=1.0){
return mue*x*x*x + sigma*factor_g(x);
}


//methods usign the weights and abscissae of Sagar 1991
Expand Down
11 changes: 8 additions & 3 deletions lib/chandra.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,20 @@
#include "../src/constants.h"

namespace Chandrasekhar {
const double A0 = 6.0406e22;
const double B0 = 9.8848e5;
double const A0 = 6.0406e22;
double const B0 = 9.8848e5;

//these values taken from Chandrasekhar 1932, pg 416 in Dover reprint
double const A01939 = 6.01e22;
double const B01939 = 9.82e5;

double factor_f(double x);
double factor_g(double x);
// double factor_h(double x);
double factor_h(double x, double, double);
}

namespace FermiDirac {
const double m_pi = 3.141592653589793;
//Abscissae (x) and weights (w) for 24-point Gauss quadrature method due to Sagar 1991
static const double xFermiDirac1Half[] = {
1.065765457622244303e-01, 4.230728669515992804e-01, 9.419850084605768359e-01,
Expand Down
Loading

0 comments on commit 1381a0e

Please sign in to comment.