|
Neko 1.99.7
A portable framework for high-order spectral element flow simulations
|
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 | tamg_free (this) |
| deallocate tamg hierarchy | |
| subroutine, public | tamg_lvl_init (tamg_lvl, lvl, nnodes, ndofs) |
| Initialization of a TreeAMG level. | |
| subroutine | lvl_free (this) |
| deallocate tamg level | |
| subroutine, public | tamg_node_init (node, gid, ndofs) |
| Initialization of a TreeAMG tree node. | |
| subroutine | node_free (this) |
| deallocate tamg 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. | |
| subroutine | tamg_device_matvec_flat_impl (this, vec_out, vec_in, vec_out_d, vec_in_d, lvl_out) |
| subroutine | tamg_device_restriction_operator (this, vec_out_d, vec_in_d, lvl) |
| subroutine | tamg_device_prolongation_operator (this, vec_out_d, vec_in_d, lvl, vec_out) |
|
private |
Definition at line 227 of file tree_amg.f90.
|
private |
Definition at line 295 of file tree_amg.f90.
|
private |
isleaf true
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 578 of file tree_amg.f90.
|
private |
Definition at line 636 of file tree_amg.f90.
|
private |
Definition at line 621 of file tree_amg.f90.
|
private |
Definition at line 173 of file tree_amg.f90.
| 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 | ||
| ) |
| ax | Finest level matvec operator |
| Xh | Finest level field |
| coef | Finest level coeff thing |
| msh | Finest level mesh information |
| gs_h | Finest level gather scatter operator |
| nlvls | Number of levels for the TreeAMG hierarchy |
| blst | Finest level BC list |
Definition at line 138 of file tree_amg.f90.
| 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 | ||
| ) |
| tamg_lvl | The TreeAMG level |
| lvl | The level id |
| nnodes | Number of nodes on the level (number of aggregates) |
| ndofs | Number of dofs on the level |
Definition at line 198 of file tree_amg.f90.


|
private |
| vec_out | Result of Ax |
| vec_in | Vector to be multiplied by linear system. A * vec_in |
| lvl_out | Level of the TreeAMG hierarchy on which the matvec is done. This also specifies the hieararchy level of the incoming vector |
Definition at line 315 of file tree_amg.f90.

|
private |
isleaf true
pass down through hierarchy
Map input level to finest level. Walking the aggregates rather than the dofs reads vec_in once per aggregate and broadcasts it, instead of doing an indirect load per dof.
Average on overlapping dofs
Finest level matvec (Call local finite element assembly)
Map finest level matvec back to output level. This is a segmented reduction, so drive it from the aggregate side: each aggregate is owned by exactly one thread, which makes the writes to vec_out disjoint. No atomics (there is no hardware fp64 atomic add on AArch64, so !$omp atomic there becomes a CAS retry loop, and the aggregation map guarantees maximal contention on it), no pre-zeroing, and a deterministic summation order.
Too few aggregates to hand every thread one; the coarsest level has exactly one, from aggregate_end. Reduce over the dofs into per-thread partials and merge, as in the GMRES Gram-Schmidt hp(:,tid). agg_part's leading dimension is padded to a cache line by build_agg_csr, so the columns do not false share; it is tiny here, so zero all of it up front: capping the team at nthrds still permits a smaller team, whose unused columns the merge below would otherwise read uninitialised.
Definition at line 393 of file tree_amg.f90.

|
private |
| vec_out | The vector to be returned by level lvl |
| vec_in | The vector pased to level lvl |
| lvl | The current level of the matvec (wrt tree traversal) |
| lvl_out | Level 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 332 of file tree_amg.f90.

| subroutine, public tree_amg::tamg_node_init | ( | type(tamg_node_t), intent(inout) | node, |
| integer, intent(in) | gid, | ||
| integer, intent(in) | ndofs | ||
| ) |
| node | The TreeAMG tree node |
| gid | The gid for the node |
| ndofs | Number of dofs in the node |
Definition at line 279 of file tree_amg.f90.

|
private |
| vec_out | The vector to be returned. On level lvl |
| vec_in | The vector pased into operator. On level lvl-1 |
| lvl | The target level of the returned vector after prolongation (wrt tree traversal) |
Definition at line 545 of file tree_amg.f90.
|
private |
| vec_out | The vector to be returned. On level lvl |
| vec_in | The vector pased into operator. On level lvl-1 |
| lvl | The target level of the returned vector after restrction (wrt tree traversal) |
Definition at line 511 of file tree_amg.f90.