Neko  0.8.99
A portable framework for high-order spectral element flow simulations
mesh Module Reference

Defines a mesh.

Data Types

type  mesh_element_t
 
type  mesh_t
 
interface  mesh_deform
 

Functions/Subroutines

subroutine mesh_init_nelv (this, gdim, nelv)
 Initialise a mesh this with nelv elements. More...
 
subroutine mesh_init_dist (this, gdim, dist)
 Initialise a mesh this based on a distribution dist. More...
 
subroutine mesh_init_common (this)
 
subroutine mesh_free (this)
 Deallocate a mesh this. More...
 
subroutine mesh_finalize (this)
 
subroutine mesh_generate_flags (this)
 
subroutine mesh_all_deformed (this)
 Set all elements as if they are deformed. More...
 
subroutine mesh_generate_conn (this)
 Generate element-to-element connectivity. More...
 
subroutine mesh_generate_external_facet_conn (this)
 Generate element-element connectivity via facets between PEs. More...
 
subroutine mesh_generate_external_point_conn (this)
 Generate element-element connectivity via points between PEs. More...
 
subroutine mesh_generate_edge_conn (this)
 Generate element-element connectivity via edges both between internal and between PEs. More...
 
subroutine mesh_generate_facet_numbering (this)
 Generate a unique facet numbering. More...
 
subroutine mesh_add_quad (this, el, p1, p2, p3, p4)
 Add a quadrilateral element to the mesh this. More...
 
subroutine mesh_add_hex (this, el, p1, p2, p3, p4, p5, p6, p7, p8)
 Add a hexahedral element to the mesh this. More...
 
subroutine mesh_add_point (this, p, idx)
 Add a unique point to the mesh. More...
 
subroutine mesh_add_face (this, f)
 Add a unique face represented as a 4-tuple to the mesh. More...
 
subroutine mesh_add_edge (this, e)
 Add a unique edge represented as a 2-tuple to the mesh. More...
 
subroutine mesh_mark_wall_facet (this, f, e)
 Mark facet f in element e as a wall. More...
 
subroutine mesh_mark_curve_element (this, e, curve_data, curve_type)
 Mark element e as a curve element. More...
 
subroutine mesh_mark_inlet_facet (this, f, e)
 Mark facet f in element e as an inlet. More...
 
subroutine mesh_mark_labeled_facet (this, f, e, label)
 Mark facet f in element e with label. More...
 
subroutine mesh_mark_outlet_normal_facet (this, f, e)
 Mark facet f in element e as an outlet normal. More...
 
subroutine mesh_mark_outlet_facet (this, f, e)
 Mark facet f in element e as an outlet. More...
 
subroutine mesh_mark_sympln_facet (this, f, e)
 Mark facet f in element e as a symmetry plane. More...
 
subroutine mesh_mark_periodic_facet (this, f, e, pf, pe, pids)
 Mark facet f in element e as periodic with (pf, pe) More...
 
subroutine mesh_get_facet_ids (this, f, e, pids)
 Get original ids of periodic points. More...
 
subroutine mesh_reset_periodic_ids (this)
 Reset ids of periodic points to their original ids. More...
 
subroutine mesh_create_periodic_ids (this, f, e, pf, pe)
 Creates common ids for matching periodic points. More...
 
subroutine mesh_apply_periodic_facet (this, f, e, pf, pe, pids)
 Replaces the periodic point's id with a common id for matching periodic points. More...
 
integer function mesh_get_local_point (this, p)
 Return the local id of a point p. More...
 
integer function mesh_get_local_edge (this, e)
 Return the local id of an edge e. More...
 
integer function mesh_get_local_facet (this, f)
 Return the local id of a face f. More...
 
integer function mesh_get_global_edge (this, e)
 Return the global id of an edge e. More...
 
integer function mesh_get_global_facet (this, f)
 Return the local id of a face f. More...
 
integer function mesh_have_point_glb_idx (this, index)
 Check if the mesh has a point given its global index. More...
 
