Neko 0.9.99
A portable framework for high-order spectral element flow simulations
Loading...
Searching...
No Matches
rea2nbin.f90
Go to the documentation of this file.
1program rea2nbin
2 use neko
3 implicit none
4
5 character(len=NEKO_FNAME_LEN) :: fname, output_
6 type(mesh_t) :: msh
7 type(file_t) :: rea_file, nmsh_file
8 integer :: argc
9 character(len=80) :: suffix
10
11 argc = command_argument_count()
12
13 if ((argc .lt. 1) .or. (argc .gt. 2)) then
14 write(*,*) 'Usage: ./rea2nbin <reafile> <neko mesh>'
15 stop
16 end if
17
18 call neko_init
19
20 if (pe_size .gt. 1) then
21 call neko_error("rea2nbin can only run on 1 rank")
22 end if
23
24 call get_command_argument(1, fname)
25 call filename_suffix(fname, suffix)
26 if (suffix .ne. "re2") then
27 call neko_error("rea is no longer supported. Please convert to re2 first")
28 end if
29
30 if (argc .eq. 2) then
31 call get_command_argument(2, output_)
32 call filename_suffix(output_, suffix)
33
34 if (suffix .ne. "nmsh") then
35 call neko_error("Invalid output format")
36 end if
37 else
38 call filename_chsuffix(fname, output_, 'nmsh')
39 end if
40
41
42 rea_file = file_t(fname)
43
44 msh%lgenc = .false.
45
46 call rea_file%read(msh)
47
48 nmsh_file = file_t(output_)
49
50 call nmsh_file%write(msh)
51
52 call msh%free()
53
54 call neko_finalize
55
56end program rea2nbin
Master module.
Definition neko.f90:34
subroutine neko_finalize(c)
Definition neko.f90:303
subroutine neko_init(c)
Definition neko.f90:130
Neko binary mesh data.
Definition nmsh_file.f90:34
NEKTON session data reader.
Definition rea_file.f90:35
program rea2nbin
Definition rea2nbin.f90:1