55 template <
typename Range>
62 template <
typename Range>
KOKKOS_INLINE_FUNCTION rtype dot(const rtype *a, const rtype *b)
Compute the dot product of two arrays.
Definition common_math.h:32
Typedefs for common types.
float rtype
Definition common_typedef.h:39
MeshType
Definition mesh.h:28
std::array< rtype, 3 > Stretching
Tanh stretching factor of each direction of a generated mesh, 0 for uniform spacing.
Definition mesh.h:62
MeshBlock cartesian_3d_block(uint32_t nx, uint32_t ny, uint32_t nz, rtype Lx, rtype Ly, rtype Lz, MeshType kind, uint64_t first_cell, uint64_t end_cell, uint64_t first_node, uint64_t end_node, const Stretching &stretching={})
A generated 3D box (see Mesh::init_cart_3d): the cells [first_cell, end_cell) and nodes [first_node,...
Definition mesh_block.cpp:149
std::array< uint64_t, 2 > cartesian_3d_size(uint32_t nx, uint32_t ny, uint32_t nz, MeshType kind)
Total cell and node counts of a generated 3D box.
Definition mesh_block.cpp:144
MeshBlock read_mesh_block(const toml::value &input)
This rank's block of the mesh described by the [mesh] table (collective): an HDF5 mesh file (....
Definition mesh_block.cpp:266
MeshBlock read_mesh_h5(const std::string &filename, bool whole=false)
Read this rank's block of an HDF5 mesh file (collective): cells, nodes and boundary faces split evenl...
Definition mesh_block.cpp:472
uint64_t block_begin(uint64_t n, int r, int p)
First element of block r of n elements split into p near-equal blocks.
Definition mesh_block.h:105
Stretching mesh_stretching(const toml::value &input)
[mesh] stretching: the tanh factor of each direction, 0 (uniform) if not given.
Definition mesh_block.cpp:43
bool is_hdf5_mesh(const std::string &filename)
Whether a mesh file name denotes an HDF5 mesh file (.h5 or .hdf5).
Definition mesh_block.cpp:261
void write_mesh_h5(const std::string &filename, const MeshBlock &block)
Write the mesh whose blocks the ranks hold, in rank order, to an HDF5 mesh file (collective; several ...
Definition mesh_block.cpp:468
bool have_parallel_hdf5()
Whether several ranks can write one HDF5 mesh file together.
Definition mesh_block.cpp:466
rtype stretched_coordinate(uint32_t i, uint32_t n, rtype L, rtype beta)
Node i of n along a side of length L of a generated mesh, clustered toward both ends by the tanh stre...
Definition mesh_block.cpp:36
MeshBlock read_gmsh_block(const std::string &filename)
This rank's block of a Gmsh file (every rank reads the whole file).
Definition mesh_io.cpp:626
std::array< rtype, 2 > wedge_node(rtype x, rtype y, rtype Ly)
Node (x, y) of the supersonic wedge mesh, moved from the box node (x, y).
Definition mesh_block.cpp:26
bool have_hdf5()
Whether this build reads and writes HDF5 mesh files.
Definition mesh_block.cpp:464
MeshBlock cartesian_2d_block(uint32_t nx, uint32_t ny, rtype Lx, rtype Ly, MeshType kind, int r, int p, const Stretching &stretching={})
Part r of p of a generated 2D mesh (cartesian, cartesian_tri or wedge): near-equal blocks of its cell...
Definition mesh_block.cpp:59
Contiguous ranges of a mesh's cells and nodes and a set of its boundary faces. Global ids are positio...
Definition mesh_block.h:35
void add_cell(std::initializer_list< uint64_t > nodes)
Definition mesh_block.h:60
uint64_t n_faces() const
Definition mesh_block.h:53
std::vector< uint64_t > face_offsets
Definition mesh_block.h:41
std::vector< std::array< double, N_DIM > > face_high_order_nodes
Definition mesh_block.h:49
std::vector< uint64_t > face_nodes
Definition mesh_block.h:42
uint64_t n_cells() const
Definition mesh_block.h:51
uint64_t first_cell
Definition mesh_block.h:36
uint64_t first_node
Definition mesh_block.h:37
std::vector< uint64_t > face_high_order_offsets
Definition mesh_block.h:48
std::vector< uint64_t > cell_offsets
Definition mesh_block.h:38
std::vector< uint32_t > face_zone
Definition mesh_block.h:43
uint64_t n_nodes() const
Definition mesh_block.h:52
void add_face(const Range &nodes, uint32_t zone)
Definition mesh_block.h:63
std::vector< std::string > zone_names
Definition mesh_block.h:44
std::vector< uint64_t > cell_nodes
Definition mesh_block.h:39
std::vector< std::array< double, N_DIM > > node_coords
Definition mesh_block.h:40
void add_cell(const Range &nodes)
Definition mesh_block.h:56
uint8_t r
Definition teno_setup.cpp:687
uint8_t beta[teno::MAX_NK][3]
Definition teno_setup.cpp:315