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

Detailed Description

Base FEM class and functions for construction of FE linkage.

Authors
Chris Hansen
Date
August 2011

Data Types

interface  afem_ncdofs
 Needs docs. More...
 
interface  afem_setup
 Needs docs. More...
 
type  dof_map
 Cell DOF type information. More...
 
type  fem_mpi_global
 Global vector information and indicies. More...
 
type  fem_parent
 Parent FE information and indicies. More...
 
interface  ml_fe_base_pop
 Needs docs. More...
 
interface  ml_fe_base_push
 Needs docs. More...
 
type  oft_afem_type
 Base FE type. More...
 
type  oft_bfem_type
 Base FE type for boundary (triangle) meshes. More...
 
type  oft_fem_ptr
 Needs docs. More...
 
type  oft_fem_type
 Base FE type. More...
 
type  oft_ml_fe_vecspace
 Needs docs. More...
 
type  oft_ml_fem_ptr
 Needs docs. More...
 
type  oft_ml_fem_type
 Needs docs. More...
 

Functions/Subroutines

subroutine afem_delete (self)
 Needs docs.
 
subroutine afem_fill_lgraph (row, col, nee, kee, lee)
 Supplement local graph with interactions from other processors.
 
subroutine afem_mat_create (self, new)
 Create self-matrix for FE representation.
 
subroutine afem_self_linkage (self)
 Compute element to element linkage for a FE representation.
 
subroutine afem_vec_create (self, new, cache, native)
 Create weight vector for FE representation.
 
subroutine afem_vec_load (self, source, filename, path, err_flag)
 Load a Lagrange scalar field from a HDF5 restart file.
 
subroutine afem_vec_save (self, source, filename, path, append)
 Save a Lagrange scalar field to a HDF5 restart file.
 
subroutine, public bfem_delete (self)
 Destroy boundary FE object.
 
subroutine bfem_global_linkage (self)
 Compute FE global context and stitching information.
 
subroutine bfem_ncdofs (self, cell, dofs)
 Retrieve the indices of elements beloning to a given face.
 
subroutine bfem_nfdofs_map (self)
 Construct face element mapping.
 
subroutine bfem_setup (self, quad_order)
 Constructs a finite element representation on the associated surface mesh.
 
subroutine, public fem_common_linkage (self, other, nee, kee, lee)
 Compute element to element linkage between two FE representations.
 
subroutine, public fem_delete (self)
 Destroy FE object.
 
subroutine fem_global_linkage (self)
 Compute FE global context and stitching information.
 
subroutine fem_ncdofs (self, cell, dofs)
 Retrieve the indices of elements beloning to a given cell.
 
subroutine fem_ncdofs_map (self)
 Construct cell element mapping.
 
subroutine fem_setup (self, quad_order)
 Constructs a finite element representation on the associated volume mesh.
 
subroutine ml_fe_vecspace_create (self, new, level, cache, native)
 Needs docs.
 
subroutine ml_fe_vecspace_inject (self, afine, acors)
 Interpolate a coarse level Lagrange scalar field to the next finest level.
 
subroutine ml_fe_vecspace_interp (self, acors, afine)
 Interpolate a coarse level Lagrange scalar field to the next finest level.
 
subroutine ml_fem_delete (self)
 Destroy boundary multi-level FE object.
 
subroutine ml_fem_set_level (self, level)
 Set the current level for a ML FE structure.
 
subroutine ml_fem_vec_create (self, new, level, cache, native)
 Create weight vector for FE representation.
 

Variables

character(len=16), parameter, public fem_idx_path ="OFT_idx_Version"
 HDF5 field name.
 
integer(i4), parameter, public fem_idx_ver =1
 File version for array indexing.
 
integer(i4), parameter, public fem_max_levels =10
 Maximum number of FE levels.
 

Function/Subroutine Documentation

◆ afem_delete()

subroutine afem_delete ( class(oft_afem_type), intent(inout)  self)

Needs docs.

◆ afem_fill_lgraph()

subroutine afem_fill_lgraph ( class(oft_afem_type), intent(in)  row,
class(oft_afem_type), intent(in)  col,
integer(i4), intent(inout)  nee,
integer(i4), dimension(:), intent(inout), pointer  kee,
integer(i4), dimension(:), intent(inout), pointer  lee 
)
private

Supplement local graph with interactions from other processors.

Due to domain decomposition not all matrix elements for the local block may be present in the graph constructed from the local mesh. This subroutine expands the local matrix graph to include all entries in the local block (interaction between elements owned by the local processor)