logical function mesh_is_shared_point (this, p)
 Check if a point is shared. More...
 
logical function mesh_is_shared_edge (this, e)
 Check if an edge is shared. More...
 
logical function mesh_is_shared_facet (this, f)
 Check if a facet is shared. More...
 

Variables

integer, parameter, public neko_msh_max_zlbls = 20
 Max num. zone labels. More...
 
integer, parameter, public neko_msh_max_zlbl_len = 40
 Max length of a zone label. More...
 

Function/Subroutine Documentation

◆ mesh_add_edge()

subroutine mesh::mesh_add_edge ( class(mesh_t), intent(inout)  this,
type(tuple_i4_t), intent(inout)  e 
)
private

Definition at line 1511 of file mesh.f90.

◆ mesh_add_face()

subroutine mesh::mesh_add_face ( class(mesh_t), intent(inout)  this,
type(tuple4_i4_t), intent(inout)  f 
)
private

Definition at line 1498 of file mesh.f90.

◆ mesh_add_hex()

subroutine mesh::mesh_add_hex ( class(mesh_t), intent(inout), target  this,
integer, value  el,
type(point_t), intent(inout), target  p1,
type(point_t), intent(inout), target  p2,
type(point_t), intent(inout), target  p3,
type(point_t), intent(inout), target  p4,
type(point_t), intent(inout), target  p5,
type(point_t), intent(inout), target  p6,
type(point_t), intent(inout), target  p7,
type(point_t), intent(inout), target  p8 
)
private

Definition at line 1434 of file mesh.f90.

◆ mesh_add_point()

subroutine mesh::mesh_add_point ( class(mesh_t), intent(inout)  this,
type(point_t), intent(inout)  p,
integer, intent(inout)  idx 
)
private

Definition at line 1474 of file mesh.f90.

◆ mesh_add_quad()

subroutine mesh::mesh_add_quad ( class(mesh_t), intent(inout), target  this,
integer, value  el,
type(point_t), intent(inout), target  p1,
type(point_t), intent(inout), target  p2,
type(point_t), intent(inout), target  p3,
type(point_t), intent(inout), target  p4 
)
private

Definition at line 1398 of file mesh.f90.

◆ mesh_all_deformed()

subroutine mesh::mesh_all_deformed ( class(mesh_t), intent(inout)  this)
private

Definition at line 455 of file mesh.f90.

◆ mesh_apply_periodic_facet()

subroutine mesh::mesh_apply_periodic_facet ( class(mesh_t), intent(inout)  this,
integer, intent(in)  f,
integer, intent(in)  e,
integer, intent(in)  pf,
integer, intent(in)  pe,
integer, dimension(4), intent(inout)  pids 
)
private

Definition at line 1829 of file mesh.f90.

◆ mesh_create_periodic_ids()

subroutine mesh::mesh_create_periodic_ids ( class(mesh_t), intent(inout)  this,
integer, intent(in)  f,
integer, intent(in)  e,
integer, intent(in)  pf,
integer, intent(in)  pe 
)
private

Definition at line 1747 of file mesh.f90.

◆ mesh_finalize()

subroutine mesh::mesh_finalize ( class(mesh_t), intent(inout), target  this)
private

Definition at line 402 of file mesh.f90.

Here is the call graph for this function:

◆ mesh_free()

subroutine mesh::mesh_free ( class(mesh_t), intent(inout)  this)
private

Definition at line 324 of file mesh.f90.

Here is the call graph for this function:

◆ mesh_generate_conn()

subroutine mesh::mesh_generate_conn ( class(mesh_t), intent(inout), target  this)
private
Note
We have to sweep through the facet map twice to make sure that both odd and even sides are marked
Todo:
These loop nests needs a lot of love...

Definition at line 461 of file mesh.f90.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ mesh_generate_edge_conn()

