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

Implements an aggregation for TreeAMG hierarchy structure.

Data Types

type  tamg_agg_monitor_t
 

Functions/Subroutines

subroutine aggregate_finest_level (tamg, lx, ly, lz, ne)
 Aggregaiton on finest level Aggregates all dofs in an element into a single aggregate.
 
subroutine agg_greedy_first_pass (naggs, max_aggs, n_elements, facet_neigh, offset_el, n_facet, is_aggregated, aggregate_size)
 First pass of a greedy aggregation Loop through all dofs and aggregate on dof that has all unaggregated neighbors.
 
subroutine agg_greedy_second_pass (naggs, max_aggs, n_elements, facet_neigh, offset_el, n_facet, is_aggregated, aggregate_size)
 Second pass of a greedy aggregation Loop through all unaggregated dofs and add them to a neighboring aggregate. If no neighboring aggregates, create a new aggregate.
 
subroutine agg_fill_nhbr_info (agg_nhbr, n_agg_nhbr, n_elements, facet_neigh, offset_el, n_facet, is_aggregated, aggregate_size)
 Create information on which aggregates are "adjacent" to eachother.
 
subroutine aggregate_greedy (tamg, lvl_id, max_aggs, facet_neigh, agg_nhbr)
 Aggregates dofs based on adjacent dofs.
 
subroutine aggregate_end (tamg, lvl_id)
 Aggregate all dofs to a single point to form a tree-like structure.
 
subroutine aggregation_monitor_finest (lvl, ndof, nagg)
 
subroutine aggregation_monitor_phase1 (lvl, ndof, nagg, is_aggregated)
 
subroutine aggregation_monitor_phase2 (lvl, ndof, nagg, is_aggregated)
 
subroutine aggregation_monitor_final (lvl, ndof, nagg)
 

Function/Subroutine Documentation

◆ agg_fill_nhbr_info()