Parameters
[in]rowFE representation for row space
[in]colFE representation for column space
[in,out]neeNumber of entries in graph
[in,out]keeRow pointer into column list [selfne+1]
[in,out]leeColumn list [nee]

◆ afem_mat_create()

subroutine afem_mat_create ( class(oft_afem_type), intent(inout)  self,
class(oft_matrix), intent(out), pointer  new 
)
private

Create self-matrix for FE representation.

Parameters
[out]newMatrix to create

◆ afem_self_linkage()

subroutine afem_self_linkage ( class(oft_afem_type), intent(inout)  self)
private

Compute element to element linkage for a FE representation.

Creates a CSR graph representing the interaction between elements in a single finite element representation. This interaction comes from performing a volume integration of test functions against basis functions, which in Galerkin finite element are the same sets. As a result interactions are present for any two elements who share a common cell.

Note
The graph is constructed in the nee, kee, and lee fields of self
Parameters
[in,out]selfFinite element representation

◆ afem_vec_create()

subroutine afem_vec_create ( class(oft_afem_type), intent(inout)  self,
class(oft_vector), intent(out), pointer  new,
logical, intent(in), optional  cache,
logical, intent(in), optional  native 
)
private

Create weight vector for FE representation.

Parameters
[out]newVector to create
[in]cacheAllow caching (optional)
[in]nativeForce native representation (optional)

◆ afem_vec_load()

subroutine afem_vec_load ( class(oft_afem_type), intent(inout)  self,
class(oft_vector), intent(inout), target  source,
character(*), intent(in)  filename,
character(*), intent(in)  path,
integer(i4), intent(out), optional  err_flag 
)
private

Load a Lagrange scalar field from a HDF5 restart file.

Parameters
[in,out]sourceDestination vector
[in]filenameName of source file
[in]pathField path in file
[out]err_flagError flag

◆ afem_vec_save()

subroutine afem_vec_save ( class(oft_afem_type), intent(inout)  self,
class(oft_vector), intent(inout), target  source,
character(*), intent(in)  filename,
character(*), intent(in)  path,
logical, intent(in), optional  append 
)
private

Save a Lagrange scalar field to a HDF5 restart file.

Parameters
[in,out]sourceSource field
[in]filenameName of destination file
[in]pathField label in file
[in]appendAppend to file instead of creating?

◆ bfem_delete()

subroutine, public bfem_delete ( class(oft_bfem_type), intent(inout)  self)

Destroy boundary FE object.

◆ bfem_global_linkage()

subroutine bfem_global_linkage ( class(oft_bfem_type), intent(inout)  self)
private

Compute FE global context and stitching information.

This subroutine is the equilivalent of fem_global_linkage for triangular grids and fem_base::oft_bfem_type

Parameters
[in,out]selfFinite element representation

◆ bfem_ncdofs()

subroutine bfem_ncdofs ( class(oft_bfem_type), intent(in)  self,
integer(i4), intent(in)  cell,
integer(i4), dimension(:), intent(inout)  dofs 
)
private

Retrieve the indices of elements beloning to a given face.

Parameters
[in]selfFinite element representation
[in]cellDesired cell in mesh
[in,out]dofsIndices of face elements [selfnfe]

◆ bfem_nfdofs_map()

subroutine bfem_nfdofs_map ( class(oft_bfem_type), intent(inout)  self)
private

Construct face element mapping.

Sets up the structure fmap, which defines the local type, index, and geometric linkage of DOFs on a face

Parameters
[in,out]selfFinite element representation

◆ bfem_setup()

subroutine bfem_setup ( class(oft_bfem_type), intent(inout)  self,
integer(i4), intent(in)  quad_order 
)
private

Constructs a finite element representation on the associated surface mesh.

This subroutine is the equilivalent of fem_setup for trangular grids and fem_base::oft_bfem_type. Generally this method is used to construct a finite element representation for the boundary mesh, however it may be used with arbitrary triangular grids

Parameters
[in,out]selfFE representation to construct
[in]quad_orderDesired quadrature order

◆ fem_common_linkage()

subroutine, public fem_common_linkage ( class(oft_afem_type), intent(in)  self,
class(oft_afem_type), intent(in)  other,
integer(i4), intent(out)  nee,
integer(i4), dimension(:), intent(out), pointer  kee,
integer(i4), dimension(:), intent(out), pointer  lee 
)

Compute element to element linkage between two FE representations.

Creates a CSR graph representing the interaction between elements of two different finite element representations. This listed is constructed as in fem_self_linkage, however in this case self is used as the test functions and other is used as the basis set in the Galerkin intergral. These correspond to the row and columns of the CSR graph respectively

