You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
385 B
C
21 lines
385 B
C
#include "genlib.h"
|
|
#include "log.h"
|
|
#include <math.h>
|
|
#include <stdio.h>
|
|
|
|
/*spherical covariance function*/
|
|
double spherical(double h) {
|
|
double z;
|
|
log_info("RESULT = in progress, h = %f", h);
|
|
|
|
if (h >= 1.) {
|
|
z = 0.;
|
|
} else {
|
|
z = 1. - 1.5 * (double)h + 0.5 * (double)(h * h * h);
|
|
}
|
|
|
|
log_info("RESULT = success, z = %f", z);
|
|
|
|
return z;
|
|
}
|