v0.16.3
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Static Private Member Functions | List of all members
MoFEM::GetFTensor2FromArrayImpl< DIM1, DIM2, S, M > Struct Template Reference

Get FTensor2 from array. More...

#include "include/Templates.hpp"

Public Member Functions

 GetFTensor2FromArrayImpl ()=delete
 

Static Public Member Functions

static auto get (M &data, const size_t rr, const size_t cc=0)
 

Static Private Member Functions

template<size_t... Is>
static auto make (M &data, const size_t rr, const size_t cc, std::index_sequence< Is... >)
 

Detailed Description

template<int DIM1, int DIM2, int S, class M>
struct MoFEM::GetFTensor2FromArrayImpl< DIM1, DIM2, S, M >

Get FTensor2 from array.

Note
Generalize for other data types
Template Parameters
DIM1
DIM2
S
Parameters
data
Returns
FTensor::Tensor2<FTensor::PackPtr<T *, S>, DIM1, DIM2>

Definition at line 662 of file Templates.hpp.

Constructor & Destructor Documentation

◆ GetFTensor2FromArrayImpl()

template<int DIM1, int DIM2, int S, class M >
MoFEM::GetFTensor2FromArrayImpl< DIM1, DIM2, S, M >::GetFTensor2FromArrayImpl ( )
delete

Member Function Documentation

◆ get()

template<int DIM1, int DIM2, int S, class M >
static auto MoFEM::GetFTensor2FromArrayImpl< DIM1, DIM2, S, M >::get ( M &  data,
const size_t  rr,
const size_t  cc = 0 
)
inlinestatic

Definition at line 664 of file Templates.hpp.

664 {
665 return make(data, rr, cc, std::make_index_sequence<DIM1 * DIM2>{});
666 }
static auto make(M &data, const size_t rr, const size_t cc, std::index_sequence< Is... >)

◆ make()

template<int DIM1, int DIM2, int S, class M >
template<size_t... Is>
static auto MoFEM::GetFTensor2FromArrayImpl< DIM1, DIM2, S, M >::make ( M &  data,
const size_t  rr,
const size_t  cc,
std::index_sequence< Is... >   
)
inlinestaticprivate

Definition at line 670 of file Templates.hpp.

671 {
672 using T = std::remove_cv_t<std::remove_reference_t<decltype(data(0, 0))>>;
674 &data(rr + Is / DIM2, cc + Is % DIM2)...};
675 }
constexpr int DIM2
Definition level_set.cpp:22
constexpr int DIM1
Definition level_set.cpp:21

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