8#include <initializer_list>
60 assert(i >= 0 && i <
size());
65 assert(i >= 0 && i <
size());
82 template <
typename It>
88 template <
typename Range>
99 void assign_sizes(
const std::vector<uint32_t> &sizes,
const T &value = T())
103 for (
size_t i = 0; i < sizes.size(); ++i)
111 const uint32_t n =
data_.size();
115 for (
int i = 0; i < other.
size(); ++i)
118 for (
const T &v : other.
data_)
119 data_.push_back(v + shift);
127 assert(
data_.size() <= std::numeric_limits<uint32_t>::max());
200 int EV(
const int k,
const int e)
const {
return edge_vs[e][k]; }
201 int FV(
const int k,
const int f)
const {
return face_vs[f][k]; }
202 int FE(
const int k,
const int f)
const {
return face_es[f][k]; }
203 int HF(
const int k,
const int c)
const {
return cell_fs[c][k]; }
Contiguous view of one row of a JaggedArray (like std::span).
std::vector< std::remove_const_t< T > > to_vector() const
Copy of the row.
T & operator[](const size_t i) const
ArrayRow(T *begin, T *end)
Rows of different lengths stored contiguously (compressed rows): row i is data[offsets[i],...
ArrayRow< T > operator[](const int i)
std::vector< uint32_t > offsets_
int size() const
Number of rows (a moved-from array has none).
void push_back_filled(const size_t n, const T &value)
Appends a row of n copies of value.
int row_size(const int i) const
void push_back(It begin, It end)
Appends a row.
void append(const JaggedArray &other, const T shift)
Appends the rows of other, adding shift to every entry.
void reserve(const size_t n_rows, const size_t n_entries)
ArrayRow< const T > operator[](const int i) const
void assign_sizes(const std::vector< uint32_t > &sizes, const T &value=T())
Replaces the content with rows of the given sizes, filled with value.
size_t n_entries() const
Total number of entries.
void push_back(std::initializer_list< T > row)
void push_back(const Range &row)
Topology of a conforming 3D mesh (used by CMesh3D), stored as flat arrays indexed by entity id.
JaggedArray< uint8_t > cell_fs_flag
JaggedArray< uint32_t > cell_input_vs
input order (rows may be empty)
std::vector< uint8_t > vertex_boundary
Eigen::MatrixXd points
Vertex positions, 3 x #vertices.
size_t memory() const
Bytes allocated by the storage.
std::vector< uint8_t > cell_hex
JaggedArray< uint32_t > face_vs
int HF(const int k, const int c) const
int FE(const int k, const int f) const
JaggedArray< uint32_t > vertex_fs
JaggedArray< uint32_t > face_es
JaggedArray< uint32_t > vertex_es
JaggedArray< uint32_t > face_hs
JaggedArray< uint32_t > edge_fs
std::vector< uint8_t > face_boundary
JaggedArray< uint32_t > cell_vs
navigation order (see above)
JaggedArray< uint32_t > cell_es
int FH(const int k, const int f) const
int EV(const int k, const int e) const
std::vector< std::array< double, 3 > > cell_kernel
A point from which the cell is star-shaped.
JaggedArray< uint32_t > vertex_hs
JaggedArray< uint32_t > vertex_vs
int FV(const int k, const int f) const
JaggedArray< uint32_t > edge_hs
void append(const Mesh3DStorage &other)
Appends the input topology of other (shifting its ids).
JaggedArray< uint16_t > face_hs_slot
std::vector< std::array< uint32_t, 2 > > edge_vs
int FHi(const int k, const int f) const
JaggedArray< uint32_t > cell_fs
std::vector< uint8_t > edge_boundary
double deviation_Jacobian