MONC
Data Types | Modules | Functions/Subroutines | Variables
iterativesolver.F90 File Reference

Go to the source code of this file.

Data Types

type  iterativesolver_mod::matrix_type
 A helper type to abstract the concrete details of the matrix. More...
 

Modules

module  iterativesolver_mod
 This is the iterative pressure solver and uses a Jacobi preconditioned BiCGStab which we implement here.
 

Functions/Subroutines

type(component_descriptor_type) function, public iterativesolver_mod::iterativesolver_get_descriptor ()
 Descriptor of the iterative solver component used by the registry. More...
 
subroutine iterativesolver_mod::initialisation_callback (current_state)
 Initialisation callback hook which will set up the halo swapping state and allocate some data. More...
 
subroutine iterativesolver_mod::timestep_callback (current_state)
 Timestep callback, this ignores all but the last column where it calls the solver. More...
 
subroutine iterativesolver_mod::finalisation_callback (current_state)
 Called as MONC is shutting down and frees the halo swap state and deallocates local data. More...
 
subroutine iterativesolver_mod::bicgstab (current_state, A, x, b, i_strt, i_end, j_strt, j_end, k_end)
 Performs the BiCGStab KS method. More...
 
subroutine iterativesolver_mod::cg_solver (current_state, A, x, b, i_strt, i_end, j_strt, j_end, k_end)
 Performs the preconditioned conjugate gradient method. More...
 
subroutine iterativesolver_mod::precond (current_state, A, s, r, preits)
 Jacobi preconditioner. More...
 
subroutine iterativesolver_mod::calc_ax (current_state, A, x, Ax)
 Calculates A * x. More...
 
real(kind=default_precision) function iterativesolver_mod::inner_prod (current_state, x, y, i_strt, i_end, j_strt, j_end, k_end)
 Returns the global inner product of two vectors, ignoring the halo cells. More...
 
real(kind=default_precision) function, dimension(3) iterativesolver_mod::inner_prod_three_way (current_state, t, s, i_strt, i_end, j_strt, j_end, k_end)
 Returns the global inner product of a pair of vectors, ignoring the halo cells for three separate pairs. This call is for optimisation to bunch up the comms in a BiCGStab solver per iteration. More...
 
subroutine iterativesolver_mod::set_matrix_for_poisson (grid_configuration, A, z_size)
 Sets the values of the provided matrix to solve the poisson equation. More...
 
subroutine iterativesolver_mod::deduce_global_divmax (current_state)
 Determines the global divmax which is written into the current state. More...
 
subroutine iterativesolver_mod::copy_p_to_halo_buffer (current_state, neighbour_description, dim, source_index, pid_location, current_page, source_data)
 Copies the p field data to halo buffers for a specific process in a dimension and halo cell. More...
 
subroutine iterativesolver_mod::copy_calc_ax_to_halo_buffer (current_state, neighbour_description, dim, source_index, pid_location, current_page, source_data)
 Copies the source field data to halo buffers for a specific process in a dimension and halo cell - for the calc_Ax halo swaps. More...
 
subroutine iterativesolver_mod::copy_halo_buffer_to_p (current_state, neighbour_description, dim, target_index, neighbour_location, current_page, source_data)
 Copies the halo buffer to halo location for the p field. More...
 
subroutine iterativesolver_mod::copy_halo_buffer_to_calc_ax (current_state, neighbour_description, dim, target_index, neighbour_location, current_page, source_data)
 Copies the halo buffer to halo location for the source field as required in the calc_Ax procedure. More...
 
subroutine iterativesolver_mod::perform_local_data_copy_for_p (current_state, halo_depth, involve_corners, source_data)
 Does local data copying for P variable halo swap. More...
 
subroutine iterativesolver_mod::perform_local_data_copy_for_calc_ax (current_state, halo_depth, involve_corners, source_data)
 Does a local data copy for halo swapping cells with wrap around (to maintain periodic boundary condition) More...
 
type(matrix_type) function iterativesolver_mod::create_problem_matrix (z_size)
 Creates a problem matrix, allocating the required data based upon the column size. More...
 
subroutine iterativesolver_mod::complete_psrce_calculation (current_state, y_halo_size, x_halo_size)
 Completes the psrce calculation by waiting on all outstanding psrce communications to complete and then combine the received values with the P field for U and V. More...
 

Variables

real(kind=default_precision) iterativesolver_mod::tolerance
 
real(kind=default_precision) iterativesolver_mod::relaxation
 Solving tollerance. More...
 
integer iterativesolver_mod::max_iterations
 Maximum number of BiCGStab iterations. More...
 
integer iterativesolver_mod::preconditioner_iterations
 Number of preconditioner iterations to perform per call. More...
 
logical iterativesolver_mod::symm_prob
 
real(kind=default_precision), parameter iterativesolver_mod::tiny = 1.0e-16
 Minimum residual - if we go below this then something has gone wrong. More...
 
type(halo_communication_type), save iterativesolver_mod::halo_swap_state
 The halo swap state as initialised by that module. More...
 
real(kind=default_precision), dimension(:,:,:), allocatable iterativesolver_mod::psource
 
real(kind=default_precision), dimension(:,:,:), allocatable iterativesolver_mod::prev_p
 Passed to BiCGStab as the RHS. More...
 
logical iterativesolver_mod::first_run =.true.
 
type(matrix_type) iterativesolver_mod::a