20 TYPE(mesh_type) :: p1_mesh_glob, p2_mesh_glob, p2_c0_mesh_glob_temp
22 TYPE(mesh_type),
TARGET :: h_mesh, phi_mesh
23 TYPE(mesh_type),
TARGET :: h_mesh_glob, phi_mesh_glob
24 TYPE(mesh_type),
POINTER :: h_mesh_in, h_mesh_out, phi_mesh_in, phi_mesh_out
26 TYPE(mesh_type),
TARGET :: vv_mesh, pp_mesh
27 TYPE(mesh_type),
TARGET :: vv_mesh_glob, pp_mesh_glob
28 TYPE(mesh_type),
POINTER :: vv_mesh_in, vv_mesh_out, pp_mesh_in, pp_mesh_out
32 TYPE(mesh_type),
POINTER :: temp_mesh_in, temp_mesh_out
34 CHARACTER(len=200) :: old_filename, old_directory
35 CHARACTER(len=200) :: new_filename, new_directory
36 CHARACTER(len=200) :: file_name, directory
37 CHARACTER(len=200) :: file_name_m, directory_m
38 LOGICAL :: if_momentum, if_mass, if_induction, if_energy, &
39 old_is_form, new_is_form, iformatted, is_form_m, mono_in, mono_out, is_in, &
40 dom_h_larger_dom_ns, dom_temp_larger_dom_ns, &
41 if_temperature_in, if_temperature_out, if_temperature, if_level_set, inter_mesh, &
42 rw_ns, rw_temp, rw_mxw, check_plt, test, if_select
44 INTEGER :: nb_s, nb_f, nb_procs, rank, type_fe_h, type_fe_phi, &
45 nb_dom_ns, nb_dom_temp, nb_dom_h, nb_dom_phi, nsize, code, m, &
46 m_max_c, rank_s, nb_inter, nb_inter_mu, nb_inter_v_t, &
47 k, kp, i, nb_mode, rang_ns_s, rang_temp_s, rang_s, l, lblank, nb_fluid
48 INTEGER :: nb_fic, index_start
49 REAL(KIND=8) :: time_h, time_u, time_t, max_vel
52 INTEGER,
DIMENSION(:),
ALLOCATABLE :: list_inter, list_inter_temp, list_inter_v_t, &
53 list_inter_mu, list_inter_h_phi, list_dom_h, &
54 list_dom_ns, list_dom_temp, list_dom_temp_in, list_dom_phi, list_dom_h_in, list_dom, part, &
55 list_mode, controle_h, controle_phi, &
56 controle_vv, controle_pp, controle_temp, temp_in_to_new, h_in_to_new, &
57 l_t_g_vv, l_t_g_pp, l_t_g_h, l_t_g_phi, l_t_g_temp
59 REAL(KIND=8),
DIMENSION(:,:,:),
POINTER :: hn, hn1, bn, bn1, phin, phin1
60 REAL(KIND=8),
DIMENSION(:,:,:),
POINTER :: hn_glob, hn1_glob, bn_glob, bn1_glob, phin_glob, phin1_glob
61 REAL(KIND=8),
DIMENSION(:,:,:),
POINTER :: un, un_m1, pn, pn_m1
62 REAL(KIND=8),
DIMENSION(:,:,:),
POINTER :: incpn, incpn_m1, tempn, tempn_m1
63 REAL(KIND=8),
DIMENSION(:,:,:,:),
POINTER :: level_setn, level_setn_m1
64 REAL(KIND=8),
DIMENSION(:,:,:),
POINTER :: un_glob, un_m1_glob, pn_glob, pn_m1_glob
65 REAL(KIND=8),
DIMENSION(:,:,:),
POINTER :: incpn_glob, incpn_m1_glob, tempn_glob, tempn_m1_glob
66 REAL(KIND=8),
DIMENSION(:,:,:,:),
POINTER :: level_setn_glob, level_setn_m1_glob
68 REAL(KIND=8),
DIMENSION(:,:,:),
POINTER :: hn_in, hn1_in, bn_in, bn1_in, phin_in, phin1_in
69 REAL(KIND=8),
DIMENSION(:,:,:),
POINTER :: hn_out, hn1_out, bn_out, bn1_out, phin_out, phin1_out
70 REAL(KIND=8),
DIMENSION(:,:,:),
POINTER :: un_in, un_m1_in, pn_in, pn_m1_in
71 REAL(KIND=8),
DIMENSION(:,:,:),
POINTER :: incpn_in, incpn_m1_in, tempn_in, tempn_m1_in
72 REAL(KIND=8),
DIMENSION(:,:,:,:),
POINTER :: level_setn_in, level_setn_m1_in
73 REAL(KIND=8),
DIMENSION(:,:,:),
POINTER :: un_out, un_m1_out, pn_out, pn_m1_out
74 REAL(KIND=8),
DIMENSION(:,:,:),
POINTER :: incpn_out, incpn_m1_out, tempn_out, tempn_m1_out
75 REAL(KIND=8),
DIMENSION(:,:,:,:),
POINTER :: level_setn_out, level_setn_m1_out
77 CHARACTER(len=3) :: type_pb, tit_m, tit_s, tit
78 CHARACTER(len=4) :: tit_part
79 CHARACTER(len=200) :: mesh_part_name
81 LOGICAL :: if_read_partition
83 #include "petsc/finclude/petsc.h"
85 mpi_comm,
DIMENSION(:),
POINTER :: comm_one_d, comm_one_d_ns, comm_one_d_temp, coord_cart
86 petscerrorcode :: ierr
88 CALL petscinitialize(petsc_null_character,ierr)
89 CALL mpi_comm_rank(petsc_comm_world, petsc_rank, code)
91 OPEN(unit=22, file=
'data_interpol', status=
'unknown', access=
'sequential')
97 CALL
read_until(22,
'===Number of processors in meridian section (Input)')
99 CALL
read_until(22,
'===Problem type (Input): (nst, mxw, mhd, fhd)')
101 CALL
find_string(22,
'===Is there an input temperature field?', test)
103 READ (22, *) if_temperature_in
105 if_temperature_in = .false.
107 if_temperature = if_temperature_in
109 if_read_partition = .true.
111 CALL
read_until(22,
'===Number of processors in meridian section (Output)')
113 CALL
read_until(22,
'===Problem type (Output): (nst, mxw, mhd, fhd)')
115 CALL
find_string(22,
'===Is there an output temperature field?', test)
117 READ (22, *) if_temperature_out
119 if_temperature_out = .false.
121 if_temperature = if_temperature_out
122 CALL
read_until(22,
'===Should data be interpolated on new mesh? (True/False)')
123 READ(22,*) inter_mesh
124 if_read_partition = .false.
128 CALL
read_until(22,
'===Problem type (Input): (nst, mxw, mhd, fhd)')
133 ELSE IF ((tit==
'mhd').OR.(tit==
'fhd'))
THEN
136 ELSE IF (tit==
'mxw')
THEN
140 CALL
error_petsc(
'BUG in interpol, type_pb (Input) not correct')
142 CALL
find_string(22,
'===Is there an input temperature field?', test)
153 CALL
find_string(22,
'===Check construction with plotmtv? (True/False)', test)
155 READ (22, *) check_plt
161 CALL
read_until(22,
'===How many files (times steps) should be converted?')
165 CALL
find_string(22,
'===What is the starting index? (suite*_I*index.mesh*), index is an integer in [1,999]', test)
167 READ (22, *) index_start
173 CALL
read_until(22,
'===Number of Fourier modes')
175 ALLOCATE(list_mode(nb_mode))
176 CALL
find_string(22,
'===Select Fourier modes? (true/false)',test)
180 CALL
read_until(22,
'===List of Fourier modes (if select_mode=.TRUE.)')
183 list_mode = (/ (m, m=0, nb_mode-1) /)
186 list_mode = (/ (m, m=0, nb_mode-1) /)
190 CALL
read_until(22,
'===Directory and name of input mesh file')
191 READ(22,*) old_directory, old_filename
192 CALL
read_until(22,
'===Is input mesh file formatted (true/false)?')
193 READ(22,*) old_is_form
195 new_directory = old_directory
196 new_filename = old_filename
197 new_is_form = old_is_form
199 CALL
read_until(22,
'===Directory and name of output mesh file')
200 READ(22,*) new_directory, new_filename
201 CALL
read_until(22,
'===Is output mesh file formatted (true/false)?')
202 READ(22,*) new_is_form
206 IF ( (type_pb ==
'nst') .OR. (type_pb ==
'mhd') .OR. (type_pb ==
'fhd'))
THEN
207 CALL
read_until(22,
'===Number of subdomains in Navier-Stokes mesh')
209 ALLOCATE(list_dom_ns(nb_dom_ns))
210 CALL
read_until(22,
'===List of subdomains for Navier-Stokes mesh')
211 READ (22, *) list_dom_ns
212 CALL
find_string(22,
'===Is there a level set?', test)
214 READ (22, *) if_level_set
215 IF (if_level_set)
THEN
220 if_level_set = .false.
222 IF (type_pb ==
'nst')
ALLOCATE(list_dom_h(0), list_dom_phi(0))
226 IF (if_temperature)
THEN
227 CALL
read_until(22,
'===Number of subdomains in temperature mesh')
228 READ(22,*) nb_dom_temp
229 ALLOCATE(list_dom_temp_in(nb_dom_temp), list_dom_temp(nb_dom_temp), temp_in_to_new(nb_dom_temp))
230 CALL
read_until(22,
'===List of subdomains for temperature mesh')
231 READ (22, *) list_dom_temp_in
232 CALL
find_string(21,
'===Number of interfaces between velocity and temperature only domains (for nst applications)', test)
234 READ(21,*) nb_inter_v_t
235 ALLOCATE(list_inter_v_t(nb_inter_v_t))
236 CALL
read_until(21,
'===List of interfaces between velocity and temperature only domains (for nst applications)')
237 READ(21,*) list_inter_v_t
239 ALLOCATE(list_inter_v_t(0))
242 ALLOCATE(list_dom_temp(0))
246 IF ( (type_pb ==
'mhd') .OR. (type_pb ==
'mxw') .OR. (type_pb ==
'fhd'))
THEN
247 CALL
read_until(22,
'===Type of finite element for magnetic field')
248 READ (22, *) type_fe_h
249 CALL
read_until(22,
'===Number of subdomains in magnetic field (H) mesh')
251 ALLOCATE(list_dom_h_in(nb_dom_h), list_dom_h(nb_dom_h), h_in_to_new(nb_dom_h))
252 CALL
read_until(22,
'===List of subdomains for magnetic field (H) mesh')
253 READ(22,*) list_dom_h_in
256 CALL
read_until(22,
'===Number of interfaces in H mesh')
257 READ(22,*) nb_inter_mu
258 ALLOCATE(list_inter_mu(nb_inter_mu))
259 IF (nb_inter_mu>0)
THEN
260 CALL
read_until(22,
'===List of interfaces in H mesh')
261 READ(22,*) list_inter_mu
265 CALL
find_string(22,
'===Number of subdomains in magnetic potential (phi) mesh', test)
267 READ (22, *) nb_dom_phi
271 ALLOCATE(list_dom_phi(nb_dom_phi))
272 IF (nb_dom_phi>0)
THEN
274 CALL
read_until(22,
'===List of subdomains for magnetic potential (phi) mesh')
275 READ(22,*) list_dom_phi
278 CALL
read_until(22,
'===Number of interfaces between H and phi')
280 ALLOCATE(list_inter_h_phi(nb_inter))
282 CALL
read_until(22,
'===List of interfaces between H and phi')
283 READ(22,*) list_inter_h_phi
287 CALL
read_until(22,
'===Type of finite element for scalar potential')
288 READ(22,*) type_fe_phi
290 ALLOCATE(list_inter_h_phi(0))
293 IF (type_pb ==
'mxw')
THEN
294 ALLOCATE(list_dom_ns(0))
298 CALL
find_string(22,
'===How many pieces of periodic boundary?', test)
300 READ (22, *) my_periodic%nb_periodic_pairs
302 my_periodic%nb_periodic_pairs = 0
305 IF (my_periodic%nb_periodic_pairs.GE.1)
THEN
306 ALLOCATE(my_periodic%list_periodic(2,my_periodic%nb_periodic_pairs))
307 ALLOCATE(my_periodic%vect_e(2,my_periodic%nb_periodic_pairs))
308 CALL
read_until(22,
'===Indices of periodic boundaries and corresponding vectors')
309 DO k = 1, my_periodic%nb_periodic_pairs
310 READ(22,*) my_periodic%list_periodic(:,k), my_periodic%vect_e(:,k)
316 if_mass = if_level_set
317 if_momentum = type_pb==
'nst' .OR. type_pb==
'mhd' .OR. type_pb==
'fhd'
318 if_induction = type_pb==
'mxw' .OR. type_pb==
'mhd' .OR. type_pb==
'fhd'
319 if_energy = if_temperature
322 IF (if_induction)
THEN
323 IF (if_momentum)
THEN
324 IF (
SIZE(list_dom_h) <
SIZE(list_dom_ns))
THEN
325 WRITE(*,*)
' BUG: NS must be a subset of Maxwell '
330 IF (minval(abs(list_dom_h_in - list_dom_ns(k))) /= 0)
THEN
331 WRITE(*,*)
' BUG : NS must be a subset of Maxwell '
335 IF (list_dom_h_in(kp) == list_dom_ns(k))
EXIT
339 list_dom_h(k) = list_dom_ns(k)
343 IF (minval(abs(list_dom_h_in(k) - list_dom_ns)) == 0) cycle
348 list_dom_h(m) = list_dom_h_in(k)
350 IF (m/=nb_dom_h)
THEN
351 WRITE(*,*)
' BUG : m/=nb_dom_H '
354 IF (nb_dom_h > nb_dom_ns)
THEN
355 dom_h_larger_dom_ns = .true.
357 dom_h_larger_dom_ns = .false.
365 list_dom_h = list_dom_h_in
371 IF (
SIZE(list_dom_temp) <
SIZE(list_dom_ns))
THEN
372 WRITE(*,*)
' BUG: NS must be a subset of temp '
376 IF (minval(abs(list_dom_temp_in - list_dom_ns(k))) /= 0)
THEN
377 WRITE(*,*)
' BUG : NS must be a subset of temp '
380 DO kp = 1, nb_dom_temp
381 IF (list_dom_temp_in(kp) == list_dom_ns(k))
EXIT
383 temp_in_to_new(k) = kp
384 list_dom_temp(k) = list_dom_ns(k)
387 DO k = 1, nb_dom_temp
388 IF (minval(abs(list_dom_temp_in(k) - list_dom_ns)) == 0) cycle
390 temp_in_to_new(m) = k
391 list_dom_temp(m) = list_dom_temp_in(k)
393 IF (m/=nb_dom_temp)
THEN
394 WRITE(*,*)
' BUG : m/=nb_dom_temp '
397 IF (nb_dom_temp > nb_dom_ns)
THEN
398 dom_temp_larger_dom_ns = .true.
400 dom_temp_larger_dom_ns = .false.
405 IF (if_induction .AND. if_energy)
THEN
406 IF (
SIZE(list_dom_h) <
SIZE(list_dom_temp))
THEN
407 WRITE(*,*)
' BUG: temp must be a subset of Maxwell '
410 DO k = 1, nb_dom_temp
411 IF (minval(abs(list_dom_h - list_dom_temp(k))) /= 0)
THEN
412 WRITE(*,*)
' BUG: temp must be a subset of Maxwell '
419 IF (if_momentum .AND. (.NOT. if_induction))
THEN
421 nsize =
SIZE(list_dom_temp)
422 ALLOCATE(list_dom(nsize))
423 list_dom = list_dom_temp
424 ALLOCATE(list_inter(
SIZE(list_inter_v_t)))
425 list_inter = list_inter_v_t
427 nsize =
SIZE(list_dom_ns)
428 ALLOCATE(list_dom(nsize))
429 list_dom = list_dom_ns
430 ALLOCATE(list_inter(0))
433 nsize =
SIZE(list_dom_h)+
SIZE(list_dom_phi)
434 ALLOCATE(list_dom(nsize))
435 list_dom(1:
SIZE(list_dom_h)) = list_dom_h
436 IF (
SIZE(list_dom_phi)>0)
THEN
437 list_dom(
SIZE(list_dom_h)+1:) = list_dom_phi
439 nsize =
SIZE(list_inter_mu)+
SIZE(list_inter_h_phi)
440 ALLOCATE(list_inter(nsize))
441 IF (
SIZE(list_inter_mu)>0)
THEN
442 list_inter(1:
SIZE(list_inter_mu)) = list_inter_mu
444 IF (
SIZE(list_inter_h_phi)>0)
THEN
445 list_inter(
SIZE(list_inter_mu)+1:) = list_inter_h_phi
449 ALLOCATE(list_inter_temp(0))
454 directory = old_directory
455 file_name = old_filename
456 iformatted = old_is_form
458 directory = new_directory
459 file_name = new_filename
460 iformatted = new_is_form
464 directory_m = new_directory
465 file_name_m = new_filename
466 is_form_m = new_is_form
468 directory_m = old_directory
469 file_name_m = old_filename
470 is_form_m = old_is_form
474 CALL mpi_comm_size(petsc_comm_world, nb_procs, ierr)
475 IF ( nb_s*nb_f /= nb_procs )
THEN
480 CALL mpi_comm_size(comm_one_d(2),nb_procs,code)
481 CALL mpi_comm_rank(comm_one_d(2),rank,code)
482 IF (nb_f/=nb_procs)
THEN
483 CALL
error_petsc(
'BUG in INIT, nb_procs_F/=nb_procs')
486 IF ( (rw_ns) .AND. (type_pb==
'mxw'))
THEN
487 CALL
error_petsc(
'WARNING: type_pb and/or rw_ns might be wrong')
489 IF ( (rw_mxw) .AND. ((type_pb==
'nst')) )
THEN
490 CALL
error_petsc(
'WARNING: type_pb and/or rw_mxw might be wrong')
498 list_inter_temp, 2, p2_c0_mesh_glob_temp, iformatted)
502 ALLOCATE(part(p1_mesh_glob%me))
503 WRITE(tit_part,
'(i4)') nb_s
504 mesh_part_name=
'mesh_part_S'//trim(adjustl(tit_part))//
'.'//trim(adjustl(file_name))
505 IF (if_read_partition)
THEN
506 OPEN(unit=51, file=mesh_part_name, status=
'unknown',
form=
'formatted')
509 WRITE(*,*)
'read partition'
511 WRITE(*,*)
'create partition'
513 list_dom_phi, p1_mesh_glob, list_inter, part, my_periodic)
514 IF (petsc_rank==0)
THEN
515 OPEN(unit=51, file=mesh_part_name, status=
'replace',
form=
'formatted')
522 IF (if_momentum)
THEN
523 CALL
extract_mesh(comm_one_d(1),nb_s,p1_mesh_glob,part,list_dom_ns,pp_mesh_glob,pp_mesh)
524 CALL
extract_mesh(comm_one_d(1),nb_s,p2_mesh_glob,part,list_dom_ns,vv_mesh_glob,vv_mesh)
526 ALLOCATE(comm_one_d_ns(2))
527 comm_one_d_ns(2) = comm_one_d(2)
528 CALL mpi_comm_rank(comm_one_d(1),rank_s,code)
529 IF (pp_mesh%me/=0)
THEN
530 CALL mpi_comm_split(comm_one_d(1),1,rank_s,comm_one_d_ns(1),code)
532 CALL mpi_comm_split(comm_one_d(1),mpi_undefined,rank_s,comm_one_d_ns(1),code)
537 CALL
extract_mesh(comm_one_d(1),nb_s,p2_c0_mesh_glob_temp,part,list_dom_temp,temp_mesh_glob,temp_mesh)
538 ALLOCATE(comm_one_d_temp(2))
539 CALL mpi_comm_dup(comm_one_d(2), comm_one_d_temp(2), code)
540 CALL mpi_comm_rank(comm_one_d(1),rank_s,code)
541 IF (temp_mesh%me/=0)
THEN
542 CALL mpi_comm_split(comm_one_d(1),1,rank_s,comm_one_d_temp(1),code)
544 CALL mpi_comm_split(comm_one_d(1),mpi_undefined,rank_s,comm_one_d_temp(1),code)
548 IF (if_induction)
THEN
549 IF (type_fe_h==1)
THEN
550 CALL
extract_mesh(comm_one_d(1),nb_s,p1_mesh_glob,part,list_dom_h,h_mesh_glob,h_mesh)
552 CALL
extract_mesh(comm_one_d(1),nb_s,p2_mesh_glob,part,list_dom_h,h_mesh_glob,h_mesh)
554 IF (type_fe_phi==1)
THEN
555 CALL
extract_mesh(comm_one_d(1),nb_s,p1_mesh_glob,part,list_dom_phi,phi_mesh_glob,phi_mesh)
557 CALL
extract_mesh(comm_one_d(1),nb_s,p2_mesh_glob,part,list_dom_phi,phi_mesh_glob,phi_mesh)
565 DEALLOCATE(list_inter_temp)
569 m_max_c = nb_mode/nb_f
572 IF (if_momentum)
THEN
578 CALL
plot_const_p1_label(vv_mesh_glob%jj, vv_mesh_glob%rr, 1.d0*vv_mesh_glob%i_d,
'vv.plt')
585 CALL
plot_const_p1_label(temp_mesh_glob%jj, temp_mesh_glob%rr, 1.d0*temp_mesh_glob%i_d,
'temp.plt')
588 IF (if_induction)
THEN
591 CALL
load_dg_mesh_free_format(directory_m, file_name_m, list_dom_h, list_inter_mu, type_fe_h, h_mesh_glob, is_form_m)
592 CALL
load_mesh_free_format(directory_m, file_name_m, list_dom_phi, type_fe_phi, phi_mesh_glob, is_form_m)
595 CALL
plot_const_p1_label(phi_mesh_glob%jj, phi_mesh_glob%rr, 1.d0*phi_mesh_glob%i_d,
'phi.plt')
600 IF (if_momentum)
THEN
601 ALLOCATE(un_glob(vv_mesh_glob%np, 6, m_max_c))
602 ALLOCATE(un_m1_glob(vv_mesh_glob%np, 6, m_max_c))
603 ALLOCATE(pn_glob(pp_mesh_glob%np, 2, m_max_c))
604 ALLOCATE(pn_m1_glob(pp_mesh_glob%np, 2, m_max_c))
605 ALLOCATE(incpn_m1_glob(pp_mesh_glob%np, 2, m_max_c))
606 ALLOCATE(incpn_glob(pp_mesh_glob%np, 2, m_max_c))
607 ALLOCATE(un(vv_mesh%np, 6, m_max_c))
608 ALLOCATE(un_m1(vv_mesh%np, 6, m_max_c))
609 ALLOCATE(pn(pp_mesh%np, 2, m_max_c))
610 ALLOCATE(pn_m1(pp_mesh%np, 2, m_max_c))
611 ALLOCATE(incpn_m1(pp_mesh%np, 2, m_max_c))
612 ALLOCATE(incpn(pp_mesh%np, 2, m_max_c))
626 ALLOCATE(level_setn_m1_glob(nb_fluid-1,pp_mesh_glob%np, 2, m_max_c))
627 ALLOCATE(level_setn_glob(nb_fluid-1,pp_mesh_glob%np, 2, m_max_c))
628 ALLOCATE(level_setn_m1(nb_fluid-1,pp_mesh%np, 2, m_max_c))
629 ALLOCATE(level_setn(nb_fluid-1,pp_mesh%np, 2, m_max_c))
630 level_setn_m1_glob = 0.d0
631 level_setn_glob = 0.d0
638 ALLOCATE(tempn_m1_glob(temp_mesh_glob%np, 2, m_max_c))
639 ALLOCATE(tempn_glob(temp_mesh_glob%np, 2, m_max_c))
640 ALLOCATE(tempn_m1(temp_mesh%np, 2, m_max_c))
641 ALLOCATE(tempn(temp_mesh%np, 2, m_max_c))
648 IF (if_induction)
THEN
649 ALLOCATE(hn1(h_mesh%np, 6, m_max_c))
650 ALLOCATE(hn(h_mesh%np, 6, m_max_c))
651 ALLOCATE(bn1(h_mesh%np, 6, m_max_c))
652 ALLOCATE(bn(h_mesh%np, 6, m_max_c))
653 ALLOCATE(phin1(phi_mesh%np,2, m_max_c))
654 ALLOCATE(phin(phi_mesh%np,2, m_max_c))
655 ALLOCATE(hn1_glob(h_mesh_glob%np, 6, m_max_c))
656 ALLOCATE(hn_glob(h_mesh_glob%np, 6, m_max_c))
657 ALLOCATE(bn1_glob(h_mesh_glob%np, 6, m_max_c))
658 ALLOCATE(bn_glob(h_mesh_glob%np, 6, m_max_c))
659 ALLOCATE(phin1_glob(phi_mesh_glob%np,2, m_max_c))
660 ALLOCATE(phin_glob(phi_mesh_glob%np,2, m_max_c))
679 IF (if_induction)
THEN
687 phi_mesh_in => phi_mesh
692 phin_out => phin_glob
693 phin1_out => phin1_glob
694 h_mesh_out => h_mesh_glob
695 phi_mesh_out => phi_mesh_glob
697 IF (if_momentum)
THEN
703 incpn_m1_in=> incpn_m1
704 vv_mesh_in => vv_mesh
705 pp_mesh_in => pp_mesh
707 un_m1_out => un_m1_glob
709 pn_m1_out => pn_m1_glob
710 incpn_out => incpn_glob
711 incpn_m1_out=> incpn_m1_glob
712 vv_mesh_out => vv_mesh_glob
713 pp_mesh_out => pp_mesh_glob
715 level_setn_in => level_setn
716 level_setn_m1_in => level_setn_m1
717 level_setn_out => level_setn_glob
718 level_setn_m1_out=> level_setn_m1_glob
723 tempn_m1_in => tempn_m1
724 tempn_out => tempn_glob
725 tempn_m1_out => tempn_m1_glob
726 temp_mesh_in => temp_mesh
727 temp_mesh_out => temp_mesh_glob
733 IF (if_induction)
THEN
739 phin1_in => phin1_glob
740 h_mesh_in => h_mesh_glob
741 phi_mesh_in => phi_mesh_glob
749 phi_mesh_out => phi_mesh
751 IF (if_momentum)
THEN
753 un_m1_in => un_m1_glob
755 pn_m1_in => pn_m1_glob
756 incpn_in => incpn_glob
757 incpn_m1_in=> incpn_m1_glob
758 vv_mesh_in => vv_mesh_glob
759 pp_mesh_in => pp_mesh_glob
765 incpn_m1_out=> incpn_m1
766 vv_mesh_out => vv_mesh
767 pp_mesh_out => pp_mesh
769 level_setn_in => level_setn_glob
770 level_setn_m1_in => level_setn_m1_glob
771 level_setn_out => level_setn
772 level_setn_m1_out=> level_setn_m1
776 tempn_in => tempn_glob
777 tempn_m1_in => tempn_m1_glob
779 tempn_m1_out=> tempn_m1
780 temp_mesh_in => temp_mesh_glob
781 temp_mesh_out => temp_mesh
787 IF (rank==0)
WRITE(*,*)
'Start interpolation Maxwell'
789 ALLOCATE(controle_h(h_mesh_out%np), controle_phi(phi_mesh_out%np))
790 DO m = index_start, index_start+nb_fic-1
809 IF (petsc_rank==0) CALL system(
'mv suite_maxwell_I'//tit//
'.'//old_filename//
'suite_maxwell.'//old_filename)
810 CALL mpi_barrier( mpi_comm_world, code)
811 CALL
read_restart_maxwell(comm_one_d, h_mesh_in, phi_mesh_in, time_h, list_mode, hn_in, hn1_in, &
812 bn_in, bn1_in, phin_in, phin1_in, old_filename, interpol=.false., opt_mono=mono_in)
815 CALL
interp_mesh(h_mesh_in, h_mesh_out, hn_in, hn_out, controle_h, type_fe_h)
816 CALL
interp_mesh(h_mesh_in, h_mesh_out, hn1_in, hn1_out, controle_h, type_fe_h)
817 CALL
interp_mesh(h_mesh_in, h_mesh_out, bn_in, bn_out, controle_h, type_fe_h)
818 CALL
interp_mesh(h_mesh_in, h_mesh_out, bn1_in, bn1_out, controle_h, type_fe_h)
819 CALL
interp_mesh(phi_mesh_in, phi_mesh_out, phin_in, phin_out, controle_phi, type_fe_phi)
820 CALL
interp_mesh(phi_mesh_in, phi_mesh_out, phin1_in, phin1_out, controle_phi, type_fe_phi)
822 IF ( min(minval(controle_h),minval(controle_phi)) == 0)
THEN
823 CALL
error_petsc(
'certains points non trouve H/phi 2')
826 CALL
write_restart_maxwell(comm_one_d, h_mesh_out, phi_mesh_out, time_h, list_mode, hn_out, hn1_out, &
827 bn_out, bn1_out, phin_out, phin1_out, new_filename, m, 1, opt_mono=mono_out)
828 CALL mpi_comm_rank(comm_one_d(1), rank_s, ierr)
830 DEALLOCATE(controle_h, controle_phi)
832 ALLOCATE(l_t_g_h(h_mesh%np), l_t_g_phi(phi_mesh%np))
836 CALL
loc_to_glob(phi_mesh, phi_mesh_glob, l_t_g_phi)
837 DO m = index_start, index_start+nb_fic-1
857 CALL mpi_comm_rank(comm_one_d(1), rank_s, ierr)
858 WRITE(tit_s,
'(i3)') rank_s
863 CALL system(
'mv suite_maxwell_S'//tit_s//
'_I'//tit//
'.'//old_filename//
'suite_maxwell_S'//tit_s//
'.'//old_filename)
865 IF (petsc_rank==0) CALL system(
'mv suite_maxwell_I'//tit//
'.'//old_filename//
'suite_maxwell.'//old_filename)
866 CALL mpi_barrier( mpi_comm_world, code)
868 CALL
read_restart_maxwell(comm_one_d, h_mesh_in, phi_mesh_in, time_h, list_mode, hn_in, hn1_in, &
869 bn_in, bn1_in, phin_in, phin1_in, old_filename, interpol=.false., opt_mono=mono_in)
875 CALL
inter_mesh_loc_to_glob(phi_mesh_in, phi_mesh_out, phin_in, phin_out, l_t_g_phi, is_in, comm_one_d(1))
876 CALL
inter_mesh_loc_to_glob(phi_mesh_in, phi_mesh_out, phin1_in, phin1_out, l_t_g_phi, is_in, comm_one_d(1))
878 CALL
write_restart_maxwell(comm_one_d, h_mesh_out, phi_mesh_out, time_h, list_mode, hn_out, hn1_out, &
879 bn_out, bn1_out, phin_out, phin1_out, new_filename, m, 1, opt_mono=mono_out)
880 CALL mpi_comm_rank(comm_one_d(1), rank_s, ierr)
886 IF (h_mesh%me /= 0)
THEN
887 CALL mpi_comm_rank(comm_one_d(1), rang_s, ierr)
888 WRITE(tit_s,
'(i3)') rang_s
893 DO i = 1,
SIZE(list_mode)
894 WRITE(tit_m,
'(i3)') list_mode(i)
899 CALL
plot_scalar_field(h_mesh%jj, h_mesh%rr, hn(:,1,i),
'H_r_cos_m='//tit_m//
'_'//tit_s//
'_999.plt' )
900 CALL
plot_scalar_field(h_mesh%jj, h_mesh%rr, hn(:,2,i),
'H_r_sin_m='//tit_m//
'_'//tit_s//
'_999.plt' )
901 CALL
plot_scalar_field(h_mesh%jj, h_mesh%rr, hn(:,3,i),
'H_t_cos_m='//tit_m//
'_'//tit_s//
'_999.plt' )
902 CALL
plot_scalar_field(h_mesh%jj, h_mesh%rr, hn(:,4,i),
'H_t_sin_m='//tit_m//
'_'//tit_s//
'_999.plt' )
903 CALL
plot_scalar_field(h_mesh%jj, h_mesh%rr, hn(:,5,i),
'H_z_cos_m='//tit_m//
'_'//tit_s//
'_999.plt' )
904 CALL
plot_scalar_field(h_mesh%jj, h_mesh%rr, hn(:,6,i),
'H_z_sin_m='//tit_m//
'_'//tit_s//
'_999.plt' )
908 IF (rang_s == 0)
THEN
909 DO i = 1,
SIZE(list_mode)
910 WRITE(tit_m,
'(i3)') list_mode(i)
915 CALL
plot_scalar_field(h_mesh_glob%jj, h_mesh_glob%rr, hn_glob(:,1,i),
'gH_r_cos_m='//tit_m//
'_999.plt' )
916 CALL
plot_scalar_field(h_mesh_glob%jj, h_mesh_glob%rr, hn_glob(:,2,i),
'gH_r_sin_m='//tit_m//
'_999.plt' )
917 CALL
plot_scalar_field(h_mesh_glob%jj, h_mesh_glob%rr, hn_glob(:,3,i),
'gH_t_cos_m='//tit_m//
'_999.plt' )
918 CALL
plot_scalar_field(h_mesh_glob%jj, h_mesh_glob%rr, hn_glob(:,4,i),
'gH_t_sin_m='//tit_m//
'_999.plt' )
919 CALL
plot_scalar_field(h_mesh_glob%jj, h_mesh_glob%rr, hn_glob(:,5,i),
'gH_z_cos_m='//tit_m//
'_999.plt' )
920 CALL
plot_scalar_field(h_mesh_glob%jj, h_mesh_glob%rr, hn_glob(:,6,i),
'gH_z_sin_m='//tit_m//
'_999.plt' )
925 IF (rank==0)
WRITE(*,*)
'End interpolation Maxwell'
931 IF (rank==0)
WRITE(*,*)
'Start interpolation NS'
935 ALLOCATE(controle_vv(vv_mesh_out%np), controle_pp(pp_mesh_out%np))
936 DO m = index_start, index_start+nb_fic-1
949 IF (if_level_set)
THEN
950 level_setn_m1_glob = 0.d0
951 level_setn_glob = 0.d0
962 IF (petsc_rank==0)
THEN
963 CALL system(
'mv suite_ns_I'//tit//
'.'//old_filename//
'suite_ns.'//old_filename)
965 CALL mpi_barrier( mpi_comm_world, code)
967 IF (vv_mesh%me/=0)
THEN
968 IF (if_level_set)
THEN
969 CALL
read_restart_ns(comm_one_d_ns, time_u, list_mode, un_in, un_m1_in, &
970 pn_in, pn_m1_in, incpn_in, incpn_m1_in, old_filename,opt_level_set=level_setn_in, &
971 opt_level_set_m1=level_setn_m1_in, opt_max_vel=max_vel, opt_mono = mono_in)
974 CALL
read_restart_ns(comm_one_d_ns, time_u, list_mode, un_in, un_m1_in, &
975 pn_in, pn_m1_in, incpn_in, incpn_m1_in, old_filename, opt_mono = mono_in)
980 CALL
interp_mesh(vv_mesh_in, vv_mesh_out, un_in, un_out, controle_vv, 2)
981 CALL
interp_mesh(vv_mesh_in, vv_mesh_out, un_m1_in, un_m1_out, controle_vv, 2)
982 CALL
interp_mesh(pp_mesh_in, pp_mesh_out, pn_in, pn_out, controle_pp, 1)
983 CALL
interp_mesh(pp_mesh_in, pp_mesh_out, pn_m1_in, pn_m1_out, controle_pp, 1)
984 CALL
interp_mesh(pp_mesh_in, pp_mesh_out, incpn_in, incpn_out, controle_pp, 1)
985 CALL
interp_mesh(pp_mesh_in, pp_mesh_out, incpn_m1_in, incpn_m1_out, controle_pp, 1)
986 IF (if_level_set)
THEN
988 CALL
interp_mesh(pp_mesh_in, pp_mesh_out, level_setn_in(k,:,:,:), level_setn_out(k,:,:,:), controle_pp, 1)
989 CALL
interp_mesh(pp_mesh_in, pp_mesh_out, level_setn_m1_in(k,:,:,:), level_setn_m1_out(k,:,:,:), controle_pp, 1)
993 IF ( min(minval(controle_vv),minval(controle_pp)) == 0)
THEN
997 IF (pp_mesh%me /=0)
THEN
998 IF (if_level_set)
THEN
999 CALL
write_restart_ns(comm_one_d_ns, vv_mesh_out, pp_mesh_out, time_u, list_mode, un_out, un_m1_out, &
1000 pn_out, pn_m1_out, incpn_out, incpn_m1_out, new_filename, m, 1, opt_level_set=level_setn_out, &
1001 opt_level_set_m1=level_setn_m1_out, opt_max_vel=max_vel, opt_mono=mono_out)
1003 CALL
write_restart_ns(comm_one_d_ns, vv_mesh_out, pp_mesh_out, time_u, list_mode, un_out, un_m1_out, &
1004 pn_out, pn_m1_out, incpn_out, incpn_m1_out, new_filename, m, 1, opt_mono=mono_out)
1006 CALL mpi_comm_rank(comm_one_d_ns(1), rang_ns_s, ierr)
1009 DEALLOCATE(controle_vv, controle_pp)
1013 ALLOCATE(l_t_g_vv(vv_mesh%np), l_t_g_pp(pp_mesh%np))
1018 IF (pp_mesh%me /=0)
THEN
1019 DO m = index_start, index_start+nb_fic-1
1024 incpn_m1_glob = 0.d0
1032 IF (if_level_set)
THEN
1033 level_setn_m1_glob = 0.d0
1034 level_setn_glob = 0.d0
1035 level_setn_m1 = 0.d0
1039 WRITE(tit,
'(i3)') m
1041 DO l = 1, lblank - 1
1045 CALL mpi_comm_rank(comm_one_d_ns(1), rang_ns_s, ierr)
1046 WRITE(tit_s,
'(i3)') rang_ns_s
1048 DO l = 1, lblank - 1
1052 CALL system(
'mv suite_ns_S'//tit_s//
'_I'//tit//
'.'//old_filename//
'suite_ns_S'//tit_s//
'.'//old_filename)
1055 IF (petsc_rank==0) CALL system(
'mv suite_ns_I'//tit//
'.'//old_filename//
'suite_ns.'//old_filename)
1056 CALL mpi_barrier( mpi_comm_world, code)
1059 IF (if_level_set)
THEN
1060 CALL
read_restart_ns(comm_one_d_ns, time_u, list_mode, un_in, un_m1_in, &
1061 pn_in, pn_m1_in, incpn_in, incpn_m1_in, old_filename, opt_level_set=level_setn_in, &
1062 opt_level_set_m1=level_setn_m1_in, opt_max_vel=max_vel, opt_mono = mono_in)
1064 CALL
read_restart_ns(comm_one_d_ns, time_u, list_mode, un_in, un_m1_in, &
1065 pn_in, pn_m1_in, incpn_in, incpn_m1_in, old_filename, opt_mono = mono_in)
1080 IF (if_level_set)
THEN
1081 DO k = 1, nb_fluid-1
1082 CALL
inter_mesh_loc_to_glob(pp_mesh_in, pp_mesh_out, level_setn_in(k,:,:,:), level_setn_out(k,:,:,:), &
1083 l_t_g_pp, is_in, comm_one_d_ns(1))
1085 level_setn_m1_out(k,:,:,:), l_t_g_pp, is_in, comm_one_d_ns(1))
1089 IF (if_level_set)
THEN
1090 CALL
write_restart_ns(comm_one_d_ns, vv_mesh_out, pp_mesh_out, time_u, list_mode, un_out, un_m1_out, &
1091 pn_out, pn_m1_out, incpn_out, incpn_m1_out, new_filename, m, 1, opt_level_set=level_setn_out, &
1092 opt_level_set_m1=level_setn_m1_out, opt_max_vel=max_vel, opt_mono=mono_out)
1094 CALL
write_restart_ns(comm_one_d_ns, vv_mesh_out, pp_mesh_out, time_u, list_mode, un_out, un_m1_out, &
1095 pn_out, pn_m1_out, incpn_out, incpn_m1_out, new_filename, m, 1, opt_mono=mono_out)
1097 CALL mpi_comm_rank(comm_one_d_ns(1), rang_ns_s, ierr)
1103 IF (pp_mesh%me /= 0)
THEN
1104 CALL mpi_comm_rank(comm_one_d_ns(1), rang_ns_s, ierr)
1105 WRITE(tit_s,
'(i3)') rang_ns_s
1107 DO l = 1, lblank - 1
1110 DO i = 1,
SIZE(list_mode)
1111 WRITE(tit_m,
'(i3)') list_mode(i)
1113 DO l = 1, lblank - 1
1116 CALL
plot_scalar_field(vv_mesh%jj, vv_mesh%rr, un(:,1,i),
'u_r_cos_m='//tit_m//
'_'//tit_s//
'_999.plt' )
1117 CALL
plot_scalar_field(vv_mesh%jj, vv_mesh%rr, un(:,3,i),
'u_t_cos_m='//tit_m//
'_'//tit_s//
'_999.plt' )
1118 CALL
plot_scalar_field(vv_mesh%jj, vv_mesh%rr, un(:,4,i),
'u_t_sin_m='//tit_m//
'_'//tit_s//
'_999.plt' )
1119 CALL
plot_scalar_field(vv_mesh%jj, vv_mesh%rr, un(:,5,i),
'u_z_cos_m='//tit_m//
'_'//tit_s//
'_999.plt' )
1123 IF (rang_ns_s == 0)
THEN
1124 DO i = 1,
SIZE(list_mode)
1125 WRITE(tit_m,
'(i3)') list_mode(i)
1127 DO l = 1, lblank - 1
1130 CALL
plot_scalar_field(vv_mesh_glob%jj, vv_mesh_glob%rr, un_glob(:,1,i),
'gu_r_cos_m='//tit_m//
'_999.plt' )
1131 CALL
plot_scalar_field(vv_mesh_glob%jj, vv_mesh_glob%rr, un_glob(:,3,i),
'gu_t_cos_m='//tit_m//
'_999.plt' )
1132 CALL
plot_scalar_field(vv_mesh_glob%jj, vv_mesh_glob%rr, un_glob(:,4,i),
'gu_t_sin_m='//tit_m//
'_999.plt' )
1133 CALL
plot_scalar_field(vv_mesh_glob%jj, vv_mesh_glob%rr, un_glob(:,5,i),
'gu_z_cos_m='//tit_m//
'_999.plt' )
1138 IF (rank==0)
WRITE(*,*)
'End interpolation NS'
1143 IF (rank==0)
WRITE(*,*)
'Start interpolation temperature'
1145 IF (inter_mesh)
THEN
1146 ALLOCATE(controle_temp(temp_mesh_out%np))
1147 DO m = index_start, index_start+nb_fic-1
1148 tempn_m1_glob = 0.d0
1152 WRITE(tit,
'(i3)') m
1154 DO l = 1, lblank - 1
1158 IF (petsc_rank==0)
THEN
1159 CALL system(
'mv suite_temp_I'//tit//
'.'//old_filename//
'suite_temp.'//old_filename)
1161 CALL mpi_barrier( mpi_comm_world, code)
1163 IF (temp_mesh%me/=0)
THEN
1164 CALL
read_restart_temp(comm_one_d_temp, time_t, list_mode, tempn_in, tempn_m1_in, old_filename, &
1168 CALL
interp_mesh(temp_mesh_in, temp_mesh_out, tempn_in, tempn_out, controle_temp, 2)
1169 CALL
interp_mesh(temp_mesh_in, temp_mesh_out, tempn_m1_in, tempn_m1_out, controle_temp, 2)
1171 IF (temp_mesh%me /= 0)
THEN
1173 list_mode, tempn_out, tempn_m1_out, new_filename, m, 1, opt_mono = mono_out)
1174 CALL mpi_comm_rank(comm_one_d_temp(1), rang_temp_s, ierr)
1177 DEALLOCATE(controle_temp)
1181 ALLOCATE(l_t_g_temp(temp_mesh%np))
1183 CALL
loc_to_glob(temp_mesh, temp_mesh_glob, l_t_g_temp)
1184 IF (temp_mesh%me /=0)
THEN
1185 DO m = index_start, index_start+nb_fic-1
1186 tempn_m1_glob = 0.d0
1191 WRITE(tit,
'(i3)') m
1193 DO l = 1, lblank - 1
1197 CALL mpi_comm_rank(comm_one_d_temp(1), rang_temp_s, ierr)
1198 WRITE(tit_s,
'(i3)') rang_temp_s
1200 DO l = 1, lblank - 1
1204 CALL system(
'mv suite_temp_S'//tit_s//
'_I'//tit//
'.'//old_filename//
'suite_temp_S'//tit_s//
'.'//old_filename)
1206 IF (petsc_rank==0) CALL system(
'mv suite_temp_I'//tit//
'.'//old_filename//
'suite_temp.'//old_filename)
1207 CALL mpi_barrier( mpi_comm_world, code)
1210 CALL
read_restart_temp(comm_one_d_temp, time_t, list_mode, tempn_in, tempn_m1_in, old_filename, &
1218 CALL
write_restart_temp(comm_one_d_temp, temp_mesh_out, time_t, list_mode, tempn_out, tempn_m1_out, &
1219 new_filename, m, 1, opt_mono = mono_out)
1220 CALL mpi_comm_rank(comm_one_d_temp(1), rang_temp_s, ierr)
1226 IF (temp_mesh%me /= 0)
THEN
1227 CALL mpi_comm_rank(comm_one_d_temp(1), rang_temp_s, ierr)
1228 WRITE(tit_s,
'(i3)') rang_temp_s
1230 DO l = 1, lblank - 1
1233 DO i = 1,
SIZE(list_mode)
1234 WRITE(tit_m,
'(i3)') list_mode(i)
1236 DO l = 1, lblank - 1
1239 CALL
plot_scalar_field(temp_mesh%jj, temp_mesh%rr, tempn(:,1,i),
'temp_cos_m='//tit_m//
'_'//tit_s//
'_999.plt' )
1240 CALL
plot_scalar_field(temp_mesh%jj, temp_mesh%rr, tempn(:,2,i),
'temp_sin_m='//tit_m//
'_'//tit_s//
'_999.plt' )
1242 IF (rang_temp_s == 0)
THEN
1243 DO i = 1,
SIZE(list_mode)
1244 WRITE(tit_m,
'(i3)') list_mode(i)
1246 DO l = 1, lblank - 1
1250 'gtemp_cos_m='//tit_m//
'_'//tit_s//
'_999.plt' )
1252 'gtemp_sin_m='//tit_m//
'_'//tit_s//
'_999.plt' )
1257 IF (rank==0)
WRITE(*,*)
'End interpolation temperature'
1261 IF (petsc_rank==0 .AND. rw_mxw) CALL system(
'rm -rf suite_maxwell_S*')
1262 IF (petsc_rank==0 .AND. rw_ns) CALL system(
'rm -rf suite_ns_S*')
1263 IF (petsc_rank==0 .AND. rw_temp) CALL system(
'rm -rf suite_temp_S*')
1265 IF (petsc_rank==0 .AND. rw_mxw) CALL system(
'rm -rf suite_maxwell.*')
1266 IF (petsc_rank==0 .AND. rw_ns) CALL system(
'rm -rf suite_ns.*')
1267 IF (petsc_rank==0 .AND. rw_temp) CALL system(
'rm -rf suite_temp.*')
1270 IF (check_plt .AND. petsc_rank==0)
THEN
1271 CALL system(
'mkdir -p PLT')
1272 CALL system(
'mv *.plt PLT/')
1274 CALL mpi_barrier( mpi_comm_world, code)
1276 CALL petscfinalize(ierr)
1283 LOGICAL,
INTENT(OUT) :: is_in
1284 CHARACTER(len=200) :: inline
1285 CALL getarg(1,inline)
1286 IF (trim(adjustl(inline)) ==
'petsc_nonpetsc')
THEN
1288 ELSE IF (trim(adjustl(inline)) ==
'nonpetsc_petsc')
THEN
integer function eval_blank(len_str, string)
subroutine write_restart_maxwell(communicator, H_mesh, phi_mesh, time, list_mode, Hn, Hn1, Bn, Bn1, phin, phin1, filename, it, freq_restart, opt_mono)
subroutine write_restart_ns(communicator, vv_mesh, pp_mesh, time, list_mode, un, un_m1, pn, pn_m1, incpn, incpn_m1, filename, it, freq_restart, opt_level_set, opt_level_set_m1, opt_max_vel, opt_mono)
subroutine, public free_mesh(mesh)
subroutine, public part_mesh_m_t_h_phi(nb_proc, list_u, list_T_in, list_h_in, list_phi, mesh, list_of_interfaces, part, my_periodic)
subroutine write_restart_temp(communicator, temp_mesh, time, list_mode, tempn, tempn_m1, filename, it, freq_restart, opt_mono)
subroutine, public load_dg_mesh_free_format(dir, fil, list_dom, list_inter, type_fe, mesh, mesh_formatted)
subroutine, public extract_mesh(communicator, nb_proc, mesh_glob, part, list_dom, mesh, mesh_loc)
subroutine read_restart_temp(communicator, time, list_mode, tempn, tempn_m1, filename, val_init, interpol, opt_mono)
subroutine, public load_mesh_free_format(dir, fil, list_dom, type_fe, mesh, mesh_formatted, edge_stab)
subroutine read_restart_ns(communicator, time, list_mode, un, un_m1, pn, pn_m1, incpn, incpn_m1, filename, val_init, interpol, opt_level_set, opt_level_set_m1, opt_max_vel, opt_mono)
subroutine which_pb(is_in)
subroutine plot_scalar_field(jj, rr, uu, file_name)
subroutine, public mesh_interpol
subroutine, public create_cart_comm(ndim, comm_cart, comm_one_d, coord_cart)
subroutine read_until(unit, string)
subroutine plot_const_p1_label(jj, rr, uu, file_name)
subroutine find_string(unit, string, okay)
subroutine error_petsc(string)
subroutine read_restart_maxwell(communicator, H_mesh, phi_mesh, time, list_mode, Hn, Hn1, Bn, Bn1, phin, phin1, filename, val_init, interpol, opt_mono)
section doc_intro_frame_work_num_app Numerical approximation subsection doc_intro_fram_work_num_app_Fourier_FEM Fourier Finite element representation The SFEMaNS code uses a hybrid Fourier Finite element formulation The Fourier decomposition allows to approximate the problem’s solutions for each Fourier mode modulo nonlinear terms that are made explicit The variables are then approximated on a meridian section of the domain with a finite element method The numerical approximation of a function f $f f is written in the following generic form