vtu_wrapper.F90 Source File


Files dependent on this one

sourcefile~~vtu_wrapper.f90~~AfferentGraph sourcefile~vtu_wrapper.f90 vtu_wrapper.F90 sourcefile~vtk.f90 vtk.F90 sourcefile~vtk.f90->sourcefile~vtu_wrapper.f90 sourcefile~core.f90 core.F90 sourcefile~core.f90->sourcefile~vtk.f90 sourcefile~adjacency_element.f90 adjacency_element.F90 sourcefile~adjacency_element.f90->sourcefile~core.f90 sourcefile~element.f90 element.F90 sourcefile~adjacency_element.f90->sourcefile~element.f90 sourcefile~adjacency_node.f90 adjacency_node.F90 sourcefile~adjacency_node.f90->sourcefile~core.f90 sourcefile~boundary_interface.f90 boundary_interface.F90 sourcefile~boundary_interface.f90->sourcefile~core.f90 sourcefile~domain.f90 domain.F90 sourcefile~boundary_interface.f90->sourcefile~domain.f90 sourcefile~input.f90 input.F90 sourcefile~boundary_interface.f90->sourcefile~input.f90 sourcefile~matrix.f90 matrix.F90 sourcefile~boundary_interface.f90->sourcefile~matrix.f90 sourcefile~boundary_manager.f90 boundary_manager.F90 sourcefile~boundary_manager.f90->sourcefile~core.f90 sourcefile~boundary_manager.f90->sourcefile~boundary_interface.f90 sourcefile~boundary_manager.f90->sourcefile~domain.f90 sourcefile~boundary_manager.f90->sourcefile~input.f90 sourcefile~boundary_manager.f90->sourcefile~matrix.f90 sourcefile~density_interface.f90 density_interface.F90 sourcefile~density_interface.f90->sourcefile~core.f90 sourcefile~density_interface.f90->sourcefile~input.f90 sourcefile~domain_manager.f90 domain_manager.F90 sourcefile~domain_manager.f90->sourcefile~core.f90 sourcefile~domain_manager.f90->sourcefile~element.f90 sourcefile~element_factory.f90 element_factory.F90 sourcefile~domain_manager.f90->sourcefile~element_factory.f90 sourcefile~multicoloring.f90 multicoloring.F90 sourcefile~domain_manager.f90->sourcefile~multicoloring.f90 sourcefile~reordering.f90 reordering.F90 sourcefile~domain_manager.f90->sourcefile~reordering.f90 sourcefile~side.f90 side.F90 sourcefile~domain_manager.f90->sourcefile~side.f90 sourcefile~side_factory.f90 side_factory.F90 sourcefile~domain_manager.f90->sourcefile~side_factory.f90 sourcefile~adjacency.f90 adjacency.F90 sourcefile~domain_manager.f90->sourcefile~adjacency.f90 sourcefile~domain_manager.f90->sourcefile~input.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~element.f90 sourcefile~element_factory.f90->sourcefile~input.f90 sourcefile~ftdss.f90 ftdss.F90 sourcefile~ftdss.f90->sourcefile~core.f90 sourcefile~input_interface.f90 input_interface.F90 sourcefile~ftdss.f90->sourcefile~input_interface.f90 sourcefile~thermal_interface.f90 thermal_interface.F90 sourcefile~ftdss.f90->sourcefile~thermal_interface.f90 sourcefile~boundary.f90 boundary.F90 sourcefile~ftdss.f90->sourcefile~boundary.f90 sourcefile~control.f90 control.F90 sourcefile~ftdss.f90->sourcefile~control.f90 sourcefile~ftdss.f90->sourcefile~domain.f90 sourcefile~initial.f90 initial.F90 sourcefile~ftdss.f90->sourcefile~initial.f90 sourcefile~output.f90 output.F90 sourcefile~ftdss.f90->sourcefile~output.f90 sourcefile~properties.f90 properties.F90 sourcefile~ftdss.f90->sourcefile~properties.f90 sourcefile~heat_capacity_interface.f90 heat_capacity_interface.F90 sourcefile~heat_capacity_interface.f90->sourcefile~core.f90 sourcefile~heat_capacity_interface.f90->sourcefile~density_interface.f90 sourcefile~heat_capacity_interface.f90->sourcefile~input_interface.f90 sourcefile~initial_interface.f90 initial_interface.F90 sourcefile~initial_interface.f90->sourcefile~core.f90 sourcefile~initial_interface.f90->sourcefile~boundary.f90 sourcefile~initial_interface.f90->sourcefile~domain.f90 sourcefile~initial_interface.f90->sourcefile~input.f90 sourcefile~initial_manager.f90 initial_manager.F90 sourcefile~initial_manager.f90->sourcefile~core.f90 sourcefile~initial_manager.f90->sourcefile~initial_interface.f90 sourcefile~initial_manager.f90->sourcefile~domain.f90 sourcefile~initial_manager.f90->sourcefile~input.f90 sourcefile~input_interface.f90->sourcefile~core.f90 sourcefile~project_settings.f90 project_settings.F90 sourcefile~input_interface.f90->sourcefile~project_settings.f90 sourcefile~matrix_coo.f90 matrix_coo.F90 sourcefile~matrix_coo.f90->sourcefile~core.f90 sourcefile~matrix_coo.f90->sourcefile~domain.f90 sourcefile~matrix_base.f90 matrix_base.F90 sourcefile~matrix_coo.f90->sourcefile~matrix_base.f90 sourcefile~matrix_crs.f90 matrix_crs.F90 sourcefile~matrix_crs.f90->sourcefile~core.f90 sourcefile~matrix_crs.f90->sourcefile~matrix_coo.f90 sourcefile~matrix_crs.f90->sourcefile~domain.f90 sourcefile~matrix_crs.f90->sourcefile~matrix_base.f90 sourcefile~matrix_dense.f90 matrix_dense.F90 sourcefile~matrix_dense.f90->sourcefile~core.f90 sourcefile~matrix_dense.f90->sourcefile~domain.f90 sourcefile~matrix_dense.f90->sourcefile~matrix_base.f90 sourcefile~multicoloring.f90->sourcefile~core.f90 sourcefile~multicoloring.f90->sourcefile~adjacency_element.f90 sourcefile~output_interface.f90 output_interface.F90 sourcefile~output_interface.f90->sourcefile~core.f90 sourcefile~output_interface.f90->sourcefile~project_settings.f90 sourcefile~output_interface.f90->sourcefile~control.f90 sourcefile~output_interface.f90->sourcefile~domain.f90 sourcefile~output_interface.f90->sourcefile~input.f90 sourcefile~output_interface.f90->sourcefile~matrix.f90 sourcefile~output_interface.f90->sourcefile~properties.f90 sourcefile~project_settings.f90->sourcefile~core.f90 sourcefile~properties_manager.f90 properties_manager.F90 sourcefile~properties_manager.f90->sourcefile~core.f90 sourcefile~calculate.f90 calculate.F90 sourcefile~properties_manager.f90->sourcefile~calculate.f90 sourcefile~properties_manager.f90->sourcefile~input.f90 sourcefile~materials_manager.f90 materials_manager.F90 sourcefile~properties_manager.f90->sourcefile~materials_manager.f90 sourcefile~reordering.f90->sourcefile~core.f90 sourcefile~reordering.f90->sourcefile~adjacency_node.f90 sourcefile~reordering.f90->sourcefile~element.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~side.f90 sourcefile~side_factory.f90->sourcefile~input.f90 sourcefile~specific_heat_interface.f90 specific_heat_interface.F90 sourcefile~specific_heat_interface.f90->sourcefile~core.f90 sourcefile~specific_heat_interface.f90->sourcefile~input.f90 sourcefile~thermal_conductivity_interface.f90 thermal_conductivity_interface.F90 sourcefile~thermal_conductivity_interface.f90->sourcefile~core.f90 sourcefile~thermal_conductivity_interface.f90->sourcefile~input.f90 sourcefile~thermal_interface.f90->sourcefile~core.f90 sourcefile~thermal_interface.f90->sourcefile~boundary.f90 sourcefile~thermal_interface.f90->sourcefile~control.f90 sourcefile~thermal_interface.f90->sourcefile~domain.f90 sourcefile~thermal_interface.f90->sourcefile~input.f90 sourcefile~thermal_interface.f90->sourcefile~matrix.f90 sourcefile~thermal_interface.f90->sourcefile~properties.f90 sourcefile~solver.f90 solver.F90 sourcefile~thermal_interface.f90->sourcefile~solver.f90 sourcefile~time.f90 time.F90 sourcefile~time.f90->sourcefile~core.f90 sourcefile~time.f90->sourcefile~input.f90 sourcefile~adjacency.f90->sourcefile~adjacency_element.f90 sourcefile~adjacency.f90->sourcefile~adjacency_node.f90 sourcefile~boundary.f90->sourcefile~boundary_interface.f90 sourcefile~boundary.f90->sourcefile~boundary_manager.f90 sourcefile~boundary_adiabatic.f90 boundary_adiabatic.F90 sourcefile~boundary_adiabatic.f90->sourcefile~boundary_interface.f90 sourcefile~boundary_base.f90 boundary_base.F90 sourcefile~boundary_base.f90->sourcefile~boundary_interface.f90 sourcefile~boundary_dirichlet.f90 boundary_dirichlet.F90 sourcefile~boundary_dirichlet.f90->sourcefile~boundary_interface.f90 sourcefile~calculate.f90->sourcefile~density_interface.f90 sourcefile~calculate.f90->sourcefile~heat_capacity_interface.f90 sourcefile~calculate.f90->sourcefile~specific_heat_interface.f90 sourcefile~calculate.f90->sourcefile~thermal_conductivity_interface.f90 sourcefile~gcc_interface.f90 gcc_interface.F90 sourcefile~calculate.f90->sourcefile~gcc_interface.f90 sourcefile~control.f90->sourcefile~time.f90 sourcefile~density_3phase.f90 density_3phase.F90 sourcefile~density_3phase.f90->sourcefile~density_interface.f90 sourcefile~density_base.f90 density_base.F90 sourcefile~density_base.f90->sourcefile~density_interface.f90 sourcefile~domain.f90->sourcefile~domain_manager.f90 sourcefile~domain.f90->sourcefile~element.f90 sourcefile~domain.f90->sourcefile~element_factory.f90 sourcefile~domain.f90->sourcefile~multicoloring.f90 sourcefile~domain.f90->sourcefile~reordering.f90 sourcefile~domain.f90->sourcefile~side.f90 sourcefile~domain.f90->sourcefile~side_factory.f90 sourcefile~domain.f90->sourcefile~adjacency.f90 sourcefile~dsatur.f90 dsatur.F90 sourcefile~dsatur.f90->sourcefile~multicoloring.f90 sourcefile~element_square_first.f90 element_square_first.F90 sourcefile~element_square_first.f90->sourcefile~element.f90 sourcefile~element_square_second.f90 element_square_second.F90 sourcefile~element_square_second.f90->sourcefile~element.f90 sourcefile~element_triangle_first.f90 element_triangle_first.F90 sourcefile~element_triangle_first.f90->sourcefile~element.f90 sourcefile~element_triangle_second.f90 element_triangle_second.F90 sourcefile~element_triangle_second.f90->sourcefile~element.f90 sourcefile~heat_capacity_3phase.f90 heat_capacity_3phase.F90 sourcefile~heat_capacity_3phase.f90->sourcefile~heat_capacity_interface.f90 sourcefile~heat_capacity_3phase_apparent.f90 heat_capacity_3phase_apparent.F90 sourcefile~heat_capacity_3phase_apparent.f90->sourcefile~heat_capacity_interface.f90 sourcefile~heat_capacity_base.f90 heat_capacity_base.F90 sourcefile~heat_capacity_base.f90->sourcefile~heat_capacity_interface.f90 sourcefile~initial.f90->sourcefile~initial_interface.f90 sourcefile~initial.f90->sourcefile~initial_manager.f90 sourcefile~initial_laplace.f90 initial_laplace.F90 sourcefile~initial_laplace.f90->sourcefile~initial_interface.f90 sourcefile~initial_uniform.f90 initial_uniform.F90 sourcefile~initial_uniform.f90->sourcefile~initial_interface.f90 sourcefile~input.f90->sourcefile~input_interface.f90 sourcefile~input_basic.f90 input_basic.F90 sourcefile~input_basic.f90->sourcefile~input_interface.f90 sourcefile~input_conditions.f90 input_conditions.F90 sourcefile~input_conditions.f90->sourcefile~input_interface.f90 sourcefile~input_geometry.f90 input_geometry.F90 sourcefile~input_geometry.f90->sourcefile~input_interface.f90 sourcefile~input_output.f90 input_output.F90 sourcefile~input_output.f90->sourcefile~input_interface.f90 sourcefile~lfo.f90 lfo.F90 sourcefile~lfo.f90->sourcefile~multicoloring.f90 sourcefile~matrix.f90->sourcefile~matrix_coo.f90 sourcefile~matrix.f90->sourcefile~matrix_crs.f90 sourcefile~matrix.f90->sourcefile~matrix_dense.f90 sourcefile~matrix.f90->sourcefile~matrix_base.f90 sourcefile~methods.f90 methods.F90 sourcefile~methods.f90->sourcefile~reordering.f90 sourcefile~output.f90->sourcefile~output_interface.f90 sourcefile~output_base.f90 output_base.F90 sourcefile~output_base.f90->sourcefile~output_interface.f90 sourcefile~output_observation.f90 output_observation.F90 sourcefile~output_observation.f90->sourcefile~output_interface.f90 sourcefile~output_overall_base.f90 output_overall_base.F90 sourcefile~output_overall_base.f90->sourcefile~output_interface.f90 sourcefile~output_overall_vtk.f90 output_overall_vtk.F90 sourcefile~output_overall_vtk.f90->sourcefile~output_interface.f90 sourcefile~output_overall_vtu.f90 output_overall_vtu.F90 sourcefile~output_overall_vtu.f90->sourcefile~output_interface.f90 sourcefile~output_system_logger.f90 output_system_logger.F90 sourcefile~output_system_logger.f90->sourcefile~output_interface.f90 sourcefile~properties.f90->sourcefile~properties_manager.f90 sourcefile~properties.f90->sourcefile~materials_manager.f90 sourcefile~side_first.f90 side_first.F90 sourcefile~side_first.f90->sourcefile~side.f90 sourcefile~side_second.f90 side_second.F90 sourcefile~side_second.f90->sourcefile~side.f90 sourcefile~specific_heat_3phase.f90 specific_heat_3phase.F90 sourcefile~specific_heat_3phase.f90->sourcefile~specific_heat_interface.f90 sourcefile~specific_heat_base.f90 specific_heat_base.F90 sourcefile~specific_heat_base.f90->sourcefile~specific_heat_interface.f90 sourcefile~thermal.f90 thermal.F90 sourcefile~thermal.f90->sourcefile~thermal_interface.f90 sourcefile~thermal_3phase.f90 thermal_3phase.F90 sourcefile~thermal_3phase.f90->sourcefile~thermal_interface.f90 sourcefile~thermal_conductivity_3phase.f90 thermal_conductivity_3phase.F90 sourcefile~thermal_conductivity_3phase.f90->sourcefile~thermal_conductivity_interface.f90 sourcefile~thermal_conductivity_base.f90 thermal_conductivity_base.F90 sourcefile~thermal_conductivity_base.f90->sourcefile~thermal_conductivity_interface.f90 sourcefile~to_original.f90 to_original.F90 sourcefile~to_original.f90->sourcefile~reordering.f90 sourcefile~to_reordered.f90 to_reordered.F90 sourcefile~to_reordered.f90->sourcefile~reordering.f90 sourcefile~welch_powell.f90 welch_powell.F90 sourcefile~welch_powell.f90->sourcefile~multicoloring.f90 sourcefile~gcc_interface.f90->sourcefile~input.f90 sourcefile~materials_manager.f90->sourcefile~calculate.f90 sourcefile~materials_manager.f90->sourcefile~input.f90 sourcefile~matrix_base.f90->sourcefile~domain.f90 sourcefile~solver_factory.f90 solver_factory.F90 sourcefile~solver_factory.f90->sourcefile~input.f90 sourcefile~solver_factory.f90->sourcefile~matrix.f90 sourcefile~gcc_base.f90 gcc_base.F90 sourcefile~gcc_base.f90->sourcefile~gcc_interface.f90 sourcefile~gcc_non_segregation_m.f90 gcc_non_segregation_m.F90 sourcefile~gcc_non_segregation_m.f90->sourcefile~gcc_interface.f90 sourcefile~gcc_non_segregation_pa.f90 gcc_non_segregation_pa.F90 sourcefile~gcc_non_segregation_pa.f90->sourcefile~gcc_interface.f90 sourcefile~gcc_segregation_m.f90 gcc_segregation_m.F90 sourcefile~gcc_segregation_m.f90->sourcefile~gcc_interface.f90 sourcefile~gcc_segregation_pa.f90 gcc_segregation_pa.F90 sourcefile~gcc_segregation_pa.f90->sourcefile~gcc_interface.f90 sourcefile~solver.f90->sourcefile~solver_factory.f90

