The Open FUSION Toolkit 1.0.0-8905cc5
Modeling tools for plasma and fusion research and engineering
Loading...
Searching...
No Matches
Data Types | Functions/Subroutines | Variables
oft_mesh_type Module Reference

Detailed Description

Tetrahedral mesh structure definitions.

Global Tet variables

Author
Chris Hansen
Date
June 2010

Data Types

interface  bmesh_hessian
 Compute the spatial hessian matrices for a given cell at a given logical position. More...
 
interface  bmesh_in_cell
 Test if logical position lies within the base cell. More...
 
interface  bmesh_invert_cell
 Turn cell "inside out", used to ensure consistent orientations. More...
 
interface  bmesh_jacobian
 Compute the spatial jacobian matrix and its determinant for a given cell at a given logical position. More...
 
interface  bmesh_load
 Load mesh from transfer file. More...
 
interface  bmesh_log2phys
 Map from logical to physical coordinates in a given cell. More...
 
interface  bmesh_norm
 Get unit normal for surface at a given point in a given cell. More...
 
type  bmesh_parent
 Global mesh information and indicies. More...
 
interface  bmesh_phys2log
 Map from physical to logical coordinates in a given cell. More...
 
interface  bmesh_quad_rule
 Retrieve suitable quadrature rule for mesh with given order. More...
 
interface  bmesh_save
 Save mesh to transfer file. More...
 
interface  bmesh_set_order
 Set maximum order of spatial mapping. More...
 
interface  bmesh_setup
 Setup mesh with implementation specifics (cell_np, cell_ne, etc.) More...
 
interface  bmesh_tang
 Get tangent basis set for surface at a given point in a given cell. More...
 
interface  bmesh_tessellate
 Tessellate mesh onto lagrange FE nodes of specified order (usually for plotting) More...
 
interface  bmesh_tessellated_sizes
 Get variable sizes following tessellation. More...
 
interface  bmesh_vlog
 Get position in logical space of vertex i More...
 
type  ho_mesh
 High order tet geometry information. More...
 
type  mesh_base
 Base mesh information and indicies. More...
 
interface  mesh_ctang
 Compute the curve tangent vector for a given edge on a cell. More...
 
interface  mesh_get_surf_map
 Get mapping between boundary and volume logical coordinates. More...
 
type  mesh_global
 Global mesh information and indicies. More...
 
interface  mesh_hessian
 Compute the spatial hessian matrices for a given cell at a given logical position. More...
 
interface  mesh_in_cell
 Test if logical position lies within the base cell. More...
 
interface  mesh_invert_cell
 Turn cell "inside out", used to ensure consistent orientations. More...
 
interface  mesh_jacobian
 Compute the spatial jacobian matrix and its determinant for a given cell at a given logical position. More...
 
interface  mesh_log2phys
 Map from logical to physical coordinates in a given cell. More...
 
type  mesh_per
 Global mesh information and indicies. More...
 
interface  mesh_phys2log
 Map from physical to logical coordinates in a given cell. More...
 
interface  mesh_quad_rule
 Retrieve suitable quadrature rule for mesh with given order. More...
 
type  mesh_save_index
 MPI global index information (For I/O Only) More...
 
type  mesh_seam
 Processor-processor connectivity information for mesh. More...
 
interface  mesh_set_order
 Set maximum order of spatial mapping. More...
 
interface  mesh_setup
 Setup mesh with implementation specifics (cell_np, cell_ne, etc.) More...
 
interface  mesh_snormal
 Compute the surface normal vector for a given face on a cell. More...
 
interface  mesh_surf_to_vol
 Map between surface and volume logical coordinates. More...
 
interface  mesh_tessellate
 Tessellate mesh onto lagrange FE nodes of specified order (usually for plotting) More...
 
interface  mesh_tessellated_sizes
 Get sizes of arrays returned by mesh_tessellate. More...
 
interface  mesh_vlog
 Get position in logical space of vertex i More...
 
type  oft_amesh
 Abstrac mesh type (surface or volume) More...
 
type  oft_bmesh
 Surface mesh type. More...
 
type  oft_mesh
 Tetrahedral Mesh type. More...
 

Functions/Subroutines

subroutine amesh_destroy (self)
 Needs docs.
 
real(r8) function bmesh_area (self)
 Estimate mesh area.
 
subroutine bmesh_destroy (self)
 Needs docs.
 
subroutine, public bmesh_findcell (self, cell, pt, fout)
 Find physical point in mesh.
 
subroutine bmesh_save_cell_scalar (self, p, xdmf_obj, path)
 Write scalar cell data out to file.
 
subroutine bmesh_save_cell_vector (self, bcc, xdmf_obj, path)
 Write vector cell data out to file.
 
subroutine bmesh_save_vertex_scalar (self, p, xdmf_obj, path)
 Write scalar vertex data out to file.
 
