atlas::mesh::HybridElements class

HybridElements class that describes elements of different types.

Public types

using Connectivity = MultiBlockConnectivity

Constructors, destructors, conversion operators

HybridElements()
~HybridElements() virtual

Public functions

auto size() const -> idx_t
Number of elements.
auto nb_nodes(idx_t elem_idx) const -> idx_t
Number of nodes for given element.
auto nb_edges(idx_t elem_idx) const -> idx_t
Number of edges for given element.
auto type_idx(idx_t elem_idx) const -> idx_t
Element type index for given element.
auto name(idx_t elem_idx) const -> const std::string&
Element type name for given element.
auto node_connectivity() const -> const HybridElements::Connectivity&
Element to Node connectivity table.
auto node_connectivity() -> HybridElements::Connectivity&
auto edge_connectivity() const -> const HybridElements::Connectivity&
Element to Edge connectivity table.
auto edge_connectivity() -> HybridElements::Connectivity&
auto cell_connectivity() const -> const HybridElements::Connectivity&
Element to Cell connectivity table.
auto cell_connectivity() -> HybridElements::Connectivity&
auto nb_types() const -> idx_t
Number of types present in HybridElements.
auto element_type(idx_t type_idx) const -> const ElementType&
The element_type description for given type.
auto elements(idx_t type_idx) const -> const Elements&
Sub-elements convenience class for given type This allows optimized access to connectivities and loops.
auto elements(idx_t type_idx) -> Elements&
auto field(const std::string& name) const -> const Field&
auto field(const std::string& name) -> Field&
auto has_field(const std::string& name) const -> bool
auto field(idx_t) const -> const Field&
auto field(idx_t) -> Field&
auto nb_fields() const -> idx_t
auto metadata() const -> const util::Metadata&
auto metadata() -> util::Metadata&
auto global_index() const -> const Field&
auto global_index() -> Field&
auto remote_index() const -> const Field&
auto remote_index() -> Field&
auto partition() const -> const Field&
auto partition() -> Field&
auto halo() const -> const Field&
auto halo() -> Field&
auto flags() const -> const Field&
auto flags() -> Field&
auto add(const ElementType*, idx_t nb_elements) -> idx_t
Add a new element type with given number of elements.
auto add(const ElementType*, idx_t nb_elements, const std::vector<idx_t>& node_connectivity) -> idx_t
Add a new element type with given number of elements and node-connectivity.
auto add(const ElementType*, idx_t nb_elements, const idx_t node_connectivity[]) -> idx_t
Add a new element type with given number of elements and node-connectivity.
auto add(const ElementType*, idx_t nb_elements, const idx_t node_connectivity[], bool fortran_array) -> idx_t
Add a new element type with given number of elements and node-connectivity.
auto add(const Elements&) -> idx_t
Add a new element type from existing Elements. Data will be copied.
auto add(const Field& field) -> Field
void remove_field(const std::string& name)
void insert(idx_t type_idx, idx_t position, idx_t nb_elements = 1)
void updateDevice() const
void updateHost() const
void syncHostDevice() const
void clear()
auto footprint() const -> size_t
Return the memory footprint of the elements.

Function documentation

idx_t atlas::mesh::HybridElements::add(const ElementType*, idx_t nb_elements)

Add a new element type with given number of elements.

Returns type_idx of the added element type

idx_t atlas::mesh::HybridElements::add(const ElementType*, idx_t nb_elements, const std::vector<idx_t>& node_connectivity)

Add a new element type with given number of elements and node-connectivity.

Returns type_idx of the added element type

idx_t atlas::mesh::HybridElements::add(const ElementType*, idx_t nb_elements, const idx_t node_connectivity[])

Add a new element type with given number of elements and node-connectivity.

Returns type_idx of the added element type

idx_t atlas::mesh::HybridElements::add(const ElementType*, idx_t nb_elements, const idx_t node_connectivity[], bool fortran_array)

Add a new element type with given number of elements and node-connectivity.

Returns type_idx of the added element type

idx_t atlas::mesh::HybridElements::add(const Elements&)

Add a new element type from existing Elements. Data will be copied.

Returns type_idx of the added element type
This website is beyond its original expiry date and the content may be out of date. The site owner has been notified and may choose to extend the expiry date and remove this banner. If you have any questions about this, please visit our support portal.