atlas
|
Connectivity contiguously composed of multiple BlockConnectivityImpl. More...
#include <Connectivity.h>
Public Member Functions | |
MultiBlockConnectivityImpl (const std::string &name="") | |
Construct connectivity table that needs resizing a-posteriori Data is owned. | |
MultiBlockConnectivityImpl (eckit::Stream &) | |
Construct a mesh from a Stream (serialization) | |
ATLAS_HOST_DEVICE idx_t | blocks () const |
Number of blocks. | |
ATLAS_HOST_DEVICE const BlockConnectivityImpl & | block (idx_t block_idx) const |
Access to a block connectivity. | |
ATLAS_HOST_DEVICE BlockConnectivityImpl & | block (idx_t block_idx) |
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 row_idx counts up from 0, from block 0, as in IrregularConnectivity The returned index has base 0 regardless if ATLAS_HAVE_FORTRAN is defined. More... | |
ATLAS_HOST_DEVICE idx_t | operator() (idx_t block_idx, idx_t block_row_idx, idx_t block_col_idx) const |
Access to connectivity table elements for given row and column The block_row_idx counts up from zero for every block_idx. More... | |
virtual void | add (idx_t rows, idx_t cols, const idx_t values[], bool fortran_array=false) |
Resize connectivity, and add given rows as a new block. More... | |
virtual void | add (const BlockConnectivityImpl &) |
Resize connectivity, and copy from a BlockConnectivity to a new block. More... | |
virtual void | add (idx_t rows, idx_t cols) |
Resize connectivity, and add given rows with missing values. More... | |
virtual void | add (idx_t rows, const idx_t cols[]) |
Resize connectivity, and add given rows with missing values. More... | |
virtual void | insert (idx_t position, idx_t rows, idx_t cols, const idx_t values[], bool fortran_array=false) |
Resize connectivity, and insert given rows. More... | |
virtual void | insert (idx_t position, idx_t rows, idx_t cols) |
Resize connectivity, and insert given rows with missing values. More... | |
virtual void | insert (idx_t position, idx_t rows, const idx_t cols[]) |
Resize connectivity, and insert given rows with missing values. More... | |
virtual void | clear () |
virtual size_t | footprint () const |
virtual void | encode (eckit::Stream &s) const |
virtual void | decode (eckit::Stream &s) |
![]() | |
IrregularConnectivityImpl (const std::string &name="") | |
Construct connectivity table that needs resizing a-posteriori Data is owned. | |
IrregularConnectivityImpl (idx_t values[], idx_t rows, idx_t displs[], idx_t counts[]) | |
Construct connectivity table wrapping existing raw data. More... | |
IrregularConnectivityImpl (eckit::Stream &) | |
Construct a mesh from a Stream (serialization) | |
const std::string | name () const |
Name associated to this Connetivity. | |
void | rename (const std::string &name) |
Rename this Connectivity. | |
ATLAS_HOST_DEVICE idx_t | rows () const |
Number of rows in the connectivity table. | |
ATLAS_HOST_DEVICE idx_t | cols (idx_t row_idx) const |
Number of columns for specified row in the connectivity table. | |
ATLAS_HOST_DEVICE idx_t | maxcols () const |
Maximum value for number of columns over all rows. | |
ATLAS_HOST_DEVICE idx_t | mincols () const |
Minimum value for number of columns over all rows. | |
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... | |
idx_t | size () const |
ATLAS_HOST_DEVICE idx_t | missing_value () const |
ATLAS_HOST_DEVICE Row | row (idx_t row_idx) const |
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. | |
virtual void | resize (idx_t old_size, idx_t size, bool initialize, const idx_t values[], bool fortran_array) |
Resize connectivity. More... | |
idx_t | displs (const idx_t row) const |
void | dump (std::ostream &os) const |
Protected Member Functions | |
void | encode_ (eckit::Stream &) const |
Serialization to Stream. | |
void | decode_ (eckit::Stream &) |
Serialization from Stream. | |
![]() | |
bool | owns () |
const idx_t * | displs () const |
const idx_t * | counts () const |
void | encode_ (eckit::Stream &) const |
Serialization to Stream. | |
void | decode_ (eckit::Stream &) |
Serialization from Stream. | |
Friends | |
eckit::Stream & | operator<< (eckit::Stream &s, const MultiBlockConnectivityImpl &x) |
eckit::Stream & | operator>> (eckit::Stream &s, MultiBlockConnectivityImpl &x) |
Additional Inherited Members | |
![]() | |
typedef ConnectivityRow | Row |
typedef void * | ctxt_t |
typedef void(* | callback_t) (ctxt_t) |
![]() | |
array::SVector< idx_t > | values_ |
array::SVector< idx_t > | displs_ |
array::SVector< idx_t > | counts_ |
idx_t | missing_value_ |
idx_t | rows_ |
idx_t | maxcols_ |
idx_t | mincols_ |
Connectivity contiguously composed of multiple BlockConnectivityImpl.
Container for connectivity tables that are layed out in memory as multiple BlockConnectivities stitched together. This is e.g. the case for a element-node connectivity, with element-types grouped together:
This class can also be interpreted as a atlas::IrregularConnectivity without distinction between blocks
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
|
virtual |
Resize connectivity, and add given rows as a new block.
Reimplemented from atlas::mesh::IrregularConnectivityImpl.
|
virtual |
Resize connectivity, and copy from a BlockConnectivity to a new block.
Reimplemented from atlas::mesh::IrregularConnectivityImpl.
Resize connectivity, and add given rows with missing values.
Reimplemented from atlas::mesh::IrregularConnectivityImpl.
Resize connectivity, and add given rows with missing values.
Reimplemented from atlas::mesh::IrregularConnectivityImpl.
|
virtual |
Resize connectivity, and insert given rows.
Reimplemented from atlas::mesh::IrregularConnectivityImpl.
|
virtual |
Resize connectivity, and insert given rows with missing values.
Reimplemented from atlas::mesh::IrregularConnectivityImpl.
|
virtual |
Resize connectivity, and insert given rows with missing values.
Reimplemented from atlas::mesh::IrregularConnectivityImpl.
|
inline |
Access to connectivity table elements for given row and column The row_idx counts up from 0, from block 0, as in IrregularConnectivity The returned index has base 0 regardless if ATLAS_HAVE_FORTRAN is defined.
|
inline |
Access to connectivity table elements for given row and column The block_row_idx counts up from zero for every block_idx.
The returned index has base 0 regardless if ATLAS_HAVE_FORTRAN is defined.