Neko 0.9.1
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 call get_command_argument(1, fname)
21
22 if (argc .eq. 2) then
23 call get_command_argument(2, output_)
24 call filename_suffix(output_, suffix)
25
26 if (suffix .ne. "nmsh") then
27 call neko_error("Invalid output format")
28 end if
29 else
30 call filename_chsuffix(fname, output_, 'nmsh')
31 end if
32
33
34 rea_file = file_t(fname)
35
36 msh%lgenc = .false.
37
38 call rea_file%read(msh)
39
40 nmsh_file = file_t(output_)
41
42 call nmsh_file%write(msh)
43
44 call msh%free()
45
46 call neko_finalize
47
48end program rea2nbin
Master module.
Definition neko.f90:34
subroutine neko_finalize(c)
Definition neko.f90:295
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