Dune::Copasi
Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
Dune::Copasi::CellData< GV, T > Class Template Reference

Container for cell data of a grid view. More...

#include <cell_data.hh>

Public Types

using GridView = GV
 
using Entity = typename GridView::template Codim<0>::Entity
 

Public Member Functions

 CellData (GridView grid_view)
 
std::unique_ptr< CellData< typename GV::Grid::LeafGridView, T > > makeLeafGridViewCellData () const
 creates a cell data object with a copy data for the leaf grid view
 
std::size_t capacity () const noexcept
 Number of elements per entity that the container has currently allocated space for.
 
std::size_t size () const noexcept
 Number of elements per entity in the container.
 
std::size_t max_size () const noexcept
 Number of elements per entity that the container can ever hold container.
 
std::size_t gridview_size () const noexcept
 The size of the gridview - This gives the number of elements in the grid view.
 
const std::vector< std::string > & keys () const noexcept
 Return the keys of the cell data.
 
void reserve (std::size_t new_cap)
 Reservers new_cap elements per entity in the container.
 
void shrink_to_fit ()
 
template<std::ranges::input_range R, class Proj = std::identity, std::indirect_unary_predicate< std::projected< std::ranges::iterator_t< R >, Proj > > Pred>
requires std::assignable_from<T&, std::ranges::range_value_t<R>>
void addData (std::string_view key, R &&r, Pred pred, Proj proj={})
 
template<std::ranges::input_range R>
requires std::assignable_from<T&, std::ranges::range_value_t<R>>
void addData (std::string_view key, R &&r)
 
template<std::ranges::input_range R, class Proj = std::identity, std::indirect_unary_predicate< std::projected< std::ranges::iterator_t< R >, Proj > > Pred>
requires std::assignable_from<T&, std::tuple_element_t<1, std::ranges::range_value_t<R>>>
void addData (std::string_view key, R &&r, Pred pred, Proj proj={})
 
template<std::ranges::input_range R>
requires std::assignable_from<T&, std::tuple_element_t<1, std::ranges::range_value_t<R>>>
void addData (std::string_view key, R &&r)
 
void getData (const Concept::IndexableEntity< IndexSet > auto &entity, std::vector< T > &cell_data, std::vector< bool > &cell_mask) const
 
std::optional< TgetData (std::size_t id, const Concept::IndexableEntity< IndexSet > auto &entity) const
 
std::optional< TgetData (std::string_view key, const Concept::IndexableEntity< IndexSet > auto &entity) const
 

Detailed Description

template<Dune::Concept::GridView GV, class T>
class Dune::Copasi::CellData< GV, T >

Container for cell data of a grid view.

Template Parameters
GVThe grid view type
TThe data type to store

Member Typedef Documentation

◆ Entity

template<Dune::Concept::GridView GV, class T >
using Dune::Copasi::CellData< GV, T >::Entity = typename GridView::template Codim<0>::Entity

◆ GridView

template<Dune::Concept::GridView GV, class T >
using Dune::Copasi::CellData< GV, T >::GridView = GV

Constructor & Destructor Documentation

◆ CellData()

template<Dune::Concept::GridView GV, class T >
CellData< typename GV::Grid::LevelGridView, T > ( GridView grid_view)
inlineexplicit

Member Function Documentation

◆ addData() [1/4]

template<Dune::Concept::GridView GV, class T >
template<std::ranges::input_range R>
requires std::assignable_from<T&, std::ranges::range_value_t<R>>
void Dune::Copasi::CellData< GV, T >::addData ( std::string_view key,
R && r )
inline

◆ addData() [2/4]

template<Dune::Concept::GridView GV, class T >
template<std::ranges::input_range R>
requires std::assignable_from<T&, std::tuple_element_t<1, std::ranges::range_value_t<R>>>
void Dune::Copasi::CellData< GV, T >::addData ( std::string_view key,
R && r )
inline

◆ addData() [3/4]

template<Dune::Concept::GridView GV, class T >
template<std::ranges::input_range R, class Proj = std::identity, std::indirect_unary_predicate< std::projected< std::ranges::iterator_t< R >, Proj > > Pred>
requires std::assignable_from<T&, std::ranges::range_value_t<R>>
void Dune::Copasi::CellData< GV, T >::addData ( std::string_view key,
R && r,
Pred pred,
Proj proj = {} )
inline

◆ addData() [4/4]

template<Dune::Concept::GridView GV, class T >
template<std::ranges::input_range R, class Proj = std::identity, std::indirect_unary_predicate< std::projected< std::ranges::iterator_t< R >, Proj > > Pred>
requires std::assignable_from<T&, std::tuple_element_t<1, std::ranges::range_value_t<R>>>
void Dune::Copasi::CellData< GV, T >::addData ( std::string_view key,
R && r,
Pred pred,
Proj proj = {} )
inline

◆ capacity()

template<Dune::Concept::GridView GV, class T >
std::size_t Dune::Copasi::CellData< GV, T >::capacity ( ) const
inlinenoexcept

Number of elements per entity that the container has currently allocated space for.

◆ getData() [1/3]

template<Dune::Concept::GridView GV, class T >
void Dune::Copasi::CellData< GV, T >::getData ( const Concept::IndexableEntity< IndexSet > auto & entity,
std::vector< T > & cell_data,
std::vector< bool > & cell_mask ) const
inline

◆ getData() [2/3]

template<Dune::Concept::GridView GV, class T >
std::optional< T > Dune::Copasi::CellData< GV, T >::getData ( std::size_t id,
const Concept::IndexableEntity< IndexSet > auto & entity ) const
inline

◆ getData() [3/3]

template<Dune::Concept::GridView GV, class T >
std::optional< T > Dune::Copasi::CellData< GV, T >::getData ( std::string_view key,
const Concept::IndexableEntity< IndexSet > auto & entity ) const
inline

◆ gridview_size()

template<Dune::Concept::GridView GV, class T >
std::size_t Dune::Copasi::CellData< GV, T >::gridview_size ( ) const
inlinenoexcept

The size of the gridview - This gives the number of elements in the grid view.

◆ keys()

template<Dune::Concept::GridView GV, class T >
const std::vector< std::string > & Dune::Copasi::CellData< GV, T >::keys ( ) const
inlinenoexcept

Return the keys of the cell data.

◆ makeLeafGridViewCellData()

template<Dune::Concept::GridView GV, class T >
std::unique_ptr< CellData< typename GV::Grid::LeafGridView, T > > Dune::Copasi::CellData< GV, T >::makeLeafGridViewCellData ( ) const
inline

creates a cell data object with a copy data for the leaf grid view

Create cell data for leaf grid view

Makes a copy of this CellData into another CellData that operates in the leaf grid view

Returns
std::unique_ptr<CellData<typename GV::Grid::LeafGridView, T>> Cell data for leaf grid view

◆ max_size()

template<Dune::Concept::GridView GV, class T >
std::size_t Dune::Copasi::CellData< GV, T >::max_size ( ) const
inlinenoexcept

Number of elements per entity that the container can ever hold container.

◆ reserve()

template<Dune::Concept::GridView GV, class T >
void Dune::Copasi::CellData< GV, T >::reserve ( std::size_t new_cap)
inline

Reservers new_cap elements per entity in the container.

◆ shrink_to_fit()

template<Dune::Concept::GridView GV, class T >
void Dune::Copasi::CellData< GV, T >::shrink_to_fit ( )
inline

◆ size()

template<Dune::Concept::GridView GV, class T >
std::size_t Dune::Copasi::CellData< GV, T >::size ( ) const
inlinenoexcept

Number of elements per entity in the container.


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