lookup_element_by_loc_gmsh_msh1_file Subroutine

private subroutine lookup_element_by_loc_gmsh_msh1_file(mesh_data, location, element, stat, errmsg)

Look up a gmsh_msh1_element_type in the gmsh_msh1_data_type.

Warning

If no element corresponding to the location argument exists, a element initialized by initialize_gmsh_msh1_element will be returned.

Arguments

Type IntentOptional Attributes Name
type(gmsh_msh1_data_type), intent(in) :: mesh_data
integer, intent(in) :: location

location in element

type(gmsh_msh1_element_type), intent(inout) :: element
integer, intent(out) :: stat
character(len=*), intent(inout) :: errmsg

Calls

proc~~lookup_element_by_loc_gmsh_msh1_file~~CallsGraph proc~lookup_element_by_loc_gmsh_msh1_file lookup_element_by_loc_gmsh_msh1_file interface~output_number_of_elements output_number_of_elements proc~lookup_element_by_loc_gmsh_msh1_file->interface~output_number_of_elements proc~initialize_gmsh_msh1_element initialize_gmsh_msh1_element proc~lookup_element_by_loc_gmsh_msh1_file->proc~initialize_gmsh_msh1_element proc~output_number_of_elements_gmsh_msh1_file output_number_of_elements_gmsh_msh1_file interface~output_number_of_elements->proc~output_number_of_elements_gmsh_msh1_file

Called by

proc~~lookup_element_by_loc_gmsh_msh1_file~~CalledByGraph proc~lookup_element_by_loc_gmsh_msh1_file lookup_element_by_loc_gmsh_msh1_file interface~lookup_element lookup_element interface~lookup_element->proc~lookup_element_by_loc_gmsh_msh1_file

Source Code

    subroutine lookup_element_by_loc_gmsh_msh1_file(mesh_data, location, element, stat, errmsg)

        type(gmsh_msh1_data_type), intent(in) :: mesh_data

        !> location in [[gmsh_msh1_data_type:element]]
        integer, intent(in) :: location

        type(gmsh_msh1_element_type), intent(inout) :: element

        integer, intent(out) :: stat

        character(len=*), intent(inout) :: errmsg



        if (location .lt. 1) then

            call initialize_gmsh_msh1_element( element, stat, errmsg(:) )

        else if ( output_number_of_elements(mesh_data) .lt. location ) then

            call initialize_gmsh_msh1_element( element, stat, errmsg(:) )

        else

            element = mesh_data%element(location)

        end if

    end subroutine lookup_element_by_loc_gmsh_msh1_file