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