Assign one Lorenz field to another.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(lorenz), | intent(inout) | :: | lhs | Left hand side. |
||
class(integrand), | intent(in) | :: | rhs | Right hand side. |
subroutine lorenz_assign_lorenz(lhs, rhs)
!---------------------------------------------------------------------------------------------------------------------------------
!< Assign one Lorenz field to another.
!---------------------------------------------------------------------------------------------------------------------------------
class(lorenz), intent(INOUT) :: lhs !< Left hand side.
class(integrand), intent(IN) :: rhs !< Right hand side.
!---------------------------------------------------------------------------------------------------------------------------------
!---------------------------------------------------------------------------------------------------------------------------------
select type(rhs)
class is (lorenz)
lhs%dims = rhs%dims
lhs%steps = rhs%steps
if (allocated(rhs%U)) lhs%U = rhs%U
if (allocated(rhs%previous)) lhs%previous = rhs%previous
lhs%sigma = rhs%sigma
lhs%rho = rhs%rho
lhs%beta = rhs%beta
endselect
return
!---------------------------------------------------------------------------------------------------------------------------------
endsubroutine lorenz_assign_lorenz