Neko 0.9.99
A portable framework for high-order spectral element flow simulations
|
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) |
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 | ||
) |
agg_nhbr | Aggregate adjacency information (same structure as facet_neigh) |
n_agg_nhbr | The max number of aggregate neighbors over all aggregates |
n_elements | The number of elements (dofs) |
facet_neigh | Dof adjacency information |
offset_el | Offset for facet_neigh |
n_facet | Max number of adjecnt dofs (ex. 6 if element is a cube) |
is_aggregated | Array containing aggregate info. Maps from dof id to agg id |
aggregate_size | Array containing the size of each aggregate |
if nhbr exists
Definition at line 244 of file tree_amg_aggregate.f90.
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 | ||
) |
naggs | The number of aggregates that have been created |
max_aggs | The maximum number of aggregates to allow to be created |
facet_neigh | Dof adjacency information |
offset_el | Offset for facet_neigh |
n_facet | Max number of adjecnt dofs (ex. 6 if element is a cube) |
is_aggregated | Array containing aggregate info. Maps from dof id to agg id |
aggregate_size | Array 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.
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 | ||
) |
naggs | The number of aggregates that have ben created |
max_aggs | The maximum number of aggregates to allow to be created |
facet_neigh | Dof adjacency information |
offset_el | Offset for facet_neigh |
n_facet | Max number of adjecnt dofs (ex. 6 if element is a cube) |
is_aggregated | Array containing aggregate info. Maps from dof id to agg id |
aggregate_size | Array 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.
subroutine tree_amg_aggregate::aggregate_end | ( | type(tamg_hierarchy_t), intent(inout) | tamg, |
integer, intent(in) | lvl_id | ||
) |
tamg | TreeAMG hierarchy data structure being aggregated |
lvl_id | The 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.
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 | ||
) |
tamg | TreeAMG hierarchy data structure being aggregated |
lx | Number of dofs in x direction per element |
ly | Number of dofs in y direction per element |
lz | Number of dofs in z direction per element |
ne | Number 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.
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 | ||
) |
tamg | TreeAMG hierarchy data structure being aggregated |
lvl_id | The level id for which aggregates are being created |
max_aggs | Target number of aggregates to create on level |
facet_neigh | Input array that contains adjacency of dofs on level |
agg_nhbr | Output 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.