Parameters
[in]selfFinite element representation for test set (rows)
[in]otherFinite element representation for basis set (columns)
[out]neeNumber of entries in graph
[out]keeRow pointer into column list [selfne+1]
[out]leeColumn list [nee]

◆ fem_delete()

subroutine, public fem_delete ( class(oft_fem_type), intent(inout)  self)

Destroy FE object.

◆ fem_global_linkage()

subroutine fem_global_linkage ( class(oft_fem_type), intent(inout)  self)
private

Compute FE global context and stitching information.

Sets up structures and information for distributed meshes. Primarily this supports the creation of vector and matrix objects for the full mesh during linear solves.

Parameters
[in,out]selfFinite element representation

◆ fem_ncdofs()

subroutine fem_ncdofs ( class(oft_fem_type), intent(in)  self,
integer(i4), intent(in)  cell,
integer(i4), dimension(:), intent(inout)  dofs 
)
private

Retrieve the indices of elements beloning to a given cell.

Parameters
[in]selfFinite element representation
[in]cellDesired cell in mesh
[in,out]dofsIndices of cell elements [selfnce]

◆ fem_ncdofs_map()

subroutine fem_ncdofs_map ( class(oft_fem_type), intent(inout)  self)
private

Construct cell element mapping.

Sets up the structure cmap, which defines the local type, index, and geometric linkage of DOFs in a cell

Parameters
[in,out]selfFinite element representation

◆ fem_setup()

subroutine fem_setup ( class(oft_fem_type), intent(inout)  self,
integer(i4), intent(in)  quad_order 
)
private

Constructs a finite element representation on the associated volume mesh.

Constructs a finite element representation from a specified geometric mapping, provided by gstruct, and the assigned mesh. The result is a fully defined finite element type which my be used to define weight vectors, matrix graphs, etc. required to employ the finite element method on the chosen tetrahedral grid.

Parameters
[in,out]selfFE representation to construct
[in]quad_orderDesired quadrature order

◆ ml_fe_vecspace_create()

subroutine ml_fe_vecspace_create ( class(oft_ml_fe_vecspace), intent(inout)  self,
class(oft_vector), intent(out), pointer  new,
integer(i4), intent(in), optional  level,
logical, intent(in), optional  cache,
logical, intent(in), optional  native 
)
private

Needs docs.

◆ ml_fe_vecspace_inject()

subroutine ml_fe_vecspace_inject ( class(oft_ml_fe_vecspace), intent(inout)  self,
class(oft_vector), intent(inout)  afine,
class(oft_vector), intent(inout)  acors 
)
private

Interpolate a coarse level Lagrange scalar field to the next finest level.

Note
The global Lagrange level in incremented by one in this subroutine
Parameters
[in,out]afineFine vector from interpolation
[in,out]acorsVector to interpolate

◆ ml_fe_vecspace_interp()

subroutine ml_fe_vecspace_interp ( class(oft_ml_fe_vecspace), intent(inout)  self,
class(oft_vector), intent(inout)  acors,
class(oft_vector), intent(inout)  afine 
)
private

Interpolate a coarse level Lagrange scalar field to the next finest level.

Note
The global Lagrange level in incremented by one in this subroutine
Parameters
[in,out]acorsVector to interpolate
[in,out]afineFine vector from interpolation

◆ ml_fem_delete()

subroutine ml_fem_delete ( class(oft_ml_fem_type), intent(inout)  self)
private

Destroy boundary multi-level FE object.

◆ ml_fem_set_level()

subroutine ml_fem_set_level ( class(oft_ml_fem_type), intent(inout)  self,
integer(i4), intent(in)  level 
)
private

Set the current level for a ML FE structure.

Parameters
[in]levelDesired level

◆ ml_fem_vec_create()

subroutine ml_fem_vec_create ( class(oft_ml_fem_type), intent(inout)  self,
class(oft_vector), intent(out), pointer  new,
integer(i4), intent(in), optional  level,
logical, intent(in), optional  cache,
logical, intent(in), optional  native 
)
private

Create weight vector for FE representation.

Parameters
[out]newVector to create
[in]levelFE level for init (optional)
[in]cacheAllow caching (optional)
[in]nativeForce native representation (optional)

Variable Documentation

◆ fem_idx_path

character(len=16), parameter, public fem_idx_path ="OFT_idx_Version"

HDF5 field name.

◆ fem_idx_ver

integer(i4), parameter, public fem_idx_ver =1

File version for array indexing.

◆ fem_max_levels

integer(i4), parameter, public fem_max_levels =10

Maximum number of FE levels.