subroutine bmesh_save_vertex_vector (self, bv, xdmf_obj, path)
 Write vector vertex data out to file.
 
subroutine bmesh_setup_io (self, xdmf_obj, tess_order)
 Needs docs.
 
logical function, public cell_is_curved (self, cell)
 Checks if a global mesh cell is curved or not.
 
subroutine mesh_destroy (self)
 Destroy mesh object.
 
subroutine, public mesh_findcell (self, cell, pt, fout)
 Find physical point in mesh.
 
subroutine, public mesh_findcell2 (self, cell, pt, nclosest, fout)
 Find physical point in mesh using robust method.
 
subroutine mesh_save_cell_scalar (self, p, xdmf_obj, path)
 Write scalar cell data out to file.
 
subroutine mesh_save_cell_vector (self, bcc, xdmf_obj, path)
 Write vector cell data out to file.
 
subroutine mesh_save_vertex_scalar (self, p, xdmf_obj, path)
 Write scalar vertex data out to file.
 
subroutine mesh_save_vertex_vector (self, bv, xdmf_obj, path)
 Write vector vertex data out to file.
 
subroutine mesh_setup_io (self, xdmf_obj, tess_order)
 Estimate mesh volume.
 
real(r8) function mesh_volume (self)
 Estimate mesh volume.
 
subroutine, public oft_init_seam (self, seam_obj)
 Create oft_seam object from mesh connectivity.
 

Variables

integer(i4), parameter, private ho_find_retry =20
 Number of retry attempts during high order find_cell.
 
logical, parameter plot_r4_flag =.TRUE.
 

Function/Subroutine Documentation

◆ amesh_destroy()

subroutine amesh_destroy ( class(oft_amesh), intent(inout)  self)
private

Needs docs.

◆ bmesh_area()

real(r8) function bmesh_area ( class(oft_bmesh), intent(in)  self)
private

Estimate mesh area.

◆ bmesh_destroy()

subroutine bmesh_destroy ( class(oft_bmesh), intent(inout)  self)
private

Needs docs.

◆ bmesh_findcell()

subroutine, public bmesh_findcell ( class(oft_bmesh), intent(in)  self,
integer(i4), intent(inout)  cell,
real(r8), dimension(2), intent(in)  pt,
real(r8), dimension(3), intent(out), optional  fout 
)

Find physical point in mesh.

Warning
Only works for 2D meshes and uses linear logical mapping
Parameters
[in]selfMesh to search
[in,out]cellCell containing point on output, guess on input
[in]ptCoordinates to locate [2]
[out]foutLogical coordinates of point in cell (optional)

◆ bmesh_save_cell_scalar()

subroutine bmesh_save_cell_scalar ( class(oft_bmesh), intent(in)  self,
real(r8), dimension(:), intent(in)  p,
class(xdmf_plot_file), intent(in)  xdmf_obj,
character(len=*), intent(in)  path 
)
private

Write scalar cell data out to file.

Parameters
[in]pCell data [nc]
[in]xdmf_objXDMF save object
[in]pathName of the output field

◆ bmesh_save_cell_vector()

subroutine bmesh_save_cell_vector ( class(oft_bmesh), intent(in)  self,
real(r8), dimension(:,:), intent(in)  bcc,
class(xdmf_plot_file), intent(in)  xdmf_obj,
character(len=*), intent(in)  path 
)
private

Write vector cell data out to file.

Parameters
[in]bccCell data [3,nc]
[in]xdmf_objXDMF save object
[in]pathName of the output field

◆ bmesh_save_vertex_scalar()

subroutine bmesh_save_vertex_scalar ( class(oft_bmesh), intent(in)  self,
real(r8), dimension(:), intent(in)  p,
class(xdmf_plot_file), intent(in)  xdmf_obj,
character(len=*), intent(in)  path 
)
private

Write scalar vertex data out to file.

Parameters
[in]pVertex data [np]
[in]xdmf_objXDMF save object
[in]pathName of the output field

◆ bmesh_save_vertex_vector()

subroutine bmesh_save_vertex_vector ( class(oft_bmesh), intent(in)  self,
real(r8), dimension(:,:), intent(in)  bv,
class(xdmf_plot_file), intent(in)  xdmf_obj,
character(len=*), intent(in)  path 
)
private

Write vector vertex data out to file.

Parameters
[in]bvVertex data [3,np]
[in]xdmf_objXDMF save object
[in]pathName of the output field

◆ bmesh_setup_io()

subroutine bmesh_setup_io ( class(oft_bmesh), intent(inout)  self,
class(xdmf_plot_file), intent(inout)  xdmf_obj,
integer(i4), intent(in)  tess_order 
)
private

Needs docs.

Parameters
[in,out]selfNeeds docs
[in,out]xdmf_objNeeds docs
[in]tess_orderNeeds docs

◆ cell_is_curved()

