struct my_f_params {int a; int b;};
gsl_function F1;
struct my_f_params alpha = {2,2};
F1.function = &f1;
F1.params = & alpha;
struct my_f_params * params = (struct my_f_params *)p;
int n = (params->a);
int m = (params->b);
----------
double params[] = { y, z };
F.params = params;
double y = ((double *)params)[0];
double z = *((double *)p+1);
Interested in particle astrophysics and plasma astrophysics. This blog is my research/private notebook.
Thursday, August 1, 2024
pass parameters in GSL integration
Thursday, June 6, 2024
Levi-Civita symbol and cross product
Sunday, May 26, 2024
Tools
https://www.oacommunity.org/resources
// resources related to academic writing
Resources: applying for PhD / Postdoc / Faculty and more
save website as pdf https://pdfmage.org/
Monday, March 11, 2024
Sunday, January 21, 2024
Tuesday, December 19, 2023
citation map
https://jokergoo.github.io/2023/02/18/generate-citation-map/
library(V8)
ct = v8()
ct$source("~/citation.json")
citation = ct$get("citation")
results = citation$results[, 1:4] head(results)
tb = data.frame(address = tapply(results$address, results$address, function(x) x[1]), publicationCount = tapply(results$publicationCount, results$address, sum), lat = tapply(results$lat, results$address, mean), lon = tapply(results$lon, results$address, mean))
library("sf") library("rnaturalearth") library("rnaturalearthdata") world = ne_countries(scale = "medium", returnclass = "sf") library(ggplot2) library(ggrepel) library(RColorBrewer) ggplot(data = world) + geom_sf(color = "grey", fill = NA) + geom_point(data = tb[order(tb$publicationCount), ], aes(x = lon, y = lat, color = publicationCount, size = publicationCount)) + scale_colour_gradientn(colours = rev(brewer.pal(9, "Spectral"))) + scale_size(range = c(0.2, 3)) + geom_text_repel(data = tb[order(-tb$publicationCount)[1:20], ], mapping = aes(x = lon, y = lat, label = gsub(", .*$", "", address)), box.padding = 0.5, max.overlaps = Inf, min.segment.length = 0, size = 3)
https://guides.library.harvard.edu/c.php?g=311134&p=4423814