Source Code

module core_vtk_vtu_wrapper
    use, intrinsic :: iso_c_binding
    implicit none
    private

    ! --- 公開するプロシージャ ---
    public :: vtu_initialize
    public :: vtu_read_header
    public :: vtu_get_num_points
    public :: vtu_get_points
    public :: vtu_get_num_cells
    public :: vtu_get_total_connectivity_size
    public :: vtu_get_cell_info
    public :: vtu_get_cell_ids
    public :: vtu_get_point_data
    public :: vtu_finalize

    !----------------------------------------------------------------!
    ! C++のラッパー関数へのインターフェース定義
    !----------------------------------------------------------------!
    interface
        ! initializeはC++オブジェクトのポインタ(ハンドル)を返す関数になる
        function vtu_initialize(filename, error_code) bind(C, name='c_vtu_initialize')
            import :: c_ptr, c_char, c_int
            type(c_ptr) :: vtu_initialize
            character(kind=c_char), intent(in) :: filename(*)
            integer(c_int), intent(out) :: error_code
        end function vtu_initialize

        ! finalizeは解放対象のハンドルを引数として受け取る
        subroutine vtu_finalize(handle) bind(C, name='c_vtu_finalize')
            import :: c_ptr
            type(c_ptr), value, intent(in) :: handle
        end subroutine vtu_finalize

        subroutine vtu_read_header(handle, format, format_len, dataset, dataset_len) bind(C, name='c_vtu_read_header')
            import :: c_ptr, c_char, c_int
            type(c_ptr), value, intent(in) :: handle
            character(kind=c_char), intent(out) :: format(*)
            integer(c_int), value, intent(in) :: format_len
            character(kind=c_char), intent(out) :: dataset(*)
            integer(c_int), value, intent(in) :: dataset_len
        end subroutine vtu_read_header

        subroutine vtu_get_num_points(handle, num_points) bind(C, name='c_vtu_get_num_points')
            import :: c_ptr, c_int
            type(c_ptr), value, intent(in) :: handle
            integer(c_int), intent(out) :: num_points
        end subroutine vtu_get_num_points

        subroutine vtu_get_points(handle, x, y, z) bind(C, name='c_vtu_get_points')
            import :: c_ptr, c_double
            type(c_ptr), value, intent(in) :: handle
            real(c_double), intent(out) :: x(*), y(*), z(*)
        end subroutine vtu_get_points

        subroutine vtu_get_num_cells(handle, num_cells) bind(C, name='c_vtu_get_num_cells')
            import :: c_ptr, c_int
            type(c_ptr), value, intent(in) :: handle
            integer(c_int), intent(out) :: num_cells
        end subroutine vtu_get_num_cells

        subroutine vtu_get_total_connectivity_size(handle, size_val) bind(C, name='c_vtu_get_total_connectivity_size')
            import :: c_ptr, c_long_long
            type(c_ptr), value, intent(in) :: handle
            integer(c_long_long), intent(out) :: size_val
        end subroutine vtu_get_total_connectivity_size

        subroutine vtu_get_cell_info(handle, connectivity, offsets, types) bind(C, name='c_vtu_get_cell_info')
            import :: c_ptr, c_long_long, c_int
            type(c_ptr), value, intent(in) :: handle
            integer(c_long_long), intent(out) :: connectivity(*)
            integer(c_long_long), intent(out) :: offsets(*)
            integer(c_int), intent(out) :: types(*)
        end subroutine vtu_get_cell_info

        subroutine vtu_get_cell_ids(handle, array_name, ids) bind(C, name='c_vtu_get_cell_ids')
            import :: c_ptr, c_int, c_char
            type(c_ptr), value, intent(in) :: handle
            character(kind=c_char), intent(in) :: array_name(*)
            integer(c_int), intent(out) :: ids(*)
        end subroutine vtu_get_cell_ids

        subroutine vtu_get_point_data(handle, array_name, point_data) bind(C, name='c_vtu_get_point_data')
            import :: c_ptr, c_double, c_char
            type(c_ptr), value, intent(in) :: handle
            character(kind=c_char), intent(in) :: array_name(*)
            real(c_double), intent(out) :: point_data(*)
        end subroutine vtu_get_point_data

    end interface

end module core_vtk_vtu_wrapper