| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| integer, | public | :: | nVars | ||||
| logical, | public | :: | initialized | = | .FALSE. | ||
| real(kind=wp), | public | :: | W_MHD3D | ||||
| real(kind=wp), | public, | CONTIGUOUS, POINTER | :: | X1(:,:) |
X1 variable, shape=(base_s%nBase,base_f%mn_mode) |
||
| real(kind=wp), | public, | CONTIGUOUS, POINTER | :: | X2(:,:) |
X2 variable |
||
| real(kind=wp), | public, | CONTIGUOUS, POINTER | :: | LA(:,:) |
lambda variable |
||
| real(kind=wp), | public, | CONTIGUOUS, POINTER | :: | q(:) |
1d array container for all variables (is the one allocated) |
||
| integer, | public, | ALLOCATABLE | :: | varsize(:,:) |
varsize(a,b): size of rank a of variable b =1..nvars |
||
| integer, | public, | ALLOCATABLE | :: | offset(:) |
offset(0:nvars): size of variable b =offset(b)-offset(b-1) |
initialize (=allocate) sf of type t_sol_var
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(t_sol_var_MHD3D), | intent(inout) | :: | sf |
sf |
||
| integer, | intent(in) | :: | varsize(:) |
free (=deallocate) sf of type t_sol_var_MHD3D
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(t_sol_var_MHD3D), | intent(inout) | :: | sf |
sf |
copy tocopy => sf
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(t_sol_var_MHD3D), | intent(inout) | :: | sf |
sf |
||
| class(c_sol_var), | intent(in) | :: | tocopy |
set variabes X1,X2,LA of toset => sf, optional argument to scale toset with a scalar (for example -1.0_wp)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(t_sol_var_MHD3D), | intent(inout) | :: | sf |
sf |
||
| class(c_sol_var), | intent(in) | :: | toset | |||
| real(kind=wp), | intent(in), | optional | :: | scal_in |
set all variables to scalar
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(t_sol_var_MHD3D), | intent(inout) | :: | sf |
sf |
||
| real(kind=wp), | intent(in) | :: | scalar |
set variabes X1,X2,LA of toset => sf, optional argument to scale toset with a scalar (for example -1.0_wp)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(t_sol_var_MHD3D), | intent(inout) | :: | sf |
sf |
||
| class(c_sol_var), | intent(in) | :: | toset | |||
| real(kind=wp), | intent(in), | optional | :: | scal_in |
set all variables to scalar
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(t_sol_var_MHD3D), | intent(inout) | :: | sf |
sf |
||
| real(kind=wp), | intent(in) | :: | scalar |
|X|^2, where X is of type t_var_sol, so three values are returned: |X1|^2,|X2|^2,|LA|^2
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(t_sol_var_MHD3D), | intent(in) | :: | sf |
self |
res=aX+bY , where X,Y,res are of type t_var_sol
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(t_sol_var_MHD3D), | intent(inout) | :: | sf | |||
| real(kind=wp), | intent(in) | :: | aa | |||
| class(c_sol_var), | intent(in) | :: | X | |||
| real(kind=wp), | intent(in) | :: | bb | |||
| class(c_sol_var), | intent(in) | :: | Y |
TYPE,EXTENDS(c_sol_var) :: t_sol_var_MHD3D !--------------------------------------------------------------------------------------------------------------------------------- LOGICAL :: initialized=.FALSE. !--------------------------------------------------------------------------------------------------------------------------------- REAL(wp) :: W_MHD3D REAL(wp),CONTIGUOUS,POINTER :: X1(:,:) !! X1 variable, shape=(base_s%nBase,base_f%mn_mode) REAL(wp),CONTIGUOUS,POINTER :: X2(:,:) !! X2 variable REAL(wp),CONTIGUOUS,POINTER :: LA(:,:) !! lambda variable REAL(wp),CONTIGUOUS,POINTER :: q(:) !! 1d array container for all variables (is the one allocated) INTEGER, ALLOCATABLE :: varsize(:,:) !! varsize(a,b): size of rank a of variable b =1..nvars INTEGER, ALLOCATABLE :: offset(:) !! offset(0:nvars): size of variable b =offset(b)-offset(b-1) !--------------------------------------------------------------------------------------------------------------------------------- CONTAINS PROCEDURE :: init => sol_var_MHD3D_init PROCEDURE :: free => sol_var_MHD3D_free PROCEDURE :: copy => sol_var_MHD3D_copy PROCEDURE :: set_to_solvar => sol_var_MHD3D_set_to_solvar PROCEDURE :: set_to_scalar => sol_var_MHD3D_set_to_scalar GENERIC :: set_to => set_to_solvar,set_to_scalar !chooses right routine depending on input type! PROCEDURE :: norm_2 => sol_var_MHD3D_norm_2 PROCEDURE :: AXBY => sol_var_MHD3D_AXBY !--------------------------------------------------------------------------------------------------------------------------------- END TYPE t_sol_var_MHD3D