Loading...
Searching...
No Matches
terra::fv::hex::operators::detail::GeometryHelper< ScalarT > Struct Template Reference

Stateless geometry helper for a single FV hex cell. More...

#include <geometry_helper.hpp>

Public Types

enum class  WedgeContribution : int { NONE = 0 , TRIANGLE = 1 , QUAD = 2 }
 
enum class  CrossProductType : int { XI_ETA = 0 , XI_ZETA = 1 , ETA_ZETA = 2 }
 
using Vec3 = dense::Vec< ScalarT, 3 >
 

Static Public Member Functions

static constexpr int cell_offset_x (int n)
 
static constexpr int cell_offset_y (int n)
 
static constexpr int cell_offset_r (int n)
 
static constexpr WedgeContribution contribution (const int hex_direction, const int wedge_id)
 
static constexpr void map_face (const int hex_direction, const int wedge_id, const double s, const double t, double &xi, double &eta, double &zeta, CrossProductType &cross_product_type)
 
static void compute_geometry (const grid::Grid3DDataVec< ScalarT, 3 > &grid, const grid::Grid2DDataScalar< ScalarT > &radii, const grid::Grid4DDataVec< ScalarT, 3 > &cell_centers, const grid::Grid4DDataVec< ScalarT, 3 > &vel_grid, const int local_subdomain_id, const int x_cell, const int y_cell, const int r_cell, ScalarT(&beta)[num_neighbors], ScalarT &M_ii, Vec3(&S_f)[num_neighbors])
 Compute beta[6], M_ii, and S_f[6] for the cell at (x_cell, y_cell, r_cell).
 

Static Public Attributes

static constexpr int num_neighbors = 6
 

Detailed Description

template<typename ScalarT>
struct terra::fv::hex::operators::detail::GeometryHelper< ScalarT >

Stateless geometry helper for a single FV hex cell.

Computes:

  • beta[6] : velocity flux ∫ u·n dS through each of the 6 faces (positive = outward).
  • M_ii : cell volume.
  • S_f[6] : area-weighted outward normal vector for each face (∫ n dS).

Neighbour ordering (faces 0..5): face 0: x-1 face 1: x+1 face 2: y-1 face 3: y+1 face 4: r-1 face 5: r+1

Member Typedef Documentation

◆ Vec3

template<typename ScalarT >
using terra::fv::hex::operators::detail::GeometryHelper< ScalarT >::Vec3 = dense::Vec< ScalarT, 3 >

Member Enumeration Documentation

◆ CrossProductType

template<typename ScalarT >
enum class terra::fv::hex::operators::detail::GeometryHelper::CrossProductType : int
strong
Enumerator
XI_ETA 
XI_ZETA 
ETA_ZETA 

◆ WedgeContribution

template<typename ScalarT >
enum class terra::fv::hex::operators::detail::GeometryHelper::WedgeContribution : int
strong
Enumerator
NONE 
TRIANGLE 
QUAD 

Member Function Documentation

◆ cell_offset_r()

template<typename ScalarT >
static constexpr int terra::fv::hex::operators::detail::GeometryHelper< ScalarT >::cell_offset_r ( int  n)
inlinestaticconstexpr

◆ cell_offset_x()

template<typename ScalarT >
static constexpr int terra::fv::hex::operators::detail::GeometryHelper< ScalarT >::cell_offset_x ( int  n)
inlinestaticconstexpr

◆ cell_offset_y()

template<typename ScalarT >
static constexpr int terra::fv::hex::operators::detail::GeometryHelper< ScalarT >::cell_offset_y ( int  n)
inlinestaticconstexpr

◆ compute_geometry()

template<typename ScalarT >
static void terra::fv::hex::operators::detail::GeometryHelper< ScalarT >::compute_geometry ( const grid::Grid3DDataVec< ScalarT, 3 > &  grid,
const grid::Grid2DDataScalar< ScalarT > &  radii,
const grid::Grid4DDataVec< ScalarT, 3 > &  cell_centers,
const grid::Grid4DDataVec< ScalarT, 3 > &  vel_grid,
const int  local_subdomain_id,
const int  x_cell,
const int  y_cell,
const int  r_cell,
ScalarT(&)  beta[num_neighbors],
ScalarT &  M_ii,
Vec3(&)  S_f[num_neighbors] 
)
inlinestatic

Compute beta[6], M_ii, and S_f[6] for the cell at (x_cell, y_cell, r_cell).

Parameters
beta[out] Velocity flux ∫ u·n dS per face; positive = flow out of cell.
M_ii[out] Cell volume.
S_f[out] Area-weighted outward normal ∫ n dS per face. All three are needed by advection-diffusion; only beta and M_ii by pure advection.

◆ contribution()

template<typename ScalarT >
static constexpr WedgeContribution terra::fv::hex::operators::detail::GeometryHelper< ScalarT >::contribution ( const int  hex_direction,
const int  wedge_id 
)
inlinestaticconstexpr

◆ map_face()

template<typename ScalarT >
static constexpr void terra::fv::hex::operators::detail::GeometryHelper< ScalarT >::map_face ( const int  hex_direction,
const int  wedge_id,
const double  s,
const double  t,
double &  xi,
double &  eta,
double &  zeta,
CrossProductType cross_product_type 
)
inlinestaticconstexpr

Member Data Documentation

◆ num_neighbors

template<typename ScalarT >
constexpr int terra::fv::hex::operators::detail::GeometryHelper< ScalarT >::num_neighbors = 6
staticconstexpr

The documentation for this struct was generated from the following file: