SFEMaNS  version 5.3
Reference documentation for SFEMaNS
condlim_test_24.f90
Go to the documentation of this file.
2  USE my_util
3  USE def_type_mesh
4  USE input_data
5 !!$ATTENTION
6 !!$Some subroutines have been commented to avoid warning messages when compiling executable.
7 !!$It can not be done in the module boundary_generic that expects all subroutines to be present.
8 !!$END ATTENTION
9  PUBLIC :: init_velocity_pressure
10 !!$ PUBLIC :: init_temperature
11 !!$ PUBLIC :: init_level_set
12  PUBLIC :: source_in_ns_momentum
13 !!$ PUBLIC :: source_in_temperature
14 !!$ PUBLIC :: source_in_level_set
15  PUBLIC :: vv_exact
17  PUBLIC :: pp_exact
18 !!$ PUBLIC :: temperature_exact
19 !!$ PUBLIC :: level_set_exact
20  PUBLIC :: penal_in_real_space
21 !!$ PUBLIC :: extension_velocity
22 !!$ PUBLIC :: Vexact
23 !!$ PUBLIC :: H_B_quasi_static
24 !!$ PUBLIC :: Hexact
25 !!$ PUBLIC :: Phiexact
26 !!$ PUBLIC :: Jexact_gauss
27 !!$ PUBLIC :: Eexact_gauss
28 !!$ PUBLIC :: init_maxwell
29 !!$ PUBLIC :: mu_bar_in_fourier_space
30 !!$ PUBLIC :: grad_mu_bar_in_fourier_space
31 !!$ PUBLIC :: mu_in_real_space
32  PRIVATE
33 
34 CONTAINS
35  !===============================================================================
36  ! Boundary conditions for Navier-Stokes
37  !===============================================================================
38 
39  !===Initialize velocity, pressure
40  SUBROUTINE init_velocity_pressure(mesh_f, mesh_c, time, dt, list_mode, &
41  un_m1, un, pn_m1, pn, phin_m1, phin)
42  IMPLICIT NONE
43  TYPE(mesh_type) :: mesh_f, mesh_c
44  REAL(KIND=8), INTENT(OUT):: time
45  REAL(KIND=8), INTENT(IN) :: dt
46  INTEGER, DIMENSION(:), INTENT(IN) :: list_mode
47  REAL(KIND=8), DIMENSION(:,:,:), INTENT(OUT):: un_m1, un
48  REAL(KIND=8), DIMENSION(:,:,:), INTENT(OUT):: pn_m1, pn, phin_m1, phin
49  INTEGER :: mode, i, j
50  REAL(KIND=8), DIMENSION(mesh_c%np) :: pn_m2
51 
52  time = 0.d0
53  DO i= 1, SIZE(list_mode)
54  mode = list_mode(i)
55  DO j = 1, 6
56  !===velocity
57  un_m1(:,j,i) = vv_exact(j,mesh_f%rr,mode,time-dt)
58  un(:,j,i) = vv_exact(j,mesh_f%rr,mode,time)
59  END DO
60  DO j = 1, 2
61  !===pressure
62  pn_m2(:) = pp_exact(j,mesh_c%rr,mode,time-2*dt)
63  pn_m1(:,j,i) = pp_exact(j,mesh_c%rr,mode,time-dt)
64  pn(:,j,i) = pp_exact(j,mesh_c%rr,mode,time)
65  phin_m1(:,j,i) = pn_m1(:,j,i) - pn_m2(:)
66  phin(:,j,i) = pn(:,j,i) - pn_m1(:,j,i)
67  ENDDO
68  ENDDO
69  END SUBROUTINE init_velocity_pressure
70 
71 !!$ !===Initialize temperature
72 !!$ SUBROUTINE init_temperature(mesh, time, dt, list_mode, tempn_m1, tempn)
73 !!$ IMPLICIT NONE
74 !!$ TYPE(mesh_type) :: mesh
75 !!$ REAL(KIND=8), INTENT(OUT):: time
76 !!$ REAL(KIND=8), INTENT(IN) :: dt
77 !!$ INTEGER, DIMENSION(:), INTENT(IN) :: list_mode
78 !!$ REAL(KIND=8), DIMENSION(:,:,:), INTENT(OUT):: tempn_m1, tempn
79 !!$ INTEGER :: mode, i, j
80 !!$
81 !!$ time = 0.d0
82 !!$ DO i= 1, SIZE(list_mode)
83 !!$ mode = list_mode(i)
84 !!$ DO j = 1, 2
85 !!$ tempn_m1(:,j,i) = temperature_exact(j, mesh%rr, mode, time-dt)
86 !!$ tempn (:,j,i) = temperature_exact(j, mesh%rr, mode, time)
87 !!$ ENDDO
88 !!$ ENDDO
89 !!$ END SUBROUTINE init_temperature
90 
91 !!$ !===Initialize level_set
92 !!$ SUBROUTINE init_level_set(vv_mesh, time, &
93 !!$ dt, list_mode, level_set_m1, level_set)
94 !!$ IMPLICIT NONE
95 !!$ TYPE(mesh_type) :: vv_mesh
96 !!$ REAL(KIND=8), INTENT(OUT):: time
97 !!$ REAL(KIND=8), INTENT(IN) :: dt
98 !!$ INTEGER, DIMENSION(:), INTENT(IN) :: list_mode
99 !!$ REAL(KIND=8), DIMENSION(:,:,:,:), INTENT(OUT):: level_set, level_set_m1
100 !!$ INTEGER :: mode, i, j, n
101 !!$
102 !!$ time = 0.d0
103 !!$ DO i= 1, SIZE(list_mode)
104 !!$ mode = list_mode(i)
105 !!$ DO j = 1, 2
106 !!$ !===level_set
107 !!$ DO n = 1, inputs%nb_fluid -1
108 !!$ level_set_m1(n,:,j,i) = level_set_exact(n,j,vv_mesh%rr,mode,time-dt)
109 !!$ level_set (n,:,j,i) = level_set_exact(n,j,vv_mesh%rr,mode,time)
110 !!$ END DO
111 !!$ END DO
112 !!$ END DO
113 !!$
114 !!$ END SUBROUTINE init_level_set
115 
116  !===Source in momemtum equation. Always called.
117  FUNCTION source_in_ns_momentum(TYPE, rr, mode, i, time, Re, ty, opt_density, opt_tempn) RESULT(vv)
118  IMPLICIT NONE
119  INTEGER , INTENT(IN) :: TYPE
120  REAL(KIND=8), DIMENSION(:,:), INTENT(IN) :: rr
121  INTEGER , INTENT(IN) :: mode, i
122  REAL(KIND=8), INTENT(IN) :: time
123  REAL(KIND=8), INTENT(IN) :: Re
124  CHARACTER(LEN=2), INTENT(IN) :: ty
125  REAL(KIND=8), DIMENSION(:,:,:), OPTIONAL, INTENT(IN) :: opt_density
126  REAL(KIND=8), DIMENSION(:,:,:), OPTIONAL, INTENT(IN) :: opt_tempn
127  REAL(KIND=8), DIMENSION(SIZE(rr,2)) :: vv
128  REAL(KIND=8), DIMENSION(SIZE(rr,2)) :: r, z
129  INTEGER :: m
130  REAL(KIND=8) :: t
131  CHARACTER(LEN=2) :: np
132 
133  IF (PRESENT(opt_density)) CALL error_petsc('density should not be present for test 24')
134  IF (PRESENT(opt_tempn)) CALL error_petsc('temperature should not be present for test 24')
135 
136  r = rr(1,:)
137  z = rr(2,:)
138  m = mode
139  t = time
140 
141  IF (type==1.AND.m==0) THEN
142  vv = (2*r-1)**2*cos(z+t) & !du/dt
143  + 2*r*z**3*cos(t) & !GRAD p
144  !-(1/Re)*(sin(z+t)*(12*r**2-1)/r**2-(2-1/r)*(6*r-1)*cos(z+t)) & !viscous
145  -(1/re)*sin(z+t)*(-4*r**4 +4*r**3+11*r**2-1)/r**2 & ! viscous GOOD
146  +(2*r-1)/r**3*(6*r-1)*cos(z+t)**2*(4*r**4-4*r**3-11*r**2+1) & !ROT(u) x u
147  -(r-0.5d0)/2 !ROT(u) x u
148  ELSE IF (type==1.AND.m==1) THEN
149  vv = 1.d0 !GRAD p
150  ELSE IF (type==1.AND.m==4) THEN
151  vv = (r-0.5d0)/2 !ROT(u) x u
152  ELSE IF (type==2.AND.m==2) THEN
153  vv = (4*r**2 - 4*r - 11 + 1/r**2)*(r - 0.5d0)*cos(z+t) & !ROT(u) x u
154  -(2-1/r)*(6*r-1)*cos(z+t) !ROT(u) x u
155  ELSE IF (type==3.AND.m==2) THEN
156  vv = -(2-1/r)**2*(6*r-1)*cos(z+t) !ROT(u) x u
157  ELSE IF (type==4.AND.m==1) THEN
158  vv = -1.d0 !GRAD p
159  ELSE IF (type==4.AND.m==4) THEN
160  vv = -(r-0.5d0)**2/r !ROT(u) x u
161  ELSE IF (type==5.AND.m==0) THEN
162  vv = -(2-1/r)*(6*r-1)*sin(z+t) & !du/dt
163  + 3*r**2*z**2*cos(t) & !GRAD p
164  +(1/re)*cos(z+t)*(12*r**4-8*r**3-11*r**2-1)/r**3 & !viscous
165  -(2*r-1)**2*sin(z+t)*cos(z+t)*(4*r**4-4*r**3-11*r**2+1)/r**2 !ROT(u) x u
166  ELSE IF(type==6.AND.m==2) THEN
167  vv = -(1.d0/re)*(-3/r + 2/r**2) & !viscous
168  +(2*r-1)**2*sin(z+t) !ROT(u) x u
169  ELSE
170  vv = 0.d0
171  END IF
172  RETURN
173 
174  !===Dummies variables to avoid warning
175  m=i; np=ty
176  !===Dummies variables to avoid warning
177  END FUNCTION source_in_ns_momentum
178 
179 !!$ !===Extra source in temperature equation. Always called.
180 !!$ FUNCTION source_in_temperature(TYPE, rr, m, t)RESULT(vv)
181 !!$ IMPLICIT NONE
182 !!$ INTEGER , INTENT(IN) :: TYPE
183 !!$ REAL(KIND=8), DIMENSION(:,:), INTENT(IN) :: rr
184 !!$ INTEGER , INTENT(IN) :: m
185 !!$ REAL(KIND=8), INTENT(IN) :: t
186 !!$ REAL(KIND=8), DIMENSION(SIZE(rr,2)) :: vv
187 !!$
188 !!$ vv = 0.d0
189 !!$ CALL error_petsc('source_in_temperature: should not be called for this test')
190 !!$ RETURN
191 !!$ END FUNCTION source_in_temperature
192 
193 !!$ !===Extra source in level set equation. Always called.
194 !!$ FUNCTION source_in_level_set(interface_nb,TYPE, rr, m, t)RESULT(vv)
195 !!$ IMPLICIT NONE
196 !!$ INTEGER , INTENT(IN) :: TYPE
197 !!$ REAL(KIND=8), DIMENSION(:,:), INTENT(IN) :: rr
198 !!$ INTEGER , INTENT(IN) :: m, interface_nb
199 !!$ REAL(KIND=8), INTENT(IN) :: t
200 !!$ REAL(KIND=8), DIMENSION(SIZE(rr,2)) :: vv
201 !!$
202 !!$ vv=0.d0
203 !!$ CALL error_petsc('sourece_in_temperature: should not be called for this test')
204 !!$ END FUNCTION source_in_level_set
205 
206  !===Velocity for boundary conditions in Navier-Stokes.
207  !===Can be used also to initialize velocity in: init_velocity_pressure_temperature
208  FUNCTION vv_exact(TYPE,rr,m,t) RESULT(vv)
210  IMPLICIT NONE
211  INTEGER , INTENT(IN) :: TYPE
212  REAL(KIND=8), DIMENSION(:,:), INTENT(IN) :: rr
213  INTEGER, INTENT(IN) :: m
214  REAL(KIND=8), INTENT(IN) :: t
215  REAL(KIND=8), DIMENSION(SIZE(rr,2)) :: vv
216  REAL(KIND=8), DIMENSION(SIZE(rr,2)) :: r, z
217  INTEGER :: n
218 
219  r = rr(1,:)
220  z = rr(2,:)
221 
222  IF (type==1.AND.m==0) THEN
223  DO n = 1, SIZE(rr,2)
224  IF (rr(1,n)>0.5d0) THEN
225  vv(n) = (2*rr(1,n)-1)**2*sin(rr(2,n)+t)
226  ELSE
227  vv(n) = 0.d0
228  END IF
229  END DO
230  ELSE IF (type==5.AND.m==0) THEN
231  DO n = 1, SIZE(rr,2)
232  IF (rr(1,n)>0.5d0) THEN
233  vv(n) = (2-1.d0/rr(1,n))*(6*rr(1,n)-1)*cos(rr(2,n)+t)
234  ELSE
235  vv(n) = 0.d0
236  END IF
237  END DO
238  ELSE IF (type==6.AND.m==2) THEN
239  DO n = 1, SIZE(rr,2)
240  IF (rr(1,n)>0.5d0) THEN
241  vv(n) = rr(1,n)-0.5d0
242  ELSE
243  vv(n) = 0.d0
244  END IF
245  END DO
246  ELSE
247  vv = 0.d0
248  END IF
249  RETURN
250  END FUNCTION vv_exact
251 
252  !===Solid velocity imposed when using penalty technique
253  !===Defined in Fourier space on mode 0 only.
254  FUNCTION imposed_velocity_by_penalty(rr,t) RESULT(vv)
255  IMPLICIT NONE
256  REAL(KIND=8), DIMENSION(:,:), INTENT(IN) :: rr
257  REAL(KIND=8), INTENT(IN) :: t
258  REAL(KIND=8), DIMENSION(SIZE(rr,2),6) :: vv
259  REAL(KIND=8) :: r
260 
261  vv = 0.d0
262  RETURN
263 
264  !===Dummies variables to avoid warning
265  r=rr(1,1); r=t
266  !===Dummies variables to avoid warning
267  END FUNCTION imposed_velocity_by_penalty
268 
269  !===Pressure for boundary conditions in Navier-Stokes.
270  !===Can be used also to initialize pressure in the subroutine init_velocity_pressure.
271  !===Use this routine for outflow BCs only.
272  !===CAUTION: Do not enfore BCs on pressure where normal component
273  ! of velocity is prescribed.
274  FUNCTION pp_exact(TYPE,rr,m,t) RESULT (vv)
275  IMPLICIT NONE
276  INTEGER , INTENT(IN) :: TYPE
277  REAL(KIND=8), DIMENSION(:,:), INTENT(IN) :: rr
278  INTEGER , INTENT(IN) :: m
279  REAL(KIND=8), INTENT(IN) :: t
280  REAL(KIND=8), DIMENSION(SIZE(rr,2)) :: vv
281  REAL(KIND=8), DIMENSION(SIZE(rr,2)) :: r, z
282 
283  r = rr(1,:)
284  z = rr(2,:)
285 
286  IF (type==1.AND.m==0) THEN
287  vv(:) = r**2*z**3*cos(t)
288  ELSE IF (type==1.AND.m==1) THEN
289  vv(:) = r
290  ELSE
291  vv = 0.d0
292  END IF
293  RETURN
294  END FUNCTION pp_exact
295 
296 !!$ !===Temperature for boundary conditions in temperature equation.
297 !!$ FUNCTION temperature_exact(TYPE,rr,m,t) RESULT (vv)
298 !!$ IMPLICIT NONE
299 !!$ INTEGER , INTENT(IN) :: TYPE
300 !!$ REAL(KIND=8), DIMENSION(:,:), INTENT(IN) :: rr
301 !!$ INTEGER , INTENT(IN) :: m
302 !!$ REAL(KIND=8), INTENT(IN) :: t
303 !!$ REAL(KIND=8), DIMENSION(SIZE(rr,2)) :: vv
304 !!$
305 !!$ vv = 0.d0
306 !!$ CALL error_petsc('temperature_exact: should not be called for this test')
307 !!$ RETURN
308 !!$ END FUNCTION temperature_exact
309 
310 !!$ !===Can be used to initialize level set in the subroutine init_level_set.
311 !!$ FUNCTION level_set_exact(interface_nb,TYPE,rr,m,t) RESULT (vv)
312 !!$ IMPLICIT NONE
313 !!$ INTEGER , INTENT(IN) :: TYPE
314 !!$ REAL(KIND=8), DIMENSION(:,:), INTENT(IN) :: rr
315 !!$ INTEGER , INTENT(IN) :: m, interface_nb
316 !!$ REAL(KIND=8), INTENT(IN) :: t
317 !!$ REAL(KIND=8), DIMENSION(SIZE(rr,2)) :: vv
318 !!$
319 !!$ vv = 0.d0
320 !!$ CALL error_petsc('level_set_exact: should not be called for this test')
321 !!$ RETURN
322 !!$
323 !!$ END FUNCTION level_set_exact
324 
325  !===Penalty coefficient (if needed)
326  !===This coefficient is equal to zero in subdomain
327  !===where penalty is applied (penalty is zero in solid)
328  FUNCTION penal_in_real_space(mesh,rr_gauss,angles,nb_angles,nb,ne,time) RESULT(vv)
329  IMPLICIT NONE
330  TYPE(mesh_type) :: mesh
331  REAL(KIND=8), DIMENSION(:,:), INTENT(IN) :: rr_gauss
332  REAL(KIND=8), DIMENSION(:), INTENT(IN) :: angles
333  INTEGER, INTENT(IN) :: nb_angles
334  INTEGER, INTENT(IN) :: nb, ne
335  REAL(KIND=8), INTENT(IN) :: time
336  REAL(KIND=8), DIMENSION(nb_angles,ne-nb+1) :: vv
337  INTEGER :: n, n_loc
338  REAL(KIND=8) :: r
339 
340  DO n = nb, ne
341  n_loc = n - nb + 1
342  IF (rr_gauss(1,n_loc).LE.0.5d0) THEN
343  vv(:,n_loc) = 0.d0
344  ELSE
345  vv(:,n_loc) = 1.d0
346  END IF
347  END DO
348  RETURN
349 
350  !===Dummies variables to avoid warning
351  n=mesh%np; n=SIZE(angles); n=nb_angles; r=time
352  !===Dummies variables to avoid warning
353  END FUNCTION penal_in_real_space
354 
355 !!$ !===Extension of the velocity field in the solid.
356 !!$ !===Used when temperature or Maxwell equations are solved.
357 !!$ !===It extends the velocity field on the Navier-Stokes domain to a
358 !!$ !===velocity field on the temperature and the Maxwell domain.
359 !!$ !===It is also used if problem type=mxw and restart velocity
360 !!$ !===is set to true in data (type problem denoted mxx in the code).
361 !!$ FUNCTION extension_velocity(TYPE, H_mesh, mode, t, n_start) RESULT(vv)
362 !!$ IMPLICIT NONE
363 !!$ TYPE(mesh_type), INTENT(IN) :: H_mesh
364 !!$ INTEGER , INTENT(IN) :: TYPE, n_start
365 !!$ INTEGER, INTENT(IN) :: mode
366 !!$ REAL(KIND=8), INTENT(IN) :: t
367 !!$ REAL(KIND=8), DIMENSION(H_Mesh%np) :: vv
368 !!$
369 !!$ vv = 0.d0
370 !!$ RETURN
371 !!$
372 !!$ END FUNCTION extension_velocity
373 
374  !===============================================================================
375  ! Boundary conditions for Maxwell
376  !===============================================================================
377 !!$ !===Velocity used in the induction equation.
378 !!$ !===Used only if problem type is mxw and restart velocity is false
379 !!$ FUNCTION Vexact(m, H_mesh) RESULT(vv) !Set uniquement a l'induction
380 !!$ IMPLICIT NONE
381 !!$ TYPE(mesh_type), INTENT(IN) :: H_mesh
382 !!$ INTEGER, INTENT(IN) :: m
383 !!$ REAL(KIND=8), DIMENSION(H_mesh%np,6) :: vv
384 !!$
385 !!$ vv = 0.d0
386 !!$ CALL error_petsc('Vexact: should not be called for this test')
387 !!$ END FUNCTION Vexact
388 
389 !!$ !===Magnetic field and magnetic induction for quasi-static approximation
390 !!$ !===if needed
391 !!$ FUNCTION H_B_quasi_static(char_h_b, rr, m) RESULT(vv)
392 !!$ IMPLICIT NONE
393 !!$ CHARACTER(LEN=1), INTENT(IN) :: char_h_b
394 !!$ REAL(KIND=8), DIMENSION(:,:), INTENT(IN) :: rr
395 !!$ INTEGER, INTENT(IN) :: m
396 !!$ REAL(KIND=8), DIMENSION(SIZE(rr,2),6) :: vv
397 !!$
398 !!$ vv = 0.d0
399 !!$ RETURN
400 !!$ END FUNCTION H_B_quasi_static
401 
402 !!$ !===Magnetic field for boundary conditions in the Maxwell equations.
403 !!$ FUNCTION Hexact(H_mesh,TYPE, rr, m, mu_H_field, t) RESULT(vv)
404 !!$ IMPLICIT NONE
405 !!$ TYPE(mesh_type), INTENT(IN) :: H_mesh
406 !!$ INTEGER , INTENT(IN) :: TYPE
407 !!$ REAL(KIND=8), DIMENSION(:,:), INTENT(IN) :: rr
408 !!$ INTEGER , INTENT(IN) :: m
409 !!$ REAL(KIND=8), INTENT(IN) :: t
410 !!$ REAL(KIND=8), DIMENSION(:), INTENT(IN) :: mu_H_field
411 !!$ REAL(KIND=8), DIMENSION(SIZE(rr,2)) :: vv
412 !!$
413 !!$ vv=0.d0
414 !!$ CALL error_petsc('Hexact: should not be called for this test')
415 !!$ RETURN
416 !!$ END FUNCTION Hexact
417 
418 !!$ !===Scalar potential for boundary conditions in the Maxwell equations.
419 !!$ FUNCTION Phiexact(TYPE, rr, m, mu_phi,t) RESULT(vv)
420 !!$ IMPLICIT NONE
421 !!$ INTEGER , INTENT(IN) :: TYPE
422 !!$ REAL(KIND=8), DIMENSION(:,:), INTENT(IN) :: rr
423 !!$ INTEGER , INTENT(IN) :: m
424 !!$ REAL(KIND=8), INTENT(IN) :: mu_phi, t
425 !!$ REAL(KIND=8), DIMENSION(SIZE(rr,2)) :: vv
426 !!$
427 !!$ vv=0.d0
428 !!$ CALL error_petsc('Phiexact: should not be called for this test')
429 !!$ RETURN
430 !!$ END FUNCTION Phiexact
431 
432 !!$ !===Current in Ohm's law. Curl(H) = sigma(E + uxB) + current
433 !!$ FUNCTION Jexact_gauss(TYPE, rr, m, mu_phi, sigma, mu_H, t, mesh_id, opt_B_ext) RESULT(vv)
434 !!$ IMPLICIT NONE
435 !!$ INTEGER , INTENT(IN) :: TYPE
436 !!$ REAL(KIND=8), DIMENSION(:), INTENT(IN) :: rr
437 !!$ INTEGER , INTENT(IN) :: m
438 !!$ REAL(KIND=8), INTENT(IN) :: mu_phi, sigma, mu_H, t
439 !!$ INTEGER , INTENT(IN) :: mesh_id
440 !!$ REAL(KIND=8), DIMENSION(6), OPTIONAL,INTENT(IN) :: opt_B_ext
441 !!$ REAL(KIND=8) :: vv
442 !!$
443 !!$ vv=0.d0
444 !!$ CALL error_petsc('Jexact_gauss: should not be called for this test')
445 !!$ RETURN
446 !!$ END FUNCTION Jexact_gauss
447 
448 !!$ !===Electric field for Neumann BC (cf. doc)
449 !!$ FUNCTION Eexact_gauss(TYPE, rr, m, mu_phi, sigma, mu_H, t) RESULT(vv)
450 !!$ IMPLICIT NONE
451 !!$ INTEGER, INTENT(IN) :: TYPE
452 !!$ REAL(KIND=8), DIMENSION(:), INTENT(IN) :: rr
453 !!$ INTEGER, INTENT(IN) :: m
454 !!$ REAL(KIND=8), INTENT(IN) :: mu_phi, sigma, mu_H, t
455 !!$ REAL(KIND=8) :: vv
456 !!$
457 !!$ vv = 0.d0
458 !!$ CALL error_petsc('Eexact: should not be called for this test')
459 !!$ END FUNCTION Eexact_gauss
460 
461 !!$ !===Initialization of magnetic field and scalar potential (if present)
462 !!$ SUBROUTINE init_maxwell(H_mesh, phi_mesh, time, dt, mu_H_field, mu_phi, &
463 !!$ list_mode, Hn1, Hn, phin1, phin)
464 !!$ IMPLICIT NONE
465 !!$ TYPE(mesh_type) :: H_mesh, phi_mesh
466 !!$ REAL(KIND=8), INTENT(OUT):: time
467 !!$ REAL(KIND=8), INTENT(IN) :: dt
468 !!$ REAL(KIND=8), DIMENSION(:), INTENT(IN) :: mu_H_field
469 !!$ REAL(KIND=8), INTENT(IN) :: mu_phi
470 !!$ INTEGER, DIMENSION(:), INTENT(IN) :: list_mode
471 !!$ REAL(KIND=8), DIMENSION(:,:,:), INTENT(OUT):: Hn, Hn1
472 !!$ REAL(KIND=8), DIMENSION(:,:,:), INTENT(OUT):: phin, phin1
473 !!$
474 !!$ CALL error_petsc('init_maxwell: should not be called for this test')
475 !!$ END SUBROUTINE init_maxwell
476 
477 !!$ !===Analytical permeability (if needed)
478 !!$ !===This function is not needed unless the flag
479 !!$ !=== ===Use FEM Interpolation for magnetic permeability (true/false)
480 !!$ !===is activated and set to .FALSE. in the data data file. Default is .TRUE.
481 !!$ FUNCTION mu_bar_in_fourier_space(H_mesh,nb,ne,pts,pts_ids) RESULT(vv)
482 !!$ IMPLICIT NONE
483 !!$ TYPE(mesh_type), INTENT(IN) :: H_mesh
484 !!$ REAL(KIND=8), DIMENSION(ne-nb+1) :: vv
485 !!$ INTEGER, INTENT(IN) :: nb, ne
486 !!$ REAL(KIND=8),DIMENSION(2,ne-nb+1),OPTIONAL :: pts
487 !!$ INTEGER, DIMENSION(ne-nb+1), OPTIONAL :: pts_ids
488 !!$
489 !!$ vv = 1.d0
490 !!$ CALL error_petsc('mu_bar_in_fourier_space: should not be called for this test')
491 !!$ RETURN
492 !!$ END FUNCTION mu_bar_in_fourier_space
493 
494 !!$ !===Analytical mu_in_fourier_space (if needed)
495 !!$ !===This function is not needed unless the flag
496 !!$ !=== ===Use FEM Interpolation for magnetic permeability (true/false)
497 !!$ !===is activated and set to .FALSE. in the data data file. Default is .TRUE.
498 !!$ FUNCTION grad_mu_bar_in_fourier_space(pt,pt_id) RESULT(vv)
499 !!$ IMPLICIT NONE
500 !!$ REAL(KIND=8),DIMENSION(2), INTENT(in):: pt
501 !!$ INTEGER,DIMENSION(1), INTENT(in) :: pt_id
502 !!$ REAL(KIND=8),DIMENSION(2) :: vv
503 !!$
504 !!$ vv=0.d0
505 !!$ CALL error_petsc('grad_mu_bar_in_fourier_space: should not be called for this test')
506 !!$ RETURN
507 !!$ END FUNCTION grad_mu_bar_in_fourier_space
508 
509 !!$ !===Analytical permeability, mu in real space (if needed)
510 !!$ FUNCTION mu_in_real_space(H_mesh,angles,nb_angles,nb,ne,time) RESULT(vv)
511 !!$ IMPLICIT NONE
512 !!$ TYPE(mesh_type), INTENT(IN) :: H_mesh
513 !!$ REAL(KIND=8), DIMENSION(:), INTENT(IN) :: angles
514 !!$ INTEGER, INTENT(IN) :: nb_angles
515 !!$ INTEGER, INTENT(IN) :: nb, ne
516 !!$ REAL(KIND=8), INTENT(IN) :: time
517 !!$ REAL(KIND=8), DIMENSION(nb_angles,ne-nb+1) :: vv
518 !!$
519 !!$ vv = 1.d0
520 !!$ CALL error_petsc('mu_in_real_space: should not be called for this test')
521 !!$ RETURN
522 !!$ END FUNCTION mu_in_real_space
523 
524 END MODULE boundary_test_24
subroutine, public init_velocity_pressure(mesh_f, mesh_c, time, dt, list_mode, un_m1, un, pn_m1, pn, phin_m1, phin)
real(kind=8) function, dimension(size(rr, 2)), public pp_exact(TYPE, rr, m, t)
subroutine error_petsc(string)
Definition: my_util.f90:16
real(kind=8) function, dimension(size(rr, 2)), public vv_exact(TYPE, rr, m, t)
real(kind=8) function, dimension(size(rr, 2)), public source_in_ns_momentum(TYPE, rr, mode, i, time, Re, ty, opt_density, opt_tempn)
real(kind=8) function, dimension(nb_angles, ne-nb+1), public penal_in_real_space(mesh, rr_gauss, angles, nb_angles, nb, ne, time)
real(kind=8) function, dimension(size(rr, 2), 6), public imposed_velocity_by_penalty(rr, t)