SABER
type_mesh Module Reference

Mesh derived type. More...

Data Types

type  mesh_type
 

Functions/Subroutines

subroutine mesh_alloc (mesh, n)
 Allocation. More...
 
subroutine mesh_init (mesh, mpl, rng, lon, lat)
 Intialization. More...
 
subroutine mesh_dealloc (mesh)
 Release memory. More...
 
subroutine mesh_copy (mesh_out, mesh_in)
 Copy. More...
 
subroutine mesh_store (mesh, mpl, lon, lat)
 Store mesh cartesian coordinates. More...
 
subroutine mesh_trlist (mesh, mpl)
 Compute triangle list, arc list. More...
 
subroutine mesh_bnodes (mesh, mpl, bdist)
 Find boundary nodes. More...
 
subroutine mesh_find_bdist (mesh, mpl, lon, lat, bdist)
 Find shortest distance to boundary arcs. More...
 
subroutine mesh_check (mesh, mpl, valid)
 Check whether the mesh is made of counter-clockwise triangles. More...
 
subroutine mesh_inside (mesh, mpl, lon, lat, inside_mesh)
 Find whether a point is inside the mesh. More...
 
subroutine mesh_barycentric (mesh, mpl, lon, lat, istart, b, ib)
 Compute barycentric coordinates. More...
 
subroutine mesh_count_bnda (mesh, gmask, nbnda)
 Count boundary arcs. More...
 
subroutine mesh_get_bnda (mesh, gmask, nbnda, bnda_index)
 Get boundary arcs. More...
 

Variables

logical, parameter shuffle = .true.
 

Detailed Description

Mesh derived type.

Function/Subroutine Documentation

◆ mesh_alloc()

subroutine type_mesh::mesh_alloc ( class(mesh_type), intent(inout)  mesh,
integer, intent(in)  n 
)
private

Allocation.

Parameters
[in]nMesh size

Definition at line 82 of file type_mesh.F90.

◆ mesh_barycentric()

subroutine type_mesh::mesh_barycentric ( class(mesh_type), intent(in)  mesh,
type(mpl_type), intent(inout)  mpl,
real(kind_real), intent(in)  lon,
real(kind_real), intent(in)  lat,
integer, intent(in)  istart,
real(kind_real), dimension(3), intent(out)  b,
integer, dimension(3), intent(out)  ib 
)
private

Compute barycentric coordinates.

Parameters
[in,out]mplMPI data
[in]lonLongitude
[in]latLatitude
[in]istartStarting index
[out]bBarycentric weights
[out]ibBarycentric indices

Definition at line 660 of file type_mesh.F90.

Here is the call graph for this function:

◆ mesh_bnodes()

subroutine type_mesh::mesh_bnodes ( class(mesh_type), intent(inout)  mesh,
type(mpl_type), intent(inout)  mpl,
logical, intent(in), optional  bdist 
)
private

Find boundary nodes.

Parameters
[in,out]mplMPI data
[in]bdistFind minimum distance a boundary arc

Definition at line 417 of file type_mesh.F90.

Here is the call graph for this function:

◆ mesh_check()

subroutine type_mesh::mesh_check ( class(mesh_type), intent(inout)  mesh,
type(mpl_type), intent(inout)  mpl,
logical, dimension(mesh%n), intent(out)  valid 
)
private

Check whether the mesh is made of counter-clockwise triangles.

Parameters
[in,out]mplMPI data
[out]validValidity flag

Definition at line 557 of file type_mesh.F90.

Here is the call graph for this function:

◆ mesh_copy()

subroutine type_mesh::mesh_copy ( class(mesh_type), intent(inout)  mesh_out,
type(mesh_type), intent(in)  mesh_in 
)
private

Copy.

Parameters
[in,out]mesh_outOutput mesh
[in]mesh_inInput mesh

Definition at line 260 of file type_mesh.F90.

◆ mesh_count_bnda()

subroutine type_mesh::mesh_count_bnda ( class(mesh_type), intent(in)  mesh,
logical, dimension(mesh%n), intent(in)  gmask,
integer, intent(out)  nbnda 
)
private

Count boundary arcs.

Parameters
[in]gmaskMask
[out]nbndaNumber of boundary nodes

Definition at line 696 of file type_mesh.F90.

◆ mesh_dealloc()

subroutine type_mesh::mesh_dealloc ( class(mesh_type), intent(inout)  mesh)
private

Release memory.

Definition at line 223 of file type_mesh.F90.

◆ mesh_find_bdist()

subroutine type_mesh::mesh_find_bdist ( class(mesh_type), intent(in)  mesh,
type(mpl_type), intent(inout)  mpl,
real(kind_real), intent(in)  lon,
real(kind_real), intent(in)  lat,
real(kind_real), intent(out)  bdist 
)
private

Find shortest distance to boundary arcs.

Parameters
[in,out]mplMPI data
[in]lonLongitude
[in]latLatitude
[out]bdistDistance to boundary

Definition at line 500 of file type_mesh.F90.

Here is the call graph for this function:

◆ mesh_get_bnda()

subroutine type_mesh::mesh_get_bnda ( class(mesh_type), intent(in)  mesh,
logical, dimension(mesh%n), intent(in)  gmask,
integer, intent(in)  nbnda,
integer, dimension(2,nbnda), intent(out)  bnda_index 
)
private

Get boundary arcs.

Parameters
[in]gmaskMask
[in]nbndaNumber of boundary nodes
[out]bnda_indexBoundary node index

Definition at line 739 of file type_mesh.F90.

◆ mesh_init()

subroutine type_mesh::mesh_init ( class(mesh_type), intent(inout)  mesh,
type(mpl_type), intent(inout)  mpl,
type(rng_type), intent(inout)  rng,
real(kind_real), dimension(mesh%n), intent(in)  lon,
real(kind_real), dimension(mesh%n), intent(in)  lat 
)
private

Intialization.

Parameters
[in,out]mplMPI data
[in,out]rngRandom number generator
[in]lonLongitudes
[in]latLatitudes

Definition at line 112 of file type_mesh.F90.

Here is the call graph for this function:

◆ mesh_inside()

subroutine type_mesh::mesh_inside ( class(mesh_type), intent(in)  mesh,
type(mpl_type), intent(inout)  mpl,
real(kind_real), intent(in)  lon,
real(kind_real), intent(in)  lat,
logical, intent(out)  inside_mesh 
)
private

Find whether a point is inside the mesh.

Parameters
[in,out]mplMPI data
[in]lonLongitude
[in]latLatitude
[out]inside_meshTrue if the point is inside the mesh

Definition at line 628 of file type_mesh.F90.

Here is the call graph for this function:

◆ mesh_store()

subroutine type_mesh::mesh_store ( class(mesh_type), intent(inout)  mesh,
type(mpl_type), intent(inout)  mpl,
real(kind_real), dimension(mesh%n), intent(in)  lon,
real(kind_real), dimension(mesh%n), intent(in)  lat 
)
private

Store mesh cartesian coordinates.

Parameters
[in,out]mplMPI data
[in]lonLongitude
[in]latLatitude

Definition at line 319 of file type_mesh.F90.

Here is the call graph for this function:

◆ mesh_trlist()

subroutine type_mesh::mesh_trlist ( class(mesh_type), intent(inout)  mesh,
type(mpl_type), intent(inout)  mpl 
)
private

Compute triangle list, arc list.

Parameters
[in,out]mplMPI data

Definition at line 351 of file type_mesh.F90.

Here is the call graph for this function:

Variable Documentation

◆ shuffle

logical, parameter type_mesh::shuffle = .true.

Definition at line 21 of file type_mesh.F90.