Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ea5ca0b679 | ||
|
|
c6560acb4c |
+1
-1
@@ -7,6 +7,6 @@
|
|||||||
#define M (0.5*Rs)
|
#define M (0.5*Rs)
|
||||||
#define R0 (15*Rs)
|
#define R0 (15*Rs)
|
||||||
#define f(r) ((1.0-Rs/((double)r)))
|
#define f(r) ((1.0-Rs/((double)r)))
|
||||||
#define bmin (1.5*sqrt(3.0))
|
#define bmin (1.5*sqrt(3.0))+1e-5
|
||||||
#define THETAERROR 100000
|
#define THETAERROR 100000
|
||||||
|
|
||||||
|
|||||||
+5
-1
@@ -123,7 +123,7 @@ static void refine_interval(double xl, double xr, double yl, double yr, double r
|
|||||||
return ;
|
return ;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int init(double bmax, double rela_err_limit){
|
int init(double bmax, double rela_err_limit){
|
||||||
SampleData sample;
|
SampleData sample;
|
||||||
sample.capacity = 2;
|
sample.capacity = 2;
|
||||||
sample.size=2;
|
sample.size=2;
|
||||||
@@ -139,6 +139,10 @@ static int init(double bmax, double rela_err_limit){
|
|||||||
//sort
|
//sort
|
||||||
|
|
||||||
//output
|
//output
|
||||||
|
printf("Total sample points number: %d\n", sample.size);
|
||||||
|
for (int i = 0; i < sample.size; i++) {
|
||||||
|
printf("%.16g %.16g\n", sample.x[i], sample.y[i]);
|
||||||
|
}
|
||||||
|
|
||||||
free(sample.x);
|
free(sample.x);
|
||||||
free(sample.y);
|
free(sample.y);
|
||||||
|
|||||||
@@ -1 +1,2 @@
|
|||||||
double chi(double b);
|
double chi(double b);
|
||||||
|
int init(double bmax, double rela_err_limit);
|
||||||
|
|||||||
@@ -0,0 +1,8 @@
|
|||||||
|
#include "common.h"
|
||||||
|
#include "init.h"
|
||||||
|
|
||||||
|
int main(){
|
||||||
|
init(15.0, 1e-3);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user