atlas::mesh::IrregularConnectivityImpl class

Derived classes

class MultiBlockConnectivityImpl
Connectivity contiguously composed of multiple BlockConnectivityImpl.

Public types

using Row = ConnectivityRow
using ctxt_t = void*
using callback_t = void(*)(ctxt_t)

Constructors, destructors, conversion operators

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. No resizing can be performed as data is not owned.
IrregularConnectivityImpl(eckit::Stream&) explicit
Construct a mesh from a Stream (serialization)
~IrregularConnectivityImpl() virtual

Public functions

auto name() const -> const std::string
Name associated to this Connetivity.
void rename(const std::string& name)
Rename this Connectivity.
auto rows() const -> idx_t
Number of rows in the connectivity table.
auto cols(idx_t row_idx) const -> idx_t
Number of columns for specified row in the connectivity table.
auto maxcols() const -> idx_t
Maximum value for number of columns over all rows.
auto mincols() const -> idx_t
Minimum value for number of columns over all rows.
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 size() const -> idx_t
auto missing_value() const -> idx_t
auto row(idx_t row_idx) const -> Row
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 resize(idx_t old_size, idx_t size, bool initialize, const idx_t values[], bool fortran_array) virtual
Resize connectivity.
void add(idx_t rows, idx_t cols, const idx_t values[], bool fortran_array = false) virtual
Resize connectivity, and add given rows.
void add(idx_t rows, idx_t cols) virtual
Resize connectivity, and add given rows with missing values.
void add(idx_t rows, const idx_t cols[]) virtual
Resize connectivity, and add given rows with missing values.
void add(const BlockConnectivityImpl& block) virtual
Resize connectivity, and copy from a BlockConnectivity.
void insert(idx_t position, idx_t rows, idx_t cols, const idx_t values[], bool fortran_array = false) virtual
Resize connectivity, and insert given rows.
void insert(idx_t position, idx_t rows, idx_t cols) virtual
Resize connectivity, and insert given rows with missing values.
void insert(idx_t position, idx_t rows, const idx_t cols[]) virtual
Resize connectivity, and insert given rows with missing values.
void clear() virtual
auto footprint() const -> size_t virtual
auto displs(const idx_t row) const -> idx_t
void dump(std::ostream& os) const
void encode(eckit::Stream& s) const virtual
void decode(eckit::Stream& s) virtual

Friends

auto operator<<(std::ostream& os, const IrregularConnectivityImpl& p) -> std::ostream&
auto operator<<(eckit::Stream& s, const IrregularConnectivityImpl& x) -> eckit::Stream&
auto operator>>(eckit::Stream& s, IrregularConnectivityImpl& x) -> eckit::Stream&

Function documentation

void atlas::mesh::IrregularConnectivityImpl::resize(idx_t old_size, idx_t size, bool initialize, const idx_t values[], bool fortran_array) virtual

Resize connectivity.

void atlas::mesh::IrregularConnectivityImpl::add(idx_t rows, idx_t cols, const idx_t values[], bool fortran_array = false) virtual

Resize connectivity, and add given rows.

void atlas::mesh::IrregularConnectivityImpl::add(idx_t rows, idx_t cols) virtual

Resize connectivity, and add given rows with missing values.

void atlas::mesh::IrregularConnectivityImpl::add(idx_t rows, const idx_t cols[]) virtual

Resize connectivity, and add given rows with missing values.

void atlas::mesh::IrregularConnectivityImpl::insert(idx_t position, idx_t rows, idx_t cols, const idx_t values[], bool fortran_array = false) virtual

Resize connectivity, and insert given rows.

void atlas::mesh::IrregularConnectivityImpl::insert(idx_t position, idx_t rows, idx_t cols) virtual

Resize connectivity, and insert given rows with missing values.

void atlas::mesh::IrregularConnectivityImpl::insert(idx_t position, idx_t rows, const idx_t cols[]) virtual

Resize connectivity, and insert given rows with missing values.