type_vtk_cell_get_dimension Function

private function type_vtk_cell_get_dimension(self) result(dimension)

Get the dimension of the cell

Type Bound

type_vtk_cell

Arguments

Type IntentOptional Attributes Name
class(type_vtk_cell), intent(in) :: self

VTK cell data

Return Value integer(kind=int32)


Called by

proc~~type_vtk_cell_get_dimension~~CalledByGraph proc~type_vtk_cell_get_dimension type_vtk_cell%type_vtk_cell_get_dimension proc~construct_side_first construct_side_first proc~construct_side_first->proc~type_vtk_cell_get_dimension proc~construct_side_second construct_side_second proc~construct_side_second->proc~type_vtk_cell_get_dimension proc~construct_square_first construct_square_first proc~construct_square_first->proc~type_vtk_cell_get_dimension proc~construct_square_second construct_square_second proc~construct_square_second->proc~type_vtk_cell_get_dimension proc~construct_triangle_first construct_triangle_first proc~construct_triangle_first->proc~type_vtk_cell_get_dimension proc~construct_triangle_second construct_triangle_second proc~construct_triangle_second->proc~type_vtk_cell_get_dimension proc~initialize_type_domain type_domain%initialize_type_domain proc~initialize_type_domain->proc~type_vtk_cell_get_dimension interface~construct_side_first construct_side_first interface~construct_side_first->proc~construct_side_first interface~construct_side_second construct_side_second interface~construct_side_second->proc~construct_side_second interface~construct_square_first construct_square_first interface~construct_square_first->proc~construct_square_first interface~construct_square_second construct_square_second interface~construct_square_second->proc~construct_square_second interface~construct_triangle_first construct_triangle_first interface~construct_triangle_first->proc~construct_triangle_first interface~construct_triangle_second construct_triangle_second interface~construct_triangle_second->proc~construct_triangle_second interface~type_side_first type_side_first interface~type_side_first->interface~construct_side_first interface~type_side_second type_side_second interface~type_side_second->interface~construct_side_second interface~type_square_first type_square_first interface~type_square_first->interface~construct_square_first interface~type_square_second type_square_second interface~type_square_second->interface~construct_square_second interface~type_triangle_first type_triangle_first interface~type_triangle_first->interface~construct_triangle_first interface~type_triangle_second type_triangle_second interface~type_triangle_second->interface~construct_triangle_second

Source Code

    function type_vtk_cell_get_dimension(self) result(dimension)
        implicit none
        class(type_vtk_cell), intent(in) :: self !! VTK cell data
        integer(int32) :: dimension
        !> Get the dimension of the cell
        dimension = self%cell_dimension
        if (dimension < 0) then
            ! 可変次元のセルの場合、セルのノード数から計算
            select case (self%cell_type)
            case (VTK_POLY_VERTEX, VTK_POLY_LINE, VTK_POLYGON, &
                  VTK_QUADRATIC_POLYGON, VTK_QUADRATIC_TRIANGLE, &
                  VTK_QUADRATIC_QUAD, VTK_QUADRATIC_TETRA, &
                  VTK_QUADRATIC_HEXAHEDRON, VTK_QUADRATIC_WEDGE, &
                  VTK_QUADRATIC_PYRAMID, VTK_BIQUADRATIC_QUAD, &
                  VTK_TRIQUADRATIC_HEXAHEDRON, VTK_TRIQUADRATIC_PYRAMID, &
                  VTK_QUADRATIC_LINEAR_QUAD, VTK_QUADRATIC_LINEAR_WEDGE, &
                  VTK_BIQUADRATIC_QUADRATIC_WEDGE, &
                  VTK_BIQUADRATIC_QUADRATIC_HEXAHEDRON, &
                  VTK_BIQUADRATIC_TRIANGLE, VTK_CUBIC_LINE, &
                  VTK_CONVEX_POINT_SET, VTK_POLYHEDRON, &
                  VTK_PARAMETRIC_CURVE, VTK_PARAMETRIC_SURFACE, &
                  VTK_PARAMETRIC_TRI_SURFACE, VTK_PARAMETRIC_QUAD_SURFACE, &
                  VTK_PARAMETRIC_TETRA_REGION, VTK_PARAMETRIC_HEX_REGION, &
                  VTK_HIGHER_ORDER_EDGE, VTK_HIGHER_ORDER_TRIANGLE, &
                  VTK_HIGHER_ORDER_QUAD, VTK_HIGHER_ORDER_POLYGON, &
                  VTK_HIGHER_ORDER_TETRAHEDRON, VTK_HIGHER_ORDER_WEDGE, &
                  VTK_HIGHER_ORDER_PYRAMID, VTK_HIGHER_ORDER_HEXAHEDRON)
                ! 可変次元のセルは、セルのノード数から計算
                if (self%num_nodes_in_cell > 0) then
                    dimension = 1
                else
                    dimension = -1
                end if
            case default
                ! それ以外のセルは、セルのノード数から計算
                if (self%num_nodes_in_cell > 0) then
                    dimension = 3
                else
                    dimension = -1
                end if
            end select
        end if
    end function type_vtk_cell_get_dimension