This is the top level object, consisting of a collection of ky blocks.
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
type(ky_type), | public, | dimension(:), allocatable | :: | kyb |
The ky blocks |
||
integer, | public | :: | naky |
Number of ky blocks |
|||
integer, | public | :: | ntheta0 | ||||
integer, | public | :: | npts |
Total number of theta grid points on all extended domains |
|||
integer, | public | :: | nbound |
Number of ignored boundary points |
|||
logical, | public | :: | is_local |
Does this supercell have any data on this proc? |
|||
logical, | public | :: | is_empty |
Have we got any data for the fieldmat on this proc? |
|||
logical, | public | :: | is_all_local |
Is all of this supercells data on this proc? |
|||
type(comm_type), | public | :: | fm_sub_all |
Sub communicator involving all processors with fieldmat |
|||
type(comm_type), | public | :: | fm_sub_headsc_p0 |
Sub communicator involving the supercell heads and proc0 |
|||
integer, | public | :: | prepare_type | = | 0 |
What sort of preparation do we do to the field matrix |
|
integer, | public, | dimension(:,:), allocatable | :: | heads |
An array that holds the iproc (from comm world) of the supercell head for a given ik,it point |
||
logical, | public | :: | no_populate | = | .false. |
Advanced usage only, if true then don't populate response |
|
logical, | public | :: | no_prepare | = | .false. |
Advanced usage only, if true then don't prepare (invert) response |
|
integer, | public | :: | nfield |
Number of fields we're working with |
Deallocate storage space
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(fieldmat_type), | intent(inout) | :: | self |
Allocate storage space
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(fieldmat_type), | intent(inout) | :: | self |
Debug printing
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(fieldmat_type), | intent(in) | :: | self |
A routine to calculate the update to the fields DD>Could improve performance by using a "smart" routine which only operates on local/not empty data
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(fieldmat_type), | intent(inout) | :: | self | |||
complex, | intent(inout), | dimension(:,:,:) | :: | phi | ||
complex, | intent(inout), | dimension(:,:,:) | :: | apar | ||
complex, | intent(inout), | dimension(:,:,:) | :: | bpar | ||
class(pc_type), | intent(in) | :: | pc |
Initialise the field objects
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(fieldmat_type), | intent(inout) | :: | self |
A routine to reset the object
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(fieldmat_type), | intent(inout) | :: | self |
Find the response of g to delta-fn field perturbations and store at the row level
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(fieldmat_type), | intent(inout) | :: | self | |||
class(pc_type), | intent(in) | :: | pc |
Initialise the next set of delta functions, find the response and store in the appropriate rows. DD>Could improve performance by using a "smart" routine which only operates on local/not empty data
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(fieldmat_type), | intent(inout) | :: | self | |||
complex, | intent(inout), | dimension(-ntgrid:ntgrid,ntheta0,naky) | :: | field | ||
integer, | intent(inout) | :: | pts_remain | |||
logical, | intent(inout), | dimension(ntheta0, naky) | :: | kwork_filter | ||
integer, | intent(in) | :: | ifl | |||
class(pc_type), | intent(in) | :: | pc |
Prepare the field matrix for calculating field updates
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(fieldmat_type), | intent(inout) | :: | self | |||
class(pc_type), | intent(in) | :: | pc |
Create all the necessary subcommunicators
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(fieldmat_type), | intent(inout) | :: | self |
Create the secondary subcommunicators
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(fieldmat_type), | intent(inout) | :: | self |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(fieldmat_type), | intent(inout) | :: | self |
Gather all the fields to proc0/all for diagnostics etc. DD>TAGGED:Worth looking at improving this bad memory pattern
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(fieldmat_type), | intent(inout) | :: | self | |||
complex, | intent(inout), | dimension(:,:,:) | :: | ph | ||
complex, | intent(inout), | dimension(:,:,:) | :: | ap | ||
complex, | intent(inout), | dimension(:,:,:) | :: | bp | ||
logical, | intent(in), | optional | :: | to_all_in | ||
logical, | intent(in), | optional | :: | do_allreduce_in |
A routine to unpack the supercell tmp_sum vectors to full field arrays
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(fieldmat_type), | intent(inout) | :: | self | |||
complex, | intent(inout), | dimension(-ntgrid:,:,:) | :: | ph | ||
complex, | intent(inout), | dimension(-ntgrid:,:,:) | :: | ap | ||
complex, | intent(inout), | dimension(-ntgrid:,:,:) | :: | bp |
Write some debug data to file
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(fieldmat_type), | intent(in) | :: | self |
Just work out the locality (also sets is_empty etc. but is not intended for this)
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(fieldmat_type), | intent(inout) | :: | self | |||
class(pc_type), | intent(in) | :: | pc |
Count how many subcommunicators will be created
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(fieldmat_type), | intent(inout) | :: | self |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(fieldmat_type), | intent(in) | :: | self | |||
complex, | intent(in), | dimension (-ntgrid:,:,:) | :: | phi | ||
complex, | intent(in), | dimension (-ntgrid:,:,:) | :: | apar | ||
complex, | intent(in), | dimension (-ntgrid:,:,:) | :: | bpar | ||
complex, | intent(inout), | dimension (-ntgrid:,:,:) | :: | fieldeq | ||
complex, | intent(inout), | dimension (-ntgrid:,:,:) | :: | fieldeqa | ||
complex, | intent(inout), | dimension (-ntgrid:,:,:) | :: | fieldeqp |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(fieldmat_type), | intent(in) | :: | self | |||
complex, | intent(inout), | dimension (-ntgrid:,:,:) | :: | antot | ||
complex, | intent(inout), | dimension (-ntgrid:,:,:) | :: | antota | ||
complex, | intent(inout), | dimension (-ntgrid:,:,:) | :: | antotp |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(fieldmat_type), | intent(in) | :: | self | |||
complex, | intent(in), | dimension (-ntgrid:,:,:) | :: | antot | ||
complex, | intent(in), | dimension (-ntgrid:,:,:) | :: | tempantot | ||
complex, | intent(in), | dimension (-ntgrid:,:,:) | :: | antota | ||
complex, | intent(in), | dimension (-ntgrid:,:,:) | :: | tempantota | ||
complex, | intent(in), | dimension (-ntgrid:,:,:) | :: | antotp | ||
complex, | intent(in), | dimension (-ntgrid:,:,:) | :: | tempantotp |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(fieldmat_type), | intent(in) | :: | self | |||
complex, | intent(in), | dimension (-ntgrid:,:,:) | :: | phi | ||
complex, | intent(in), | dimension (-ntgrid:,:,:) | :: | apar | ||
complex, | intent(in), | dimension (-ntgrid:,:,:) | :: | bpar | ||
complex, | intent(in), | dimension (-ntgrid:,:,:) | :: | antot | ||
complex, | intent(in), | dimension (-ntgrid:,:,:) | :: | antota | ||
complex, | intent(in), | dimension (-ntgrid:,:,:) | :: | antotp | ||
complex, | intent(inout), | dimension (-ntgrid:,:,:) | :: | fieldeq | ||
complex, | intent(inout), | dimension (-ntgrid:,:,:) | :: | fieldeqa | ||
complex, | intent(inout), | dimension (-ntgrid:,:,:) | :: | fieldeqp |
Update the fields using calculated update
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(fieldmat_type), | intent(in) | :: | self | |||
complex, | intent(inout), | dimension(:,:,:) | :: | phi | ||
complex, | intent(inout), | dimension(:,:,:) | :: | apar | ||
complex, | intent(inout), | dimension(:,:,:) | :: | bpar |
Update the fields using the new fields
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(fieldmat_type), | intent(in) | :: | self |
Fetch all condition numbers to proc0 and report on worrying values as required.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(fieldmat_type), | intent(in) | :: | self |
type :: fieldmat_type
type(ky_type), dimension(:), allocatable :: kyb !< The ky blocks
integer :: naky !< Number of ky blocks
integer :: ntheta0
integer :: npts !< Total number of theta grid points on all extended domains
integer :: nbound !< Number of ignored boundary points
logical :: is_local !< Does this supercell have any data on this proc?
logical :: is_empty !< Have we got any data for the fieldmat on this proc?
logical :: is_all_local !< Is all of this supercells data on this proc?
type(comm_type) :: fm_sub_all !< Sub communicator involving all processors with fieldmat
type(comm_type) :: fm_sub_headsc_p0 !< Sub communicator involving the supercell heads and proc0
integer :: prepare_type=0 !< What sort of preparation do we do to the field matrix
!Currently only support:
!0 : Invert the field matrix
!In the future may wish to do things like LU decomposition etc.
!Could also do things like eigenvalue analysis etc.
integer, dimension(:,:), allocatable :: heads !< An array that holds the iproc (from comm world) of the supercell head for a given ik,it point
logical :: no_populate=.false. !< Advanced usage only, if true then don't populate response
logical :: no_prepare=.false. !< Advanced usage only, if true then don't prepare (invert) response
integer :: nfield !< Number of fields we're working with
contains
procedure :: deallocate => fm_deallocate
procedure :: allocate => fm_allocate
procedure :: debug_print => fm_debug_print
procedure :: get_field_update => fm_get_field_update
procedure :: init => fm_init
procedure :: reset => fm_reset
procedure :: populate => fm_populate
procedure :: init_next_field_points => fm_init_next_field_points
procedure :: prepare => fm_prepare
procedure :: make_subcom_1 => fm_make_subcom_1
procedure :: make_subcom_2 => fm_make_subcom_2
procedure :: calc_sc_heads => fm_calc_sc_heads
procedure :: gather_fields => fm_gather_fields
procedure :: unpack_to_field => fm_unpack_to_field
procedure :: write_debug_data => fm_write_debug_data
procedure :: set_is_local => fm_set_is_local
procedure :: count_subcom => fm_count_subcom
procedure :: getfieldeq_nogath => fm_getfieldeq_nogath
procedure :: reduce_an => fm_reduce_an_head_send_broadcast
procedure :: check_an => fm_check_an
procedure :: getfieldeq1_nogath => fm_getfieldeq1_nogath
procedure :: update_fields => fm_update_fields
procedure :: update_fields_newstep => fm_update_fields_newstep
procedure :: get_condition_numbers => fm_get_condition_numbers
end type fieldmat_type