get_partition_pattern Subroutine

private subroutine get_partition_pattern(me, irow, icol)

Returns the pattern that the columns must be partitioned on: the nonlinear elements plus the linear (constant) elements. The linear elements must be included, since the function still depends on those variables: two columns that share a row through a linear element cannot be perturbed together.

Type Bound

sparsity_pattern

Arguments

Type IntentOptional Attributes Name
class(sparsity_pattern), intent(in) :: me
integer, intent(out), dimension(:), allocatable :: irow

rows of the elements

integer, intent(out), dimension(:), allocatable :: icol

columns of the elements


Called by

proc~~get_partition_pattern~~CalledByGraph proc~get_partition_pattern sparsity_pattern%get_partition_pattern proc~dsm_wrapper sparsity_pattern%dsm_wrapper proc~dsm_wrapper->proc~get_partition_pattern proc~partition_is_consistent sparsity_pattern%partition_is_consistent proc~partition_is_consistent->proc~get_partition_pattern proc~compute_sparsity_random compute_sparsity_random proc~compute_sparsity_random->proc~dsm_wrapper proc~compute_sparsity_random_2 compute_sparsity_random_2 proc~compute_sparsity_random_2->proc~dsm_wrapper proc~set_sparsity_pattern numdiff_type%set_sparsity_pattern proc~set_sparsity_pattern->proc~dsm_wrapper proc~set_sparsity_pattern->proc~partition_is_consistent

Source Code

    subroutine get_partition_pattern(me,irow,icol)

    implicit none

    class(sparsity_pattern),intent(in) :: me
    integer,dimension(:),allocatable,intent(out) :: irow  !! rows of the elements
    integer,dimension(:),allocatable,intent(out) :: icol  !! columns of the elements

    if (allocated(me%irow)) then
        irow = me%irow
        icol = me%icol
    else
        allocate(irow(0), icol(0))
    end if
    if (me%linear_sparsity_computed .and. allocated(me%linear_irow)) then
        irow = [irow, me%linear_irow]
        icol = [icol, me%linear_icol]
    end if

    end subroutine get_partition_pattern