22 type (type_equilibrium
),
pointer :: euitm_equilibrium_in(:)
23 type (type_equilibrium
),
pointer :: euitm_equilibrium_out(:)
24 type (type_param
),
save :: code_parameters
26 logical,
save :: first = .true.
29 SUBROUTINE bdseq (euitm_equilibrium_in, euitm_equilibrium_out, code_parameters)
32 type (type_equilibrium
),
pointer :: euitm_equilibrium_in(:)
33 type (type_equilibrium
),
pointer :: euitm_equilibrium_out(:)
34 type (type_param
) :: code_parameters
39 call fill_param(code_parameters,
'XML/bdseq.xml',
'',
'XML/bdseq.xsd')
43 if(
associated(euitm_equilibrium_in(1)%profiles_1d%jparallel))
then
44 maxabs = maxval(abs(euitm_equilibrium_in(1)%profiles_1d%jphi))
45 write(*,*)
'max( | jphi | ) = ', maxabs
46 if(maxabs .EQ. 0.0_r8)
then
47 write(*,*)
'bdseq_wrapper copied jparallel to jphi [ERROR]'
48 if(.not.
associated(euitm_equilibrium_in(1)%profiles_1d%jphi)) &
49 allocate(euitm_equilibrium_in(1)%profiles_1d%jphi(
size(euitm_equilibrium_in(1)%profiles_1d%jparallel)))
50 euitm_equilibrium_in(1)%profiles_1d%jphi = euitm_equilibrium_in(1)%profiles_1d%jparallel
54 CALL
bdseq(euitm_equilibrium_in, euitm_equilibrium_out, code_parameters)
56 if(.not.
associated(euitm_equilibrium_out(1)%profiles_1d%jparallel))
then
57 write(*,*)
'bdseq_wrapper copied jphi to jparallel [ERROR]'
58 allocate(euitm_equilibrium_out(1)%profiles_1d%jparallel(
size(euitm_equilibrium_out(1)%profiles_1d%jphi)))
59 euitm_equilibrium_out(1)%profiles_1d%jparallel = euitm_equilibrium_out(1)%profiles_1d%jphi
61 maxabs = maxval(abs(euitm_equilibrium_out(1)%profiles_1d%jparallel))
62 write(*,*)
'max( | jparallel | ) = ', maxabs
63 if(maxabs .EQ. 0.0_r8)
then
64 write(*,*)
'bdseq_wrapper copied jphi to jparallel [ERROR]'
65 euitm_equilibrium_out(1)%profiles_1d%jparallel = euitm_equilibrium_out(1)%profiles_1d%jphi
subroutine bdseq(eq_in, eq_out, code_parameters)
Module implementing a simple equilibrium using CPOs.