278 FUNCTION vexact(m, H_mesh) RESULT(vv) !Set uniquement a l'induction
281 INTEGER,
INTENT(IN) :: m
282 REAL(KIND=8),
DIMENSION(H_mesh%np,6) :: vv
307 FUNCTION hexact(H_mesh,TYPE, rr, m, mu_H_field, t) RESULT(vv)
310 INTEGER ,
INTENT(IN) :: type
311 REAL(KIND=8),
DIMENSION(:,:),
INTENT(IN) :: rr
312 INTEGER ,
INTENT(IN) :: m
313 REAL(KIND=8),
INTENT(IN) ::
t
314 REAL(KIND=8),
DIMENSION(:),
INTENT(IN) :: mu_h_field
315 REAL(KIND=8),
DIMENSION(SIZE(rr,2)) :: vv
316 INTEGER,
DIMENSION(SIZE(rr,2)) :: id
324 if (
SIZE(rr,2)== h_mesh%np)
THEN
326 id(h_mesh%jj(:,mm)) = h_mesh%i_d(mm)
338 vv(n) = rr(1,n)*rr(2,n)
340 vv(n) = (3.d0*rr(1,n)+2.d0)*rr(2,n)**3*rr(1,n)/&
341 (3.d0*rr(2,n)**2*rr(1,n) + 2.d0*rr(2,n)**2 + 2.d0*lambda_mu_t18 )
344 ELSE IF (type==5)
THEN
345 vv = - 0.5 * ( rr(2,:)**2*(3*rr(1,:)+2) )/( 1.d0 + rr(1,:) )
357 FUNCTION phiexact(TYPE, rr, m, mu_phi,t) RESULT(vv)
359 INTEGER ,
INTENT(IN) :: type
360 REAL(KIND=8),
DIMENSION(:,:),
INTENT(IN) :: rr
361 INTEGER ,
INTENT(IN) :: m
362 REAL(KIND=8),
INTENT(IN) :: mu_phi,
t
363 REAL(KIND=8),
DIMENSION(SIZE(rr,2)) :: vv
368 CALL
error_petsc(
'Phiexact: should not be called for this test')
372 n=type; n=
SIZE(rr,1); n=m; r=mu_phi; r=
t
377 FUNCTION jexact_gauss(TYPE, rr, m, mu_phi, sigma, mu_H, t, mesh_id, opt_B_ext) RESULT(vv)
379 INTEGER ,
INTENT(IN) :: type
380 REAL(KIND=8),
DIMENSION(:),
INTENT(IN) :: rr
381 INTEGER ,
INTENT(IN) :: m
382 REAL(KIND=8),
INTENT(IN) :: mu_phi, sigma, mu_h,
t
383 INTEGER ,
INTENT(IN) :: mesh_id
384 REAL(KIND=8),
DIMENSION(6),
OPTIONAL,
INTENT(IN) :: opt_b_ext
396 vv = rr(1) - (1.d0/2.d0)*rr(2)**2*(3*rr(1)+2)/(1+rr(1))**2 &
397 + (3.d0/2.d0)*rr(2)**2/(1+rr(1))
399 vv = rr(1)*rr(2)**2*(3*rr(1)+2)*(3*rr(2)**2*rr(1)+2*rr(2)**2+6*lambda_mu_t18) &
400 /(3*rr(2)**2*rr(1)+2*rr(2)**2+2*lambda_mu_t18)**2 &
401 + (3.d0/2.d0)*rr(2)**2/(1+rr(1)) &
402 - (1.d0/2.d0)*rr(2)**2*(3*rr(1)+2)/(1+rr(1))**2
410 r=mu_phi; r=sigma; r=mu_h; r=
t
411 IF (present(opt_b_ext)) r=opt_b_ext(1)
418 INTEGER,
INTENT(IN) :: type
419 REAL(KIND=8),
DIMENSION(:),
INTENT(IN) :: rr
420 INTEGER,
INTENT(IN) :: m
421 REAL(KIND=8),
INTENT(IN) :: mu_phi, sigma, mu_h,
t
427 CALL
error_petsc(
'Eexact: should not be called for this test')
430 r=rr(1); r=mu_phi; r=sigma; r=mu_h; r=
t; n=type; n=m
435 SUBROUTINE init_maxwell(H_mesh, phi_mesh, time, dt, mu_H_field, mu_phi, &
436 list_mode, hn1, hn, phin1, phin)
439 REAL(KIND=8),
INTENT(OUT):: time
440 REAL(KIND=8),
INTENT(IN) :: dt
441 REAL(KIND=8),
DIMENSION(:),
INTENT(IN) :: mu_h_field
442 REAL(KIND=8),
INTENT(IN) :: mu_phi
443 INTEGER,
DIMENSION(:),
INTENT(IN) :: list_mode
444 REAL(KIND=8),
DIMENSION(:,:,:),
INTENT(OUT):: hn, hn1
445 REAL(KIND=8),
DIMENSION(:,:,:),
INTENT(OUT):: phin, phin1
450 DO i=1,
SIZE(list_mode)
451 hn1(:,k,i) =
hexact(h_mesh,k, h_mesh%rr, list_mode(i), mu_h_field, time)
452 IF (inputs%nb_dom_phi>0)
THEN
454 phin1(:,k,i) =
phiexact(k, phi_mesh%rr, list_mode(i) , mu_phi, time)
462 DO i=1,
SIZE(list_mode)
463 hn(:,k,i) =
hexact(h_mesh,k, h_mesh%rr, list_mode(i), mu_h_field, time)
464 IF (inputs%nb_dom_phi>0)
THEN
466 phin(:,k,i) =
phiexact(k, phi_mesh%rr, list_mode(i), mu_phi, time)
480 REAL(KIND=8),
DIMENSION(ne-nb+1) :: vv
481 INTEGER,
INTENT(IN) :: nb, ne
482 REAL(KIND=8),
DIMENSION(2,ne-nb+1),
OPTIONAL :: pts
483 INTEGER,
DIMENSION(ne-nb+1),
OPTIONAL :: pts_ids
485 IF( present(pts) .AND. present(pts_ids) )
THEN
499 REAL(KIND=8),
DIMENSION(2),
INTENT(in):: pt
500 INTEGER,
DIMENSION(1),
INTENT(in) :: pt_id
501 REAL(KIND=8),
DIMENSION(2) :: vv
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
real(kind=8) function, dimension(ne-nb+1) mu_bar_in_fourier_space_anal_t18(H_mesh, nb, ne, pts, pts_ids)
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 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, dimension(2) grad_mu_bar_in_fourier_space_anal_t18(pt, pt_id)
real(kind=8) function, public eexact_gauss(TYPE, rr, m, mu_phi, sigma, mu_H, t)
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)
real(kind=8) function, dimension(size(rr, 2)), public hexact(H_mesh, TYPE, rr, m, mu_H_field, t)