TBI
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(type_domain), | intent(inout) | :: | self | |||
| type(type_input), | intent(in) | :: | input | |||
| type(type_dp_3d), | intent(inout), | pointer | :: | Coordinate |
subroutine initialize_type_domain(self, input, Coordinate) implicit none class(type_domain), intent(inout) :: self type(type_input), intent(in) :: input type(type_dp_3d), intent(inout), pointer :: Coordinate integer(int32) :: count_sides, count_elements, count_volumes integer(int32) :: iCell, iElem, iSide integer(int32) :: cell_dimension ! ----------------------------------------------------------------------------------- ! 初期化処理 ! ----------------------------------------------------------------------------------- count_sides = 0 count_elements = 0 count_volumes = 0 do iCell = 1, input%geometry%vtk%num_total_cells cell_dimension = input%geometry%vtk%cells(iCell)%get_dimension() select case (cell_dimension) case (1) count_sides = count_sides + 1 case (2) count_elements = count_elements + 1 case (3) count_volumes = count_volumes + 1 end select end do self%num_elements = count_elements self%num_sides = count_sides self%num_nodes = input%geometry%vtk%num_points self%num_materials = input%basic%num_materials if (allocated(self%elements)) deallocate (self%elements) allocate (self%elements(self%num_elements)) if (allocated(self%sides)) deallocate (self%sides) allocate (self%sides(self%num_sides)) iElem = 1 iSide = 1 do iCell = 1, input%geometry%vtk%num_total_cells cell_dimension = input%geometry%vtk%cells(iCell)%get_dimension() select case (cell_dimension) case (1) self%sides(iSide)%s = create_side(id=iCell, & global_coordinate=Coordinate, & input=input) iSide = iSide + 1 case (2) self%elements(iElem)%e = create_element(id=iCell, & global_coordinate=Coordinate, & input=input) iElem = iElem + 1 case (3) !!TBI end select end do self%computation_dimension = input%basic%simulation_settings%calculate_dimension !=============================================================== ! 3. 隣接行列の構築 !=============================================================== call self%node_adjacency%initialize(self%num_nodes, self%computation_dimension, self%sides, self%elements) call self%element_adjacency%initialize(self%elements) call self%map_node_to_element%initialize(self%num_nodes, self%elements, "fast") !=============================================================== ! 4. RCM並べ替えの実行 !=============================================================== call self%reordering%initialize(input%basic%solver_settings%reordering, self%node_adjacency) if (input%basic%solver_settings%reordering /= "none") then call self%apply_reordering() call global_logger%log_information(message="RCM reordering completed.") end if !=============================================================== ! 5. グラフ彩色の実行 !=============================================================== call self%colors%initialize(input%basic%solver_settings%coloring, self%element_adjacency) call global_logger%log_information(message="Graph coloring completed using " & //trim(self%colors%algorithm_name)//" algorithm.") call global_logger%log_information(message="Initialization process completed successfully.") end subroutine initialize_type_domain