createGrid {lavaSearch2}R Documentation

Create a Mesh for the Integration

Description

Create a mesh for the integration.

Usage

createGrid(n, xmin, xmax, d.y, d.z, zmax, fine, double)

Arguments

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.

Details

This create a mesh for integrating over a triangular surface using rectangles. The domain is define by constrains on three types of variables:

The intersection of these three conditions define the domain.

The mesh is obtained slicing the triangles using rectangles.

Value

A list containing:

Examples

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)


[Package lavaSearch2 version 2.0.3 Index]