compute_type_hydraulic_crs Module Subroutine

module subroutine compute_type_hydraulic_crs(self, domain, property, pressure, temperature, porosity, ice, controls, bc)

Arguments

Type IntentOptional Attributes Name
class(type_hydraulic_crs), intent(inout) :: self
type(type_domain), intent(inout) :: domain
type(type_properties_manager), intent(in) :: property
type(type_variable), intent(inout) :: pressure
type(type_variable), intent(inout) :: temperature
type(type_variable), intent(inout) :: porosity
type(type_variable), intent(inout) :: ice
type(type_controls), intent(inout) :: controls
type(type_bc), intent(inout) :: bc

Calls

proc~~compute_type_hydraulic_crs~~CallsGraph proc~compute_type_hydraulic_crs compute_type_hydraulic_crs interface~solve_type_hydraulic_crs type_hydraulic_crs%solve_type_hydraulic_crs proc~compute_type_hydraulic_crs->interface~solve_type_hydraulic_crs proc~apply_type_bc_crs type_bc%apply_type_bc_crs proc~compute_type_hydraulic_crs->proc~apply_type_bc_crs proc~check_convergence type_iteration%check_convergence proc~compute_type_hydraulic_crs->proc~check_convergence proc~continue_loop type_iteration%continue_loop proc~compute_type_hydraulic_crs->proc~continue_loop proc~get_step type_iteration%get_step proc~compute_type_hydraulic_crs->proc~get_step proc~get_time type_time%get_time proc~compute_type_hydraulic_crs->proc~get_time proc~increment_step type_iteration%increment_step proc~compute_type_hydraulic_crs->proc~increment_step proc~profile_start_timer type_time%profile_start_timer proc~compute_type_hydraulic_crs->proc~profile_start_timer proc~profile_stop_timer type_time%profile_stop_timer proc~compute_type_hydraulic_crs->proc~profile_stop_timer proc~set_initial_norms type_iteration%set_initial_norms proc~compute_type_hydraulic_crs->proc~set_initial_norms proc~solve_type_hydraulic_crs solve_type_hydraulic_crs interface~solve_type_hydraulic_crs->proc~solve_type_hydraulic_crs apply_crs apply_crs proc~apply_type_bc_crs->apply_crs proc~norm_2 norm_2 proc~check_convergence->proc~norm_2 proc~error_message error_message proc~profile_start_timer->proc~error_message proc~get_current_time get_current_time proc~profile_start_timer->proc~get_current_time proc~profile_stop_timer->proc~error_message proc~profile_stop_timer->proc~get_current_time proc~set_initial_norms->proc~norm_2 proc~norm_inf norm_inf proc~set_initial_norms->proc~norm_inf log_error log_error proc~error_message->log_error proc~solve_type_hydraulic_crs->proc~get_time check check proc~solve_type_hydraulic_crs->check proc~get_algorithm_name~2 type_iteration%get_algorithm_name proc~solve_type_hydraulic_crs->proc~get_algorithm_name~2 solve solve proc~solve_type_hydraulic_crs->solve

Called by

proc~~compute_type_hydraulic_crs~~CalledByGraph proc~compute_type_hydraulic_crs compute_type_hydraulic_crs interface~compute_type_hydraulic_crs type_hydraulic_crs%compute_type_hydraulic_crs interface~compute_type_hydraulic_crs->proc~compute_type_hydraulic_crs

Source Code

    module subroutine compute_type_hydraulic_crs(self, domain, property, pressure, temperature, porosity, ice, controls, bc)
        implicit none
        class(type_hydraulic_crs), intent(inout) :: self
        type(type_domain), intent(inout) :: domain
        type(type_properties_manager), intent(in) :: property
        type(type_variable), intent(inout) :: pressure
        type(type_variable), intent(inout) :: temperature
        type(type_variable), intent(inout) :: porosity
        type(type_variable), intent(inout) :: ice
        type(type_controls), intent(inout) :: controls
        type(type_bc), intent(inout) :: bc

        integer(int32) :: actual_order
        integer(int32) :: mode_bc

        call controls%time%profile_start("Setup")
        select case (self%algorithm)
        case ("none")
            mode_bc = mode_value
        case default
            mode_bc = mode_nr
        end select

        call controls%time%profile_stop("Setup")

        NR_LOOP_THERMAL: do while (controls%iteration%should_continue())
            call controls%time%profile_start("Setup")
            call controls%iteration%increment_step()
            call controls%time%profile_stop("Setup")

            call controls%time%profile_start("Assemble")
            actual_order = min(self%order, controls%iteration%get_step())
            ! J, R, domain, pressure, temperature, porosity, ice, &
            !                                                properties, controls, actual_order
            call self%assemble_global(self%KH_star, self%PHIH, domain, pressure, temperature, ice, porosity, &
                                      property, controls, actual_order)
            call controls%time%profile_stop("Assemble")

            call controls%time%profile_start("Setup")
            call bc%apply_crs(boundary_target='hydraulic', &
                              current_time=controls%time%get_time(), &
                              A=self%KH_star, &
                              b=self%PHIH, &
                              Domain=Domain, &
                              mode=mode_bc)
            if (controls%iteration%get_step() == 1) call controls%iteration%set_initial_norms(res_vec=self%PHIH)
            call controls%time%profile_stop("Setup")

            call controls%time%profile_start("Solve")
            call self%solve(pressure, controls)
            call controls%time%profile_stop("Solve")

            call controls%time%profile_start("Setup")
            if (controls%iteration%get_step() == 1) call controls%iteration%set_initial_norms(upd_vec=pressure%dif(:))
            call controls%iteration%check_convergence(self%PHIH, pressure%dif(:))
            pressure%pre(:) = pressure%new(:)
            call controls%time%profile_stop("Setup")
        end do NR_LOOP_THERMAL

    end subroutine compute_type_hydraulic_crs