Operator =
.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(block_object), | intent(inout) | :: | lhs | Left hand side. |
||
type(block_object), | intent(in) | :: | rhs | Right hand side. |
pure subroutine block_assign_block(lhs, rhs)
!< Operator `=`.
class(block_object), intent(inout) :: lhs !< Left hand side.
type(block_object), intent(in) :: rhs !< Right hand side.
lhs%error = rhs%error
lhs%signature = rhs%signature
if (allocated(rhs%cell)) then
if (allocated(lhs%cell)) then
call lhs%cell%destroy
deallocate(lhs%cell)
endif
lhs%cell = rhs%cell
endif
if (allocated(rhs%face_i)) then
if (allocated(lhs%face_i)) then
call lhs%face_i%destroy
deallocate(lhs%face_i)
endif
lhs%face_i = rhs%face_i
endif
if (allocated(rhs%face_j)) then
if (allocated(lhs%face_j)) then
call lhs%face_j%destroy
deallocate(lhs%face_j)
endif
lhs%face_j = rhs%face_j
endif
if (allocated(rhs%face_k)) then
if (allocated(lhs%face_k)) then
call lhs%face_k%destroy
deallocate(lhs%face_k)
endif
lhs%face_k = rhs%face_k
endif
if (allocated(rhs%node)) then
if (allocated(lhs%node)) then
call lhs%node%destroy
deallocate(lhs%node)
endif
lhs%node = rhs%node
endif
endsubroutine block_assign_block