logical function, public cell_is_curved ( class(oft_amesh), intent(in)  self,
integer(i4), intent(in)  cell 
)

Checks if a global mesh cell is curved or not.

Returns
(T/F) cell is curved?
Parameters
[in]selfMesh containing cell
[in]cellIndex of cell to check

◆ mesh_destroy()

subroutine mesh_destroy ( class(oft_mesh), intent(inout)  self)
private

Destroy mesh object.

◆ mesh_findcell()

subroutine, public mesh_findcell ( class(oft_mesh), intent(inout), target  self,
integer(i4), intent(inout)  cell,
real(r8), dimension(3), intent(in)  pt,
real(r8), dimension(4), intent(out), optional  fout 
)

Find physical point in mesh.

For high order grids an approximate guess is first computed using only the linear portion of the mesh representation. This guess is then refined using the full mesh representation and the tetmesh_phys2logho subroutine. The maximum number of cell searches during this non-linear phase is controlled by the module variable ho_find_retry. For more information see the documentation for tetmesh_phys2logho

Parameters
[in,out]selfMesh to search
[in,out]cellCell containing point on output, guess on input
[in]ptCoordinates to locate [3]
[out]foutLogical coordinates of point in cell (optional)

◆ mesh_findcell2()

subroutine, public mesh_findcell2 ( class(oft_mesh), intent(inout), target  self,
integer(i4), intent(inout)  cell,
real(r8), dimension(3), intent(in)  pt,
integer(i4), intent(in)  nclosest,
real(r8), dimension(4), intent(out), optional  fout 
)

Find physical point in mesh using robust method.

First, a collection of the nclosest mesh vertices is found. Then the surrounding cells are searched for the specified point. If the point is not found the standard tetmesh_findcell subroutine is used as a fallback.

Parameters
[in,out]selfMesh to search
[in,out]cellCell containing point on output, guess on input
[in]ptCoordinates to locate [3]
[in]nclosestNumber of candidate vertices to use for search
[out]foutLogical coordinates of point in cell (optional)

◆ mesh_save_cell_scalar()

subroutine mesh_save_cell_scalar ( class(oft_mesh), intent(in)  self,
real(r8), dimension(:), intent(in)  p,
class(xdmf_plot_file), intent(in)  xdmf_obj,
character(len=*), intent(in)  path 
)
private

Write scalar cell data out to file.

Parameters
[in]pCell data [nc]
[in]xdmf_objXDMF save object
[in]pathName of the output field

◆ mesh_save_cell_vector()

subroutine mesh_save_cell_vector ( class(oft_mesh), intent(in)  self,
real(r8), dimension(:,:), intent(in)  bcc,
class(xdmf_plot_file), intent(in)  xdmf_obj,
character(len=*), intent(in)  path 
)
private

Write vector cell data out to file.

Parameters
[in]bccCell data [3,nc]
[in]xdmf_objXDMF save object
[in]pathName of the output field

◆ mesh_save_vertex_scalar()

subroutine mesh_save_vertex_scalar ( class(oft_mesh), intent(in)  self,
real(r8), dimension(:), intent(in)  p,
class(xdmf_plot_file), intent(in)  xdmf_obj,
character(len=*), intent(in)  path 
)
private

Write scalar vertex data out to file.

Parameters
[in]pVertex data [np]
[in]xdmf_objXDMF save object
[in]pathName of the output field

◆ mesh_save_vertex_vector()

subroutine mesh_save_vertex_vector ( class(oft_mesh), intent(in)  self,
real(r8), dimension(:,:), intent(in)  bv,
class(xdmf_plot_file), intent(in)  xdmf_obj,
character(len=*), intent(in)  path 
)
private

Write vector vertex data out to file.

Parameters
[in]bvVertex data [3,np]
[in]xdmf_objXDMF save object
[in]pathName of the output field

◆ mesh_setup_io()

subroutine mesh_setup_io ( class(oft_mesh), intent(inout)  self,
class(xdmf_plot_file), intent(inout)  xdmf_obj,
integer(i4), intent(in)  tess_order 
)
private

Estimate mesh volume.

Parameters
[in,out]selfNeeds docs
[in,out]xdmf_objNeeds docs
[in]tess_orderNeeds docs

◆ mesh_volume()

real(r8) function mesh_volume ( class(oft_mesh), intent(in)  self)
private

Estimate mesh volume.

Parameters
[in]selfNeeds docs

◆ oft_init_seam()

subroutine, public oft_init_seam ( class(oft_amesh), intent(in)  self,
type(oft_seam), intent(out)  seam_obj 
)

Create oft_seam object from mesh connectivity.

Parameters
[in]selfMesh containing cell
[out]seam_objResulting seam object

Variable Documentation

◆ ho_find_retry

integer(i4), parameter, private ho_find_retry =20
private

Number of retry attempts during high order find_cell.

◆ plot_r4_flag

logical, parameter plot_r4_flag =.TRUE.
private