allocate and initialize the type base
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(t_base), | intent(inout), | ALLOCATABLE | :: | sf |
self |
|
| integer, | intent(in) | :: | deg_in |
polynomial degree |
||
| integer, | intent(in) | :: | continuity_in |
continuity: |
||
| class(t_sGrid), | intent(in), | TARGET | :: | grid_in |
grid information |
|
| integer, | intent(in) | :: | degGP_in |
gauss quadrature points: nGP=degGP+1 |
||
| integer, | intent(in) | :: | mn_max_in(2) |
maximum mode in m and n |
||
| integer, | intent(in) | :: | mn_nyq_in(2) |
number of integration points |
||
| integer, | intent(in) | :: | nfp_in |
number of field periods |
||
| character(len=8), | intent(in) | :: | sin_cos_in |
can be either only sine: " sin" only cosine: " cos" or full: "sin_cos" |
||
| logical, | intent(in) | :: | exclude_mn_zero_in |
=true: exclude m=n=0 mode in the basis (only important if cos is in basis) |
SUBROUTINE Base_new( sf,deg_in,continuity_in,grid_in,degGP_in, & mn_max_in,mn_nyq_in,nfp_in,sin_cos_in,exclude_mn_zero_in) ! MODULES IMPLICIT NONE !----------------------------------------------------------------------------------------------------------------------------------- ! INPUT VARIABLES INTEGER , INTENT(IN ) :: deg_in !! polynomial degree INTEGER , INTENT(IN ) :: continuity_in !! continuity: CLASS(t_sgrid), INTENT(IN ),TARGET :: grid_in !! grid information INTEGER , INTENT(IN ) :: degGP_in !! gauss quadrature points: nGP=degGP+1 INTEGER , INTENT(IN ) :: mn_max_in(2) !! maximum mode in m and n INTEGER , INTENT(IN ) :: mn_nyq_in(2) !! number of integration points INTEGER , INTENT(IN ) :: nfp_in !! number of field periods CHARACTER(LEN=8),INTENT(IN ) :: sin_cos_in !! can be either only sine: " _sin_" only cosine: " _cos_" or full: "_sin_cos_" LOGICAL ,INTENT(IN ) :: exclude_mn_zero_in !! =true: exclude m=n=0 mode in the basis (only important if cos is in basis) !----------------------------------------------------------------------------------------------------------------------------------- ! INPUT VARIABLES !----------------------------------------------------------------------------------------------------------------------------------- ! OUTPUT VARIABLES CLASS(t_base), ALLOCATABLE,INTENT(INOUT) :: sf !! self !----------------------------------------------------------------------------------------------------------------------------------- ! LOCAL VARIABLES !=================================================================================================================================== ALLOCATE(t_base :: sf) CALL sbase_new(sf%s,deg_in,continuity_in,grid_in,degGP_in) CALL fbase_new(sf%f,mn_max_in,mn_nyq_in,nfp_in,sin_cos_in,exclude_mn_zero_in) sf%initialized=.TRUE. IF(.NOT.test_called) CALL Base_test(sf) END SUBROUTINE base_new