subroutine tree_amg_aggregate::agg_fill_nhbr_info ( integer, dimension(:,:), intent(inout agg_nhbr,
integer, intent(inout n_agg_nhbr,
integer, intent(in n_elements,
integer, dimension(:,:), intent(in facet_neigh,
integer, intent(in offset_el,
integer, intent(in n_facet,
integer, dimension(:), intent(inout is_aggregated,
integer, dimension(:), intent(inout aggregate_size 
)
Parameters
agg_nhbrAggregate adjacency information (same structure as facet_neigh)
n_agg_nhbrThe max number of aggregate neighbors over all aggregates
n_elementsThe number of elements (dofs)
facet_neighDof adjacency information
offset_elOffset for facet_neigh
n_facetMax number of adjecnt dofs (ex. 6 if element is a cube)
is_aggregatedArray containing aggregate info. Maps from dof id to agg id
aggregate_sizeArray containing the size of each aggregate

if nhbr exists

Definition at line 244 of file tree_amg_aggregate.f90.

Here is the caller graph for this function:

◆ agg_greedy_first_pass()

subroutine tree_amg_aggregate::agg_greedy_first_pass ( integer, intent(inout naggs,
integer, intent(in max_aggs,
integer, intent(in n_elements,
integer, dimension(:,:), intent(in facet_neigh,
integer, intent(in offset_el,
integer, intent(in n_facet,
integer, dimension(:), intent(inout is_aggregated,
integer, dimension(:), intent(inout), allocatable  aggregate_size 
)
Parameters
naggsThe number of aggregates that have been created
max_aggsThe maximum number of aggregates to allow to be created
facet_neighDof adjacency information
offset_elOffset for facet_neigh
n_facetMax number of adjecnt dofs (ex. 6 if element is a cube)
is_aggregatedArray containing aggregate info. Maps from dof id to agg id
aggregate_sizeArray containing the size of each aggregate

THE NON-RANDOM VERSION...

Check to see if any of the points neighbors are aggregated

if nhbr exists

if no neighbors are aggregated, create new aggregate

if nhbr exists

Definition at line 111 of file tree_amg_aggregate.f90.

Here is the caller graph for this function:

◆ agg_greedy_second_pass()

subroutine tree_amg_aggregate::agg_greedy_second_pass ( integer, intent(inout naggs,
integer, intent(in max_aggs,
integer, intent(in n_elements,
integer, dimension(:,:), intent(in facet_neigh,
integer, intent(in offset_el,
integer, intent(in n_facet,
integer, dimension(:), intent(inout is_aggregated,
integer, dimension(:), intent(inout aggregate_size 
)
Parameters
naggsThe number of aggregates that have ben created
max_aggsThe maximum number of aggregates to allow to be created
facet_neighDof adjacency information
offset_elOffset for facet_neigh
n_facetMax number of adjecnt dofs (ex. 6 if element is a cube)
is_aggregatedArray containing aggregate info. Maps from dof id to agg id
aggregate_sizeArray containing the size of each aggregate

Add remaining unaggregated nodes to aggregates

dof i is unaggregated. Check neighbors, add to smallest neighbor

if nhbr exists

if neighbor aggregate found add to that aggregate

if none of the neignbors are aggregated. might as well make a new aggregate

Add neighbors to aggregate if unaggregated

if nhbr exists

Definition at line 174 of file tree_amg_aggregate.f90.

Here is the caller graph for this function:

◆ aggregate_end()

subroutine tree_amg_aggregate::aggregate_end ( type(tamg_hierarchy_t), intent(inout tamg,
integer, intent(in lvl_id 
)
Parameters
tamgTreeAMG hierarchy data structure being aggregated
lvl_idThe level id for which aggregates are being created

link all branches together at a point

Allocate lvl

Allocate node

Fill node

Definition at line 383 of file tree_amg_aggregate.f90.

Here is the caller graph for this function:

◆ aggregate_finest_level()

subroutine tree_amg_aggregate::aggregate_finest_level ( type(tamg_hierarchy_t), intent(inout tamg,
integer, intent(in lx,
integer, intent(in ly,
integer, intent(in lz,
integer, intent(in ne 
)
Parameters
tamgTreeAMG hierarchy data structure being aggregated
lxNumber of dofs in x direction per element
lyNumber of dofs in y direction per element
lzNumber of dofs in z direction per element
neNumber of elements

Count things

Allocate. For finest level, each aggregate is a node.

Fill the nodes

Definition at line 64 of file tree_amg_aggregate.f90.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ aggregate_greedy()

subroutine tree_amg_aggregate::aggregate_greedy ( type(tamg_hierarchy_t), intent(inout tamg,
integer, intent(in lvl_id,
integer, intent(in max_aggs,
integer, dimension(:,:), intent(in facet_neigh,
integer, dimension(:,:), intent(inout), allocatable  agg_nhbr 
)
Parameters
tamgTreeAMG hierarchy data structure being aggregated
lvl_idThe level id for which aggregates are being created
max_aggsTarget number of aggregates to create on level
facet_neighInput array that contains adjacency of dofs on level
agg_nhbrOutput array that contains adjacency of created aggregates

NEKO elements are hexes, thus have 6 face neighbors

fill with false

Fill with large number

First pass of greedy aggregation.

Second pass of greedy aggregation, adding unaggregated dofs to neighboring aggregates.

if needed on next level...

count things

Allocate and fill lvl and nodes

Definition at line 289 of file tree_amg_aggregate.f90.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ aggregation_monitor_final()

subroutine tree_amg_aggregate::aggregation_monitor_final ( integer, intent(in lvl,
integer, intent(in ndof,
integer, intent(in nagg 
)

Definition at line 502 of file tree_amg_aggregate.f90.

Here is the caller graph for this function:

◆ aggregation_monitor_finest()

subroutine tree_amg_aggregate::aggregation_monitor_finest ( integer, intent(in lvl,
integer, intent(in ndof,
integer, intent(in nagg 
)

Definition at line 407 of file tree_amg_aggregate.f90.

Here is the caller graph for this function:

◆ aggregation_monitor_phase1()

subroutine tree_amg_aggregate::aggregation_monitor_phase1 ( integer, intent(in lvl,
integer, intent(in ndof,
integer, intent(in nagg,
integer, dimension(:), intent(in is_aggregated 
)

Definition at line 425 of file tree_amg_aggregate.f90.

Here is the caller graph for this function:

◆ aggregation_monitor_phase2()

subroutine tree_amg_aggregate::aggregation_monitor_phase2 ( integer, intent(in lvl,
integer, intent(in ndof,
integer, intent(in nagg,
integer, dimension(:), intent(in is_aggregated 
)

Definition at line 464 of file tree_amg_aggregate.f90.

Here is the caller graph for this function: