NeoFOAM
WIP Prototype of a modern OpenFOAM core
Loading...
Searching...
No Matches
Public Member Functions | List of all members
NeoFOAM::SegmentedField< ValueType, IndexType > Class Template Reference

Data structure that stores a segmented fields or a vector of vectors. More...

#include <segmentedField.hpp>

Public Member Functions

 SegmentedField (const Executor &exec, size_t size, size_t numSegments)
 Create a segmented field with a given size and number of segments.
 
 SegmentedField (const Field< IndexType > &intervals)
 
 SegmentedField (const Field< ValueType > &values, const Field< IndexType > &segments)
 Constructor to create a segmentedField from values and the segments.
 
const Executorexec () const
 Get the executor associated with the segmented field.
 
size_t size () const
 Get the size of the segmented field.
 
size_t numSegments () const
 Get the number of segments in the segmented field.
 
SegmentedFieldView< ValueType, IndexType > view () &
 get a view of the segmented field
 
SegmentedFieldView< ValueType, IndexType > view () &&=delete
 
std::pair< std::span< ValueType >, std::span< IndexType > > spans () &
 get the combined value and range spans of the segmented field
 
std::pair< std::span< ValueType >, std::span< IndexType > > spans () &&=delete
 
const Field< ValueType > & values () const
 
const Field< IndexType > & segments () const
 

Detailed Description

template<typename ValueType, typename IndexType>
class NeoFOAM::SegmentedField< ValueType, IndexType >

Data structure that stores a segmented fields or a vector of vectors.

Definition at line 121 of file segmentedField.hpp.

Constructor & Destructor Documentation

◆ SegmentedField() [1/3]

template<typename ValueType , typename IndexType >
NeoFOAM::SegmentedField< ValueType, IndexType >::SegmentedField ( const Executor exec,
size_t  size,
size_t  numSegments 
)
inline

Create a segmented field with a given size and number of segments.

Parameters
execExecutor associated to the matrix
sizesize of the matrix
numSegmentsnumber of segments

Definition at line 132 of file segmentedField.hpp.

◆ SegmentedField() [2/3]

template<typename ValueType , typename IndexType >
NeoFOAM::SegmentedField< ValueType, IndexType >::SegmentedField ( const Field< IndexType > &  intervals)
inline

Definition at line 141 of file segmentedField.hpp.

◆ SegmentedField() [3/3]

template<typename ValueType , typename IndexType >
NeoFOAM::SegmentedField< ValueType, IndexType >::SegmentedField ( const Field< ValueType > &  values,
const Field< IndexType > &  segments 
)
inline

Constructor to create a segmentedField from values and the segments.

Parameters
valuesThe values of the segmented field.
segmentsThe segments of the segmented field.

Definition at line 155 of file segmentedField.hpp.

Member Function Documentation

◆ exec()

template<typename ValueType , typename IndexType >
const Executor & NeoFOAM::SegmentedField< ValueType, IndexType >::exec ( ) const
inline

Get the executor associated with the segmented field.

Returns
Reference to the executor.

Definition at line 166 of file segmentedField.hpp.

◆ numSegments()

template<typename ValueType , typename IndexType >
size_t NeoFOAM::SegmentedField< ValueType, IndexType >::numSegments ( ) const
inline

Get the number of segments in the segmented field.

Returns
The number of segments.

Definition at line 178 of file segmentedField.hpp.

◆ segments()

template<typename ValueType , typename IndexType >
const Field< IndexType > & NeoFOAM::SegmentedField< ValueType, IndexType >::segments ( ) const
inline

Definition at line 207 of file segmentedField.hpp.

◆ size()

template<typename ValueType , typename IndexType >
size_t NeoFOAM::SegmentedField< ValueType, IndexType >::size ( ) const
inline

Get the size of the segmented field.

Returns
The size of the segmented field.

Definition at line 172 of file segmentedField.hpp.

◆ spans() [1/2]

template<typename ValueType , typename IndexType >
std::pair< std::span< ValueType >, std::span< IndexType > > NeoFOAM::SegmentedField< ValueType, IndexType >::spans ( ) &
inline

get the combined value and range spans of the segmented field

Returns
Combined value and range spans of the fields

Definition at line 197 of file segmentedField.hpp.

◆ spans() [2/2]

template<typename ValueType , typename IndexType >
std::pair< std::span< ValueType >, std::span< IndexType > > NeoFOAM::SegmentedField< ValueType, IndexType >::spans ( ) &&
delete

◆ values()

template<typename ValueType , typename IndexType >
const Field< ValueType > & NeoFOAM::SegmentedField< ValueType, IndexType >::values ( ) const
inline

Definition at line 205 of file segmentedField.hpp.

◆ view() [1/2]

template<typename ValueType , typename IndexType >
SegmentedFieldView< ValueType, IndexType > NeoFOAM::SegmentedField< ValueType, IndexType >::view ( ) &
inline

get a view of the segmented field

Returns
Span of the fields

Definition at line 185 of file segmentedField.hpp.

◆ view() [2/2]

template<typename ValueType , typename IndexType >
SegmentedFieldView< ValueType, IndexType > NeoFOAM::SegmentedField< ValueType, IndexType >::view ( ) &&
delete

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