Loading...
Searching...
No Matches
memorized_disarray.h
Go to the documentation of this file.
#ifndef _RHEOLEF_MEMORIZED_DISARRAY_H
#define _RHEOLEF_MEMORIZED_DISARRAY_H
//
// utility:
// internal data area accessor: return
// _scalar_val
// _vector_val
// _tensor_val
// depending upon Value template parameter
// => allows generic programmation vs Value
//
// implementation note:
// template specialized accessor: use class-specialization
// since specialization is neither available for func and class-member
//
// ----------------------------------------------------------------------------
#include "rheolef/compiler_eigen.h"
namespace rheolef { namespace details {
// ----------------------------------------------------------------------------
// disarray-valued data
// ----------------------------------------------------------------------------
template <class T, class Value> struct memorized_disarray {};
#define _RHEOLEF_class_specialization(VALUE,MEMBER) \
template <class T> \
struct memorized_disarray<T,VALUE> { \
template <class Object> \
disarray<VALUE,typename Object::memory_type>& \
get (const Object& obj) const { \
return obj.MEMBER; \
} \
}; \
_RHEOLEF_class_specialization(T,_scalar_val)
_RHEOLEF_class_specialization(point_basic<T>,_vector_val)
_RHEOLEF_class_specialization(tensor_basic<T>,_tensor_val)
_RHEOLEF_class_specialization(tensor3_basic<T>,_tensor3_val)
_RHEOLEF_class_specialization(tensor4_basic<T>,_tensor4_val)
#undef _RHEOLEF_class_specialization
}} // namespace rheolef::details
#endif // _RHEOLEF_MEMORIZED_DISARRAY_H
T
Expr1::float_type T
Definition field_expr.h:230
_RHEOLEF_class_specialization
#define _RHEOLEF_class_specialization(VALUE, MEMBER)
Definition memorized_value.h:50
rheolef
This file is part of Rheolef.
Definition compiler_eigen.h:39
rheolef::details::memorized_disarray
Definition memorized_disarray.h:44