|
The Open FUSION Toolkit 1.0.0-beta5
Modeling tools for plasma and fusion research and engineering
|
Tetrahedral mesh structure definitions.
Global Tet variables
Data Types | |
| type | oft_tetmesh |
| Tetrahedral Mesh type. More... | |
Functions/Subroutines | |
| subroutine | tet_3d_grid (order, xnodes, inodesf, inodesc) |
| subroutine | tetmesh_ctang (self, i, ind, f, tang) |
| Compute the curve tangent vector for a given edge on a cell. | |
| subroutine | tetmesh_g2inv (jfull, g2op) |
| Invert a 3x3 matrix. | |
| integer(i4) function, dimension(2) | tetmesh_get_io_sizes (self) |
| Get variable sizes following tessellation. | |
| subroutine | tetmesh_get_surf_map (self, face, cell, lmap) |
| Get mapping between boundary and volume logical coordinates. | |
| subroutine | tetmesh_hessian (self, i, f, g2op, k) |
| Compute the second order jacobians for a grid cell. | |
| integer(i4) function | tetmesh_in_cell (self, f, tol) |
| Logical locations of vertices. | |
| subroutine | tetmesh_invert_cell (self, i) |
| Invert cell to produce positive volume. | |
| subroutine | tetmesh_jacinv (jfull, gop, jac) |
| Invert a 3x3 matrix. | |
| subroutine | tetmesh_jacl (self, i, gop, j) |
| Compute the jacobian matrix and its determinant for a linear element. | |
| subroutine | tetmesh_jacobian (self, cell, f, gop, j) |
| Compute the jacobian matrix and its determinant for a grid cell. | |
| real(r8) function, dimension(3) | tetmesh_log2phys (self, cell, f) |
| Map from logical to physical coordinates. | |
| subroutine | tetmesh_phys2log (self, i, pt, f) |
| Map from physical to logical coordinates. | |
| real(r8) function, dimension(4) | tetmesh_phys2logho (self, i, pt) |
| Map from physical to logical coordinates for general high order elements. | |
| real(r8) function, dimension(4) | tetmesh_phys2logl (self, i, pt) |
| Map from physical to logical coordinates for a linear element. | |
| subroutine | tetmesh_quad_rule (self, order, quad_rule) |
| Create quadrature rule for tetrahedra. | |
| subroutine | tetmesh_set_order (self, order) |
| Load trimesh from transfer file. | |
| subroutine | tetmesh_setup (self, cad_type) |
| Load trimesh from transfer file. | |
| subroutine | tetmesh_snormal (self, i, ind, f, norm) |
| Compute the surface normal vector for a given face on a cell. | |
| subroutine | tetmesh_surf_to_vol (self, fsurf, lmap, fvol) |
| Map between surface and volume logical coordinates. | |
| subroutine | tetmesh_tessellate (self, rtmp, lctmp, order) |
| Driver for order specific tessellation subroutines. | |
| subroutine | tetmesh_vlog (self, i, f) |
| Logical locations of vertices. | |
| subroutine | tm_findcell_error (m, n, uv, err, iflag) |
| Evalute the error between a logical point and the current active point. | |
Variables | |
| integer(i4), private | active_cell = 0 |
| Active cell for high order find_cell. | |
| class(oft_tetmesh), pointer, private | active_mesh => NULL() |
| Active mesh for high order find_cell. | |
| real(r8), dimension(3), private | active_pt = 0.d0 |
| Active point for high order find_cell. | |
| real(r8), parameter, private | ho_find_du =1.d-6 |
| Step size used for jacobian eval during high order find_cell. | |
| integer(i4), parameter, private | ho_find_nsteps =100 |
| Maximum number of steps during high order find_cell. | |
| real(r8), parameter, private | ho_find_tol =1.d-6 |
| Convergence tolerance for high order find_cell. | |
| integer(i4), dimension(2, 6), parameter | tet_ed =RESHAPE((/1,4, 2,4, 3,4, 2,3, 3,1, 1,2/), (/2,6/)) |
| Tetrahedron edge list. | |
| integer(i4), dimension(3, 4), parameter | tet_fc =RESHAPE((/2,3,4,3,1,4,1,2,4,1,2,3/), (/3,4/)) |
| Tetrahedron face list. | |
| integer(i4), dimension(3, 4), parameter | tet_fe =RESHAPE((/2,3,4, 1,3,5, 1,2,6, 4,5,6/), (/3,4/)) |
| Tetrahedron face edge list. | |
| integer(i4), dimension(2, 3), parameter | tri_ed =RESHAPE((/3,2,1,3,2,1/), (/2,3/)) |
| Triangle edge list. | |
| subroutine tet_3d_grid | ( | integer(i4), intent(in) | order, |
| real(r8), dimension(:), intent(out), pointer | xnodes, | ||
| integer(i4), dimension(:,:,:), intent(out), pointer | inodesf, | ||
| integer(i4), dimension(:,:), intent(out), pointer | inodesc | ||
| ) |
| subroutine tetmesh_ctang | ( | class(oft_tetmesh), intent(in) | self, |
| integer(i4), intent(in) | i, | ||
| integer(i4), intent(in) | ind, | ||
| real(r8), dimension(:), intent(in) | f, | ||
| real(r8), dimension(3), intent(out) | tang | ||
| ) |
Compute the curve tangent vector for a given edge on a cell.
If edge is not a global boundary edge the function returns with tang = 0
| [in] | self | Mesh containing face |
| [in] | i | Index of cell |
| [in] | ind | Index of edge within cell |
| [in] | f | Logical coordinate in cell [4] |
| [out] | tang | Unit vector tangent to the edge [3] |
| subroutine tetmesh_g2inv | ( | real(r8), dimension(3,4), intent(in) | jfull, |
| real(r8), dimension(6,10), intent(out) | g2op | ||
| ) |
Invert a 3x3 matrix.
| [in] | A | Matrix to invert |
| [out] | C | \( A^{-1} \) |
| [out] | j | |A| |
| integer(i4) function, dimension(2) tetmesh_get_io_sizes | ( | class(oft_tetmesh), intent(in) | self | ) |
Get variable sizes following tessellation.
| subroutine tetmesh_get_surf_map | ( | class(oft_tetmesh), intent(in) | self, |
| integer(i4), intent(in) | face, | ||
| integer(i4), intent(out) | cell, | ||
| integer(i4), dimension(3), intent(out) | lmap | ||
| ) |
Get mapping between boundary and volume logical coordinates.
| [in] | face | Index of face on boundary mesh |
| [out] | cell | Cell containing face |
| [out] | lmap | Coordinate mapping |
| subroutine tetmesh_hessian | ( | class(oft_tetmesh), intent(in) | self, |
| integer(i4), intent(in) | i, | ||
| real(r8), dimension(:), intent(in) | f, | ||
| real(r8), dimension(:,:), intent(out) | g2op, | ||
| real(r8), dimension(:,:), intent(out) | k | ||
| ) |
Compute the second order jacobians for a grid cell.
| [in] | self | Mesh containing cell |
| [in] | i | Index of cell for evaulation |
| [in] | f | Logical coordinate in cell [4] |
| [out] | g2op | Second order Jacobian matrix \( (\frac{\partial x_i}{\partial \lambda_l} \frac{\partial x_j}{\partial \lambda_k})^{-1} \) [6,10] |
| [out] | K | Gradient correction matrix \( \frac{\partial^2 x_i}{\partial \lambda_k \partial \lambda_l}\) [10,3] |
| integer(i4) function tetmesh_in_cell | ( | class(oft_tetmesh), intent(in) | self, |
| real(r8), dimension(:), intent(in) | f, | ||
| real(r8), intent(in) | tol | ||
| ) |
Logical locations of vertices.
| [in] | self | Mesh containing cell |
| [in] | i | Index of cell for evaulation |
| [in] | f | Logical coordinate in cell [4] |
| subroutine tetmesh_invert_cell | ( | class(oft_tetmesh), intent(inout) | self, |
| integer(i4), intent(in) | i | ||
| ) |
Invert cell to produce positive volume.
| subroutine tetmesh_jacinv | ( | real(r8), dimension(3,4), intent(in) | jfull, |
| real(r8), dimension(3,4), intent(out) | gop, | ||
| real(r8), intent(out) | jac | ||
| ) |
Invert a 3x3 matrix.
| [in] | A | Matrix to invert |
| [out] | C | \( A^{-1} \) |
| [out] | j | |A| |
| subroutine tetmesh_jacl | ( | class(oft_tetmesh), intent(in) | self, |
| integer(i4), intent(in) | i, | ||
| real(r8), dimension(3,4), intent(out) | gop, | ||
| real(r8), intent(out) | j | ||
| ) |
Compute the jacobian matrix and its determinant for a linear element.
| [in] | self | Mesh containing cell |
| [in] | i | Index of cell for evaulation |
| [out] | gop | Jacobian matrix \( (\frac{\partial x_i}{\partial \lambda_j})^{-1} \) [3,4] |
| [out] | j | Jacobian of transformation from logical to physical coordinates |
| subroutine tetmesh_jacobian | ( | class(oft_tetmesh), intent(in) | self, |
| integer(i4), intent(in) | cell, | ||
| real(r8), dimension(:), intent(in) | f, | ||
| real(r8), dimension(:,:), intent(out) | gop, | ||
| real(r8), intent(out) | j | ||
| ) |
Compute the jacobian matrix and its determinant for a grid cell.
Driver function calls mapping specific function depending on mesh order.
| [in] | self | Mesh containing cell |
| [in] | i | Index of cell for evaulation |
| [in] | f | Logical coordinate in cell [4] |
| [out] | gop | Jacobian matrix \( (\frac{\partial x_i}{\partial \lambda_j})^{-1} \) [3,4] |
| [out] | j | Jacobian of transformation from logical to physical coordinates |
| real(r8) function, dimension(3) tetmesh_log2phys | ( | class(oft_tetmesh), intent(in) | self, |
| integer, intent(in) | cell, | ||
| real(r8), dimension(:), intent(in) | f | ||
| ) |
Map from logical to physical coordinates.
Driver function calls mapping specific function depending on mesh order.
| [in] | self | Mesh containing cell |
| [in] | i | Index of cell for evaulation |
| [in] | f | Logical coordinate in cell [4] |
| subroutine tetmesh_phys2log | ( | class(oft_tetmesh), intent(in) | self, |
| integer(i4), intent(in) | i, | ||
| real(r8), dimension(3), intent(in) | pt, | ||
| real(r8), dimension(:), intent(out) | f | ||
| ) |
Map from physical to logical coordinates.
Driver function calls mapping specific function depending on mesh order.
| [in] | self | Mesh containing cell |
| [in] | i | Index of cell for evaulation |
| [in] | pt | Physical position [3] |
| real(r8) function, dimension(4) tetmesh_phys2logho | ( | class(oft_tetmesh), intent(in), target | self, |
| integer(i4), intent(in) | i, | ||
| real(r8), dimension(3), intent(in) | pt | ||
| ) |
Map from physical to logical coordinates for general high order elements.
The MINPACK package is used with step size given by ho_find_du. The convergence tolerance is set by the variable ho_find_tol.
| [in] | self | Mesh containing cell |
| [in] | i | Index of cell for evaulation |
| [in] | pt | Physical position [3] |
| real(r8) function, dimension(4) tetmesh_phys2logl | ( | class(oft_tetmesh), intent(in) | self, |
| integer(i4), intent(in) | i, | ||
| real(r8), dimension(3), intent(in) | pt | ||
| ) |
Map from physical to logical coordinates for a linear element.
A direct mapping is used to compute this transformation.
| [in] | self | Mesh containing cell |
| [in] | i | Index of cell for evaulation |
| [in] | pt | Physical position [3] |
| subroutine tetmesh_quad_rule | ( | class(oft_tetmesh), intent(in) | self, |
| integer(i4), intent(in) | order, | ||
| type(oft_quad_type), intent(out) | quad_rule | ||
| ) |
Create quadrature rule for tetrahedra.
| [in] | self | Mesh containing cell |
| [in] | i | Index of cell for evaulation |
| [in] | f | Logical coordinate in cell [4] |
| subroutine tetmesh_set_order | ( | class(oft_tetmesh), intent(inout) | self, |
| integer(i4), intent(in) | order | ||
| ) |
Load trimesh from transfer file.
| subroutine tetmesh_setup | ( | class(oft_tetmesh), intent(inout) | self, |
| integer(i4), intent(in) | cad_type | ||
| ) |
Load trimesh from transfer file.
| subroutine tetmesh_snormal | ( | class(oft_tetmesh), intent(in) | self, |
| integer(i4), intent(in) | i, | ||
| integer(i4), intent(in) | ind, | ||
| real(r8), dimension(:), intent(in) | f, | ||
| real(r8), dimension(3), intent(out) | norm | ||
| ) |
Compute the surface normal vector for a given face on a cell.
If face is not a global boundary face the function returns with norm = 0
| [in] | self | Mesh containing face |
| [in] | i | Index of cell |
| [in] | ind | Index of face within cell |
| [in] | f | Logical coordinate in cell [4] |
| [out] | norm | Unit vector normal to the face [3] |
| subroutine tetmesh_surf_to_vol | ( | class(oft_tetmesh), intent(in) | self, |
| real(r8), dimension(:), intent(in) | fsurf, | ||
| integer(i4), dimension(3), intent(in) | lmap, | ||
| real(r8), dimension(:), intent(out) | fvol | ||
| ) |
Map between surface and volume logical coordinates.
| [in] | fsurf | Surface coordinates [3] |
| [in] | lmap | Coordinate mapping |
| [out] | fvol | Volume coordinates [4] |
| subroutine tetmesh_tessellate | ( | class(oft_tetmesh), intent(in) | self, |
| real(r8), dimension(:,:), intent(out), pointer | rtmp, | ||
| integer(i4), dimension(:,:), intent(out), pointer | lctmp, | ||
| integer(i4), intent(in) | order | ||
| ) |
Driver for order specific tessellation subroutines.
| [in] | self | Mesh to tessellate |
| [out] | rtmp | Tessellated mesh points [3,np_tess] |
| [out] | lctmp | Tessellated cell list [4,nc_tess] |
| [in] | order | Desired tessellation order |
| subroutine tetmesh_vlog | ( | class(oft_tetmesh), intent(in) | self, |
| integer(i4), intent(in) | i, | ||
| real(r8), dimension(:), intent(out) | f | ||
| ) |
Logical locations of vertices.
| [in] | self | Mesh containing cell |
| [in] | i | Index of cell for evaulation |
| [in] | f | Logical coordinate in cell [4] |
| subroutine tm_findcell_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 | ||
| ) |
Evalute the error between a logical point and the current active point.
| [in] | m | Number of spatial dimensions (3) |
| [in] | n | Number of parametric dimensions (3) |
| [in] | uv | Parametric possition [n] |
| [out] | err | Error vector between current and desired point [3] |
| [in,out] | iflag | Unused flag |
|
private |
Active cell for high order find_cell.
|
private |
Active mesh for high order find_cell.
|
private |
Active point for high order find_cell.
|
private |
Step size used for jacobian eval during high order find_cell.
|
private |
Maximum number of steps during high order find_cell.
|
private |
Convergence tolerance for high order find_cell.
| integer(i4), dimension(2,6), parameter tet_ed =RESHAPE((/1,4, 2,4, 3,4, 2,3, 3,1, 1,2/), (/2,6/)) |
Tetrahedron edge list.
| integer(i4), dimension(3,4), parameter tet_fc =RESHAPE((/2,3,4,3,1,4,1,2,4,1,2,3/), (/3,4/)) |
Tetrahedron face list.
| integer(i4), dimension(3,4), parameter tet_fe =RESHAPE((/2,3,4, 1,3,5, 1,2,6, 4,5,6/), (/3,4/)) |
Tetrahedron face edge list.
| integer(i4), dimension(2,3), parameter tri_ed =RESHAPE((/3,2,1,3,2,1/), (/2,3/)) |
Triangle edge list.