Copies the contents of the rhs
Jacobian block into this
one. It will safely deallocate any data necessary.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(jacobian_block), | intent(out) | :: | this | |||
type(jacobian_block), | intent(in) | :: | rhs |
subroutine jacobian_block_assign(this, rhs)
!* Author: Chris MacMackin
! Date: December 2016
!
! Copies the contents of the `rhs` Jacobian block into this
! one. It will safely deallocate any data necessary.
!
class(jacobian_block), intent(out) :: this
type(jacobian_block), intent(in) :: rhs
this%direction = rhs%direction
this%extra_derivative = rhs%extra_derivative
allocate(this%contents, mold=rhs%contents)
allocate(this%derivative, mold=rhs%derivative)
this%contents = rhs%contents
this%coef = rhs%coef
this%derivative = rhs%derivative
this%get_boundaries => rhs%get_boundaries
if (allocated(rhs%diagonal)) then
this%diagonal = rhs%diagonal
this%super_diagonal = rhs%super_diagonal
this%sub_diagonal = rhs%sub_diagonal
this%l_multipliers = rhs%l_multipliers
this%u_diagonal = rhs%u_diagonal
this%u_superdiagonal1 = rhs%u_superdiagonal1
this%u_superdiagonal2 = rhs%u_superdiagonal2
this%pivots = rhs%pivots
end if
if (allocated(rhs%boundary_locs)) this%boundary_locs = rhs%boundary_locs
if (allocated(rhs%boundary_types)) this%boundary_types = rhs%boundary_types
this%real_increment = rhs%real_increment
if (allocated(rhs%field_increment)) &
allocate(this%field_increment, source=rhs%field_increment)
if (associated(rhs%block_increment)) this%block_increment => rhs%block_increment
this%has_increment = rhs%has_increment
end subroutine jacobian_block_assign