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_gmsh Module Reference

Detailed Description

Mesh handling for GMSH meshes.

Functions to read in, intialize and refine GMSH meshes

The CAD interface to GMSH uses a high-order, currently quadratic, triangular tessellation of the boundary. This representation is used to provide refinement and high order node placement. Note that this is not equivalent to the CAD interface for CUBIT or T3D as the form cannot analytically represent most model surfaces.

Authors
Chris Hansen
Date
October 2013

Data Types

type  gmsh_cadlink
 GMSH CAD linkage structure. More...
 

Functions/Subroutines

subroutine, public gmsh_finalize_setup
 Finalize setup/load-in of GMSH mesh and destroy temporaries created for grid construction (eg. high-order input nodes, in-memory data)
 
subroutine gmsh_spt_error (m, n, uv, err, iflag)
 Evalute the error between a surface point and the current active point used in a 1 point minimization.
 
subroutine gmsh_surf_midpoint (face, pt, pt1, pt2, wt1, wt2, ierr)
 Compute the weighted midpoint of a surface edge.
 
subroutine, public mesh_gmsh_add_quad (mg_mesh)
 Add quadratic mesh node points using CAD model.
 
subroutine, public mesh_gmsh_cadlink (mesh)
 Link GMSH CAD objects to mesh entities for use in refinement.
 
subroutine mesh_gmsh_hobase (mesh)
 Add quadratic mesh node points from high order import.
 
subroutine, public mesh_gmsh_load (mg_mesh)
 Read in GMSH mesh file from file "filename".
 
subroutine, public mesh_gmsh_reffix (mg_mesh)
 Adjust boundary points to CAD boundary.
 

Variables

real(r8), dimension(3, 3) active_endpts = 0.
 Active constraint points for MINPACK fitting.
 
integer(i4active_face = 0
 Active face for MINPACK fitting.
 
real(r8), dimension(3) active_wts = 0.
 Active constraint weights for MINPACK fitting.
 
type(gmsh_cadlink), pointer cad_link => NULL()
 Linkage of mesh to CAD geometry.
 
type(oft_trimeshcad_mesh
 Surface mesh representation of CAD geometry.
 
character(len=oft_path_slen) filename = 'none'
 Name of GMSH mesh file.
 
integer(i4), parameter, public mesh_gmsh_id = 3
 
type(gmsh_cadlink), dimension(:), pointer ml_cad_link => NULL()
 ML CAD linkage.
 
integer(i4order = 1
 Order of base mesh.
 

Function/Subroutine Documentation

◆ gmsh_finalize_setup()

subroutine, public gmsh_finalize_setup

Finalize setup/load-in of GMSH mesh and destroy temporaries created for grid construction (eg. high-order input nodes, in-memory data)

◆ gmsh_spt_error()

subroutine gmsh_spt_error ( integer(i4), intent(in)  m,
integer(i4), intent(in)  n,
real(r8), dimension(n), intent(in)  uv,
real(r8), dimension(m), intent(out)  err,
integer(i4), intent(inout)  iflag 
)
private

Evalute the error between a surface point and the current active point used in a 1 point minimization.

Note
Designed to be used as the error function for minimization in gmsh_surf_midpoint
Parameters
[in]mNumber of spatial dimensions [3]
[in]nNumber of parametric dimensions [2]
[in]uvParametric possition [n]
[out]errError vector between current and desired point [3]
[in,out]iflagUnused flag

◆ gmsh_surf_midpoint()

subroutine gmsh_surf_midpoint ( integer(i4), intent(in)  face,
real(r8), dimension(3), intent(inout)  pt,
real(r8), dimension(3), intent(in)  pt1,
real(r8), dimension(3), intent(in)  pt2,
real(r8), intent(in)  wt1,
real(r8), intent(in)  wt2,
integer(i4), intent(out)  ierr 
)
private

Compute the weighted midpoint of a surface edge.

Locates the point on a given face of the imported GMSH boundary mesh by minimizing the weighted sum of distances to 2 constraint points.

\[ \sum_i w_i*(r_n - p_i)^2 \]

Parameters
[in]faceFace index
[in,out]ptSolution point
[in]pt1Constraint point 1
[in]pt2Constraint point 2
[in]wt1Constraint weight 1
[in]wt2Constraint weight 2
[out]ierrError flag

◆ mesh_gmsh_add_quad()

subroutine, public mesh_gmsh_add_quad ( type(multigrid_mesh), intent(inout)  mg_mesh)

Add quadratic mesh node points using CAD model.

◆ mesh_gmsh_cadlink()

subroutine, public mesh_gmsh_cadlink ( class(oft_mesh), intent(inout)  mesh)

Link GMSH CAD objects to mesh entities for use in refinement.

◆ mesh_gmsh_hobase()

subroutine mesh_gmsh_hobase ( class(oft_mesh), intent(inout)  mesh)
private

Add quadratic mesh node points from high order import.

◆ mesh_gmsh_load()

subroutine, public mesh_gmsh_load ( type(multigrid_mesh), intent(inout)  mg_mesh)

Read in GMSH mesh file from file "filename".

  • Read in GMSH options from input file
  • Read in mesh points and cells

◆ mesh_gmsh_reffix()

subroutine, public mesh_gmsh_reffix ( type(multigrid_mesh), intent(inout)  mg_mesh)

Adjust boundary points to CAD boundary.

Variable Documentation

◆ active_endpts

real(r8), dimension(3,3) active_endpts = 0.
private

Active constraint points for MINPACK fitting.

◆ active_face

integer(i4) active_face = 0
private

Active face for MINPACK fitting.

◆ active_wts

real(r8), dimension(3) active_wts = 0.
private

Active constraint weights for MINPACK fitting.

◆ cad_link

type(gmsh_cadlink), pointer cad_link => NULL()
private

Linkage of mesh to CAD geometry.

◆ cad_mesh

type(oft_trimesh) cad_mesh
private

Surface mesh representation of CAD geometry.

◆ filename

character(len=oft_path_slen) filename = 'none'

Name of GMSH mesh file.

◆ mesh_gmsh_id

integer(i4), parameter, public mesh_gmsh_id = 3

◆ ml_cad_link

type(gmsh_cadlink), dimension(:), pointer ml_cad_link => NULL()
private

ML CAD linkage.

◆ order

integer(i4) order = 1
private

Order of base mesh.