euler_assign_euler Subroutine

private subroutine euler_assign_euler(lhs, rhs)

Assign one Euler field to another.

Arguments

Type IntentOptional AttributesName
class(euler_1d), intent(inout) :: lhs

Left hand side.

class(integrand), intent(in) :: rhs

Right hand side.


Source Code


Source Code

  subroutine euler_assign_euler(lhs, rhs)
  !< Assign one Euler field to another.
  class(euler_1d),  intent(inout) :: lhs !< Left hand side.
  class(integrand), intent(in)    :: rhs !< Right hand side.
  integer(I4P)                    :: i   !< Counter.

  select type(rhs)
  class is(euler_1d)
     lhs%weno_order = rhs%weno_order
     lhs%Ni         = rhs%Ni
     lhs%Ng         = rhs%Ng
     lhs%Dx         = rhs%Dx
     lhs%eos        = rhs%eos
     if (allocated(rhs%U)) then
        if (allocated(lhs%U)) deallocate(lhs%U) ; allocate(lhs%U(1:lhs%Ni))
        select type(rhs)
        class is(euler_1d)
           if (allocated(rhs%U)) then
              do i=1, lhs%Ni
                 lhs%U(i) = rhs%U(i)
              enddo
           endif
        endselect
     endif
     if (allocated(rhs%BC_L)) lhs%BC_L = rhs%BC_L
     if (allocated(rhs%BC_R)) lhs%BC_R = rhs%BC_R
     if (allocated(rhs%interpolator)) then
        if (allocated(lhs%interpolator)) deallocate(lhs%interpolator)
        allocate(lhs%interpolator, source=rhs%interpolator)
     endif
     if (associated(rhs%reconstruct_interfaces)) lhs%reconstruct_interfaces => rhs%reconstruct_interfaces
     ! if (associated(rhs%riemann_solver)) lhs%riemann_solver => rhs%riemann_solver
     if (allocated(rhs%riemann_solver)) then
        if (allocated(lhs%riemann_solver)) deallocate(lhs%riemann_solver) ; allocate(lhs%riemann_solver, source=rhs%riemann_solver)
     endif
  endselect
  endsubroutine euler_assign_euler


add add add_euler array array compute_derivate compute_dt compute_fluxes compute_fluxes compute_fluxes_from_primitive compute_post_rarefaction compute_post_shock compute_roe_state compute_states23_from_u23 compute_u23 compute_up23 compute_waves compute_waves_u23 compute_waves_up23 cons_assign_cons cons_divide_real cons_multiply_cons cons_multiply_real conservative_compressible conservative_compressible_instance conservative_compressible_pointer conservative_to_primitive_compressible cp cv delta density description description description description destroy destroy destroy dEuler_dt energy energy eos_assign_eos eos_compressible eos_compressible_instance eos_compressible_pointer eta euler_assign_euler euler_assign_real euler_local_error euler_multiply_euler euler_multiply_real g gm1 gp1 impose_boundary_conditions initialize initialize initialize initialize initialize initialize initialize initialize initialize initialize left_eigenvectors momentum negative negative output parse_command_line_interface positive positive pressure pressure prim_assign_prim prim_divide_real prim_multiply_prim prim_multiply_real primitive_compressible primitive_compressible_instance primitive_compressible_pointer primitive_to_conservative_compressible R real_multiply_cons real_multiply_euler real_multiply_prim reconstruct_interfaces_characteristic reconstruct_interfaces_conservative reconstruct_interfaces_primitive right_eigenvectors rpat_assign_rpat save_time_serie solve solve solve solve solve speed_of_sound sub sub sub_euler temperature velocity