balglave / base_ex

0 stars 0 forks source link

book.mesh.dual function #1

Open justoneee opened 10 months ago

justoneee commented 10 months ago

Thanks for the code and your research, I had to use inla for my recent research as well, but the line https://github.com/balglave/base_ex/blob/7366982c2e9a8ac3c6fc974cdd4432623d2dcf70/r/rinla_st.R#L11 The book.mesh.dual function used inside the code (https://github.com/balglave/base_ex/blob/7366982c2e9a8ac3c6fc974cdd4432623d2dcf70/r/functions/spde-book- files/R/spde-book-functions.R) which is not an official function of inla, but I can't find any explanation of this function from other places I searched. What are its input data and output data? It is very infected that you help me still start to learn inla.

balglave commented 10 months ago

Hi, You'll find the function here at line 61. It is from the github book "Advanced Spatial Modeling with Stochastic Partial Differential Equations Using R and INLA" by Krainsky et al. This functions allows to make the dual mesh based on an INLA mesh. The input is a mesh and the output a SpatialPolygon. See this link Figure 2.7 for an example.