subroutine mesh::mesh_generate_edge_conn ( type(mesh_t), intent(inout), target  this)
private
Attention
only for elements where facet .ne. edges
Todo:
move this into distdata

Definition at line 910 of file mesh.f90.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ mesh_generate_external_facet_conn()

subroutine mesh::mesh_generate_external_facet_conn ( type(mesh_t), intent(inout)  this)
private

Definition at line 675 of file mesh.f90.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ mesh_generate_external_point_conn()

subroutine mesh::mesh_generate_external_point_conn ( type(mesh_t), intent(inout)  this)
private

Definition at line 842 of file mesh.f90.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ mesh_generate_facet_numbering()

subroutine mesh::mesh_generate_facet_numbering ( type(mesh_t), intent(inout), target  this)
private
Todo:
move this into distdata
Todo:
Move this into distdata as a method...
Todo:
Since we now the neigh. we can actually do p2p here...

Definition at line 1154 of file mesh.f90.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ mesh_generate_flags()

subroutine mesh::mesh_generate_flags ( type(mesh_t), intent(inout)  this)
private

Definition at line 422 of file mesh.f90.

Here is the caller graph for this function:

◆ mesh_get_facet_ids()

subroutine mesh::mesh_get_facet_ids ( class(mesh_t), intent(inout)  this,
integer, intent(in)  f,
integer, intent(in)  e,
integer, dimension(4), intent(inout)  pids 
)
private

Definition at line 1673 of file mesh.f90.

◆ mesh_get_global_edge()

integer function mesh::mesh_get_global_edge ( class(mesh_t), intent(inout)  this,
type(tuple_i4_t), intent(inout)  e 
)
private

Definition at line 1901 of file mesh.f90.

◆ mesh_get_global_facet()

integer function mesh::mesh_get_global_facet ( class(mesh_t), intent(inout)  this,
type(tuple4_i4_t), intent(inout)  f 
)
private

Definition at line 1921 of file mesh.f90.

◆ mesh_get_local_edge()

integer function mesh::mesh_get_local_edge ( class(mesh_t), intent(inout)  this,
type(tuple_i4_t), intent(inout)  e 
)
private
Attention
only defined for gdim .ne. 2

Definition at line 1877 of file mesh.f90.

◆ mesh_get_local_facet()

integer function mesh::mesh_get_local_facet ( class(mesh_t), intent(inout)  this,
type(tuple4_i4_t), intent(inout)  f 
)
private

Definition at line 1889 of file mesh.f90.

◆ mesh_get_local_point()

integer function mesh::mesh_get_local_point ( class(mesh_t), intent(inout)  this,
type(point_t), intent(inout)  p 
)
private
Todo:
why do we still need to do this?

Definition at line 1860 of file mesh.f90.

◆ mesh_have_point_glb_idx()

integer function mesh::mesh_have_point_glb_idx ( class(mesh_t), intent(inout)  this,
integer, intent(inout)  index 
)
private
Returns
The local id of the point (if present) otherwise -1
Todo:
Consider moving this to distdata
Parameters
[in,out]indexGlobal index

Definition at line 1938 of file mesh.f90.

◆ mesh_init_common()

subroutine mesh::mesh_init_common ( type(mesh_t), intent(inout)  this)
private

Only intialize if we generate connectivity

Todo:
resize onces final size is known
Todo:
resize onces final size is known Only init if we generate connectivity

Definition at line 234 of file mesh.f90.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ mesh_init_dist()

subroutine mesh::mesh_init_dist ( class(mesh_t), intent(inout)  this,
integer, intent(in)  gdim,
type(linear_dist_t), intent(in)  dist 
)
private
Parameters
[in,out]thisMesh
[in]gdimGeometric dimension
[in]distData distribution

Definition at line 213 of file mesh.f90.

Here is the call graph for this function:

◆ mesh_init_nelv()

