Module for advancing and intitialising all fields-related arrays
Global Routines
Routines for advancing fields in main routine
TODO-GA: move to separate routine Calculations Global
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
logical, | public | :: | fields_updated | = | .false. |
Logicals |
|
logical, | private | :: | fields_initialized | = | .false. | ||
integer, | public | :: | nfields |
EM - to calculate the number of fields that are in the simulation (1 for electrostatic) |
|||
logical, | private | :: | fields_initialised | = | .false. |
For the initialisation |
TODO-GA: MOVE
Compute d
Layouts Parameters Grids Calculations include bpar contribution
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex, | intent(in), | dimension(:, :, -nzgrid:, :) | :: | phi | ||
complex, | intent(in), | dimension(:, :, -nzgrid:, :) | :: | apar | ||
complex, | intent(in), | dimension(:, :, -nzgrid:, :) | :: | bpar | ||
complex, | intent(out), | dimension(:, :, -nzgrid:, :, vmu_lo%llim_proc:) | :: | dchidy |
Compute d
Layouts Parameters Grids Calculations include bpar contribution
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | iz | |||
integer, | intent(in) | :: | ivmu | |||
complex, | intent(in), | dimension(:, :) | :: | phi | ||
complex, | intent(in), | dimension(:, :) | :: | apar | ||
complex, | intent(in), | dimension(:, :) | :: | bpar | ||
complex, | intent(out), | dimension(:, :) | :: | dchidy |
This calls the appropriate routines needed to all fields in the main code. This routine calls the appropriate update depending on the effects included in the simulation (e.g. Electrostatic, Full Flux surface effects or Radiatl Variation effects).
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 | |||
logical, | intent(in), | optional | :: | implicit_solve |
Rescale fields, including the distribution function
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real, | intent(in) | :: | target_amplitude |
Compute d
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex, | intent(in), | dimension(:, :, -nzgrid:, :) | :: | phi | ||
complex, | intent(in), | dimension(:, :, -nzgrid:, :) | :: | apar | ||
complex, | intent(in), | dimension(:, :, -nzgrid:, :) | :: | bpar | ||
complex, | intent(out), | dimension(:, :, -nzgrid:, :, vmu_lo%llim_proc:) | :: | dchidy |
Compute d
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | iz | |||
integer, | intent(in) | :: | ivmu | |||
complex, | intent(in), | dimension(:, :) | :: | phi | ||
complex, | intent(in), | dimension(:, :) | :: | apar | ||
complex, | intent(in), | dimension(:, :) | :: | bpar | ||
complex, | intent(out), | dimension(:, :) | :: | dchidy |
Compute d
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | iz | |||
integer, | intent(in) | :: | ivmu | |||
complex, | intent(in), | dimension(:, :) | :: | phi | ||
complex, | intent(in), | dimension(:, :) | :: | apar | ||
complex, | intent(in), | dimension(:, :) | :: | bpar | ||
complex, | intent(out), | dimension(:, :) | :: | dchidx |
Parameters Routined needed to initialise the different field arrays depending on the physics being simulated Allocate arrays such as phi that are needed throughout the simulation
Parameters Arrays TODO-GA: move apar stuff to EM fields Routines for deallocating arrays fields depending on the physics being simulated TODO-GA: REMOVE TODO-GA: move the above deallocations into 'finish_fields_electromagnetic' when EM is decoupled