mesh Module

Subroutines

public subroutine uniformmesh(x1, x2, delta_x, n_x, x)

Arguments

Type IntentOptional AttributesName
real(kind=8), intent(in) :: x1

the left size of the mesh boundary

real(kind=8), intent(in) :: x2

the right side of the mesh boundary

real(kind=8), intent(in) :: delta_x

the largest element size

integer(kind=4), intent(out) :: n_x

the number of mesh elements

real(kind=8), , dimension(:), allocatable:: x

the mesh midpoints

Description

creates a uniform mesh with size delta_x

public subroutine nonuniformmesh(x1, x2, delta_x, delta_x_min, n_x, x)

Arguments

Type IntentOptional AttributesName
real(kind=8), intent(in) :: x1

the left size of the mesh boundary

real(kind=8), intent(in) :: x2

the right side of the mesh boundary

real(kind=8), intent(in) :: delta_x

the largest element size

real(kind=8), intent(in) :: delta_x_min

the smallest element size

integer(kind=4), intent(out) :: n_x

the number of mesh elements

real(kind=8), , dimension(:), allocatable:: x

the mesh midpoints

Description

creates a nonuniform mesh with size varying from delta_x_min on the left edge of the boundary to delta_x on the right edge of the boundary. The element sizes vary as \(\log\left(\frac{a}{a^{n}}\right)\)