createGrid | R Documentation |
Create a mesh for the integration.
createGrid(n, xmin, xmax, d.y, d.z, zmax, fine, double)
n |
[integer >0] the number of points for the mesh in the x direction. |
xmin |
[numeric] the minimal x value. |
xmax |
[numeric] the maximal x value. |
d.y |
[integer >0] the number of dimensions for the triangle. |
d.z |
[integer >0] the number of dimensions. |
zmax |
[numeric >0] the maximal z value (in absolute value). |
fine |
[logical] should the mesh be displayed? |
double |
[logical] should the grid be just outside the region of interest? Otherwise it will be just inside. |
This create a mesh for integrating over a triangular surface using rectangles. The domain is define by constrains on three types of variables:
the x variable: [unidimensional] that varies freely between [-xmax,-xmin] U [xmin,xmax].
the y variables: [dimension d.y] constrained to be lower in absolute value than the x variable. In 2D this corresponds to 2 triangles, and in higher dimension to cones/hypercones.
the z variables: [dimension d.z] constrained to vary between [-zmax,zmax].
The intersection of these three conditions define the domain.
The mesh is obtained slicing the triangles using rectangles.
A list containing:
grid: a data.frame
where each line corresponds to a point.
seqNames.min: a character
giving the name of the x,y variables (min).
seqNames.max: a character
giving the name of the x,y variables (max).
createGrid <- lavaSearch2:::createGrid
## no z
gridInt_2d <- createGrid(5, d.y = 1, xmin = 0, xmax = 4,
d.z = 0, fine = FALSE, double = FALSE)
gridExt_2d <- createGrid(5, d.y = 1, xmin = 0, xmax = 4,
d.z = 0, fine = FALSE, double = TRUE)
gridInt_4d <- createGrid(5, d.y = 3, xmin = 0, xmax = 4,
d.z = 0, fine = FALSE, double = FALSE)
gridExt_4d <- createGrid(5, d.y = 3, xmin = 0, xmax = 4,
d.z = 0, fine = FALSE, double = TRUE)
gridInt_2d <- createGrid(5, d.y = 1, xmin = 0, xmax = 4,
d.z = 0, fine = TRUE, double = FALSE)
## z
gridIntZ1_2d <- createGrid(5, d.y = 1, xmin = 0, xmax = 4,
d.z = 1, zmax = 2, fine = FALSE, double = FALSE)
gridExtZ1_2d <- createGrid(5, d.y = 1, xmin = 0, xmax = 4,
d.z = 1, zmax = 2, fine = FALSE, double = TRUE)
gridIntZ2_4d <- createGrid(5, d.y = 3, xmin = 0, xmax = 4,
d.z = 2, zmax = 2, fine = FALSE, double = FALSE)
gridExtZ2_4d <- createGrid(5, d.y = 3, xmin = 0, xmax = 4,
d.z = 2, zmax = 2, fine = FALSE, double = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.