6 CHARACTER(LEN=200) :: directory, file_name
7 LOGICAL :: if_read_partition
8 CHARACTER(LEN=3) :: type_pb
9 INTEGER,
DIMENSION(2) :: ndim
10 LOGICAL :: select_mode
12 INTEGER,
DIMENSION(:),
POINTER :: list_mode_lect
14 INTEGER :: nb_iteration
18 REAL(KIND=8) :: les_coeff1, les_coeff2, les_coeff3, les_coeff4
19 REAL(KIND=8) :: les_coeff1_mom
20 LOGICAL :: if_les_in_momentum
22 REAL(KIND=8) :: taux_precession, angle_s_pi
25 LOGICAL :: if_ns_penalty
26 LOGICAL :: if_impose_vel_in_solids
27 LOGICAL :: if_compute_momentum_pseudo_force
28 REAL(KIND=8) :: div_stab_in_ns
30 LOGICAL :: if_navier_stokes_with_u
31 LOGICAL :: if_navier_stokes_art_comp
32 REAL(KIND=8) :: penal_coeff_art_comp
33 LOGICAL :: if_tensor_sym
34 LOGICAL :: if_moment_bdf2
35 LOGICAL :: if_level_bdf2
37 LOGICAL :: if_variable_visco
38 LOGICAL :: if_navier_stokes_with_taylor
39 INTEGER :: taylor_order
40 REAL(KIND=8) :: taylor_lambda
41 INTEGER :: type_fe_velocity
43 INTEGER,
DIMENSION(:),
POINTER :: list_dom_ns
46 INTEGER :: pp_nb_dirichlet_sides
47 INTEGER,
DIMENSION(:),
POINTER :: pp_list_dirichlet_sides
48 INTEGER,
DIMENSION(3) :: vv_nb_dirichlet_sides
50 INTEGER :: vv_nb_dirichlet
51 INTEGER :: vv_nb_dirichlet_normal_velocity
52 INTEGER,
DIMENSION(:),
POINTER :: vv_list_dirichlet_normal_velocity_sides
54 LOGICAL :: if_maxwell_with_h
56 INTEGER :: nb_dom_h, nb_dom_phi, nb_inter, nb_inter_mu
57 INTEGER :: type_fe_h, type_fe_phi, nb_dirichlet_sides_h
58 INTEGER,
DIMENSION(:),
POINTER :: list_dom_h, list_dom_phi, list_inter_h_phi
59 INTEGER,
DIMENSION(:),
POINTER :: list_inter_mu, list_dirichlet_sides_h
60 REAL(KIND=8) :: rem, mu_phi
61 LOGICAL :: analytical_permeability
62 LOGICAL :: if_use_fem_integration_for_mu_bar
63 LOGICAL :: if_permeability_variable_in_theta
64 REAL(KIND=8),
DIMENSION(:),
POINTER :: mu_h, sigma
65 REAL(KIND=8),
DIMENSION(3) :: stab
67 INTEGER :: phi_nb_dirichlet_sides
68 INTEGER,
DIMENSION(:),
POINTER :: phi_list_dirichlet_sides
69 LOGICAL :: if_quasi_static_approx
70 LOGICAL :: if_steady_current_fhd
72 LOGICAL :: if_temperature
74 LOGICAL :: if_helmholtz_force
75 REAL(KIND=8) :: gravity_coefficient
76 REAL(KIND=8) :: mag_force_coefficient
77 REAL(KIND=8),
DIMENSION(:),
POINTER :: temperature_diffusivity
78 REAL(KIND=8),
DIMENSION(:),
POINTER :: density, heat_capacity, vol_heat_capacity
80 INTEGER :: temperature_nb_dirichlet_sides
81 INTEGER,
DIMENSION(:),
POINTER :: temperature_list_dirichlet_sides
82 INTEGER :: temperature_nb_robin_sides
83 INTEGER,
DIMENSION(:),
POINTER :: temperature_list_robin_sides
84 REAL(KIND=8),
DIMENSION(:),
POINTER :: convection_coeff
85 REAL(KIND=8),
DIMENSION(:),
POINTER :: exterior_temperature
86 INTEGER :: nb_dom_temp
87 INTEGER,
DIMENSION(:),
POINTER :: list_dom_temp
88 INTEGER :: nb_inter_v_t
89 INTEGER,
DIMENSION(:),
POINTER :: list_inter_v_t
91 LOGICAL :: if_level_set
92 LOGICAL :: if_level_set_fixed
94 INTEGER :: level_set_nb_dirichlet_sides
95 INTEGER,
DIMENSION(:),
POINTER :: level_set_list_dirichlet_sides
96 REAL(KIND=8) :: level_set_cmax
97 REAL(KIND=8) :: level_set_comp_factor
98 CHARACTER(LEN=3) :: level_set_reconstruction_type
99 REAL(KIND=8) :: level_set_tanh_coeff_reconstruction
101 REAL(KIND=8),
DIMENSION(:),
POINTER :: density_fluid
102 REAL(KIND=8),
DIMENSION(:),
POINTER :: dyna_visc_fluid
103 LOGICAL :: variation_sigma_fluid
104 REAL(KIND=8),
DIMENSION(:),
POINTER :: sigma_fluid
105 LOGICAL :: if_surface_tension
106 REAL(KIND=8),
DIMENSION(:),
POINTER :: coeff_surface
107 LOGICAL :: if_mass_correction
108 LOGICAL :: if_kill_overshoot
109 REAL(KIND=8) :: multiplier_for_h_min_distance
110 REAL(KIND=8) :: sigma_min, mu_min
112 REAL(KIND=8) :: h_min_distance
113 LOGICAL :: if_level_set_p2
114 LOGICAL :: if_compression_mthd_jlg
118 LOGICAL :: test_de_convergence
119 CHARACTER(len=200) :: data_directory_debug
120 INTEGER :: numero_du_test_debug
121 REAL(KIND=8),
DIMENSION(4) :: norm_ref
124 CHARACTER(len=2) :: arpack_which
125 INTEGER :: nb_eigenvalues, arpack_iter_max
126 REAL(KIND=8) :: arpack_tolerance
127 LOGICAL :: if_arpack_vtu_2d
129 REAL(KIND=8) :: stab_bdy_ns
131 INTEGER :: number_of_planes_in_real_space
132 LOGICAL :: check_numerical_stability
133 LOGICAL :: is_mesh_symmetric
134 LOGICAL :: if_zero_out_modes
135 INTEGER :: nb_select_mode_ns, nb_select_mode_mxw
136 INTEGER,
DIMENSION(:),
POINTER :: list_select_mode_ns, list_select_mode_mxw
137 INTEGER :: freq_restart, freq_en, freq_plot
138 LOGICAL :: verbose_timing, verbose_divergence, verbose_cfl
139 LOGICAL :: if_just_processing
142 PROCEDURE,
PUBLIC :: init
149 a%if_read_partition=.false.
150 a%select_mode=.false.
152 a%if_LES_in_momentum=.false.
154 a%if_ns_penalty=.false.
155 a%if_impose_vel_in_solids=.false.
156 a%if_compute_momentum_pseudo_force=.false.
157 a%if_navier_stokes_with_u=.false.
158 a%if_navier_stokes_art_comp=.false.
159 a%if_tensor_sym=.false.
160 a%if_moment_bdf2=.false.
161 a%if_level_bdf2=.false.
163 a%if_maxwell_with_H=.false.
166 a%if_helmholtz_force=.false.
167 a%analytical_permeability=.false.
168 a%if_use_fem_integration_for_mu_bar=.false.
169 a%if_permeability_variable_in_theta=.false.
170 a%if_quasi_static_approx=.false.
171 a%if_steady_current_fhd=.false.
172 a%if_temperature=.false.
173 a%if_level_set=.false.
174 a%if_level_set_fixed=.false.
175 a%variation_sigma_fluid=.false.
176 a%if_surface_tension=.false.
177 a%if_mass_correction=.false.
178 a%if_kill_overshoot=.false.
179 a%if_level_set_P2=.false.
180 a%if_compression_mthd_JLG=.false.
181 a%if_variable_visco=.false.
183 a%if_navier_stokes_with_taylor =.false.
186 a%if_arpack_vtu_2d=.false.
187 a%check_numerical_stability=.false.
188 a%is_mesh_symmetric=.false.
189 a%if_zero_out_modes=.false.
190 a%verbose_timing =.false.
191 a%verbose_divergence=.false.
192 a%verbose_CFL=.false.
193 a%if_just_processing=.false.
194 a%my_par_vv%verbose=.false.
195 a%my_par_pp%verbose=.false.
196 a%my_par_mass%verbose=.false.
197 a%my_par_H_p_phi%verbose=.false.
198 a%my_par_temperature%verbose=.false.
199 a%my_par_level_set%verbose=.false.
205 a%LES_coeff1_mom=0.d0
206 a%taux_precession=0.d0
208 a%div_stab_in_ns=0.d0
210 a%gravity_coefficient=0.d0
211 a%mag_force_coefficient=0.d0
212 a%level_set_cmax=0.d0
213 a%level_set_comp_factor=0.d0
214 a%level_set_tanh_coeff_reconstruction=0.d0
216 a%arpack_tolerance=0.d0
218 a%h_min_distance=0.d0
219 a%multiplier_for_h_min_distance=0.d0
220 a%taylor_lambda = 1.d0
221 a%penal_coeff_art_comp=1.d0
224 a%vv_nb_dirichlet_normal_velocity=0
225 a%freq_restart = 10000000
227 a%freq_plot = 10000000
228 a%type_fe_velocity = 2
246 LOGICAL :: test, test_sigma_min
247 CHARACTER(len=200),
INTENT(IN) :: data_fichier
249 CHARACTER(len=8),
DIMENSION(3) :: vel_component=(/
'uradial',
'utheta ',
'uzaxis '/)
255 OPEN(unit = 21, file = data_fichier,
form =
'formatted', status =
'unknown')
258 CALL read_until(21,
'===Is mesh file formatted (true/false)?')
259 READ(21,*)
inputs%iformatted
260 CALL read_until(21,
'===Directory and name of mesh file')
264 CALL read_until(21,
'===Number of processors in meridian section')
265 READ (21,*)
inputs%ndim(1)
266 CALL read_until(21,
'===Number of processors in Fourier space')
267 READ (21,*)
inputs%ndim(2)
270 CALL read_until(21,
'===Number of Fourier modes')
273 CALL error_petsc(
'BUG in read_my_data, MOD(nb_select_mode,nb_procs_F)/= 0')
275 CALL find_string(21,
'===Select Fourier modes? (true/false)', test)
277 READ (21,*)
inputs%select_mode
279 inputs%select_mode = .false.
281 IF (
inputs%select_mode)
THEN 283 CALL read_until(21,
'===List of Fourier modes (if select_mode=.TRUE.)')
284 READ(21,*)
inputs%list_mode_lect
288 CALL read_until(21,
'===Problem type: (nst, mxw, mhd, fhd)')
291 CALL error_petsc(
'BUG in read_my_data, type_pb of probleme not yet defined')
295 CALL read_until(21,
'===Restart on velocity (true/false)')
296 READ (21 ,*)
inputs%irestart_u
298 CALL read_until(21,
'===Restart on magnetic field (true/false)')
299 READ (21 ,*)
inputs%irestart_h
301 inputs%irestart_h = .false.
303 CALL find_string(21,
'===Restart on temperature (true/false)', test)
305 READ (21 ,*)
inputs%irestart_T
307 inputs%irestart_T = .false.
311 CALL find_string(21,
'===Do we read metis partition? (true/false)', test)
313 READ (21,*)
inputs%if_read_partition
315 inputs%if_read_partition = .false.
318 call error_petsc(
'Possibility of bug: set "===Do we read metis partition? (true/false) "' // &
319 'parameter to .true. when restarting a computation since number of procs, ' // &
320 'or machine, or type_pb may have changed. Make sure your mesh_part file is the correct one.')
324 CALL read_until(21,
'===Time step and number of time iterations')
328 CALL find_string(21,
'===Check numerical stability (true/false)', test)
330 READ (21,*)
inputs%check_numerical_stability
332 inputs%check_numerical_stability = .false.
336 CALL find_string(21,
'===How many pieces of periodic boundary?', test)
338 READ (21,*)
inputs%my_periodic%nb_periodic_pairs
340 inputs%my_periodic%nb_periodic_pairs = 0
342 IF (
inputs%my_periodic%nb_periodic_pairs.GE.1)
THEN 343 ALLOCATE(
inputs%my_periodic%list_periodic(2,
inputs%my_periodic%nb_periodic_pairs))
344 ALLOCATE(
inputs%my_periodic%vect_e(2,
inputs%my_periodic%nb_periodic_pairs))
345 CALL read_until(21,
'===Indices of periodic boundaries and corresponding vectors')
346 DO k = 1,
inputs%my_periodic%nb_periodic_pairs
347 READ(21,*)
inputs%my_periodic%list_periodic(:,k),
inputs%my_periodic%vect_e(:,k)
352 CALL find_string(21,
'===Is the mesh symmetric (true/false)?', test)
354 READ (21,*)
inputs%is_mesh_symmetric
356 inputs%is_mesh_symmetric = .false.
363 CALL find_string(21,
'===Solve Navier-Stokes with art comp scheme (true) or (false)?', test)
365 READ(21,*)
inputs%if_navier_stokes_art_comp
367 inputs%if_navier_stokes_art_comp = .false.
369 IF (
inputs%if_navier_stokes_art_comp)
THEN 370 CALL find_string(21,
'===Penalty coefficient for artifical compression', test)
372 READ(21,*)
inputs%penal_coeff_art_comp
374 inputs%penal_coeff_art_comp=1.d0
379 CALL find_string(21,
'===Solve Navier-Stokes with u (true) or m (false)?', test)
381 READ(21,*)
inputs%if_navier_stokes_with_u
383 inputs%if_navier_stokes_with_u = .true.
386 CALL find_string(21,
'===Type of finite element for velocity field', test)
388 READ(21,*)
inputs%type_fe_velocity
403 inputs%if_tensor_sym = .true.
405 IF (.NOT.
inputs%if_navier_stokes_with_u)
THEN 406 CALL find_string(21,
'===Do we solve momentum with bdf2 (true/false)?', test)
408 READ(21,*)
inputs%if_moment_bdf2
410 inputs%if_moment_bdf2=.false.
412 IF (
inputs%if_moment_bdf2)
THEN 413 inputs%if_level_bdf2=.true.
415 CALL find_string(21,
'===Do we solve level set with bdf2 (true/false)?', test)
417 READ(21,*)
inputs%if_level_bdf2
419 inputs%if_level_bdf2=.false.
424 CALL find_string(21,
'===Do we use Taylor method to solve momentum (true/false)?', test)
426 READ(21,*)
inputs%if_navier_stokes_with_taylor
427 CALL read_until(21,
'===Time accuracy of Taylor method (3 or 4)?')
428 READ(21,*)
inputs%taylor_order
429 CALL read_until(21,
'===Lambda parameter for Taylor method?')
430 READ(21,*)
inputs%taylor_lambda
432 inputs%if_navier_stokes_with_taylor = .false.
438 CALL read_until(21,
'===Number of subdomains in Navier-Stokes mesh')
439 READ(21,*)
inputs%nb_dom_ns
441 CALL read_until(21,
'===List of subdomains for Navier-Stokes mesh')
442 READ(21,*)
inputs%list_dom_ns
446 CALL find_string(21,
'===How many boundary pieces for Dirichlet BCs on '//trim(vel_component(k))//
'?', test)
448 CALL error_petsc(
'===How many boundary pieces for Dirichlet BCs on '//trim(vel_component(k))//
'? is disabled')
451 inputs%vv_nb_dirichlet_sides(k) = 0
453 IF (
inputs%vv_nb_dirichlet_sides(k)>0)
THEN 454 ALLOCATE(
inputs%vv_list_dirichlet_sides(k)%DIL(
inputs%vv_nb_dirichlet_sides(k)))
455 CALL read_until(21,
'===List of boundary pieces for Dirichlet BCs on '//trim(vel_component(k)))
456 READ(21,*)
inputs%vv_list_dirichlet_sides(k)%DIL
458 ALLOCATE(
inputs%vv_list_dirichlet_sides(k)%DIL(0))
461 CALL find_string(21,
'===How many boundary pieces for full Dirichlet BCs on velocity?', test)
463 READ(21,*)
inputs%vv_nb_dirichlet
467 IF (
inputs%vv_nb_dirichlet>0)
THEN 469 ALLOCATE(
inputs%vv_list_dirichlet_sides(k)%DIL(
inputs%vv_nb_dirichlet))
470 CALL read_until(21,
'===List of boundary pieces for full Dirichlet BCs on velocity')
471 READ(21,*)
inputs%vv_list_dirichlet_sides(k)%DIL
475 ALLOCATE(
inputs%vv_list_dirichlet_sides(k)%DIL(0))
480 CALL find_string(21,
'===How many boundary pieces for homogeneous normal velocity?', test)
482 READ(21,*)
inputs%vv_nb_dirichlet_normal_velocity
484 inputs%vv_nb_dirichlet_normal_velocity=0
486 IF (
inputs%vv_nb_dirichlet_normal_velocity>0)
THEN 487 ALLOCATE(
inputs%vv_list_dirichlet_normal_velocity_sides(
inputs%vv_nb_dirichlet_normal_velocity))
488 CALL read_until(21,
'===List of boundary pieces for homogeneous normal velocity')
489 READ(21,*)
inputs%vv_list_dirichlet_normal_velocity_sides
492 READ (21,*)
inputs%stab_bdy_ns
496 DO k = 1,
inputs%vv_nb_dirichlet_normal_velocity
497 IF (minval(abs(
inputs%vv_list_dirichlet_normal_velocity_sides(k) &
498 -
inputs%vv_list_dirichlet_sides(1)%DIL))==0)
THEN 499 CALL error_petsc(
'Boundary conditions are mixed up')
505 CALL find_string(21,
'===Stress boundary conditions? (true/false)', test)
507 CALL error_petsc(
'===Stress boundary conditions Does not work any more')
514 READ(21,*)
inputs%pp_nb_dirichlet_sides
516 inputs%pp_nb_dirichlet_sides = 0
518 IF (
inputs%pp_nb_dirichlet_sides>0)
THEN 519 ALLOCATE(
inputs%pp_list_dirichlet_sides(
inputs%pp_nb_dirichlet_sides))
520 CALL read_until(21,
'===List of boundary pieces for Dirichlet BCs on pressure')
521 READ(21,*)
inputs%pp_list_dirichlet_sides
523 ALLOCATE(
inputs%pp_list_dirichlet_sides(0))
537 CALL find_string(21,
'===Variable viscosity (true/false)?',test)
539 READ(21,*)
inputs%if_variable_visco
541 inputs%if_variable_visco = .false.
545 IF (
inputs%if_navier_stokes_with_u)
THEN 546 CALL find_string(21,
'===Coefficient for penalty of divergence in NS?', test)
548 READ(21,*)
inputs%div_stab_in_ns
550 inputs%div_stab_in_ns = 0.d0
555 CALL find_string(21,
'===Is there a precession term (true/false)?', test)
557 READ(21,*)
inputs%precession
559 inputs%precession = .false.
561 IF (
inputs%precession)
THEN 563 READ(21,*)
inputs%taux_precession
564 CALL read_until(21,
'===Precession angle over pi')
565 READ(21,*)
inputs%angle_s_pi
567 inputs%taux_precession = 0.d0
572 CALL find_string(21,
'===Use penalty in NS domain (true/false)?', test)
574 READ(21,*)
inputs%if_ns_penalty
576 inputs%if_ns_penalty = .false.
578 IF (
inputs%if_ns_penalty)
THEN 579 CALL find_string(21,
'===Use nonzero velocity in solids (true/false)?', test)
581 READ(21,*)
inputs%if_impose_vel_in_solids
583 inputs%if_impose_vel_in_solids = .false.
585 CALL find_string(21,
'===Compute z momentum (true/false)?', test)
587 READ(21,*)
inputs%if_compute_momentum_pseudo_force
589 inputs%if_compute_momentum_pseudo_force = .false.
592 inputs%if_impose_vel_in_solids = .false.
593 inputs%if_compute_momentum_pseudo_force = .false.
597 CALL read_until(21,
'===Maximum number of iterations for velocity solver')
598 READ(21,*)
inputs%my_par_vv%it_max
599 CALL read_until(21,
'===Relative tolerance for velocity solver')
600 READ(21,*)
inputs%my_par_vv%rel_tol
601 CALL read_until(21,
'===Absolute tolerance for velocity solver')
602 READ(21,*)
inputs%my_par_vv%abs_tol
603 CALL find_string(21,
'===Velocity solver verbose? (true/false)', test)
605 READ(21,*)
inputs%my_par_vv%verbose
607 CALL read_until(21,
'===Solver type for velocity (FGMRES, CG, ...)')
608 READ(21,*)
inputs%my_par_vv%solver
609 CALL read_until(21,
'===Preconditionner type for velocity solver (HYPRE, JACOBI, MUMPS...)')
610 READ(21,*)
inputs%my_par_vv%precond
613 CALL read_until(21,
'===Maximum number of iterations for pressure solver')
614 READ(21,*)
inputs%my_par_pp%it_max
615 CALL read_until(21,
'===Relative tolerance for pressure solver')
616 READ(21,*)
inputs%my_par_pp%rel_tol
617 CALL read_until(21,
'===Absolute tolerance for pressure solver')
618 READ(21,*)
inputs%my_par_pp%abs_tol
619 CALL find_string(21,
'===Pressure solver verbose? (true/false)',test)
621 READ(21,*)
inputs%my_par_pp%verbose
623 CALL read_until(21,
'===Solver type for pressure (FGMRES, CG, ...)')
624 READ(21,*)
inputs%my_par_pp%solver
625 CALL read_until(21,
'===Preconditionner type for pressure solver (HYPRE, JACOBI, MUMPS...)')
626 READ(21,*)
inputs%my_par_pp%precond
629 CALL read_until(21,
'===Maximum number of iterations for mass matrix solver')
630 READ(21,*)
inputs%my_par_mass%it_max
631 CALL read_until(21,
'===Relative tolerance for mass matrix solver')
632 READ(21,*)
inputs%my_par_mass%rel_tol
633 CALL read_until(21,
'===Absolute tolerance for mass matrix solver')
634 READ(21,*)
inputs%my_par_mass%abs_tol
635 CALL find_string(21,
'===Mass matrix solver verbose? (true/false)',test)
637 READ(21,*)
inputs%my_par_mass%verbose
639 CALL read_until(21,
'===Solver type for mass matrix (FGMRES, CG, ...)')
640 READ(21,*)
inputs%my_par_mass%solver
641 CALL read_until(21,
'===Preconditionner type for mass matrix solver (HYPRE, JACOBI, MUMPS...)')
642 READ(21,*)
inputs%my_par_mass%precond
645 CALL find_string(21,
'===Use LES? (true/false)', test)
653 CALL find_string(21,
'===Coefficients for LES', test)
655 CALL error_petsc(
'===Coefficients for LES is disabled')
658 inputs%LES_coeff4 = 0.125d0
662 CALL read_until(21,
'===Coefficient multiplying residual')
663 READ(21,*)
inputs%LES_coeff2
665 CALL find_string(21,
'===Coefficient for explicit LES', test)
667 READ(21,*)
inputs%LES_coeff1
678 IF (.NOT.
inputs%if_navier_stokes_with_u)
THEN 679 CALL find_string(21,
'===Use LES in momentum? (true/false)', test)
681 READ(21,*)
inputs%if_LES_in_momentum
683 inputs%if_LES_in_momentum=.true.
685 IF (
inputs%if_LES_in_momentum)
THEN 688 inputs%LES_coeff1_mom=0.d0
695 CALL find_string(21,
'===Solve Maxwell with H (true) or B (false)?', test)
697 READ(21,*)
inputs%if_maxwell_with_H
699 inputs%if_maxwell_with_H = .false.
703 CALL find_string(21,
'===Quasi-static approximation (true) or (false)?', test)
705 READ(21,*)
inputs%if_quasi_static_approx
707 inputs%if_quasi_static_approx = .false.
711 IF (
inputs%type_pb==
'fhd')
THEN 712 CALL find_string(21,
'===Steady current for fhd (true or false)?', test)
714 READ(21,*)
inputs%if_steady_current_fhd
716 inputs%if_steady_current_fhd = .false.
721 CALL read_until(21,
'===Number of subdomains in magnetic field (H) mesh')
722 READ(21,*)
inputs%nb_dom_H
724 CALL read_until(21,
'===List of subdomains for magnetic field (H) mesh')
725 READ(21,*)
inputs%list_dom_H
728 CALL read_until(21,
'===Number of interfaces in H mesh')
729 READ(21,*)
inputs%nb_inter_mu
731 IF (
inputs%nb_inter_mu>0)
THEN 732 CALL read_until(21,
'===List of interfaces in H mesh')
733 READ(21,*)
inputs%list_inter_mu
737 CALL read_until(21,
'===Number of Dirichlet sides for Hxn')
738 READ(21,*)
inputs%nb_dirichlet_sides_H
739 ALLOCATE(
inputs%list_dirichlet_sides_H(
inputs%nb_dirichlet_sides_H))
740 IF (
inputs%nb_dirichlet_sides_H>0)
THEN 741 CALL read_until(21,
'===List of Dirichlet sides for Hxn')
742 READ(21,*)
inputs%list_dirichlet_sides_H
746 CALL find_string(21,
'===Is permeability defined analytically (true/false)?', test)
748 READ(21,*)
inputs%analytical_permeability
750 inputs%analytical_permeability = .false.
752 IF (.NOT.
inputs%analytical_permeability)
THEN 753 CALL read_until(21,
'===Permeability in the conductive part (1:nb_dom_H)')
757 inputs%if_permeability_variable_in_theta = .false.
758 IF (
inputs%analytical_permeability)
THEN 759 CALL find_string(21,
'===Is permeability variable in theta (true/false)?', test)
761 READ(21,*)
inputs%if_permeability_variable_in_theta
766 inputs%if_use_fem_integration_for_mu_bar = .true.
767 IF (
inputs%analytical_permeability)
THEN 768 CALL find_string(21,
'===Use FEM Interpolation for magnetic permeability (true/false)?', test)
770 READ(21,*)
inputs%if_use_fem_integration_for_mu_bar
775 CALL read_until(21,
'===Conductivity in the conductive part (1:nb_dom_H)')
781 CALL find_string(21,
'===Minimum of conductivity in the whole domain', test)
783 READ(21,*)
inputs%sigma_min
785 test_sigma_min = .true.
790 CALL find_string(21,
'===Minimum of permeability in the whole domain', test)
794 IF (.NOT.
inputs%analytical_permeability)
THEN 802 CALL read_until(21,
'===Type of finite element for magnetic field')
803 READ(21,*)
inputs%type_fe_H
806 CALL read_until(21,
'===Magnetic Reynolds number')
810 CALL read_until(21,
'===Stabilization coefficient (divergence)')
812 IF (
inputs%nb_inter_mu>0 .OR.
inputs%nb_dirichlet_sides_H>0)
THEN 813 CALL read_until(21,
'===Stabilization coefficient for Dirichlet H and/or interface H/H')
820 CALL find_string(21,
'===Number of subdomains in magnetic potential (phi) mesh', test)
822 READ (21,*)
inputs%nb_dom_phi
827 IF (
inputs%nb_dom_phi>0)
THEN 829 CALL read_until(21,
'===List of subdomains for magnetic potential (phi) mesh')
830 READ(21,*)
inputs%list_dom_phi
833 CALL read_until(21,
'===How many boundary pieces for Dirichlet BCs on phi?')
834 READ(21,*)
inputs%phi_nb_dirichlet_sides
835 IF (
inputs%phi_nb_dirichlet_sides>0)
THEN 836 ALLOCATE(
inputs%phi_list_dirichlet_sides(
inputs%phi_nb_dirichlet_sides))
837 CALL read_until(21,
'===List of boundary pieces for Dirichlet BCs on phi')
838 READ(21,*)
inputs%phi_list_dirichlet_sides
840 ALLOCATE(
inputs%phi_list_dirichlet_sides(0))
844 CALL read_until(21,
'===Number of interfaces between H and phi')
845 READ(21,*)
inputs%nb_inter
847 CALL read_until(21,
'===List of interfaces between H and phi')
848 IF (
inputs%nb_inter>0)
THEN 849 READ(21,*)
inputs%list_inter_H_phi
853 CALL read_until(21,
'===Permeability in vacuum')
857 CALL read_until(21,
'===Type of finite element for scalar potential')
858 READ(21,*)
inputs%type_fe_phi
861 CALL read_until(21,
'===Stabilization coefficient (interface H/phi)')
866 CALL read_until(21,
'===Maximum number of iterations for Maxwell solver')
867 READ(21,*)
inputs%my_par_H_p_phi%it_max
868 CALL read_until(21,
'===Relative tolerance for Maxwell solver')
869 READ(21,*)
inputs%my_par_H_p_phi%rel_tol
870 CALL read_until(21,
'===Absolute tolerance for Maxwell solver')
871 READ(21,*)
inputs%my_par_H_p_phi%abs_tol
872 CALL find_string(21,
'===Maxwell solver verbose? (true/false)',test)
874 READ(21,*)
inputs%my_par_H_p_phi%verbose
876 CALL read_until(21,
'===Solver type for Maxwell (FGMRES, CG, ...)')
877 READ(21,*)
inputs%my_par_H_p_phi%solver
878 CALL read_until(21,
'===Preconditionner type for Maxwell solver (HYPRE, JACOBI, MUMPS...)')
879 READ(21,*)
inputs%my_par_H_p_phi%precond
883 CALL find_string(21,
'===Is there a temperature field?', test)
885 READ (21,*)
inputs%if_temperature
887 inputs%if_temperature = .false.
889 IF (
inputs%if_temperature)
THEN 891 CALL find_string(21,
'===Non-dimensional gravity coefficient', test)
893 READ (21,*)
inputs%gravity_coefficient
895 inputs%gravity_coefficient = 0.d0
898 CALL find_string(21,
'===Helmholtz force for ferrohydrodynamics? (true/false)', test)
900 READ (21,*)
inputs%if_helmholtz_force
902 CALL find_string(21,
'===Non-dimensional magnetic force coefficient for ferrohydrodynamics', test)
904 READ (21,*)
inputs%mag_force_coefficient
907 CALL read_until(21,
'===Number of subdomains in temperature mesh')
908 READ(21,*)
inputs%nb_dom_temp
910 CALL read_until(21,
'===List of subdomains for temperature mesh')
911 READ(21,*)
inputs%list_dom_temp
913 ALLOCATE(
inputs%temperature_diffusivity(
inputs%nb_dom_temp))
914 CALL find_string(21,
'===Density (1:nb_dom_temp)', test)
919 CALL read_until(21,
'===Heat capacity (1:nb_dom_temp)')
920 READ(21,*)
inputs%heat_capacity
922 DEALLOCATE (
inputs%density)
923 DEALLOCATE (
inputs%heat_capacity)
924 CALL read_until(21,
'===Thermal conductivity (1:nb_dom_temp)')
925 READ(21,*)
inputs%temperature_diffusivity
927 CALL find_string(21,
'===Volumetric heat capacity (1:nb_dom_temp)', test)
929 READ(21,*)
inputs%vol_heat_capacity
930 CALL read_until(21,
'===Thermal conductivity (1:nb_dom_temp)')
931 READ(21,*)
inputs%temperature_diffusivity
933 inputs%vol_heat_capacity = 1.d0
934 CALL read_until(21,
'===Diffusivity coefficient for temperature (1:nb_dom_temp)')
935 READ(21,*)
inputs%temperature_diffusivity
939 CALL read_until(21,
'===How many boundary pieces for Dirichlet BCs on temperature?')
940 READ(21,*)
inputs%temperature_nb_dirichlet_sides
941 IF (
inputs%temperature_nb_dirichlet_sides>0)
THEN 942 ALLOCATE(
inputs%temperature_list_dirichlet_sides(
inputs%temperature_nb_dirichlet_sides))
943 CALL read_until(21,
'===List of boundary pieces for Dirichlet BCs on temperature')
944 READ(21,*)
inputs%temperature_list_dirichlet_sides
946 ALLOCATE(
inputs%temperature_list_dirichlet_sides(0))
949 CALL find_string(21,
'===How many boundary pieces for Robin BCs on temperature?', test)
951 READ(21,*)
inputs%temperature_nb_robin_sides
953 inputs%temperature_nb_robin_sides = 0
955 IF (test .AND. (
inputs%temperature_nb_robin_sides>0))
THEN 956 ALLOCATE(
inputs%temperature_list_robin_sides(
inputs%temperature_nb_robin_sides))
957 CALL read_until(21,
'===List of boundary pieces for Robin BCs on temperature')
958 READ(21,*)
inputs%temperature_list_robin_sides
959 ALLOCATE(
inputs%convection_coeff(
inputs%temperature_nb_robin_sides))
960 CALL read_until(21,
'===Convection heat transfert coefficient (1:temperature_nb_robin_sides)')
961 READ(21,*)
inputs%convection_coeff
962 ALLOCATE(
inputs%exterior_temperature(
inputs%temperature_nb_robin_sides))
963 CALL read_until(21,
'===Exterior temperature (1:temperature_nb_robin_sides)')
964 READ(21,*)
inputs%exterior_temperature
966 ALLOCATE(
inputs%temperature_list_robin_sides(0))
969 CALL find_string(21,
'===Number of interfaces between velocity and temperature only domains (for nst applications)', test)
971 READ(21,*)
inputs%nb_inter_v_T
973 CALL read_until(21,
'===List of interfaces between velocity and temperature only domains (for nst applications)')
974 READ(21,*)
inputs%list_inter_v_T
976 ALLOCATE(
inputs%list_inter_v_T(0))
979 CALL read_until(21,
'===Maximum number of iterations for temperature solver')
980 READ(21,*)
inputs%my_par_temperature%it_max
981 CALL read_until(21,
'===Relative tolerance for temperature solver')
982 READ(21,*)
inputs%my_par_temperature%rel_tol
983 CALL read_until(21,
'===Absolute tolerance for temperature solver')
984 READ(21,*)
inputs%my_par_temperature%abs_tol
985 CALL find_string(21,
'===Temperature solver verbose? (true/false)',test)
987 READ(21,*)
inputs%my_par_temperature%verbose
989 CALL read_until(21,
'===Solver type for temperature (FGMRES, CG, ...)')
990 READ(21,*)
inputs%my_par_temperature%solver
991 CALL read_until(21,
'===Preconditionner type for temperature solver (HYPRE, JACOBI, MUMPS...)')
992 READ(21,*)
inputs%my_par_temperature%precond
996 CALL find_string(21,
'===Is there a level set?', test)
998 READ (21,*)
inputs%if_level_set
1000 inputs%if_level_set = .false.
1002 IF (
inputs%if_level_set)
THEN 1004 CALL find_string(21,
'===Do we fix level set? (true/false)', test)
1006 READ (21, *)
inputs%if_level_set_fixed
1008 inputs%if_level_set_fixed = .false.
1012 READ(21,*)
inputs%nb_fluid
1014 CALL read_until(21,
'===multiplier for h_min for level set')
1015 READ(21,*)
inputs%multiplier_for_h_min_distance
1018 inputs%level_set_cmax=0.d0
1020 CALL read_until(21,
'===Compression factor for level set')
1021 READ(21,*)
inputs%level_set_comp_factor
1024 CALL read_until(21,
'===Density of fluid 0, fluid 1, ...')
1025 READ(21,*)
inputs%density_fluid
1028 CALL read_until(21,
'===Dynamic viscosity of fluid 0, fluid 1, ...')
1029 READ(21,*)
inputs%dyna_visc_fluid
1031 IF (
inputs%type_pb==
'mhd' .OR.
inputs%type_pb==
'fhd')
THEN 1032 CALL find_string(21,
'===Conductivity of fluid 0, fluid 1, ...', test)
1034 inputs%variation_sigma_fluid =.true.
1036 READ(21,*)
inputs%sigma_fluid
1038 IF(test_sigma_min)
THEN 1042 inputs%variation_sigma_fluid =.false.
1046 CALL find_string(21,
'===Is there a surface tension?', test)
1048 READ (21,*)
inputs%if_surface_tension
1050 inputs%if_surface_tension = .false.
1052 IF (
inputs%if_surface_tension)
THEN 1054 CALL read_until(21,
'===Coefficients of surface tension for level set 0, level set 1, ...')
1056 READ(21,*)
inputs%coeff_surface
1059 CALL find_string(21,
'===Do we apply mass correction? (true/false)', test)
1061 READ (21,*)
inputs%if_mass_correction
1063 inputs%if_mass_correction=.true.
1066 CALL read_until(21,
'===How many boundary pieces for Dirichlet BCs on level set?')
1067 READ(21,*)
inputs%level_set_nb_dirichlet_sides
1068 IF (
inputs%level_set_nb_dirichlet_sides>0)
THEN 1069 ALLOCATE(
inputs%level_set_list_dirichlet_sides(
inputs%level_set_nb_dirichlet_sides))
1070 CALL read_until(21,
'===List of boundary pieces for Dirichlet BCs on level set')
1071 READ(21,*)
inputs%level_set_list_dirichlet_sides
1073 ALLOCATE(
inputs%level_set_list_dirichlet_sides(0))
1076 CALL read_until(21,
'===Maximum number of iterations for level set solver')
1077 READ(21,*)
inputs%my_par_level_set%it_max
1078 CALL read_until(21,
'===Relative tolerance for level set solver')
1079 READ(21,*)
inputs%my_par_level_set%rel_tol
1080 CALL read_until(21,
'===Absolute tolerance for level set solver')
1081 READ(21,*)
inputs%my_par_level_set%abs_tol
1082 CALL find_string(21,
'===Level set solver verbose? (true/false)',test)
1084 READ(21,*)
inputs%my_par_level_set%verbose
1086 CALL read_until(21,
'===Solver type for level set (FGMRES, CG, ...)')
1087 READ(21,*)
inputs%my_par_level_set%solver
1088 CALL read_until(21,
'===Preconditionner type for level set solver (HYPRE, JACOBI, MUMPS...)')
1089 READ(21,*)
inputs%my_par_level_set%precond
1092 CALL find_string(21,
'===How are the variables reconstructed from the level set function? (lin, reg)', test)
1094 READ (21,*)
inputs%level_set_reconstruction_type
1096 inputs%level_set_reconstruction_type =
'reg' 1098 IF (
inputs%level_set_reconstruction_type==
'reg')
THEN 1099 CALL find_string(21,
'===Value of the regularization coefficient in (0,0.5]', test)
1101 READ (21,*)
inputs%level_set_tanh_coeff_reconstruction
1102 IF (
inputs%level_set_tanh_coeff_reconstruction.LE.1d-2 .OR. &
1103 .5d0 .LE.
inputs%level_set_tanh_coeff_reconstruction)
THEN 1104 inputs%level_set_tanh_coeff_reconstruction = 0.45d0
1107 inputs%level_set_tanh_coeff_reconstruction = 0.45d0
1109 ELSE IF (
inputs%level_set_reconstruction_type/=
'lin')
THEN 1110 CALL error_petsc(
'BUG in read_my_data: variable reconstruction type not correct')
1113 IF(
inputs%level_set_reconstruction_type/=
'reg')
THEN 1114 CALL find_string(21,
'===Do we kill level set overshoot? (true/false)', test)
1116 READ (21,*)
inputs%if_kill_overshoot
1118 inputs%if_kill_overshoot=.false.
1121 inputs%if_kill_overshoot=.false.
1125 CALL find_string(21,
'===Do we use P2 finite element for level_set? (true/false)', test)
1127 READ(21,*)
inputs%if_level_set_P2
1129 inputs%if_level_set_P2=.true.
1133 CALL find_string(21,
'===Do we use JLG compression method for level_set? (true/false)', test)
1135 READ(21,*)
inputs%if_compression_mthd_JLG
1137 inputs%if_compression_mthd_JLG=.true.
1141 IF (
inputs%type_pb==
'mxw')
THEN 1142 CALL error_petsc(
'BUG in read_my_data: Level_set without Navier-Stokes')
1148 IF (
inputs%type_pb==
'mxw')
THEN 1149 CALL find_string(21,
'===Do we use Arpack?', test)
1151 READ (21,*)
inputs%if_arpack
1153 inputs%if_arpack = .false.
1155 IF (
inputs%if_arpack)
THEN 1156 CALL read_until(21,
'===Number of eigenvalues to compute')
1157 READ (21,*)
inputs%nb_eigenvalues
1158 CALL read_until(21,
'===Maximum number of Arpack iterations')
1159 READ (21,*)
inputs%arpack_iter_max
1160 CALL read_until(21,
'===Tolerance for Arpack')
1161 READ (21,*)
inputs%arpack_tolerance
1163 '===Which eigenvalues (''LM'', ''SM'', ''SR'', ''LR'' ''LI'', ''SI'')')
1164 READ (21,*)
inputs%arpack_which
1165 CALL find_string(21,
'===Create 2D vtu files for Arpack? (true/false)', test)
1167 READ (21,*)
inputs%if_arpack_vtu_2d
1169 inputs%if_arpack_vtu_2d = .false.
1174 inputs%if_arpack = .false.
1178 CALL find_string(21,
'===Vtu files in xml format? (true=xml/false=ascii)', test)
1180 READ (21,*)
inputs%if_xml
1186 CALL find_string(21,
'===Number of planes in real space for Visualization', test)
1188 READ (21,*)
inputs%number_of_planes_in_real_space
1190 inputs%number_of_planes_in_real_space = 10
1194 CALL find_string(21,
'===Frequency to write restart file', test)
1196 READ (21,*)
inputs%freq_restart
1198 inputs%freq_restart = 100000000
1200 CALL find_string(21,
'===Frequency to write energies', test)
1202 READ (21,*)
inputs%freq_en
1204 inputs%freq_en = 100000000
1206 CALL find_string(21,
'===Frequency to create plots', test)
1208 READ (21,*)
inputs%freq_plot
1210 inputs%freq_plot = 100000000
1212 CALL find_string(21,
'===Just postprocessing without computing? (true/false)', test)
1214 READ (21,*)
inputs%if_just_processing
1216 inputs%if_just_processing = .false.
1221 IF (
inputs%type_pb==
'mhd')
THEN 1222 CALL find_string(21,
'===Should some modes be zeroed out?', test)
1224 READ (21,*)
inputs%if_zero_out_modes
1226 inputs%if_zero_out_modes = .false.
1228 IF (
inputs%if_zero_out_modes)
THEN 1229 CALL read_until(21,
'===How many Navier-Stokes modes to zero out?')
1230 READ(21,*)
inputs%nb_select_mode_ns
1231 ALLOCATE(
inputs%list_select_mode_ns(
inputs%nb_select_mode_ns))
1232 CALL read_until(21,
'===List of Navier-Stokes modes to zero out?')
1233 READ(21,*)
inputs%list_select_mode_ns
1234 CALL read_until(21,
'===How Maxwell modes to zero out?')
1235 READ(21,*)
inputs%nb_select_mode_mxw
1236 ALLOCATE(
inputs%list_select_mode_mxw(
inputs%nb_select_mode_mxw))
1237 CALL read_until(21,
'===List of Maxwell modes to zero out?')
1238 READ(21,*)
inputs%list_select_mode_mxw
1243 CALL find_string(21,
'===Verbose timing? (true/false)', test)
1245 READ (21,*)
inputs%verbose_timing
1247 inputs%verbose_timing = .false.
1249 CALL find_string(21,
'===Verbose divergence? (true/false)', test)
1251 READ (21,*)
inputs%verbose_divergence
1253 inputs%verbose_divergence = .false.
1255 CALL find_string(21,
'===Verbose CFL? (true/false)', test)
1257 READ (21,*)
inputs%verbose_CFL
1259 inputs%verbose_CFL = .false.
1263 IF (
inputs%test_de_convergence)
THEN 1266 READ(21,*)
inputs%norm_ref(k)
1273 IF (
inputs%type_pb ==
'mxw' .AND.
inputs%irestart_u)
THEN 1288 INTEGER :: k, mode_min, mode_max, Delta_mode
1292 IF (
inputs%my_periodic%nb_periodic_pairs>0)
THEN 1296 IF (
inputs%vv_nb_dirichlet_sides(k)<1) cycle
1299 CALL error_petsc(
' BUG in read_my_data: Incompatible Dirichlet'// &
1300 ' and periodic BCs on velocity')
1304 IF (
inputs%pp_nb_dirichlet_sides>0)
THEN 1307 CALL error_petsc(
' BUG in read_my_data: Incompatible Dirichlet'// &
1308 ' and periodic BCs on pressure')
1315 IF (.NOT.
inputs%if_navier_stokes_with_u .AND.
inputs%if_ns_penalty)
THEN 1316 CALL error_petsc(
'BUG in read_my_data: No penalty with momentum formulation')
1320 IF (
inputs%if_temperature.AND.
inputs%my_periodic%nb_periodic_pairs>0)
THEN 1321 IF (
inputs%temperature_nb_dirichlet_sides>0)
THEN 1324 CALL error_petsc(
' BUG in read_my_data: Incompatible Dirichlet'// &
1325 ' and periodic BCs on temperature')
1331 IF (
inputs%if_level_set.AND.
inputs%my_periodic%nb_periodic_pairs>0)
THEN 1332 IF (
inputs%level_set_nb_dirichlet_sides>0)
THEN 1335 CALL error_petsc(
' BUG in read_my_data: Incompatible Dirichlet'// &
1336 ' and periodic BCs on level_set')
1342 IF (
inputs%temperature_nb_robin_sides>0)
THEN 1343 DO k = 1,
inputs%temperature_nb_robin_sides
1344 IF (minval(abs(
inputs%temperature_list_dirichlet_sides -
inputs%temperature_list_robin_sides(k))) == 0)
THEN 1345 CALL error_petsc(
' BUG in read_my_data: Incompatible Dirichlet'// &
1346 ' and Robin BCs for temperature')
1352 IF (
inputs%my_periodic%nb_periodic_pairs>0)
THEN 1353 IF (
inputs%type_pb==
'mxw' .OR.
inputs%type_pb==
'mhd' .OR.
inputs%type_pb==
'fhd')
THEN 1355 IF (
inputs%nb_dirichlet_sides_H>0)
THEN 1358 CALL error_petsc(
' BUG in read_my_data: Incompatible Dirichlet'// &
1359 ' and periodic BCs on magnetic field')
1364 IF (
inputs%nb_dom_phi>0 .AND.
inputs%phi_nb_dirichlet_sides>0)
THEN 1367 CALL error_petsc(
' BUG in read_my_data: Incompatible Dirichlet'// &
1368 ' and periodic BCs on scalar potential')
1375 IF (
inputs%my_periodic%nb_periodic_pairs>0)
THEN 1376 IF (
inputs%if_temperature .AND.
inputs%type_pb==
'mxw')
THEN 1377 CALL error_petsc(
'Bug in read_my_data: incompatible temperature with maxwell')
1382 IF ((.NOT.
inputs%if_temperature) .AND.
inputs%type_pb==
'fhd')
THEN 1383 CALL error_petsc(
'Bug in read_my_data: ferrohydrodynamics but no temperature')
1387 IF (
inputs%if_arpack)
THEN 1389 CALL error_petsc(
'Bug in read_my_data: #Fourier modes'// &
1390 ' not equal to #processors in Fourier direction')
1395 IF (
inputs%select_mode .AND. .NOT.
inputs%if_arpack)
THEN 1396 IF (
SIZE(
inputs%list_mode_lect)/=1)
THEN 1397 mode_max = maxval(
inputs%list_mode_lect)
1398 mode_min = minval(
inputs%list_mode_lect)
1399 IF (mod(mode_max-mode_min,
SIZE(
inputs%list_mode_lect)-1)/=0)
THEN 1400 CALL error_petsc(
'Bug in read_my_data: Fourier modes not equally spaced ')
1402 delta_mode = (mode_max-mode_min)/(
SIZE(
inputs%list_mode_lect)-1)
1403 DO k = 0,
SIZE(
inputs%list_mode_lect)-1
1404 IF (minval(abs(
inputs%list_mode_lect-(delta_mode*k+mode_min)))/=0)
THEN 1405 CALL error_petsc(
'Bug in read_my_data: Fourier modes not equally spaced ')
1408 DO k = 1,
SIZE(
inputs%list_mode_lect)-1
1409 IF (
inputs%list_mode_lect(k+1).LE.
inputs%list_mode_lect(k))
THEN 1410 CALL error_petsc(
'Bug in read_my_data: Fourier modes not in increasing order ')
1417 IF (
inputs%if_just_processing)
THEN 1418 inputs%irestart_u = .false.
1419 inputs%irestart_h = .false.
1425 IF (.NOT.
ASSOCIATED(
inputs%list_dom_ns))
ALLOCATE(
inputs%list_dom_ns(0))
1426 IF (.NOT.
ASSOCIATED(
inputs%list_dom_H))
ALLOCATE(
inputs%list_dom_H(0))
1427 IF (.NOT.
ASSOCIATED(
inputs%list_dom_phi))
ALLOCATE(
inputs%list_dom_phi(0))
1428 IF (.NOT.
ASSOCIATED(
inputs%list_dom_temp))
ALLOCATE(
inputs%list_dom_temp(0))
1434 INTEGER,
DIMENSION(:) :: list
1439 DO k = 1,
inputs%my_periodic%nb_periodic_pairs
1440 DO n = 1,
SIZE(list)
1441 IF (minval(abs(list(n)-
inputs%my_periodic%list_periodic(:,k)))==0)
THEN
subroutine find_string(unit, string, okay)
subroutine error_petsc(string)
subroutine read_until(unit, string, error)
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