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