side_second.F90 Source File


This file depends on

sourcefile~~side_second.f90~~EfferentGraph sourcefile~side_second.f90 side_second.F90 sourcefile~side.f90 side.F90 sourcefile~side_second.f90->sourcefile~side.f90 sourcefile~core.f90 core.F90 sourcefile~side.f90->sourcefile~core.f90 sourcefile~input.f90 input.F90 sourcefile~side.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~input_interface.f90 input_interface.F90 sourcefile~input.f90->sourcefile~input_interface.f90 sourcefile~allocate.f90->sourcefile~error.f90 sourcefile~deallocate.f90->sourcefile~error.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~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~array.f90->sourcefile~allocate.f90 sourcefile~array.f90->sourcefile~deallocate.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

Source Code

submodule(domain_side) domain_side_second
    implicit none
contains

    module function construct_side_second(id, global_coordinate, cell_info, integration) result(side)
        implicit none
        integer(int32), intent(in) :: id
        type(type_dp_3d), pointer, intent(in) :: global_coordinate
        type(type_vtk_cell), intent(in) :: cell_info
        type(type_geometry_settings), intent(in) :: integration
        class(abst_side), allocatable :: side

        integer(int32) :: i

        if (allocated(side)) deallocate (side)
        allocate (type_side_second :: side)

        side%id = id
        side%type = cell_info%cell_type
        side%group = cell_info%cell_entity_id
        side%dimension = cell_info%get_dimension()
        side%order = cell_info%get_order()

        side%num_nodes = cell_info%num_nodes_in_cell
        allocate (side%connectivity(side%num_nodes))
        side%connectivity(:) = cell_info%connectivity(1:side%num_nodes)

        allocate (side%x(side%num_nodes))
        allocate (side%y(side%num_nodes))
        allocate (side%z(side%num_nodes))
        do i = 1, side%num_nodes
            nullify (side%x(i)%val)
            nullify (side%y(i)%val)
            nullify (side%z(i)%val)
            side%x(i)%val => global_coordinate%x(side%connectivity(i))
            side%y(i)%val => global_coordinate%y(side%connectivity(i))
            side%z(i)%val => global_coordinate%z(side%connectivity(i))
        end do

        select case (integration%integration_type)
        case ("full")
            side%num_gauss = 2_int32
            call allocate_array(side%weight, side%num_gauss)
            call allocate_array(side%gauss, side%num_gauss)
            side%weight(:) = [1.0d0, 1.0d0]
            side%gauss(:) = [-sqrt(1.0d0 / 3.0d0), sqrt(1.0d0 / 3.0d0)]
        case ("reduced")
            side%num_gauss = 1_int32
            call allocate_array(side%weight, side%num_gauss)
            call allocate_array(side%gauss, side%num_gauss)
            side%weight(:) = [2.0d0]
            side%gauss(:) = [0.0d0]
        case ("free")
            side%num_gauss = 2_int32
            call allocate_array(side%weight, side%num_gauss)
            call allocate_array(side%gauss, side%num_gauss)
            side%weight(:) = [1.0d0, 1.0d0]
            side%gauss(:) = [-integration%integration_points, integration%integration_points]
        end select

    end function construct_side_second

    module function get_id_side_second(self) result(id)
        implicit none
        class(type_side_second), intent(in) :: self
        integer(int32) :: id

        id = self%id
    end function get_id_side_second

    module function get_type_side_second(self) result(type)
        implicit none
        class(type_side_second), intent(in) :: self
        integer(int32) :: type

        type = self%type
    end function get_type_side_second

    module function get_num_nodes_side_second(self) result(num_nodes)
        implicit none
        class(type_side_second), intent(in) :: self
        integer(int32) :: num_nodes

        num_nodes = self%num_nodes
    end function get_num_nodes_side_second

    module function get_group_side_second(self) result(group)
        implicit none
        class(type_side_second), intent(in) :: self
        integer(int32) :: group

        group = self%group
    end function get_group_side_second

    module function get_order_side_second(self) result(order)
        implicit none
        class(type_side_second), intent(in) :: self
        integer(int32) :: order

        order = self%order
    end function get_order_side_second

    module function get_dimension_side_second(self) result(dimension)
        implicit none
        class(type_side_second), intent(in) :: self
        integer(int32) :: dimension

        dimension = self%dimension
    end function get_dimension_side_second

    module function get_num_gauss_side_second(self) result(num_gauss)
        implicit none
        class(type_side_second), intent(in) :: self
        integer(int32) :: num_gauss

        num_gauss = self%num_gauss
    end function get_num_gauss_side_second

    module function psi_side_second(self, i, xi) result(psi)
        implicit none
        class(type_side_second), intent(in) :: self
        integer(int32), intent(in) :: i
        real(real64), intent(in) :: xi
        real(real64) :: psi

        select case (i)
        case (1)
            psi = 0.5d0 * (1.0d0 - xi)
        case (2)
            psi = 0.5d0 * (1.0d0 + xi)
        case default
            psi = 0.0d0
        end select
    end function psi_side_second

    module function dpsi_dxi_side_second(self, i) result(dpsi)
        implicit none
        class(type_side_second), intent(in) :: self
        integer(int32), intent(in) :: i
        real(real64) :: dpsi

        select case (i)
        case (1)
            dpsi = -0.5d0
        case (2)
            dpsi = 0.5d0
        case default
            dpsi = 0.0d0
        end select
    end function dpsi_dxi_side_second

end submodule domain_side_Second