class
#include <atlas/mesh/Connectivity.h>
BlockConnectivityImpl Block Connectivity table.
There are 2 modes of construction:
- It wraps existing raw data
- It owns the connectivity data
In case ATLAS_HAVE_FORTRAN is defined (which is usually the case), the raw data will be stored with base 1 for Fortran interoperability. The operator(row,col) will then do the conversion to base 0.
In the first mode of construction, the connectivity table cannot be resized. In the second mode of construction, resizing is possible
Constructors, destructors, conversion operators
- BlockConnectivityImpl()
- Construct connectivity table that needs resizing a-posteriori Data is owned.
-
BlockConnectivityImpl(idx_
t rows, idx_ t cols, const std:: initializer_list<idx_ t>&) -
BlockConnectivityImpl(idx_
t rows, idx_ t cols, idx_ t values[]) - Construct connectivity table wrapping existing raw data. No resizing can be performed as data is not owned.
- BlockConnectivityImpl(BlockConnectivityImpl&& other)
-
BlockConnectivityImpl(eckit::
Stream&) explicit - Construct a mesh from a Stream (serialization)
- ~BlockConnectivityImpl()
- Destructor.
Public functions
- auto operator=(const BlockConnectivityImpl& other) -> BlockConnectivityImpl&
- auto operator=(BlockConnectivityImpl&& other) -> BlockConnectivityImpl&
-
auto index(idx_
t i, idx_ t j) const -> idx_ t -
auto operator()(idx_
t row_idx, idx_ t col_idx) const -> idx_ t - Access to connectivity table elements for given row and column The returned index has base 0 regardless if ATLAS_HAVE_FORTRAN is defined.
-
auto rows() const -> idx_
t - Number of rows.
-
auto cols() const -> idx_
t - Number of columns.
-
auto data() const -> const idx_
t* - Access to raw data. Note that the connectivity base is 1 in case ATLAS_HAVE_FORTRAN is defined.
-
auto data() -> idx_
t* -
auto missing_value() const -> idx_
t - auto footprint() const -> size_t
-
void set(idx_
t row_idx, const idx_ t column_values[]) - Modify row with given values. Values must be given with base 0.
-
void set(idx_
t row_idx, idx_ t col_idx, const idx_ t value) - Modify (row,col) with given value. Value must be given with base 0.
-
void add(idx_
t rows, idx_ t cols, const idx_ t values[], bool fortran_array = false) - Resize connectivity, and add given rows.
- auto owns() const -> bool
Friends
-
auto operator<<(std::
ostream& out, const BlockConnectivityImpl& x) -> std:: ostream& -
auto operator<<(eckit::
Stream& s, const BlockConnectivityImpl& x) -> eckit:: Stream& -
auto operator>>(eckit::
Stream& s, BlockConnectivityImpl& x) -> eckit:: Stream&