Mallard 0.8.0
Unstructured, GPU accelerated, high-order finite volume CFD solver
Mallard website
Loading...
Searching...
No Matches
teno_setup.cpp File Reference

TENO-E table setup in 3D, per cell on the device. More...

#include "teno_setup.h"
#include "curved.h"
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <limits>
#include <stdexcept>
#include <vector>
#include "launch_bounds.h"

Classes

class  teno_setup::Setup3D
 The setup of one mesh. More...
 

Namespaces

namespace  teno_setup
 

Functions

bool teno_setup::batch_interleaved ()
 Whether batches interleave their cells (GPUs).
 
TableBatch teno_setup::device_copy (const TableBatchT< Kokkos::HostSpace > &h)
 The device copy of a host batch.
 
teno::SmoothnessTerms teno_setup::smoothness_terms (uint8_t degree)
 The terms of every smoothness-matrix entry of the given degree, in the order the setup sums them.
 
uint16_t teno_setup::n_moments (uint8_t degree)
 Central moments per cell for the given degree.
 
std::array< double, 9 > teno_setup::ranking_metric (const Mesh &mesh, const Kokkos::View< int32_t * >::host_mirror_type &face_bc, const Kokkos::View< BoundaryCondition * >::host_mirror_type &bcs, uint32_t i)
 Metric (3 x 3, row-major) in which the stencil candidates of cell i are ranked by distance: the identity unless the spacing of its vertex neighbors (completed across its boundary faces by mirror images) is markedly anisotropic.
 

Detailed Description

TENO-E table setup in 3D, per cell on the device.

Author
Matthew Bonanni (mbona.nosp@m.nni0.nosp@m.01@gm.nosp@m.ail..nosp@m.com)
Version
0.1
Date
2026-10-09

Every cell's search, least-squares fits, Lebesgue constants and smoothness indicators run in one thread, on the device or on the host, with the same code. This file is compiled without contracting multiplies and adds into FMAs (src/CMakeLists.txt), and uses only correctly rounded operations (+, -, *, /, sqrt) on the device, so both give bitwise identical tables. The cube roots and the ranking metrics (log, exp) are computed on the host.

Variable Documentation

◆ A

size_t A = 0

◆ basis_mean

Lane<rtype> basis_mean

◆ beta

◆ binom

double binom[12][12] = {}

◆ boxes

R<double *[6]> boxes

◆ bytes

size_t bytes = 0

◆ c

CellSetup<ExecSpace> c

◆ cand_cell

size_t cand_cell = 0

◆ cand_lattice

size_t cand_lattice = 0

◆ cand_off

size_t cand_off = 0

◆ cand_slot

size_t cand_slot = 0

◆ candidates

uint32_t candidates = 0

◆ caps

Caps caps

◆ cell_coords

V<rtype *[N_DIM]> cell_coords

◆ cell_h

R<double *> cell_h

◆ cells

Kokkos::View<uint32_t *, Space> cells

◆ cells_of_cell

V<uint32_t *> cells_of_cell

◆ cells_of_cell_shift

V<uint8_t *> cells_of_cell_shift

◆ cells_of_face

V<int32_t *[2]> cells_of_face

◆ coef

size_t coef = 0

◆ cone

size_t cone = 0

◆ derivative

◆ entries

uint32_t entries = 4096

◆ entry_key

size_t entry_key = 0

◆ entry_order

size_t entry_order = 0

◆ entry_ref

size_t entry_ref = 0

◆ expo

uint8_t expo[teno::MAX_NK][3] = {}

◆ face_area

V<rtype *> face_area

◆ face_coords

V<rtype *[N_DIM]> face_coords

◆ face_normals

V<rtype *[N_DIM]> face_normals

◆ face_shift

V<uint8_t *> face_shift

◆ faces_of_cell

V<uint32_t *> faces_of_cell

◆ frame

size_t frame = 0

◆ g

Geometry<Space> g

◆ has_mirror_face

R<uint8_t *> has_mirror_face

◆ hash

Lane<uint64_t> hash = 4096

◆ hash_key

size_t hash_key = 0

◆ hash_pos

size_t hash_pos = 0

◆ inside

size_t inside = 0

◆ large_cells

Lane<int32_t> large_cells

