atlas
|
Block Connectivity table. More...
#include <Connectivity.h>
Public Member Functions | |
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. More... | |
BlockConnectivityImpl (BlockConnectivityImpl &&other) | |
BlockConnectivityImpl & | operator= (const BlockConnectivityImpl &other) |
BlockConnectivityImpl & | operator= (BlockConnectivityImpl &&other) |
BlockConnectivityImpl (eckit::Stream &) | |
Construct a mesh from a Stream (serialization) | |
~BlockConnectivityImpl () | |
Destructor. | |
ATLAS_HOST_DEVICE idx_t | index (idx_t i, idx_t j) const |
ATLAS_HOST_DEVICE idx_t | operator() (idx_t row_idx, idx_t col_idx) const |
Access to connectivity table elements for given row and column The returned index has base 0 regardless if ATLAS_HAVE_FORTRAN is defined. More... | |
ATLAS_HOST_DEVICE idx_t | rows () const |
Number of rows. | |
ATLAS_HOST_DEVICE idx_t | cols () const |
Number of columns. | |
ATLAS_HOST_DEVICE const idx_t * | data () const |
Access to raw data. More... | |
ATLAS_HOST_DEVICE idx_t * | data () |
ATLAS_HOST_DEVICE idx_t | missing_value () const |
size_t | footprint () const |
ATLAS_HOST_DEVICE void | set (idx_t row_idx, const idx_t column_values[]) |
Modify row with given values. Values must be given with base 0. | |
ATLAS_HOST_DEVICE 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. More... | |
bool | owns () const |
Protected Member Functions | |
void | rebuild (idx_t rows, idx_t cols, idx_t values[]) |
Wrap existing and set owns_ = false. | |
void | encode (eckit::Stream &) const |
Serialization to Stream. | |
void | decode (eckit::Stream &) |
Serialization from Stream. | |
void | print (std::ostream &) const |
Friends | |
class | IrregularConnectivityImpl |
class | MultiBlockConnectivityImpl |
std::ostream & | operator<< (std::ostream &out, const BlockConnectivityImpl &x) |
eckit::Stream & | operator<< (eckit::Stream &s, const BlockConnectivityImpl &x) |
eckit::Stream & | operator>> (eckit::Stream &s, BlockConnectivityImpl &x) |
Block Connectivity table.
There are 2 modes of construction:
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
atlas::mesh::BlockConnectivityImpl::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.
void atlas::mesh::BlockConnectivityImpl::add | ( | idx_t | rows, |
idx_t | cols, | ||
const idx_t | values[], | ||
bool | fortran_array = false |
||
) |
Resize connectivity, and add given rows.
|
inline |
Access to raw data.
Note that the connectivity base is 1 in case ATLAS_HAVE_FORTRAN is defined.
Access to connectivity table elements for given row and column The returned index has base 0 regardless if ATLAS_HAVE_FORTRAN is defined.