Loading...
Searching...
No Matches
divergence_kerngen.hpp File Reference

Team-based matrix-free Divergence operator for the spherical shell. More...

Go to the source code of this file.

Classes

class  terra::fe::wedge::operators::shell::DivergenceKerngen< ScalarT >
 

Namespaces

namespace  terra
 
namespace  terra::fe
 
namespace  terra::fe::wedge
 Features for wedge elements.
 
namespace  terra::fe::wedge::operators
 
namespace  terra::fe::wedge::operators::shell
 

Detailed Description

Team-based matrix-free Divergence operator for the spherical shell.

This is a performance-oriented variant of Divergence (fe/wedge/operators/shell/divergence.hpp) that transfers the optimisation techniques used in EpsilonDivDivKerngen:

  • Kokkos::TeamPolicy with backend-aware tile sizing.
  • Per-team shared-memory staging of coords, radii and velocity src.
  • Host-side BC-aware kernel path dispatch (Slow / FastDirichletNeumann / FastFreeslip) with no in-kernel branching on the path.
  • LaunchBounds<128, 5> for occupancy tuning on CUDA.
  • ShellBoundaryCommPlan-based halo exchange.

The kernel path math is intentionally kept identical to the original Divergence: every cell assembles the same local 6x18 element matrix (dense::Mat< ScalarT, 6, 18 > A[2]), applies the same boundary mask / freeslip rotation, and scatters through the same atomically_add_local_wedge_scalar_coefficients helper onto the coarse pressure grid (x/2, y/2, r/2). The only difference in the fast paths is that per-cell input data is read from team shared memory rather than from global memory. This gives a safe, first-pass optimisation that keeps correctness provable against the existing operator.