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