Module for advancing and initialising the fields when Electromagnetic effects are included
TODO-GA: add debug flag
Layouts Arrays Parameters Grids Calculations
integrate g to get sum_s Z_s n_s J0 g and store in phi integrate g to get - 2 beta sum_s n_s T_s J1 mu g and store in bpar
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| complex, | intent(in), | dimension(:, :, kxkyz_lo%llim_proc:) | :: | g | ||
| complex, | intent(inout), | dimension(:, :, -nzgrid:, :) | :: | phi | ||
| complex, | intent(inout), | dimension(:, :, -nzgrid:, :) | :: | apar | ||
| complex, | intent(inout), | dimension(:, :, -nzgrid:, :) | :: | bpar | ||
| character(len=*), | intent(in) | :: | dist |
If we are parallelising over (vpa,mu) then this subroutine is called
This is the more common version used compared with parallelising over
(kx,ky,z) and is the default for stella.
This advances the fields when Electromagnetic effects are included, so
we advance
Layouts Arrays Parameters Grids Calculations Routines from other fields modules
store result in phi, which will be further modified below to account for polarization term store result in bpar, which will be further modified below to account for polarization term store result in apar, which will be further modified below to account for apar pre-factor
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| complex, | intent(in), | dimension(:, :, -nzgrid:, :, vmu_lo%llim_proc:) | :: | g | ||
| complex, | intent(out), | dimension(:, :, -nzgrid:, :) | :: | phi | ||
| complex, | intent(out), | dimension(:, :, -nzgrid:, :) | :: | apar | ||
| complex, | intent(out), | dimension(:, :, -nzgrid:, :) | :: | bpar | ||
| character(len=*), | intent(in) | :: | dist |
If we are parallelising over (vpa,mu) then this subroutine is called
This is the more common version used compared with parallelising over
(kx,ky,z) and is the default for stella.
This advances the fields when Electromagnetic effects are included, so
we advance
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| complex, | intent(in), | dimension(:, :, -nzgrid:, :, vmu_lo%llim_proc:) | :: | g | ||
| complex, | intent(out), | dimension(:, :, -nzgrid:, :) | :: | phi | ||
| complex, | intent(out), | dimension(:, :, -nzgrid:, :) | :: | apar | ||
| complex, | intent(out), | dimension(:, :, -nzgrid:, :) | :: | bpar | ||
| character(len=*), | intent(in) | :: | dist |
Layouts Arrays Parameters Grids Calculations
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| complex, | intent(in), | dimension(:, :, kxkyz_lo%llim_proc:) | :: | g | ||
| complex, | intent(inout), | dimension(:, :, -nzgrid:, :) | :: | phi | ||
| complex, | intent(inout), | dimension(:, :, -nzgrid:, :) | :: | apar | ||
| complex, | intent(inout), | dimension(:, :, -nzgrid:, :) | :: | bpar | ||
| character(len=*), | intent(in) | :: | dist |
Arrays Parameters Grids
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| complex, | intent(inout), | dimension(:, :, -nzgrid:, :) | :: | phi | ||
| complex, | intent(inout), | dimension(:, :, -nzgrid:, :) | :: | bpar | ||
| character(len=*), | intent(in) | :: | dist |
Get_apar solves pre-factor * Apar = beta_ref * sum_s Z_s n_s vth_s int d3v vpa * J0 * pdf for apar, with pdf being either g or gbar (specified by dist input). the input apar is the RHS of the above equation and is overwritten by the true apar the pre-factor depends on whether g or gbar is used (kperp2 in former case, with additional term appearing in latter case)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| complex, | intent(inout), | dimension(:, :, -nzgrid:, :) | :: | apar | ||
| character(len=*), | intent(in) | :: | dist |
Layouts Parameters Grids Calculations
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| complex, | intent(in), | dimension(:, :, kxkyz_lo%llim_proc:) | :: | g | ||
| character(len=*), | intent(in) | :: | dist | |||
| complex, | intent(out), | dimension(:, :, -nzgrid:, :) | :: | apar |
Fill arrays needed for the electromagnetic calculations
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(inout) | :: | nfields |
Allocate arrays needed for solving electromagnetic fields This includes Apar and Bpar
TODO-GA: