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

Detailed Description

FEM utility classes and functions.

Authors
Chris Hansen
Date
March 2013

Data Types

type  bfem_interp
 Base class for interpolation of a FE field. More...
 
type  cc_interp
 Interpolator for cell centered fields. More...
 
type  cross_interp
 Interpolator for cross-product of two fields. More...
 
type  diff_interp
 Interpolator for difference between two fields. More...
 
type  dot_interp
 Interpolator for dot-product of two fields. More...
 
type  fem_interp
 Base class for interpolation of a FE field. More...
 
interface  oft_bfem_interp
 Protoype for FE interpolation method. More...
 
interface  oft_fem_interp
 Protoype for FE interpolation method. More...
 
type  tensor_dot_interp
 Interpolator for the product of a vector and tensor field. More...
 

Functions/Subroutines

subroutine bfem_interp_delete (self)
 Dummy destroy function.
 
subroutine bfem_map_flag (fem_obj, vert_flag, edge_flag, fe_flag)
 Set diagonal elements to one on owned rows according to BC flag.
 
subroutine cc_interp_apply (self, cell, f, gop, val)
 Reconstruct a cell centered field.
 
subroutine cross_interp_apply (self, cell, f, gop, val)
 Reconstruct the cross-product of two fields.
 
subroutine diff_interp_apply (self, cell, f, gop, val)
 Reconstruct the difference between two fields.
 
subroutine dot_interp_apply (self, cell, f, gop, val)
 Reconstruct the dot-product of two fields.
 
subroutine fem_avg_bcc (mesh, field, bcc, order, n)
 Average a FE interpolator field to cell centers, by volume averaging.
 
subroutine fem_dirichlet_diag (fem_obj, mat, flag, iblock)
 Set diagonal elements to one on owned rows according to BC flag.
 
subroutine fem_dirichlet_vec (fem_obj, vecin, vecout, flag)
 Replace values in local vector according to BC flag.
 
subroutine fem_interp_delete (self)
 Dummy destroy function.
 
subroutine fem_map_flag (fem_obj, vert_flag, edge_flag, face_flag, fe_flag)
 Set diagonal elements to one on owned rows according to BC flag.
 
subroutine fem_partition (self, part, nparts)
 Partition FE weights based on geometric connectivity.
 
subroutine tensor_dot_interp_apply (self, cell, f, gop, val)
 Reconstruct the product of a vector and tensor field.
 
subroutine tensor_dot_interp_delete (self)
 Destroy temporary internal storage.
 
subroutine tensor_dot_interp_setup (self, mesh)
 Setup composite interpolator for a matrix-vector product.
 

Function/Subroutine Documentation

◆ bfem_interp_delete()

subroutine bfem_interp_delete ( class(bfem_interp), intent(inout)  self)

Dummy destroy function.

◆ bfem_map_flag()

subroutine bfem_map_flag ( class(oft_bfem_type), intent(inout)  fem_obj,
logical, dimension(:), intent(in)  vert_flag,
logical, dimension(:), intent(in)  edge_flag,
logical, dimension(:), intent(inout)  fe_flag 
)

Set diagonal elements to one on owned rows according to BC flag.

Parameters
[in,out]fem_objNeeds docs
[in]vert_flagNeeds docs
[in]edge_flagNeeds docs
[in,out]fe_flagNeeds docs

◆ cc_interp_apply()

subroutine cc_interp_apply ( class(cc_interp), intent(inout)  self,
integer(i4), intent(in)  cell,
real(r8), dimension(:), intent(in)  f,
real(r8), dimension(3,4), intent(in)  gop,
real(r8), dimension(:), intent(out)  val 
)

Reconstruct a cell centered field.

Parameters
[in]cellCell for interpolation
[in]fPosition in cell in logical coord [4]
[in]gopLogical gradient vectors at f [3,4]
[out]valReconstructed field at f [1]

◆ cross_interp_apply()

subroutine cross_interp_apply ( class(cross_interp), intent(inout)  self,
integer(i4), intent(in)  cell,
real(r8), dimension(:), intent(in)  f,
real(r8), dimension(3,4), intent(in)  gop,
real(r8), dimension(:), intent(out)  val 
)

Reconstruct the cross-product of two fields.

Parameters
[in]cellCell for interpolation
[in]fPosition in cell in logical coord [4]
[in]gopLogical gradient vectors at f [3,4]
[out]valReconstructed field at f [1]

◆ diff_interp_apply()

subroutine diff_interp_apply ( class(diff_interp), intent(inout)  self,
integer(i4), intent(in)  cell,
real(r8), dimension(:), intent(in)  f,
real(r8), dimension(3,4), intent(in)  gop,
real(r8), dimension(:), intent(out)  val 
)

Reconstruct the difference between two fields.

Parameters
[in]cellCell for interpolation
[in]fPosition in cell in logical coord [4]
[in]gopLogical gradient vectors at f [3,4]
[out]valReconstructed field at f [1]

◆ dot_interp_apply()

subroutine dot_interp_apply ( class(dot_interp), intent(inout)  self,
integer(i4), intent(in)  cell,
real(r8), dimension(:), intent(in)  f,
real(r8), dimension(3,4), intent(in)  gop,
real(r8), dimension(:), intent(out)  val 
)

Reconstruct the dot-product of two fields.

Parameters
[in]cellCell for interpolation
[in]fPosition in cell in logical coord [4]
[in]gopLogical gradient vectors at f [3,4]
[out]valReconstructed field at f [1]

◆ fem_avg_bcc()

subroutine fem_avg_bcc ( class(oft_mesh), intent(in)  mesh,
class(fem_interp), intent(inout)  field,
real(r8), dimension(:,:), intent(inout)  bcc,
integer(i4), intent(in)  order,
integer(i4), intent(in), optional  n 
)

Average a FE interpolator field to cell centers, by volume averaging.

Parameters
[in,out]fieldSource field intepolator
[in,out]bccAveraged field over each cell
[in]orderDesired integration order
[in]nDimension of field (optional)

◆ fem_dirichlet_diag()

subroutine fem_dirichlet_diag ( class(oft_afem_type), intent(inout)  fem_obj,
class(oft_matrix), intent(inout)  mat,
logical, dimension(:), intent(in)  flag,
integer(i4), intent(in), optional  iblock 
)

Set diagonal elements to one on owned rows according to BC flag.

Parameters
[in,out]fem_objNeeds docs
[in,out]matNeeds docs
[in]flagNeeds docs
[in]iblockNeeds docs

◆ fem_dirichlet_vec()

subroutine fem_dirichlet_vec ( class(oft_afem_type), intent(inout)  fem_obj,
real(r8), dimension(:), intent(inout)  vecin,
real(r8), dimension(:), intent(inout)  vecout,
logical, dimension(:), intent(in)  flag 
)

Replace values in local vector according to BC flag.

Parameters
[in,out]fem_objNeeds docs
[in,out]vecinNeeds docs
[in,out]vecoutNeeds docs
[in]flagNeeds docs

◆ fem_interp_delete()

subroutine fem_interp_delete ( class(fem_interp), intent(inout)  self)

Dummy destroy function.

◆ fem_map_flag()

subroutine fem_map_flag ( class(oft_fem_type), intent(inout)  fem_obj,
logical, dimension(:), intent(in)  vert_flag,
logical, dimension(:), intent(in)  edge_flag,
logical, dimension(:), intent(in)  face_flag,
logical, dimension(:), intent(inout)  fe_flag 
)

Set diagonal elements to one on owned rows according to BC flag.

Parameters
[in,out]fem_objNeeds docs
[in]vert_flagNeeds docs
[in]edge_flagNeeds docs
[in]face_flagNeeds docs
[in,out]fe_flagNeeds docs

◆ fem_partition()

subroutine fem_partition ( class(oft_fem_type), intent(inout)  self,
integer(i4), dimension(:), intent(inout)  part,
integer(i4), intent(in)  nparts 
)

Partition FE weights based on geometric connectivity.

Parameters
[in,out]selfFinite element structure
[in,out]partWeight partitioning [selfne]
[in]npartsNumber of partitions

◆ tensor_dot_interp_apply()

subroutine tensor_dot_interp_apply ( class(tensor_dot_interp), intent(inout)  self,
integer(i4), intent(in)  cell,
real(r8), dimension(:), intent(in)  f,
real(r8), dimension(3,4), intent(in)  gop,
real(r8), dimension(:), intent(out)  val 
)

Reconstruct the product of a vector and tensor field.

Parameters
[in]cellCell for interpolation
[in]fPosition in cell in logical coord [4]
[in]gopLogical gradient vectors at f [3,4]
[out]valReconstructed field at f [1]

◆ tensor_dot_interp_delete()

subroutine tensor_dot_interp_delete ( class(tensor_dot_interp), intent(inout)  self)

Destroy temporary internal storage.

◆ tensor_dot_interp_setup()

subroutine tensor_dot_interp_setup ( class(tensor_dot_interp), intent(inout)  self,
class(oft_mesh), intent(inout), target  mesh 
)

Setup composite interpolator for a matrix-vector product.

Allocates local interpolation objects. Setup of component fields must be called separately before the interpolator may be used