Nek5000
SEM for Incompressible NS
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
mesh_mod.F90
Go to the documentation of this file.
1 
2 module mesh
3  use kinds, only : dp
4  implicit none
5 
6  integer, allocatable :: vertex(:)
7  logical, allocatable :: ifdfrm(:) !>
8  logical, allocatable :: iffast(:) !>
9  logical :: ifsolv !>
10  integer :: niterhm
11  logical :: if_ortho = .true.
12 
13  real(DP) :: start_x(3)
14  real(DP) :: end_x(3)
15  integer :: shape_x(3)
16 
17  character(3) :: boundaries(6), tboundaries(6)
18 
19 
20  contains
21 
22  subroutine init_mesh()
23  use size_m, only : lelt, ldim
24  implicit none
25 
26  ifsolv = .false.
27  allocate(vertex((2**ldim)*lelt))
28  allocate(ifdfrm(lelt), iffast(lelt))
29 
30  end subroutine init_mesh
31 
32  function ieg_to_xyz(ieg) result(xyz)
33  integer, intent(in) :: ieg
34  integer :: xyz(3)
35 
36  xyz(1) = mod(ieg - 1, shape_x(1))
37  xyz(2) = mod((ieg-1)/shape_x(1), shape_x(2))
38  xyz(3) = mod((ieg-1)/(shape_x(1)*shape_x(2)), shape_x(3))
39 
40  end function ieg_to_xyz
41 
42  integer function xyz_to_ieg(xyz)
43  implicit none
44  integer, intent(in) :: xyz(3)
45  xyz_to_ieg = 1 + xyz(1) + xyz(2)*shape_x(1) + xyz(3)*shape_x(1)*shape_x(2)
46  return
47  end function xyz_to_ieg
48 
49 end module mesh
integer function xyz_to_ieg(xyz)
Definition: mesh_mod.F90:42
integer function, dimension(3) ieg_to_xyz(ieg)
Definition: mesh_mod.F90:32
cleaned
Definition: mesh_mod.F90:2
subroutine init_mesh()
Definition: mesh_mod.F90:22