subroutine mesh::mesh_init_nelv ( class(mesh_t), intent(inout)  this,
integer, intent(in)  gdim,
integer, intent(in)  nelv 
)
private
Parameters
[in,out]thisMesh
[in]gdimGeometric dimension
[in]nelvLocal number of elements

Definition at line 184 of file mesh.f90.

Here is the call graph for this function:

◆ mesh_is_shared_edge()

logical function mesh::mesh_is_shared_edge ( class(mesh_t), intent(inout)  this,
type(tuple_i4_t), intent(inout)  e 
)
private
Attention
only defined for gdim .ne. 2

Definition at line 1965 of file mesh.f90.

◆ mesh_is_shared_facet()

logical function mesh::mesh_is_shared_facet ( class(mesh_t), intent(inout)  this,
type(tuple4_i4_t), intent(inout)  f 
)
private

Definition at line 1979 of file mesh.f90.

◆ mesh_is_shared_point()

logical function mesh::mesh_is_shared_point ( class(mesh_t), intent(inout)  this,
type(point_t), intent(inout)  p 
)
private

Definition at line 1951 of file mesh.f90.

◆ mesh_mark_curve_element()

subroutine mesh::mesh_mark_curve_element ( class(mesh_t), intent(inout)  this,
integer, intent(in)  e,
real(kind=dp), dimension(5,12), intent(in)  curve_data,
integer, dimension(12), intent(in)  curve_type 
)
private

Definition at line 1543 of file mesh.f90.

◆ mesh_mark_inlet_facet()

subroutine mesh::mesh_mark_inlet_facet ( class(mesh_t), intent(inout)  this,
integer, intent(in)  f,
integer, intent(in)  e 
)
private

Definition at line 1561 of file mesh.f90.

◆ mesh_mark_labeled_facet()

subroutine mesh::mesh_mark_labeled_facet ( class(mesh_t), intent(inout)  this,
integer, intent(in)  f,
integer, intent(in)  e,
integer, intent(in)  label 
)
private

Definition at line 1580 of file mesh.f90.

◆ mesh_mark_outlet_facet()

subroutine mesh::mesh_mark_outlet_facet ( class(mesh_t), intent(inout)  this,
integer, intent(inout)  f,
integer, intent(inout)  e 
)
private

Definition at line 1621 of file mesh.f90.

◆ mesh_mark_outlet_normal_facet()

subroutine mesh::mesh_mark_outlet_normal_facet ( class(mesh_t), intent(inout)  this,
integer, intent(inout)  f,
integer, intent(inout)  e 
)
private

Definition at line 1601 of file mesh.f90.

◆ mesh_mark_periodic_facet()

subroutine mesh::mesh_mark_periodic_facet ( class(mesh_t), intent(inout)  this,
integer, intent(in)  f,
integer, intent(in)  e,
integer, intent(in)  pf,
integer, intent(in)  pe,
integer, dimension(4), intent(inout)  pids 
)
private

Definition at line 1659 of file mesh.f90.

◆ mesh_mark_sympln_facet()

subroutine mesh::mesh_mark_sympln_facet ( class(mesh_t), intent(inout)  this,
integer, intent(inout)  f,
integer, intent(inout)  e 
)
private

Definition at line 1640 of file mesh.f90.

◆ mesh_mark_wall_facet()

subroutine mesh::mesh_mark_wall_facet ( class(mesh_t), intent(inout)  this,
integer, intent(inout)  f,
integer, intent(inout)  e 
)
private

Definition at line 1524 of file mesh.f90.

◆ mesh_reset_periodic_ids()

subroutine mesh::mesh_reset_periodic_ids ( class(mesh_t), intent(inout)  this)
private

Definition at line 1696 of file mesh.f90.

Variable Documentation

◆ neko_msh_max_zlbl_len

integer, parameter, public mesh::neko_msh_max_zlbl_len = 40

Definition at line 58 of file mesh.f90.

◆ neko_msh_max_zlbls

integer, parameter, public mesh::neko_msh_max_zlbls = 20

Definition at line 56 of file mesh.f90.