OpenFAST
Wind turbine multiphysics simulator
Data Types | Functions/Subroutines | Variables
modmesh_types Module Reference

This module contains the type definition of of ModMesh, the FAST spatial mesh structure. More...

Data Types

type  elemlisttype
 table/list of all elements (may be different types, but not spatial dimensions) More...
 
type  elemrectype
 element record type: fields for a particular element More...
 
type  elemtabtype
 table of all elements of a particular type More...
 
type  meshtype
 mesh data structure More...
 

Functions/Subroutines

integer function numnodes (Xelement)
 This function returns the number of nodes in a given type of element. More...
 
logical function hasmotionfields (Mesh)
 This function determines if a mesh contains any motion field (translational/rotational positions, velocities, accelerations or scalars). More...
 
logical function hasloadfields (Mesh)
 This function determines if a mesh contains any load field (force or motion). More...
 
subroutine mesh_movealloc_elemrectype (Src, Dest)
 This subroutine copies the element record data from one ElemRecType data structure to another. More...
 

Variables

integer, parameter, public component_input = 1
 parameter for "input mesh"
 
integer, parameter, public component_output = 2
 parameter for "output mesh"
 
integer, parameter, public component_state = 3
 parameter for "state mesh" (not recommended to use)
 
integer, parameter, public maskid_force = 1
 parameter for fields holding force
 
integer, parameter, public maskid_moment = 2
 parameter for fields holding moment
 
integer, parameter, public maskid_orientation = 3
 parameter for fields holding orientation
 
integer, parameter, public maskid_translationdisp = 4
 parameter for fields holding translational displacement
 
integer, parameter, public maskid_translationvel = 5
 parameter for fields holding translational velocity
 
integer, parameter, public maskid_rotationvel = 6
 parameter for fields holding rotational velocity
 
integer, parameter, public maskid_translationacc = 7
 parameter for fields holding translational acceleration
 
integer, parameter, public maskid_rotationacc = 8
 parameter for fields holding rotational acceleration
 
integer, parameter, public maskid_scalar = 9
 parameter for fields holding scalars
 
integer, parameter, public fieldmask_size = 9
 maximum number of fields in a mesh
 
integer, parameter, public element_point = 1
 parameter for elements of point
 
integer, parameter, public element_line2 = 2
 parameter for elements of 2-point lines
 
integer, parameter, public element_line3 = 3
 parameter for elements of 3-point lines (currently unused)
 
integer, parameter, public element_tri3 = 4
 parameter for elements (currently unused)
 
integer, parameter, public element_tri6 = 5
 parameter for elements (currently unused)
 
integer, parameter, public element_quad4 = 6
 parameter for elements (currently unused)
 
integer, parameter, public element_quad8 = 7
 parameter for elements (currently unused)
 
integer, parameter, public element_tet4 = 8
 parameter for elements (currently unused)
 
integer, parameter, public element_tet10 = 9
 parameter for elements (currently unused)
 
integer, parameter, public element_hex8 = 10
 parameter for elements (currently unused)
 
integer, parameter, public element_hex20 = 11
 parameter for elements (currently unused)
 
integer, parameter, public element_wedge6 = 12
 parameter for elements (currently unused)
 
integer, parameter, public element_wedge15 = 13
 parameter for elements (currently unused)
 
integer, parameter, public nelemkinds = 13
 parameter for maximum number of element kinds
 
character(*), dimension(nelemkinds), parameter elemnames = (/ "Point ","Line2 ","Line3 ","Tri3 ","Tri6 ", "Quad4 ","Quad8 ","Tet4 ","Tet10 ","Hex8 ", "Hex20 ","Wedge6 ","Wedge15" /)
 element names
 
integer, parameter, public mesh_newcopy = 1
 parameter for type of mesh copy: new mesh instance
 
integer, parameter, public mesh_sibling = 2
 parameter for type of mesh copy: new sibling (shares element and reference data; fields separate)
 
integer, parameter, public mesh_updatecopy = 3
 parameter for type of mesh copy: updates fields in existing mesh
 
integer, parameter, public mesh_updatereference = 4
 parameter for type of mesh copy: updates reference fields in existing mesh
 
integer, parameter, public mesh_cousin = 5
 parameter for type of mesh copy: like sibling, but allocates memory for all data
 
integer, parameter, public mesh_next = -2
 parameter for next element in mesh
 
integer, parameter, public mesh_nomoreelems = -3
 parameter indicating no more elements in mesh
 
integer, parameter, public mesh_nomoreelements = MESH_NOMOREELEMS
 synonym
 
integer, parameter, public mesh_nomore = MESH_NOMOREELEMS
 synonym
 
logical, parameter mesh_debug = .FALSE.
 
real(reki), parameter min_line2_element_length = sqrt(epsilon(1.0_ReKi))
 

Detailed Description

This module contains the type definition of of ModMesh, the FAST spatial mesh structure.

Function/Subroutine Documentation

◆ hasloadfields()

logical function modmesh_types::hasloadfields ( type(meshtype), intent(in)  Mesh)

This function determines if a mesh contains any load field (force or motion).

Parameters
[in]meshmesh to query

◆ hasmotionfields()

logical function modmesh_types::hasmotionfields ( type(meshtype), intent(in)  Mesh)

This function determines if a mesh contains any motion field (translational/rotational positions, velocities, accelerations or scalars).

Parameters
[in]meshmesh to query

◆ mesh_movealloc_elemrectype()

subroutine modmesh_types::mesh_movealloc_elemrectype ( type(elemrectype), intent(inout)  Src,
type(elemrectype), intent(inout)  Dest 
)

This subroutine copies the element record data from one ElemRecType data structure to another.

It calls the Fortran 2003 intrinsic MOVE_ALLOC routine to move the address of the Src%ElemNodes array to the Dest%ElemNodes array without physically copying any of the array. On exist Src%ElemNodes will be deallocated.

Parameters
[in,out]srcmesh containing ElemNodes to be moved
[in,out]destmesh that will receive the ElemNodes array from Src

◆ numnodes()

integer function modmesh_types::numnodes ( integer, intent(in)  Xelement)

This function returns the number of nodes in a given type of element.

Parameters
[in]xelementtype of element