PolyFEM
Loading...
Searching...
No Matches
polyfem::mesh::SortedIds Class Reference

Set of ids stored as a sorted vector: iterates in increasing order like std::set<int>, but uses a fraction of its memory for the short element lists of the non-conforming meshes. More...

#include <NCMeshStorage.hpp>

Public Types

using const_iterator = std::vector< int >::const_iterator
 

Public Member Functions

void insert (const int id)
 
size_t erase (const int id)
 Removes id; returns the number of removed ids (0 or 1).
 
size_t size () const
 
bool empty () const
 
void clear ()
 
const_iterator begin () const
 
const_iterator end () const
 
const_iterator cbegin () const
 
const_iterator cend () const
 

Private Attributes

std::vector< int > ids_
 

Detailed Description

Set of ids stored as a sorted vector: iterates in increasing order like std::set<int>, but uses a fraction of its memory for the short element lists of the non-conforming meshes.

Definition at line 18 of file NCMeshStorage.hpp.

Member Typedef Documentation

◆ const_iterator

using polyfem::mesh::SortedIds::const_iterator = std::vector<int>::const_iterator

Definition at line 21 of file NCMeshStorage.hpp.

Member Function Documentation

◆ begin()

const_iterator polyfem::mesh::SortedIds::begin ( ) const
inline

Definition at line 44 of file NCMeshStorage.hpp.

References ids_.

◆ cbegin()

const_iterator polyfem::mesh::SortedIds::cbegin ( ) const
inline

Definition at line 46 of file NCMeshStorage.hpp.

References ids_.

Referenced by polyfem::mesh::NCMesh2D::ncBoundary::get_element(), and polyfem::mesh::NCMesh3D::ncBoundary::get_element().

Here is the caller graph for this function:

◆ cend()

const_iterator polyfem::mesh::SortedIds::cend ( ) const
inline

Definition at line 47 of file NCMeshStorage.hpp.

References ids_.

◆ clear()

void polyfem::mesh::SortedIds::clear ( )
inline

Definition at line 42 of file NCMeshStorage.hpp.

References ids_.

◆ empty()

bool polyfem::mesh::SortedIds::empty ( ) const
inline

Definition at line 41 of file NCMeshStorage.hpp.

References ids_.

◆ end()

const_iterator polyfem::mesh::SortedIds::end ( ) const
inline

Definition at line 45 of file NCMeshStorage.hpp.

References ids_.

◆ erase()

size_t polyfem::mesh::SortedIds::erase ( const int  id)
inline

Removes id; returns the number of removed ids (0 or 1).

Definition at line 31 of file NCMeshStorage.hpp.

References ids_.

Referenced by polyfem::mesh::NCMesh2D::ncBoundary::remove_element(), polyfem::mesh::NCMesh3D::ncVert::remove_element(), and polyfem::mesh::NCMesh3D::ncBoundary::remove_element().

Here is the caller graph for this function:

◆ insert()

void polyfem::mesh::SortedIds::insert ( const int  id)
inline

Definition at line 23 of file NCMeshStorage.hpp.

References ids_.

Referenced by polyfem::mesh::NCMesh2D::ncBoundary::add_element(), polyfem::mesh::NCMesh3D::ncVert::add_element(), polyfem::mesh::NCMesh3D::ncBoundary::add_element(), and polyfem::mesh::NCMesh3D::append().

Here is the caller graph for this function:

◆ size()

size_t polyfem::mesh::SortedIds::size ( ) const
inline

Definition at line 40 of file NCMeshStorage.hpp.

References ids_.

Referenced by polyfem::mesh::NCMesh2D::ncBoundary::n_elem(), polyfem::mesh::NCMesh3D::ncVert::n_elem(), and polyfem::mesh::NCMesh3D::ncBoundary::n_elem().

Here is the caller graph for this function:

Member Data Documentation

◆ ids_

std::vector<int> polyfem::mesh::SortedIds::ids_
private

Definition at line 50 of file NCMeshStorage.hpp.

Referenced by begin(), cbegin(), cend(), clear(), empty(), end(), erase(), insert(), and size().


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