Neko 1.99.5
A portable framework for high-order spectral element flow simulations
Loading...
Searching...
No Matches
mesh Module Reference

Defines a mesh.

Data Types

interface  mesh_deform
 
type  mesh_element_t
 
type  mesh_t
 

Functions/Subroutines

subroutine mesh_init_nelv (this, gdim, nelv)
 Initialise a mesh this with nelv elements.
 
subroutine mesh_init_dist (this, gdim, dist)
 Initialise a mesh this based on a distribution dist.
 
subroutine mesh_init_common (this)
 
subroutine mesh_free (this)
 Deallocate a mesh this.
 
subroutine mesh_finalize (this)
 
subroutine mesh_generate_flags (this)
 
subroutine mesh_all_deformed (this)
 Set all elements as if they are deformed.
 
subroutine mesh_generate_conn (this)
 Generate element-to-element connectivity.
 
subroutine mesh_generate_external_facet_conn (this)
 Generate element-element connectivity via facets between PEs.
 
subroutine mesh_generate_external_point_conn (this)
 Generate element-element connectivity via points between PEs.
 
subroutine mesh_generate_edge_conn (this)
 Generate element-element connectivity via edges both between internal and between PEs.
 
subroutine mesh_generate_facet_numbering (this)
 Generate a unique facet numbering.
 
subroutine mesh_add_quad (this, el, el_glb, p1, p2, p3, p4)
 Add a quadrilateral element to the mesh this.
 
subroutine mesh_add_hex (this, el, el_glb, p1, p2, p3, p4, p5, p6, p7, p8)
 Add a hexahedral element to the mesh this.
 
subroutine mesh_add_point (this, p, idx)
 Add a unique point to the mesh.
 
subroutine mesh_add_face (this, f)
 Add a unique face represented as a 4-tuple to the mesh.
 
subroutine mesh_add_edge (this, e)
 Add a unique edge represented as a 2-tuple to the mesh.
 
subroutine mesh_mark_curve_element (this, e, curve_data, curve_type)
 Mark element e as a curve element.
 
subroutine mesh_mark_labeled_facet (this, f, e, label)
 Mark facet f in element e with label.
 
subroutine mesh_mark_periodic_facet (this, f, e, pf, pe, pids)
 Mark facet f in element e as periodic with (pf, pe)
 
subroutine mesh_get_facet_ids (this, f, e, pids)
 Get original ids of periodic points.
 
subroutine mesh_reset_periodic_ids (this)
 Reset ids of periodic points to their original ids.
 
subroutine mesh_create_periodic_ids (this, f, e, pf, pe)
 Creates common ids for matching periodic points.
 
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.
 
integer function mesh_get_local_point (this, p)
 Return the local id of a point p.
 
integer function mesh_get_local_edge (this, e)
 Return the local id of an edge e.
 
integer function mesh_get_local_facet (this, f)
 Return the local id of a face f.
 
integer function mesh_get_global_edge (this, e)
 Return the global id of an edge e.
 
integer function mesh_get_global_facet (this, f)
 Return the local id of a face f.
 
integer function mesh_have_point_glb_idx (this, index)
 Check if the mesh has a point given its global index.
 
logical function mesh_is_shared_point (this, p)
 Check if a point is shared.
 
logical function mesh_is_shared_edge (this, e)
 Check if an edge is shared.
 
logical function mesh_is_shared_facet (this, f)
 Check if a facet is shared.
 
subroutine mesh_check_right_handedness (this)
 Check the correct orientation of the rst coordindates.
 
real(kind=dp) function, public parallelepiped_signed_volume (p1, p2, p3, origin)
 Compute a signed volume of a parallelepiped formed by three vectors, in turn defined via three points, p1, p2, and p3 and an origin.
 
subroutine mesh_subset_by_mask (this, other, mask, lx, ly, lz)
 Create a subset of the mesh this in other based on the provided mask.
 

Variables

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

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 1591 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 1578 of file mesh.f90.

◆ mesh_add_hex()

subroutine mesh::mesh_add_hex ( class(mesh_t), intent(inout), target  this,
integer, value  el,
integer, value  el_glb,
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 1514 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 1554 of file mesh.f90.

◆ mesh_add_quad()

subroutine mesh::mesh_add_quad ( class(mesh_t), intent(inout), target  this,
integer, value  el,
integer, value  el_glb,
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 1482 of file mesh.f90.

◆ mesh_all_deformed()

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

Definition at line 458 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 1825 of file mesh.f90.

◆ mesh_check_right_handedness()

subroutine mesh::mesh_check_right_handedness ( class(mesh_t), intent(inout this)
private
Note
Similar algorithm as in Nek5000 verify routine.

Definition at line 1989 of file mesh.f90.

Here is the call graph for this function:

◆ 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 1731 of file mesh.f90.

◆ mesh_finalize()

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

Definition at line 407 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 332 of file mesh.f90.

◆ 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 464 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 992 of file mesh.f90.

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 678 of file mesh.f90.

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

Uses a canonical-owner rendezvous routed through the crystal router instead of a dense O(P) all-to-all. Each local point is hashed to an owner rank, mod(glb_idx, P); the owner gathers every rank holding that point and reflects, back to each holder, the other holders' element lists. Shared points (held by more than one rank) are thus discovered in O(log P) communication stages, the neigh array becomes symmetric by construction, and no O(P) buffers are ever allocated.

Definition at line 856 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 1241 of file mesh.f90.

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 425 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 1655 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 1898 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 1918 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 1874 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 1886 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 1857 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 1935 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 242 of file mesh.f90.

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 221 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 192 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 1962 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 1976 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 1948 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 1604 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 1621 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 1641 of file mesh.f90.

◆ mesh_reset_periodic_ids()

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

Definition at line 1678 of file mesh.f90.

◆ mesh_subset_by_mask()

subroutine mesh::mesh_subset_by_mask ( class(mesh_t), intent(in this,
class(mesh_t), intent(inout other,
type(mask_t), intent(in mask,
integer, intent(in lx,
integer, intent(in ly,
integer, intent(in lz 
)
private
Parameters
thisThe original mesh.
otherThe subset mesh to be created.
maskThe mask defining the subset.
lxthe quadrature degree in x direction.
lythe quadrature degree in y direction.
lzthe quadrature degree in z direction.
Note
Partially lifted from nmsh_file.f90.

Definition at line 2115 of file mesh.f90.

Here is the call graph for this function:

◆ parallelepiped_signed_volume()

real(kind=dp) function, public mesh::parallelepiped_signed_volume ( real(kind=dp), dimension(3), intent(in p1,
real(kind=dp), dimension(3), intent(in p2,
real(kind=dp), dimension(3), intent(in p3,
real(kind=dp), dimension(3), intent(in origin 
)
Parameters
p1The first point.
p2The second point.
p3The third point.
originThe point defining the origin.
Note
Used to check right-handness of the elements: the volumes should be positive.

Definition at line 2089 of file mesh.f90.

Here is the caller graph for this function:

Variable Documentation

◆ neko_msh_max_zlbl_len

integer, parameter, public mesh::neko_msh_max_zlbl_len = 40

Definition at line 67 of file mesh.f90.

◆ neko_msh_max_zlbls

integer, parameter, public mesh::neko_msh_max_zlbls = 20

Definition at line 65 of file mesh.f90.