type_vtk_cell_get_order Function

private function type_vtk_cell_get_order(self) result(order)

Get the order 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_order~~CalledByGraph proc~type_vtk_cell_get_order type_vtk_cell%type_vtk_cell_get_order proc~construct_side_first construct_side_first proc~construct_side_first->proc~type_vtk_cell_get_order proc~construct_side_second construct_side_second proc~construct_side_second->proc~type_vtk_cell_get_order proc~construct_square_first construct_square_first proc~construct_square_first->proc~type_vtk_cell_get_order proc~construct_square_second construct_square_second proc~construct_square_second->proc~type_vtk_cell_get_order proc~construct_triangle_first construct_triangle_first proc~construct_triangle_first->proc~type_vtk_cell_get_order proc~construct_triangle_second construct_triangle_second proc~construct_triangle_second->proc~type_vtk_cell_get_order 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_order(self) result(order)
        !> Get the order of the cell
        implicit none
        class(type_vtk_cell), intent(in) :: self !! VTK cell data
        integer(int32) :: order

        order = self%cell_order

        if (order < 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, &
                  VTK_LAGRANGE_CURVE, VTK_LAGRANGE_TRIANGLE, &
                  VTK_LAGRANGE_QUADRILATERAL, VTK_LAGRANGE_TETRAHEDRON, &
                  VTK_LAGRANGE_HEXAHEDRON, VTK_LAGRANGE_WEDGE, &
                  VTK_LAGRANGE_PYRAMID, &
                  VTK_BEZIER_CURVE, VTK_BEZIER_TRIANGLE, &
                  VTK_BEZIER_QUADRILATERAL, VTK_BEZIER_TETRAHEDRON, &
                  VTK_BEZIER_HEXAHEDRON, VTK_BEZIER_WEDGE, &
                  VTK_BEZIER_PYRAMID)
                ! 可変次元のセルは、セルのノード数から計算
                if (self%num_nodes_in_cell > 0) then
                    order = self%num_nodes_in_cell
                else
                    order = -1
                end if
            case default
                ! それ以外のセルは、セルのノード数から計算
                if (self%num_nodes_in_cell > 0) then
                    order = self%num_nodes_in_cell
                else
                    order = -1
                end if
            end select
        end if

    end function type_vtk_cell_get_order