Neko 0.9.99
A portable framework for high-order spectral element flow simulations
Loading...
Searching...
No Matches
map.f90
Go to the documentation of this file.
1
3module map
4 use mesh
5 implicit none
6
8 type :: map_t
9 integer :: nel, nlv
10 integer, allocatable :: imap(:)
11 integer, allocatable :: vertex(:,:)
12 end type map_t
13
14 interface map_init
15 module procedure map_init_nel_nelv, map_init_mesh
16 end interface map_init
17contains
18
19 subroutine map_init_mesh(m, msh)
20 type(map_t), intent(inout) :: m
21 type(mesh_t), intent(in) :: msh
22
23 call map_free(m)
24
25 m%nel = msh%nelv
26 m%nlv = msh%npts
27
28 call map_init_common(m)
29
30 end subroutine map_init_mesh
31
32 subroutine map_init_nel_nelv(m, nel, nlv)
33 type(map_t), intent(inout) :: m
34 integer, intent(in) :: nel
35 integer, intent(in) :: nlv
36
37 call map_free(m)
38
39 m%nel = nel
40 m%nlv = nlv
41
42 call map_init_common(m)
43
44 end subroutine map_init_nel_nelv
45
46 subroutine map_init_common(m)
47 type(map_t), intent(inout) :: m
48
49 allocate(m%imap(m%nel))
50
51 allocate(m%vertex(m%nlv, m%nel))
52
53 end subroutine map_init_common
54
55 subroutine map_free(m)
56 type(map_t), intent(inout) :: m
57
58 if (allocated(m%imap)) then
59 deallocate(m%imap)
60 end if
61
62 if (allocated(m%vertex)) then
63 deallocate(m%vertex)
64 end if
65 end subroutine map_free
66
67end module map
NEKTON map.
Definition map.f90:3
subroutine map_init_mesh(m, msh)
Definition map.f90:20
subroutine map_free(m)
Definition map.f90:56
subroutine map_init_nel_nelv(m, nel, nlv)
Definition map.f90:33
subroutine map_init_common(m)
Definition map.f90:47
Defines a mesh.
Definition mesh.f90:34
NEKTON vertex mapping.
Definition map.f90:8