Neko 0.9.99
A portable framework for high-order spectral element flow simulations
Loading...
Searching...
No Matches
tree_amg Module Reference

Implements the base type for TreeAMG hierarchy structure.

Data Types

type  tamg_hierarchy_t
 Type for a TreeAMG hierarchy. More...
 
type  tamg_lvl_t
 Type for storing TreeAMG level information. More...
 
type  tamg_node_t
 Type for storing TreeAMG tree node information. More...
 

Functions/Subroutines

subroutine tamg_init (this, ax, xh, coef, msh, gs_h, nlvls, blst)
 Initialization of TreeAMG hierarchy.
 
subroutine, public tamg_lvl_init (tamg_lvl, lvl, nnodes, ndofs)
 Initialization of a TreeAMG level.
 
subroutine, public tamg_node_init (node, gid, ndofs)
 Initialization of a TreeAMG tree node.
 
recursive subroutine tamg_matvec (this, vec_out, vec_in, lvl_out)
 Wrapper for matrix vector product using the TreeAMG hierarchy structure b=Ax done as vec_out = A * vec_in.
 
recursive subroutine tamg_matvec_impl (this, vec_out, vec_in, lvl, lvl_out)
 Matrix vector product using the TreeAMG hierarchy structure b=Ax done as vec_out = A * vec_in This is done on a level by level basis.
 
recursive subroutine tamg_matvec_flat_impl (this, vec_out, vec_in, lvl_blah, lvl_out)
 Ignore this. For piecewise constant, can create index map directly to finest level.
 
subroutine tamg_restriction_operator (this, vec_out, vec_in, lvl)
 Restriction operator for TreeAMG. vec_out = R * vec_in.
 
subroutine tamg_prolongation_operator (this, vec_out, vec_in, lvl)
 Prolongation operator for TreeAMG. vec_out = P * vec_in.
 

Function/Subroutine Documentation

◆ tamg_init()

subroutine tree_amg::tamg_init ( class(tamg_hierarchy_t), intent(inout), target  this,
class(ax_t), intent(in), target  ax,
type(space_t), intent(in), target  xh,
type(coef_t), intent(in), target  coef,
type(mesh_t), intent(in), target  msh,
type(gs_t), intent(in), target  gs_h,
integer, intent(in nlvls,
type(bc_list_t), intent(in), target  blst 
)
Parameters
axFinest level matvec operator
XhFinest level field
coefFinest level coeff thing
mshFinest level mesh information
gs_hFinest level gather scatter operator
nlvlsNumber of levels for the TreeAMG hierarchy
blstFinest level BC list

Definition at line 117 of file tree_amg.f90.

◆ tamg_lvl_init()

subroutine, public tree_amg::tamg_lvl_init ( type(tamg_lvl_t), intent(inout tamg_lvl,
integer, intent(in lvl,
integer, intent(in nnodes,
integer, intent(in ndofs 
)
Parameters
tamg_lvlThe TreeAMG level
lvlThe level id
nnodesNumber of nodes on the level (number of aggregates)
ndofsNumber of dofs on the level

Definition at line 154 of file tree_amg.f90.

Here is the caller graph for this function:

◆ tamg_matvec()

recursive subroutine tree_amg::tamg_matvec ( class(tamg_hierarchy_t), intent(inout this,
real(kind=rp), dimension(:), intent(inout vec_out,
real(kind=rp), dimension(:), intent(inout vec_in,
integer, intent(in lvl_out 
)
private
Parameters
vec_outResult of Ax
vec_inVector to be multiplied by linear system. A * vec_in
lvl_outLevel of the TreeAMG hierarchy on which the matvec is done. This also specifies the hieararchy level of the incoming vector

Definition at line 198 of file tree_amg.f90.

◆ tamg_matvec_flat_impl()

recursive subroutine tree_amg::tamg_matvec_flat_impl ( class(tamg_hierarchy_t), intent(inout this,
real(kind=rp), dimension(:), intent(inout vec_out,
real(kind=rp), dimension(:), intent(inout vec_in,
integer, intent(in lvl_blah,
integer, intent(in lvl_out 
)
private

isleaf true If on finest level, pass to neko ax_t matvec operator

Call local finite element assembly

pass down through hierarchy

Map input level to finest level

Average on overlapping dofs

Finest level matvec (Call local finite element assembly)

Map finest level matvec back to output level

Definition at line 274 of file tree_amg.f90.

◆ tamg_matvec_impl()

recursive subroutine tree_amg::tamg_matvec_impl ( class(tamg_hierarchy_t), intent(inout this,
real(kind=rp), dimension(:), intent(inout vec_out,
real(kind=rp), dimension(:), intent(inout vec_in,
integer, intent(in lvl,
integer, intent(in lvl_out 
)
private
Parameters
vec_outThe vector to be returned by level lvl
vec_inThe vector pased to level lvl
lvlThe current level of the matvec (wrt tree traversal)
lvl_outLevel of the TreeAMG hierarchy on which the matvec is output.

isleaf true If on finest level, pass to neko ax_t matvec operator

Call local finite element assembly

pass down through hierarchy

lvl is finer than desired output project input vector to finer grid

restrict to coarser grid

lvl is coarser then desired output. Continue down tree

Definition at line 215 of file tree_amg.f90.

Here is the call graph for this function:

◆ tamg_node_init()

subroutine, public tree_amg::tamg_node_init ( type(tamg_node_t), intent(inout node,
integer, intent(in gid,
integer, intent(in ndofs 
)
Parameters
nodeThe TreeAMG tree node
gidThe gid for the node
ndofsNumber of dofs in the node

Definition at line 177 of file tree_amg.f90.

Here is the caller graph for this function:

◆ tamg_prolongation_operator()

subroutine tree_amg::tamg_prolongation_operator ( class(tamg_hierarchy_t), intent(inout this,
real(kind=rp), dimension(:), intent(inout vec_out,
real(kind=rp), dimension(:), intent(inout vec_in,
integer, intent(in lvl 
)
private
Parameters
vec_outThe vector to be returned. On level lvl
vec_inThe vector pased into operator. On level lvl-1
lvlThe target level of the returned vector after prolongation (wrt tree traversal)

Definition at line 363 of file tree_amg.f90.

◆ tamg_restriction_operator()

subroutine tree_amg::tamg_restriction_operator ( class(tamg_hierarchy_t), intent(inout this,
real(kind=rp), dimension(:), intent(inout vec_out,
real(kind=rp), dimension(:), intent(inout vec_in,
integer, intent(in lvl 
)
private
Parameters
vec_outThe vector to be returned. On level lvl
vec_inThe vector pased into operator. On level lvl-1
lvlThe target level of the returned vector after restrction (wrt tree traversal)

Definition at line 333 of file tree_amg.f90.