initial_manager.F90 Source File


This file depends on

sourcefile~~initial_manager.f90~~EfferentGraph sourcefile~initial_manager.f90 initial_manager.F90 sourcefile~core.f90 core.F90 sourcefile~initial_manager.f90->sourcefile~core.f90 sourcefile~domain.f90 domain.F90 sourcefile~initial_manager.f90->sourcefile~domain.f90 sourcefile~initial_interface.f90 initial_interface.F90 sourcefile~initial_manager.f90->sourcefile~initial_interface.f90 sourcefile~input.f90 input.F90 sourcefile~initial_manager.f90->sourcefile~input.f90 sourcefile~allocate.f90 allocate.F90 sourcefile~core.f90->sourcefile~allocate.f90 sourcefile~check_range.f90 check_range.F90 sourcefile~core.f90->sourcefile~check_range.f90 sourcefile~deallocate.f90 deallocate.F90 sourcefile~core.f90->sourcefile~deallocate.f90 sourcefile~error.f90 error.F90 sourcefile~core.f90->sourcefile~error.f90 sourcefile~fortran_utils.f90 fortran_utils.F90 sourcefile~core.f90->sourcefile~fortran_utils.f90 sourcefile~string_utils.f90 string_utils.F90 sourcefile~core.f90->sourcefile~string_utils.f90 sourcefile~types.f90 types.F90 sourcefile~core.f90->sourcefile~types.f90 sourcefile~unique.f90 unique.F90 sourcefile~core.f90->sourcefile~unique.f90 sourcefile~vtk.f90 vtk.F90 sourcefile~core.f90->sourcefile~vtk.f90 sourcefile~vtk_constants.f90 vtk_constants.F90 sourcefile~core.f90->sourcefile~vtk_constants.f90 sourcefile~adjacency.f90 adjacency.F90 sourcefile~domain.f90->sourcefile~adjacency.f90 sourcefile~domain_manager.f90 domain_manager.F90 sourcefile~domain.f90->sourcefile~domain_manager.f90 sourcefile~element.f90 element.F90 sourcefile~domain.f90->sourcefile~element.f90 sourcefile~element_factory.f90 element_factory.F90 sourcefile~domain.f90->sourcefile~element_factory.f90 sourcefile~multicoloring.f90 multicoloring.F90 sourcefile~domain.f90->sourcefile~multicoloring.f90 sourcefile~reordering.f90 reordering.F90 sourcefile~domain.f90->sourcefile~reordering.f90 sourcefile~side.f90 side.F90 sourcefile~domain.f90->sourcefile~side.f90 sourcefile~side_factory.f90 side_factory.F90 sourcefile~domain.f90->sourcefile~side_factory.f90 sourcefile~initial_interface.f90->sourcefile~core.f90 sourcefile~initial_interface.f90->sourcefile~domain.f90 sourcefile~initial_interface.f90->sourcefile~input.f90 sourcefile~boundary.f90 boundary.F90 sourcefile~initial_interface.f90->sourcefile~boundary.f90 sourcefile~input_interface.f90 input_interface.F90 sourcefile~input.f90->sourcefile~input_interface.f90 sourcefile~adjacency_element.f90 adjacency_element.F90 sourcefile~adjacency.f90->sourcefile~adjacency_element.f90 sourcefile~adjacency_node.f90 adjacency_node.F90 sourcefile~adjacency.f90->sourcefile~adjacency_node.f90 sourcefile~allocate.f90->sourcefile~error.f90 sourcefile~boundary_interface.f90 boundary_interface.F90 sourcefile~boundary.f90->sourcefile~boundary_interface.f90 sourcefile~boundary_manager.f90 boundary_manager.F90 sourcefile~boundary.f90->sourcefile~boundary_manager.f90 sourcefile~deallocate.f90->sourcefile~error.f90 sourcefile~domain_manager.f90->sourcefile~core.f90 sourcefile~domain_manager.f90->sourcefile~input.f90 sourcefile~domain_manager.f90->sourcefile~adjacency.f90 sourcefile~domain_manager.f90->sourcefile~element.f90 sourcefile~domain_manager.f90->sourcefile~element_factory.f90 sourcefile~domain_manager.f90->sourcefile~multicoloring.f90 sourcefile~domain_manager.f90->sourcefile~reordering.f90 sourcefile~domain_manager.f90->sourcefile~side.f90 sourcefile~domain_manager.f90->sourcefile~side_factory.f90 sourcefile~element.f90->sourcefile~core.f90 sourcefile~element.f90->sourcefile~input.f90 sourcefile~element_factory.f90->sourcefile~core.f90 sourcefile~element_factory.f90->sourcefile~input.f90 sourcefile~element_factory.f90->sourcefile~element.f90 sourcefile~memory_stats_wrapper.f90 memory_stats_wrapper.F90 sourcefile~fortran_utils.f90->sourcefile~memory_stats_wrapper.f90 sourcefile~signal_flag_wrapper.f90 signal_flag_wrapper.F90 sourcefile~fortran_utils.f90->sourcefile~signal_flag_wrapper.f90 sourcefile~system_info_wrapper.f90 system_info_wrapper.F90 sourcefile~fortran_utils.f90->sourcefile~system_info_wrapper.f90 sourcefile~input_interface.f90->sourcefile~core.f90 sourcefile~project_settings.f90 project_settings.F90 sourcefile~input_interface.f90->sourcefile~project_settings.f90 sourcefile~multicoloring.f90->sourcefile~core.f90 sourcefile~multicoloring.f90->sourcefile~adjacency_element.f90 sourcefile~reordering.f90->sourcefile~core.f90 sourcefile~reordering.f90->sourcefile~element.f90 sourcefile~reordering.f90->sourcefile~adjacency_node.f90 sourcefile~side.f90->sourcefile~core.f90 sourcefile~side.f90->sourcefile~input.f90 sourcefile~side_factory.f90->sourcefile~core.f90 sourcefile~side_factory.f90->sourcefile~input.f90 sourcefile~side_factory.f90->sourcefile~side.f90 sourcefile~string_utils.f90->sourcefile~allocate.f90 sourcefile~array.f90 array.F90 sourcefile~types.f90->sourcefile~array.f90 sourcefile~gauss.f90 gauss.F90 sourcefile~types.f90->sourcefile~gauss.f90 sourcefile~pointer.f90 pointer.F90 sourcefile~types.f90->sourcefile~pointer.f90 sourcefile~variable.f90 variable.F90 sourcefile~types.f90->sourcefile~variable.f90 sourcefile~vector.f90 vector.F90 sourcefile~types.f90->sourcefile~vector.f90 sourcefile~unique.f90->sourcefile~allocate.f90 sourcefile~vtk.f90->sourcefile~allocate.f90 sourcefile~vtk.f90->sourcefile~deallocate.f90 sourcefile~vtk.f90->sourcefile~unique.f90 sourcefile~vtk.f90->sourcefile~vtk_constants.f90 sourcefile~vtk.f90->sourcefile~array.f90 sourcefile~vtk_wrapper.f90 vtk_wrapper.F90 sourcefile~vtk.f90->sourcefile~vtk_wrapper.f90 sourcefile~vtu_wrapper.f90 vtu_wrapper.F90 sourcefile~vtk.f90->sourcefile~vtu_wrapper.f90 sourcefile~adjacency_element.f90->sourcefile~core.f90 sourcefile~adjacency_element.f90->sourcefile~element.f90 sourcefile~adjacency_node.f90->sourcefile~core.f90 sourcefile~array.f90->sourcefile~allocate.f90 sourcefile~array.f90->sourcefile~deallocate.f90 sourcefile~boundary_interface.f90->sourcefile~core.f90 sourcefile~boundary_interface.f90->sourcefile~domain.f90 sourcefile~boundary_interface.f90->sourcefile~input.f90 sourcefile~matrix.f90 matrix.F90 sourcefile~boundary_interface.f90->sourcefile~matrix.f90 sourcefile~boundary_manager.f90->sourcefile~core.f90 sourcefile~boundary_manager.f90->sourcefile~domain.f90 sourcefile~boundary_manager.f90->sourcefile~input.f90 sourcefile~boundary_manager.f90->sourcefile~boundary_interface.f90 sourcefile~boundary_manager.f90->sourcefile~matrix.f90 sourcefile~c_utils.f90 c_utils.F90 sourcefile~memory_stats_wrapper.f90->sourcefile~c_utils.f90 sourcefile~project_settings.f90->sourcefile~core.f90 sourcefile~signal_flag.f90 signal_flag.F90 sourcefile~signal_flag_wrapper.f90->sourcefile~signal_flag.f90 sourcefile~system_info_wrapper.f90->sourcefile~c_utils.f90 sourcefile~variable.f90->sourcefile~allocate.f90 sourcefile~c_utils.f90->sourcefile~signal_flag.f90 sourcefile~memory_stats.f90 memory_stats.F90 sourcefile~c_utils.f90->sourcefile~memory_stats.f90 sourcefile~system_info.f90 system_info.F90 sourcefile~c_utils.f90->sourcefile~system_info.f90 sourcefile~matrix_base.f90 matrix_base.F90 sourcefile~matrix.f90->sourcefile~matrix_base.f90 sourcefile~matrix_coo.f90 matrix_coo.F90 sourcefile~matrix.f90->sourcefile~matrix_coo.f90 sourcefile~matrix_crs.f90 matrix_crs.F90 sourcefile~matrix.f90->sourcefile~matrix_crs.f90 sourcefile~matrix_dense.f90 matrix_dense.F90 sourcefile~matrix.f90->sourcefile~matrix_dense.f90 sourcefile~matrix_base.f90->sourcefile~domain.f90 sourcefile~matrix_coo.f90->sourcefile~core.f90 sourcefile~matrix_coo.f90->sourcefile~domain.f90 sourcefile~matrix_coo.f90->sourcefile~matrix_base.f90 sourcefile~matrix_crs.f90->sourcefile~core.f90 sourcefile~matrix_crs.f90->sourcefile~domain.f90 sourcefile~matrix_crs.f90->sourcefile~matrix_base.f90 sourcefile~matrix_crs.f90->sourcefile~matrix_coo.f90 sourcefile~matrix_dense.f90->sourcefile~core.f90 sourcefile~matrix_dense.f90->sourcefile~domain.f90 sourcefile~matrix_dense.f90->sourcefile~matrix_base.f90

