Fortran module for reading Gmsh MSH file format version 1
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
character(len=*), | private, | parameter | :: | elm_section_footer | = | '$ENDELM' | |
character(len=*), | private, | parameter | :: | elm_section_header | = | '$ELM' | |
logical, | private, | parameter | :: | initial_flag_allocation_elements | = | .false. |
Whether allocated the array to read elements (Initial value) |
logical, | private, | parameter | :: | initial_flag_allocation_nodes | = | .false. |
Whether allocated the array to read nodes (Initial value) |
logical, | private, | parameter | :: | initial_flag_deallocation_elements | = | .false. |
Whether deallocated the array to read elements (Initial value) |
logical, | private, | parameter | :: | initial_flag_deallocation_nodes | = | .false. |
Whether deallocated the array to read nodes (Initial value) |
logical, | private, | parameter | :: | initial_flag_elm_section_footer | = | .false. |
Whether found the element section footer |
logical, | private, | parameter | :: | initial_flag_elm_section_header | = | .false. |
Whether found the element section header |
logical, | private, | parameter | :: | initial_flag_nod_section_footer | = | .false. |
Whether found the node section footer |
logical, | private, | parameter | :: | initial_flag_nod_section_header | = | .false. |
Whether found the node section header |
logical, | private, | parameter | :: | initial_flag_number_of_elements | = | .false. |
Whether found the number of elements |
logical, | private, | parameter | :: | initial_flag_number_of_nodes | = | .false. |
Whether found the number of nodes |
logical, | private, | parameter | :: | initial_flag_reading_elements | = | .false. |
Whether the read was successful: element (Initial value) |
logical, | private, | parameter | :: | initial_flag_reading_node | = | .false. |
Whether the read was successful: node (Initial value) |
integer, | private, | parameter | :: | iostat_success | = | 0 |
|
integer, | private, | parameter | :: | msg_len | = | 512 |
message length |
character(len=*), | private, | parameter | :: | nod_section_footer | = | '$ENDNOD' | |
character(len=*), | private, | parameter | :: | nod_section_header | = | '$NOD' | |
integer, | private, | parameter | :: | stat_success | = | 0 |
|
Get the gmsh_msh1_node_number_type from the gmsh_msh1_node_type (as integer).
Get the gmsh_msh1_node_number_type from the gmsh_msh1_node_type (as integer).
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(gmsh_msh1_node_type), | intent(in) | :: | node |
Get the node_number_list from the gmsh_msh1_element_type (as integer).
Get the node_number_list from the gmsh_msh1_element_type (as integer).
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(gmsh_msh1_element_type), | intent(in) | :: | element |
Checks if the read gmsh_msh1_data_type is invalid.
Checks if the read gmsh_msh1_data_type is invalid.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(gmsh_msh1_data_type), | intent(in) | :: | mesh_data |
Look up a gmsh_msh1_element_type in the gmsh_msh1_data_type.
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.
Type | Intent | Optional | 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 |
Look up a gmsh_msh1_node_type in the gmsh_msh1_data_type.
Look up a gmsh_msh1_node_type in the gmsh_msh1_data_type.
Warning
If no gmsh_msh1_node_type corresponding to the location argument exists, a gmsh_msh1_node_type initialized by initialize_gmsh_msh1_node will be returned.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(gmsh_msh1_data_type), | intent(in) | :: | mesh_data | |||
integer, | intent(in) | :: | location |
location in node |
Look up a gmsh_msh1_node_type in the gmsh_msh1_data_type.
Warning
If no gmsh_msh1_node_type corresponding to the node_number argument exists, a gmsh_msh1_node_type initialized by initialize_gmsh_msh1_node will be returned.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(gmsh_msh1_data_type), | intent(in) | :: | mesh_data | |||
type(gmsh_msh1_node_number_type), | intent(in) | :: | node_number |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(gmsh_msh1_node_number_type), | intent(in) | :: | number1 | |||
type(gmsh_msh1_node_number_type), | intent(in) | :: | number2 |
Get the elm_number from the gmsh_msh1_element_type.
Get the elm_number from the gmsh_msh1_element_type.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(gmsh_msh1_element_type), | intent(in) | :: | element |
Get the elm_type from the gmsh_msh1_element_type.
Get the elm_type from the gmsh_msh1_element_type.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(gmsh_msh1_element_type), | intent(in) | :: | element |
Get the gmsh_msh1_node_number_type from the gmsh_msh1_node_type (as derived type).
Get the gmsh_msh1_node_number_type from the gmsh_msh1_node_type (as derived type).
Warning
If no gmsh_msh1_node_number_type corresponding to the location argument exists, a gmsh_msh1_node_number_type initialized by initialize_gmsh_msh1_node_number will be returned.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(gmsh_msh1_element_type), | intent(in) | :: | element | |||
integer, | intent(in) | :: | location |
location in node_number_list |
Get the gmsh_msh1_node_number_type from the gmsh_msh1_node_type (as derived type).
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(gmsh_msh1_node_type), | intent(in) | :: | node |
Get the node_number_list from the gmsh_msh1_element_type (as derived type).
Get the node_number_list from the gmsh_msh1_element_type (as derived type).
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(gmsh_msh1_element_type), | intent(in) | :: | element |
Get the number of gmsh_msh1_element_types in the gmsh_msh1_data_type.
Get the number of gmsh_msh1_element_types in the gmsh_msh1_data_type.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(gmsh_msh1_data_type), | intent(in) | :: | mesh_data |
Get the number of gmsh_msh1_node_types.
Get the number of gmsh_msh1_node_types in the gmsh_msh1_element_type.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(gmsh_msh1_element_type), | intent(in) | :: | element |
Get the number of gmsh_msh1_node_types in the gmsh_msh1_data_type.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(gmsh_msh1_data_type), | intent(in) | :: | mesh_data |
Get the reg_elem from the gmsh_msh1_element_type.
Get the reg_elem from the gmsh_msh1_element_type.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(gmsh_msh1_element_type), | intent(in) | :: | element |
Get the reg_phys from the gmsh_msh1_element_type.
Get the reg_phys from the gmsh_msh1_element_type.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(gmsh_msh1_element_type), | intent(in) | :: | element |
Get the x_coord from the gmsh_msh1_node_type.
Get the x_coord from the gmsh_msh1_node_type.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(gmsh_msh1_node_type), | intent(in) | :: | node |
Get the y_coord from the gmsh_msh1_node_type.
Get the y_coord from the gmsh_msh1_node_type.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(gmsh_msh1_node_type), | intent(in) | :: | node |
Get the z_coord from the gmsh_msh1_node_type.
Get the z_coord from the gmsh_msh1_node_type.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(gmsh_msh1_node_type), | intent(in) | :: | node |
Derived type to for reading Gmsh MSH file format version 1
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
type(gmsh_msh1_element_type), | private, | allocatable, dimension(:) | :: | element |
the elements in the mesh |
||
logical, | private | :: | flag_allocation_elements | = | initial_flag_allocation_elements |
Whether allocated the array to read elements |
|
logical, | private | :: | flag_allocation_nodes | = | initial_flag_allocation_nodes |
Whether allocated the array to read nodes |
|
logical, | private | :: | flag_deallocation_elements | = | initial_flag_deallocation_elements |
Whether deallocated the array to read elements |
|
logical, | private | :: | flag_deallocation_nodes | = | initial_flag_deallocation_nodes |
Whether deallocated the array to read nodes |
|
logical, | private | :: | flag_elm_section_footer | = | initial_flag_elm_section_footer |
Whether found the element section footer |
|
logical, | private | :: | flag_elm_section_header | = | initial_flag_elm_section_header |
Whether found the element section header |
|
logical, | private | :: | flag_nod_section_footer | = | initial_flag_nod_section_footer |
Whether found the node section footer |
|
logical, | private | :: | flag_nod_section_header | = | initial_flag_nod_section_header |
Whether found the node section header |
|
logical, | private | :: | flag_number_of_elements | = | initial_flag_number_of_elements |
Whether found the number of elements |
|
logical, | private | :: | flag_number_of_nodes | = | initial_flag_number_of_nodes |
Whether found the number of nodes |
|
logical, | private | :: | flag_reading_elements | = | initial_flag_reading_elements |
Whether the read was successful: element |
|
logical, | private | :: | flag_reading_nodes | = | initial_flag_reading_node |
Whether the read was successful: node |
|
type(gmsh_msh1_node_type), | private, | allocatable, dimension(:) | :: | node |
the nodes in the mesh |
||
type(gmsh_msh1_status_type), | private | :: | status |
Derived type to for reading the n-th element in the Gmsh MSH file format version 1
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
integer, | private | :: | elm_number |
the number (index) of the n-th element in the mesh |
|||
integer, | private | :: | elm_type |
the geometrical type of the n-th element in the mesh |
|||
type(gmsh_msh1_node_number_type), | private, | allocatable, dimension(:) | :: | node_number_list |
the list of the |
||
integer, | private | :: | reg_elem |
the tag of the elementary entity to which the element belongs |
|||
integer, | private | :: | reg_phys |
the tag of the physical entity to which the element belongs |
Derived type to for reading the number (index) of the n-th node in the mesh.
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
integer, | private | :: | number |
Derived type to for reading the n-th node in the Gmsh MSH file format version 1
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
type(gmsh_msh1_node_number_type), | private | :: | node_number |
the number (index) of the n-th node in the mesh. |
|||
real(kind=real64), | private | :: | x_coord |
The floating point values giving the X coordinates of the n-th node. |
|||
real(kind=real64), | private | :: | y_coord |
The floating point values giving the Y coordinates of the n-th node. |
|||
real(kind=real64), | private | :: | z_coord |
The floating point values giving the Z coordinates of the n-th node. |
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
type(gmsh_msh1_status_unit_type), | public | :: | err | ||||
type(gmsh_msh1_status_unit_type), | public | :: | io |
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
integer, | public | :: | code | ||||
character(len=msg_len), | public | :: | msg |
If any of the flags is .false.
, it indicates that the file read operation failed.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(gmsh_msh1_data_type), | intent(in) | :: | mesh_data |
Get the gmsh_msh1_node_number_type from the gmsh_msh1_node_type (as integer).
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(gmsh_msh1_node_type), | intent(in) | :: | node |
Get the node_number_list from the gmsh_msh1_element_type (as integer).
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(gmsh_msh1_element_type), | intent(in) | :: | element |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(gmsh_msh1_node_number_type), | intent(in) | :: | number1 | |||
type(gmsh_msh1_node_number_type), | intent(in) | :: | number2 |
Checks if the read gmsh_msh1_data_type is invalid.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(gmsh_msh1_data_type), | intent(in) | :: | mesh_data |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(gmsh_msh1_status_type), | intent(in) | :: | status |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(gmsh_msh1_status_type), | intent(in) | :: | status |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(gmsh_msh1_status_type), | intent(in) | :: | status |
Look up a gmsh_msh1_node_type in the gmsh_msh1_data_type.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(gmsh_msh1_data_type), | intent(in) | :: | mesh_data | |||
integer, | intent(in) | :: | location |
location in node |
Look up a gmsh_msh1_node_type in the gmsh_msh1_data_type.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(gmsh_msh1_data_type), | intent(in) | :: | mesh_data | |||
type(gmsh_msh1_node_number_type), | intent(in) | :: | node_number |
Get the elm_number from the gmsh_msh1_element_type.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(gmsh_msh1_element_type), | intent(in) | :: | element |
Get the elm_type from the gmsh_msh1_element_type.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(gmsh_msh1_element_type), | intent(in) | :: | element |
Get the gmsh_msh1_node_number_type from the gmsh_msh1_node_type (as derived type).
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(gmsh_msh1_element_type), | intent(in) | :: | element | |||
integer, | intent(in) | :: | location |
location in node_number_list |
Get the gmsh_msh1_node_number_type from the gmsh_msh1_node_type (as derived type).
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(gmsh_msh1_node_type), | intent(in) | :: | node |
Get the node_number_list from the gmsh_msh1_element_type (as derived type).
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(gmsh_msh1_element_type), | intent(in) | :: | element |
Get the number of gmsh_msh1_element_types in the gmsh_msh1_data_type.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(gmsh_msh1_data_type), | intent(in) | :: | mesh_data |
Get the number of gmsh_msh1_node_types in the gmsh_msh1_element_type.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(gmsh_msh1_element_type), | intent(in) | :: | element |
Get the number of gmsh_msh1_node_types in the gmsh_msh1_data_type.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(gmsh_msh1_data_type), | intent(in) | :: | mesh_data |
Get the reg_elem from the gmsh_msh1_element_type.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(gmsh_msh1_element_type), | intent(in) | :: | element |
Get the reg_phys from the gmsh_msh1_element_type.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(gmsh_msh1_element_type), | intent(in) | :: | element |
Get the x_coord from the gmsh_msh1_node_type.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(gmsh_msh1_node_type), | intent(in) | :: | node |
Get the y_coord from the gmsh_msh1_node_type.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(gmsh_msh1_node_type), | intent(in) | :: | node |
Get the z_coord from the gmsh_msh1_node_type.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(gmsh_msh1_node_type), | intent(in) | :: | node |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(gmsh_msh1_data_type), | intent(inout) | :: | mesh_data |
The read data will be stored in this argument |
||
character(len=*), | intent(in) | :: | msh1_file |
File path to read from |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(gmsh_msh1_data_type), | intent(in) | :: | mesh_data | |||
integer, | intent(in) | :: | write_unit |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=msg_len), | intent(inout) | :: | msg |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(gmsh_msh1_element_type), | intent(inout) | :: | element | |||
integer, | intent(out) | :: | stat | |||
character(len=*), | intent(inout) | :: | errmsg |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(gmsh_msh1_node_type), | intent(out) | :: | node |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(gmsh_msh1_node_number_type), | intent(out) | :: | node_number |
Look up a gmsh_msh1_element_type in the gmsh_msh1_data_type.
Type | Intent | Optional | 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 |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | file_unit | |||
integer, | intent(in) | :: | itr_element | |||
character(len=*), | intent(inout) | :: | text_line | |||
type(gmsh_msh1_element_type), | intent(inout) | :: | element | |||
type(gmsh_msh1_status_type), | intent(inout) | :: | status | |||
logical, | intent(out) | :: | flag |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(gmsh_msh1_data_type), | intent(inout) | :: | mesh_data |
The read data will be stored in this argument |
||
integer, | intent(in) | :: | file_unit |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | file_unit | |||
character(len=*), | intent(in) | :: | header_footer | |||
character(len=*), | intent(inout) | :: | text_line | |||
type(gmsh_msh1_status_type), | intent(inout) | :: | status | |||
logical, | intent(out) | :: | flag |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | file_unit | |||
integer, | intent(in) | :: | itr_node | |||
type(gmsh_msh1_node_type), | intent(out) | :: | node | |||
type(gmsh_msh1_status_type), | intent(inout) | :: | status |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | file_unit | |||
character(len=*), | intent(in) | :: | item_name | |||
character(len=*), | intent(inout) | :: | text_line | |||
integer, | intent(out) | :: | number_of_items | |||
type(gmsh_msh1_status_type), | intent(inout) | :: | status | |||
logical, | intent(out) | :: | flag |