=
operator.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(integrand_ladvection), | intent(inout) | :: | lhs | Left hand side. |
||
class(integrand_object), | intent(in) | :: | rhs | Right hand side. |
subroutine assign_integrand(lhs, rhs)
!< `=` operator.
class(integrand_ladvection), intent(inout) :: lhs !< Left hand side.
class(integrand_object), intent(in) :: rhs !< Right hand side.
select type(rhs)
class is(integrand_ladvection)
lhs%w_scheme = rhs%w_scheme
lhs%weno_order = rhs%weno_order
lhs%weno_eps = rhs%weno_eps
lhs%CFL = rhs%CFL
lhs%Ni = rhs%Ni
lhs%Ng = rhs%Ng
lhs%length = rhs%length
lhs%Dx = rhs%Dx
lhs%a = rhs%a
if (allocated(rhs%u)) then
lhs%u = rhs%u
else
if (allocated(lhs%u)) deallocate(lhs%u)
endif
if (allocated(rhs%interpolator)) then
if (allocated(lhs%interpolator)) then
call lhs%interpolator%destroy
deallocate(lhs%interpolator)
endif
allocate(lhs%interpolator, mold=rhs%interpolator)
lhs%interpolator = rhs%interpolator
else
if (allocated(lhs%interpolator)) deallocate(lhs%interpolator)
endif
lhs%initial_state = rhs%initial_state
endselect
endsubroutine assign_integrand