◆ large_faces

Lane<int32_t> large_faces

◆ large_pinv

Lane<rtype> large_pinv

◆ layout

TeamLayout layout

◆ level_count

uint8_t level_count[teno::MAX_DEGREE+1] = {}

◆ level_member

uint8_t level_member[teno::MAX_DEGREE+1][(teno::MAX_DEGREE+1) *(teno::MAX_DEGREE+2)/2] = {}

◆ level_pos

uint8_t level_pos[MAX_LOW] = {}

◆ locks

Kokkos::View<int *, Space> locks

◆ low_by_degree

uint8_t low_by_degree[MAX_LOW]

◆ low_exps

uint8_t low_exps[MAX_LOW][3] = {}

◆ low_slot

◆ max_condition

double max_condition = 1e8

◆ means

size_t means = 0

◆ metric

R<double *[9]> metric

◆ mirror_face

R<uint8_t *> mirror_face

◆ moment_slot

int16_t moment_slot[MAX_NM *MAX_NM *MAX_NM] = {}

◆ moments

R<double **> moments

◆ n_beta

int n_beta = 0

◆ n_complete

uint32_t n_complete = 0

◆ n_low

int n_low = 0

◆ n_moments

int n_moments = 0

◆ n_translations

uint32_t n_translations = 0

◆ nk

uint8_t nk = 0

◆ nm

int nm = 0

◆ node_coords

V<rtype *[N_DIM]> node_coords

◆ nodes_of_cell

V<uint32_t *> nodes_of_cell

◆ nodes_of_face

V<uint32_t *> nodes_of_face

◆ ns

uint16_t ns = 0

◆ ns_max

uint16_t ns_max = 0

◆ nss

uint16_t nss = 0

◆ nss_max

uint16_t nss_max = 0

◆ offsets_cells_of_cell

V<uint32_t *> offsets_cells_of_cell

◆ offsets_faces_of_cell

V<uint32_t *> offsets_faces_of_cell

◆ offsets_nodes_of_cell

V<uint32_t *> offsets_nodes_of_cell

◆ offsets_nodes_of_face

V<uint32_t *> offsets_nodes_of_face

◆ out

TableBatchT<Space> out

◆ plane_face

size_t plane_face = 0

◆ plane_face_lattice

size_t plane_face_lattice = 0

◆ plane_face_plane

size_t plane_face_plane = 0

◆ plane_faces

uint32_t plane_faces = 512

◆ plane_first

size_t plane_first = 0

◆ plane_sorted

size_t plane_sorted = 0

◆ plane_start

size_t plane_start = 0

◆ plane_x

size_t plane_x = 0

◆ planes

size_t planes = 16

◆ pool

Kokkos::View<char *, Space> pool

◆ psi

size_t psi = 0

◆ quad_points

V<rtype ***> quad_points

◆ quad_weights

V<rtype **> quad_weights

◆ r

uint8_t r = 0

◆ reach

size_t reach = 0

◆ reflection

Lane<double> reflection

◆ rows

uint32_t rows = 0

◆ scale

Lane<rtype> scale

◆ scratch

Scratch<Space> scratch

◆ sector

size_t sector = 0

◆ shared_bytes

size_t shared_bytes = 0

◆ shared_head

size_t shared_head = 0

◆ shift_lattice

R<int8_t *[3]> shift_lattice

◆ shifts

V<rtype *[N_DIM]> shifts

◆ slots

uint32_t slots = 0

◆ small_cells

Lane<int32_t> small_cells

◆ small_faces

Lane<int32_t> small_faces

◆ small_pinv

Lane<rtype> small_pinv

◆ tables

const Tables* tables = nullptr

◆ tet_rule

R<double *[4]> tet_rule

◆ token

◆ translations

R<double *[3]> translations

◆ tried_lebesgue

size_t tried_lebesgue = 0

◆ tried_n

size_t tried_n = 0

◆ visit_cell

size_t visit_cell = 0

◆ visit_lattice

size_t visit_lattice = 0

◆ visits

uint32_t visits = 2048

◆ wall_cell

R<uint8_t *> wall_cell

◆ wall_nk

uint8_t wall_nk = 0

◆ wall_ns

uint16_t wall_ns = 0

◆ X

size_t X = 0