IgANet
IgANets - Isogeometric Analysis Networks
Loading...
Searching...
No Matches
iganet::utils::BlockTensorCore< T, Dims > Class Template Referenceabstract

Compile-time block tensor core. More...

#include </home/runner/work/iganet/iganet/include/utils/blocktensor.hpp>

Inheritance diagram for iganet::utils::BlockTensorCore< T, Dims >:
iganet::utils::FullQualifiedName

Public Member Functions

 BlockTensorCore ()=default
 Default constructor.
 
template<typename... Ts, std::size_t... dims>
 BlockTensorCore (BlockTensor< Ts, dims... > &&...other)
 Constructur from BlockTensor objects.
 
template<typename... Ts, std::size_t... dims>
 BlockTensorCore (BlockTensorCore< Ts, dims... > &&...other)
 Constructur from BlockTensorCore objects.
 
template<typename... Ts>
 BlockTensorCore (Ts &&...data)
 Constructor from variadic templates.
 
std::array< std::shared_ptr< T >,(Dims *...)> & data ()
 Returns a non-constant reference to the data array.
 
const std::array< std::shared_ptr< T >,(Dims *...)> & data () const
 Returns a constant reference to the data array.
 
T & operator() (std::size_t idx)
 Returns a non-constant reference to entry (idx)
 
const T & operator() (std::size_t idx) const
 Returns a constant reference to entry (idx)
 
std::shared_ptr< T > & operator[] (std::size_t idx)
 Returns a non-constant shared pointer to entry (idx)
 
const std::shared_ptr< T > & operator[] (std::size_t idx) const
 Returns a constant shared pointer to entry (idx)
 
virtual void pretty_print (std::ostream &os=Log(log::info)) const noexcept=0
 Returns a string representation of the BlockTensorCore object.
 
template<typename Data >
T & set (std::size_t idx, Data &&data)
 Stores the given data object at the given index.
 

Static Public Member Functions

template<std::size_t i>
static constexpr std::size_t dim ()
 Returns the i-th dimension.
 
static constexpr auto dims ()
 Returns all dimensions as array.
 
static constexpr std::size_t entries ()
 Returns the total number of entries.
 
static constexpr std::size_t size ()
 Returns the number of dimensions.
 

Protected Attributes

std::array< std::shared_ptr< T >,(Dims *...)> data_
 Array storing the data.
 
- Protected Attributes inherited from iganet::utils::FullQualifiedName
at::optional< std::string > name_
 String storing the full qualified name of the object.
 

Additional Inherited Members

- Protected Member Functions inherited from iganet::utils::FullQualifiedName
virtual const std::string & name () const noexcept
 Returns the full qualified name of the object.
 

Detailed Description

template<typename T, std::size_t... Dims>
class iganet::utils::BlockTensorCore< T, Dims >

Compile-time block tensor core.

Constructor & Destructor Documentation

◆ BlockTensorCore() [1/4]

template<typename T , std::size_t... Dims>
iganet::utils::BlockTensorCore< T, Dims >::BlockTensorCore ( )
default

Default constructor.

◆ BlockTensorCore() [2/4]

template<typename T , std::size_t... Dims>
template<typename... Ts, std::size_t... dims>
iganet::utils::BlockTensorCore< T, Dims >::BlockTensorCore ( BlockTensorCore< Ts, dims... > &&...  other)
inline

Constructur from BlockTensorCore objects.

◆ BlockTensorCore() [3/4]

template<typename T , std::size_t... Dims>
template<typename... Ts, std::size_t... dims>
iganet::utils::BlockTensorCore< T, Dims >::BlockTensorCore ( BlockTensor< Ts, dims... > &&...  other)
inline

Constructur from BlockTensor objects.

◆ BlockTensorCore() [4/4]

template<typename T , std::size_t... Dims>
template<typename... Ts>
iganet::utils::BlockTensorCore< T, Dims >::BlockTensorCore ( Ts &&...  data)
inlineexplicit

Constructor from variadic templates.

Member Function Documentation

◆ data() [1/2]

template<typename T , std::size_t... Dims>
std::array< std::shared_ptr< T >,(Dims *...)> & iganet::utils::BlockTensorCore< T, Dims >::data ( )
inline

Returns a non-constant reference to the data array.

◆ data() [2/2]

template<typename T , std::size_t... Dims>
const std::array< std::shared_ptr< T >,(Dims *...)> & iganet::utils::BlockTensorCore< T, Dims >::data ( ) const
inline

Returns a constant reference to the data array.

◆ dim()

template<typename T , std::size_t... Dims>
template<std::size_t i>
static constexpr std::size_t iganet::utils::BlockTensorCore< T, Dims >::dim ( )
inlinestaticconstexpr

Returns the i-th dimension.

◆ dims()

template<typename T , std::size_t... Dims>
static constexpr auto iganet::utils::BlockTensorCore< T, Dims >::dims ( )
inlinestaticconstexpr

Returns all dimensions as array.

◆ entries()

template<typename T , std::size_t... Dims>
static constexpr std::size_t iganet::utils::BlockTensorCore< T, Dims >::entries ( )
inlinestaticconstexpr

Returns the total number of entries.

◆ operator()() [1/2]

template<typename T , std::size_t... Dims>
T & iganet::utils::BlockTensorCore< T, Dims >::operator() ( std::size_t  idx)
inline

Returns a non-constant reference to entry (idx)

◆ operator()() [2/2]

template<typename T , std::size_t... Dims>
const T & iganet::utils::BlockTensorCore< T, Dims >::operator() ( std::size_t  idx) const
inline

Returns a constant reference to entry (idx)

◆ operator[]() [1/2]

template<typename T , std::size_t... Dims>
std::shared_ptr< T > & iganet::utils::BlockTensorCore< T, Dims >::operator[] ( std::size_t  idx)
inline

Returns a non-constant shared pointer to entry (idx)

◆ operator[]() [2/2]

template<typename T , std::size_t... Dims>
const std::shared_ptr< T > & iganet::utils::BlockTensorCore< T, Dims >::operator[] ( std::size_t  idx) const
inline

Returns a constant shared pointer to entry (idx)

◆ pretty_print()

template<typename T , std::size_t... Dims>
virtual void iganet::utils::BlockTensorCore< T, Dims >::pretty_print ( std::ostream &  os = Log(log::info)) const
inlinepure virtualnoexcept

◆ set()

template<typename T , std::size_t... Dims>
template<typename Data >
T & iganet::utils::BlockTensorCore< T, Dims >::set ( std::size_t  idx,
Data &&  data 
)
inline

Stores the given data object at the given index.

◆ size()

template<typename T , std::size_t... Dims>
static constexpr std::size_t iganet::utils::BlockTensorCore< T, Dims >::size ( )
inlinestaticconstexpr

Returns the number of dimensions.

Member Data Documentation

◆ data_

template<typename T , std::size_t... Dims>
std::array<std::shared_ptr<T>, (Dims * ...)> iganet::utils::BlockTensorCore< T, Dims >::data_
protected

Array storing the data.


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