atlas
Public Types | Public Member Functions | Friends | List of all members
atlas::mesh::HybridElements Class Reference

HybridElements class that describes elements of different types. More...

#include <HybridElements.h>

Inheritance diagram for atlas::mesh::HybridElements:
Inheritance graph
[legend]
Collaboration diagram for atlas::mesh::HybridElements:
Collaboration graph
[legend]

Public Types

typedef MultiBlockConnectivity Connectivity
 

Public Member Functions

idx_t size () const
 Number of elements.
 
idx_t nb_nodes (idx_t elem_idx) const
 Number of nodes for given element.
 
idx_t nb_edges (idx_t elem_idx) const
 Number of edges for given element.
 
idx_t type_idx (idx_t elem_idx) const
 Element type index for given element.
 
const std::string & name (idx_t elem_idx) const
 Element type name for given element.
 
const HybridElements::Connectivitynode_connectivity () const
 Element to Node connectivity table.
 
HybridElements::Connectivitynode_connectivity ()
 
const HybridElements::Connectivityedge_connectivity () const
 Element to Edge connectivity table.
 
HybridElements::Connectivityedge_connectivity ()
 
const HybridElements::Connectivitycell_connectivity () const
 Element to Cell connectivity table.
 
HybridElements::Connectivitycell_connectivity ()
 
idx_t nb_types () const
 Number of types present in HybridElements.
 
const ElementTypeelement_type (idx_t type_idx) const
 The element_type description for given type.
 
const Elementselements (idx_t type_idx) const
 Sub-elements convenience class for given type This allows optimized access to connectivities and loops. More...
 
Elementselements (idx_t type_idx)
 
const Fieldfield (const std::string &name) const
 
Fieldfield (const std::string &name)
 
bool has_field (const std::string &name) const
 
const Fieldfield (idx_t) const
 
Fieldfield (idx_t)
 
idx_t nb_fields () const
 
const util::Metadatametadata () const
 
util::Metadatametadata ()
 
const Fieldglobal_index () const
 
Fieldglobal_index ()
 
const Fieldremote_index () const
 
Fieldremote_index ()
 
const Fieldpartition () const
 
Fieldpartition ()
 
const Fieldhalo () const
 
Fieldhalo ()
 
const Fieldflags () const
 
Fieldflags ()
 
idx_t add (const ElementType *, idx_t nb_elements)
 Add a new element type with given number of elements. More...
 
idx_t 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. More...
 
idx_t 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. More...
 
idx_t 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. More...
 
idx_t add (const Elements &)
 Add a new element type from existing Elements. More...
 
Field add (const 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 ()
 
size_t footprint () const
 Return the memory footprint of the elements.
 

Friends

class Elements
 

Detailed Description

HybridElements class that describes elements of different types.

Member Function Documentation

◆ add() [1/5]

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

Add a new element type with given number of elements.

Returns
type_idx of the added element type

◆ add() [2/5]

idx_t atlas::mesh::HybridElements::add ( const ElementType element_type,
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

◆ add() [3/5]

idx_t atlas::mesh::HybridElements::add ( const ElementType element_type,
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

◆ add() [4/5]

idx_t atlas::mesh::HybridElements::add ( const ElementType element_type,
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

◆ add() [5/5]

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

Add a new element type from existing Elements.

Data will be copied.

Returns
type_idx of the added element type

◆ elements()

const Elements & atlas::mesh::HybridElements::elements ( idx_t  type_idx) const
inline

Sub-elements convenience class for given type This allows optimized access to connectivities and loops.


The documentation for this class was generated from the following files: