module subroutine apply_CRS_Thermal_Adiabatic(self, current_time, A, b, Domain, mode)
implicit none
class(type_bc_thermal_adiabatic), intent(in) :: self
real(real64), intent(in) :: current_time
type(Type_CRS), intent(inout), optional :: A
real(real64), intent(inout) :: b(:)
type(type_domain), intent(in) :: Domain
integer(int32), intent(in), optional :: mode
! real(real64) :: Dval, timeCoe
! integer(int32) :: idx, iEdge
! if (.not. present(mode)) then
! call Calc_Time_Coefficients(current_time, self%time_points, timeCoe, idx)
! Dval = (self%values(idx) * (1.0d0 - timeCoe) + self%values(idx + 1) * timeCoe)
! do iEdge = 1, self%num_target_edges
! call apply_CRS_Adiabatic_base(A=A, &
! b=b, &
! isUniform=self%is_uniform, &
! Edge=self%target_edges(:, iEdge), &
! Dval=Dval, &
! perm=Domain%RCM_perm)
! end do
! else
! select case (mode)
! case (0)
! call Calc_Time_Coefficients(current_time, self%time_points, timeCoe, idx)
! Dval = (self%values(idx) * (1.0d0 - timeCoe) + self%values(idx + 1) * timeCoe)
! case (1)
! !! Newton-Raphson step
! Dval = 0.0d0
! case (2)
! !! initial condition
! Dval = self%values(1)
! end select
! do iEdge = 1, self%num_target_edges
! call apply_CRS_Adiabatic_base(A=A, &
! b=b, &
! isUniform=self%is_uniform, &
! Edge=self%target_edges(:, iEdge), &
! Dval=Dval, &
! perm=Domain%RCM_perm)
! end do
! end if
end subroutine apply_CRS_Thermal_Adiabatic