-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
143 changed files
with
615 additions
and
314 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
2017-2022 King Abdullah University of Science and | ||
* Technology (KAUST). All rights reserved. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
0.3.0 | ||
0.3.1 |
Submodule ecrc
updated
57 files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
/*! @copyright (c) 2017-2022 King Abdullah University of Science and | ||
* Technology (KAUST). All rights reserved. | ||
* | ||
* STARS-H is a software package, provided by King Abdullah | ||
* University of Science and Technology (KAUST) | ||
* | ||
* @file examples/problem/spatial_non_gaussian.c | ||
* @version 0.3.1 | ||
* @author Sameh Abdulah | ||
* @date 2020-06-09 | ||
* */ | ||
|
||
#include <stdio.h> | ||
#include <stdlib.h> | ||
#include <starsh.h> | ||
#include <starsh-spatial.h> | ||
|
||
int main(int argc, char **argv) | ||
{ | ||
int problem_ndim = 2; | ||
// Possible values for kernel_type are: | ||
int kernel_type = STARSH_SPATIAL_NON_GAUSSIAN_SIMD; | ||
// Correlation length | ||
double beta = 0.1; | ||
// Smoothing parameter for Matern kernel | ||
double nu = 0.5; | ||
// Scaling factor | ||
double sigma = 1.0; | ||
// Set level of noise | ||
double noise = 0; | ||
// Bivariate correlation | ||
double corr = 0.1; | ||
// Size of desired matrix | ||
int N = 5000; | ||
// 'N' for nonsymmetric matrix and 'd' for double precision | ||
char symm = 'N', dtype = 'd'; | ||
int ndim = 2; | ||
STARSH_int shape[2] = {N, N}; | ||
// OBSOLETE3 for kernel PARSIMONIOUS and | ||
// OBSOLETE4 for kernel PARSIMONIOUS2 | ||
enum STARSH_PARTICLES_PLACEMENT place = STARSH_PARTICLES_OBSOLETE1; | ||
int info; | ||
srand(0); | ||
// Generate data for spatial statistics problem | ||
STARSH_ssdata *data; | ||
STARSH_kernel *kernel; | ||
// STARSH_SPATIAL for spatial statistics problem | ||
// kernel_type is enum type, for possible values look into starsh-spatial.h | ||
// STARSH_SATIAL_NDIM to indicate next parameter shows dimensionality of | ||
// spatial statistics problem | ||
// STARSH_SPATIAL_BETA to indicate next parameter is correlation length | ||
// STARSH_SPATIAL_NU to indicate next parameter is smoothing parameter for | ||
// Matern kernel | ||
// STARSH_SPATIAL_NOISE to indicate next parameter is a noise | ||
// 0 at the end to indicate end of arguments | ||
info = starsh_application((void **)&data, &kernel, N, dtype, | ||
STARSH_SPATIAL, kernel_type, STARSH_SPATIAL_NDIM, problem_ndim, | ||
STARSH_SPATIAL_BETA, beta, STARSH_SPATIAL_NU, nu, | ||
STARSH_SPATIAL_NOISE, noise, STARSH_SPATIAL_PLACE, place, | ||
STARSH_SPATIAL_SIGMA, 1.0, | ||
0); | ||
if(info != 0) | ||
{ | ||
printf("wrong parameters for the non-gaussian spatial statistics problem\n"); | ||
return info; | ||
} | ||
// Init problem with given data and kernel and print short info | ||
STARSH_problem *problem; | ||
info = starsh_problem_new(&problem, ndim, shape, symm, dtype, data, data, | ||
kernel, "Spatial Statistics example"); | ||
if(info != 0) | ||
{ | ||
printf("Error in starsh problem\n"); | ||
exit(info); | ||
} | ||
printf("STARSH problem was succesfully generated\n"); | ||
starsh_problem_info(problem); | ||
// Compute dense matrix | ||
Array *array; | ||
info = starsh_problem_to_array(problem, &array); | ||
if(info != 0) | ||
{ | ||
printf("Error when computing matrix elements\n"); | ||
exit(info); | ||
} | ||
printf("Matrix was successfully computed\n"); | ||
return 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.