Files dependent on this one

sourcefile~~initial_manager.f90~~AfferentGraph sourcefile~initial_manager.f90 initial_manager.F90 sourcefile~initial.f90 initial.F90 sourcefile~initial.f90->sourcefile~initial_manager.f90 sourcefile~ftdss.f90 ftdss.F90 sourcefile~ftdss.f90->sourcefile~initial.f90

Source Code

! =============================================================================
! module conditions_initial_manager
! Purpose: Manages all initial condition objects.
! =============================================================================
module conditions_initial_manager
    use :: module_core, only:type_variable
    use :: module_domain, only:type_domain
    use :: module_input, only:type_input
    use :: conditions_initial, only:abst_ic, type_ic_uniform, type_ic_laplace
    implicit none
    private

    public :: type_ic

    type :: type_ic
        class(abst_ic), allocatable :: t
        class(abst_ic), allocatable :: h
        class(abst_ic), allocatable :: p
    contains
        procedure :: initialize => initialize_type_ic
        procedure :: apply
    end type type_ic

contains

    !
    ! Sets up the manager by creating the correct IC objects based on input.
    !
    subroutine initialize_type_ic(self, input)
        implicit none
        class(type_ic), intent(inout) :: self
        type(type_input), intent(in) :: input

        if (input%basic%analysis_controls%calculate_thermal) then
            select case (trim(adjustl(input%conditions%initial_conditions%thermal%type)))
            case ("uniform")
                allocate (type_ic_uniform :: self%t)
            case ("laplace")
                allocate (type_ic_laplace :: self%t)
            case ("file")
                !     allocate (IC_File :: self%T)
            end select
            call self%t%initialize(input, 'thermal')
        end if

        if (input%basic%analysis_controls%calculate_hydraulic) then
            select case (trim(adjustl(input%conditions%initial_conditions%hydraulic%type)))
            case ("uniform")
                allocate (type_ic_uniform :: self%h)
            case ("laplace")
                allocate (type_ic_laplace :: self%h)
            case ("file")
                !     allocate (IC_File :: self%T)
            end select
            call self%t%initialize(input, 'hydraulic')
        end if

        select case (trim(adjustl(input%conditions%initial_conditions%porosity%type)))
        case ("uniform")
            allocate (type_ic_uniform :: self%p)
        case ("laplace")
            allocate (type_ic_laplace :: self%p)
        case ("file")
            !     allocate (IC_File :: self%T)
        end select
        call self%p%initialize(input, 'porosity')

    end subroutine initialize_type_ic

    subroutine apply(self, initial_target, domain, variable)
        class(type_ic), intent(in) :: self
        character(*), intent(in) :: initial_target
        type(type_domain), intent(in) :: domain
        type(type_variable), intent(inout) :: variable

        select case (trim(adjustl(initial_target)))
        case ("thermal")
            if (allocated(self%T)) then
                call self%t%apply(domain, variable)
            end if
        case ("hydraulic")
            if (allocated(self%H)) then
                call self%h%apply(domain, variable)
            end if
        case ("porosity")
            if (allocated(self%P)) then
                call self%p%apply(domain, variable)
            end if
        case default
            ! Error or no action
        end select
    end subroutine apply

end module conditions_initial_manager