| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| logical, | public | :: | initialized | = | .FALSE. |
set to true in init, set to false in free |
|
| integer, | public | :: | nfp |
number of field periods |
|||
| integer, | public | :: | m_max |
maximum number of fourier modes of the boundary in theta direction |
|||
| integer, | public | :: | n_max |
maximum number of fourier modes of the boundary in zeta direction (one field period only!) |
|||
| integer, | public | :: | ntheta |
number of interpolation points in theta and zeta (one field period, half grid!!) |
|||
| integer, | public | :: | nzeta |
number of interpolation points in theta and zeta (one field period, half grid!!) |
|||
| integer, | public | :: | lasym |
=0: symmetric, =1: asymmetric fourier series |
|||
| real(kind=wp), | public, | ALLOCATABLE | :: | theta(:) |
theta positions [0,2pi), should be half grid! |
||
| real(kind=wp), | public, | ALLOCATABLE | :: | zeta(:) |
zeta positions [0,2pi/nfp) should be on half grid! |
||
| real(kind=wp), | public, | ALLOCATABLE | :: | X(:,:) |
boundary data X/Y positions X[i, j]=X(theta[i],zeta[j]), Y[i, j]=Y(theta[i],zeta[j]), i=0...ntheta-1,j=0...nzeta-1 |
||
| real(kind=wp), | public, | ALLOCATABLE | :: | Y(:,:) |
boundary data X/Y positions X[i, j]=X(theta[i],zeta[j]), Y[i, j]=Y(theta[i],zeta[j]), i=0...ntheta-1,j=0...nzeta-1 |
||
| class(t_ncfile), | public, | ALLOCATABLE | :: | nc |
container for netcdf-file |
||
| character(len=255), | public | :: | ncfile | = | " " |
name of netcdf file with axis information |
initialize class: read file and save data to class structure
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(t_boundaryFromFile), | intent(inout) | :: | sf |
self |
||
| character(len=*), | intent(in) | :: | fileString |
convert from interpolation points X=> X1_b, Y=> X2_b to fourier modes, given from the input fbase convert to maximum allowable number of modes (ntheta>=2m_max+1, nzeta>=2n_max+1) the final m_max/n_max can be smaller or larger. If larger, a change of base is necessary
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(t_boundaryFromFile), | intent(inout) | :: | sf |
self |
||
| type(t_fBase), | intent(in) | :: | x1_fbase_in | |||
| type(t_fBase), | intent(in) | :: | x2_fbase_in | |||
| real(kind=wp), | intent(inout) | :: | X1_b(x1_fbase_in%modes) | |||
| real(kind=wp), | intent(inout) | :: | X2_b(x2_fbase_in%modes) | |||
| real(kind=wp), | intent(in) | :: | scale_minor_radius |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(t_boundaryFromFile), | intent(inout) | :: | sf |
self |
TYPE :: t_boundaryFromFile !--------------------------------------------------------------------------------------------------------------------------------- LOGICAL :: initialized=.FALSE. !! set to true in init, set to false in free !--------------------------------------------------------------------------------------------------------------------------------- INTEGER :: nfp !! number of field periods INTEGER :: m_max !! maximum number of fourier modes of the boundary in theta direction INTEGER :: n_max !! maximum number of fourier modes of the boundary in zeta direction (one field period only!) INTEGER :: ntheta,nzeta !! number of interpolation points in theta and zeta (one field period, half grid!!) INTEGER :: lasym !! =0: symmetric, =1: asymmetric fourier series REAL(wp),ALLOCATABLE :: theta(:) !! theta positions [0,2pi), should be half grid! REAL(wp),ALLOCATABLE :: zeta(:) !! zeta positions [0,2pi/nfp) should be on half grid! REAL(wp),ALLOCATABLE :: X(:,:) ,Y(:,:)!! boundary data X/Y positions X[i, j]=X(theta[i],zeta[j]), !! Y[i, j]=Y(theta[i],zeta[j]), i=0...ntheta-1,j=0...nzeta-1 CLASS(t_ncfile),ALLOCATABLE :: nc !! container for netcdf-file CHARACTER(LEN=255) :: ncfile=" " !! name of netcdf file with axis information CONTAINS PROCEDURE :: init => bff_init PROCEDURE :: convert_to_modes => bff_convert_to_modes PROCEDURE :: free => bff_free END TYPE t_boundaryFromFile