SFEMaNS  version 5.3
Reference documentation for SFEMaNS
sub_maxwell.f90
Go to the documentation of this file.
2  PUBLIC:: maxwell_decouple
3  PRIVATE
4 
5 CONTAINS
6 
7  SUBROUTINE maxwell_decouple(comm_one_d, H_mesh, pmag_mesh, phi_mesh, interface_H_phi, &
8  interface_h_mu, hn, bn, phin, hn1, bn1, phin1, vel, stab_in, sigma_in, &
9  r_fourier, index_fourier, mu_h_field, mu_phi, time, dt, rem, list_mode, &
10 !TEST LC-CN 15/12/2016
11 !!$ H_phi_per, LA_H, LA_pmag, LA_phi, LA_mhd, sigma_ns, jj_v_to_H)
12  h_phi_per, la_h, la_pmag, la_phi, la_mhd, one_over_sigma_ns, jj_v_to_h)
13 !TEST LC-CN 15/12/2016
14 
15  USE def_type_mesh
16  USE periodic
17  USE input_data
20  IMPLICIT NONE
21  TYPE(mesh_type), INTENT(IN) :: H_mesh, phi_mesh, pmag_mesh
22  TYPE(interface_type), INTENT(IN) :: interface_H_phi, interface_H_mu
23  INTEGER, DIMENSION(:), INTENT(IN) :: list_mode
24  REAL(KIND=8), DIMENSION(:,:,:), INTENT(INOUT) :: vel
25  REAL(KIND=8), DIMENSION(H_mesh%np,6,SIZE(list_mode)), INTENT(INOUT) :: Hn, Hn1
26  REAL(KIND=8), DIMENSION(H_mesh%np,6,SIZE(list_mode)), INTENT(INOUT) :: Bn, Bn1
27  REAL(KIND=8), DIMENSION(:,:,:), INTENT(INOUT) :: phin, phin1
28  REAL(KIND=8), DIMENSION(3), INTENT(IN) :: stab_in
29  REAL(KIND=8), INTENT(IN) :: R_fourier
30  INTEGER, INTENT(IN) :: index_fourier
31  REAL(KIND=8), INTENT(IN) :: mu_phi, time, dt, Rem
32  REAL(KIND=8), DIMENSION(:), INTENT(IN) :: sigma_in, mu_H_field
33 ! TEST
34 !TEST LC-CN 15/12/2016
35 !!$ REAL(KIND=8), DIMENSION(:,:,:), INTENT(IN) :: sigma_ns
36  REAL(KIND=8), DIMENSION(:,:,:), INTENT(IN) :: one_over_sigma_ns
37 !TEST LC-CN 15/12/2016
38  INTEGER, DIMENSION(:), INTENT(IN) :: jj_v_to_H
39 ! TEST
40  !jan 29/JLG+FL/Forget about it/We replace it by H_p_phi_per/Feb 2 2010
41  TYPE(periodic_type), INTENT(IN) :: H_phi_per
42  !jan 29/JLG+FL/Forget about it/We replace it by H_p_phi_per/Feb 2 2010
43  TYPE(petsc_csr_la) :: LA_H, LA_pmag, LA_phi, LA_mhd
44 #include "petsc/finclude/petsc.h"
45  mpi_comm, DIMENSION(:), POINTER :: comm_one_d
46 
47  IF (inputs%if_maxwell_with_H) THEN
48  CALL maxwell_decouple_with_h(comm_one_d, h_mesh, pmag_mesh, phi_mesh, interface_h_phi, &
49  interface_h_mu, hn, bn, phin, hn1, bn1, phin1, vel, stab_in, sigma_in, &
50  r_fourier, index_fourier, mu_h_field, mu_phi, time, dt, rem, list_mode, &
51 !TEST LC-CN 15/12/2016
52 !!$ H_phi_per, LA_H, LA_pmag, LA_phi, LA_mhd, sigma_ns, jj_v_to_H)
53  h_phi_per, la_h, la_pmag, la_phi, la_mhd, one_over_sigma_ns, jj_v_to_h)
54 !TEST LC-CN 15/12/2016
55 !!$ CALL maxwell_decouple_with_H(comm_one_d, H_mesh, pmag_mesh, phi_mesh, interface_H_phi, &
56 !!$ interface_H_mu, Hn, phin, Hn1, phin1, vel, stab_in, sigma_in, &
57 !!$ R_fourier, index_fourier, mu_H_field, mu_phi, time, dt, Rem, list_mode, &
58 !!$ H_phi_per, LA_H, LA_pmag, LA_phi, LA_mhd)
59  ELSE
60 ! TEST
61  CALL maxwell_decouple_with_b(comm_one_d, h_mesh, pmag_mesh, phi_mesh, interface_h_phi, &
62  interface_h_mu, hn, bn, phin, hn1, bn1, phin1, vel, stab_in, sigma_in, &
63  r_fourier, index_fourier, mu_h_field, mu_phi, time, dt, rem, list_mode, &
64 !TEST LC-CN 15/12/2016
65 !!$ H_phi_per, LA_H, LA_pmag, LA_phi, LA_mhd, sigma_ns, jj_v_to_H)
66  h_phi_per, la_h, la_pmag, la_phi, la_mhd, one_over_sigma_ns, jj_v_to_h)
67 !TEST LC-CN 15/12/2016
68 !!$ CALL maxwell_decouple_with_B(comm_one_d, H_mesh, pmag_mesh, phi_mesh, interface_H_phi, &
69 !!$ interface_H_mu, Hn, phin, Hn1, phin1, vel, stab_in, sigma_in, &
70 !!$ R_fourier, index_fourier, mu_H_field, mu_phi, time, dt, Rem, list_mode, &
71 !!$ H_phi_per, LA_H, LA_pmag, LA_phi, LA_mhd)
72 ! TEST
73  END IF
74 
75  END SUBROUTINE maxwell_decouple
76 
77 END MODULE update_maxwell
type(my_data), public inputs
subroutine, public maxwell_decouple_with_b(comm_one_d, H_mesh, pmag_mesh, phi_mesh, interface_H_phi, interface_H_mu, Hn, Bn, phin, Hn1, Bn1, phin1, vel, stab_in, sigma_in, R_fourier, index_fourier, mu_H_field, mu_phi, time, dt_in, Rem, list_mode, H_phi_per, LA_H, LA_pmag, LA_phi, LA_mhd, one_over_sigma_ns_in, jj_v_to_H)
subroutine, public maxwell_decouple(comm_one_d, H_mesh, pmag_mesh, phi_mesh, interface_H_phi,interface_H_mu, Hn, Bn, phin, Hn1, Bn1, phin1, vel, stab_in, sigma_in,R_fourier, index_fourier, mu_H_field, mu_phi, time, dt, Rem, list_mode,
Definition: sub_maxwell.f90:11
subroutine, public maxwell_decouple_with_h(comm_one_d, H_mesh, pmag_mesh, phi_mesh, interface_H_phi, interface_H_mu, Hn, Bn, phin, Hn1, Bn1, phin1, vel, stab_in, sigma_in, R_fourier, index_fourier, mu_H_field, mu_phi, time, dt_in, Rem, list_mode, H_phi_per, LA_H, LA_pmag, LA_phi, LA_mhd, one_over_sigma_ns_in, jj_v_to_H)