deallocate everything
| 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 |
| procedure, public :: init => bff_init | |
| procedure, public :: convert_to_modes => bff_convert_to_modes | |
| procedure, public :: free => bff_free |
Allocate class and call init
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(t_boundaryFromFile), | intent(inout), | ALLOCATABLE | :: | sf |
self |
|
| character(len=*), | intent(in) | :: | fileString |
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 |
READ FROM SPECIFIC NETCDF FILE: general data and "boundary" group ======= HEADER OF THE NETCDF FILE VERSION 3.1 =================================================================================== === FILE DESCRIPTION: * axis, normal and binormal of the frame are given in cartesian coordinates along the curve parameter zeta [0,2pi]. * The curve is allowed to have a field periodicity NFP, but the curve must be provided on a full turn. * The data is given in REAL SPACE, sampled along equidistant zeta point positions: zeta(i)=(i+0.5)/nzeta * (2pi/NFP), i=0,...,nzeta-1 always shifted by (2pi/NFP) for the next field period. Thus the number of points along the axis for a full turn is NFP*nzeta * definition of the axis-following frame in cartesian coordinates ( boundary surface at rho=1):
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(t_boundaryFromFile), | intent(inout) | :: | sf |
self |
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 |