Produces a Jacobian block which is the sum of two existing
blocks. Boundary conditions are set by the first operand
(this
).
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(jacobian_block), | intent(in) | :: | this | |||
class(jacobian_block), | intent(in), | target | :: | rhs | A second block which should be added to this block |
function jacobian_block_add_block(this, rhs) result(sum)
!* Author: Chris MacMackin
! Date: May 2017
!
! Produces a Jacobian block which is the sum of two existing
! blocks. Boundary conditions are set by the first operand
! (`this`).
!
class(jacobian_block), intent(in) :: this
class(jacobian_block), target, intent(in) :: rhs
!! A second block which should be added to this block
type(jacobian_block) :: sum
sum = this
sum%block_increment => rhs
#ifdef DEBUG
call logger%debug('jacobian_block%add','Added field to a Jacobian block.')
#endif
end function jacobian_block_add_block