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