typename SymmetricTensorAccessors::
StorageType<2, dim, Number>::base_tensor_type &data)
{
+ static_assert(dim <= 3, "The selected dimension is not yet supported.");
+
// 1d is very simple and done first
if (dim == 1)
return data[0];
// We cannot return a static variable, as this class must support number
// types that require no instances of the number type to be in scope during
// a reinitialization procedure (e.g. ADOL-C adtl::adouble).
- Assert(false, ExcInternalError());
return data[0];
}
const typename SymmetricTensorAccessors::
StorageType<2, dim, Number>::base_tensor_type &data)
{
+ static_assert(dim <= 3, "The selected dimension is not yet supported.");
+
// 1d is very simple and done first
if (dim == 1)
return data[0];
// We cannot return a static variable, as this class must support number
// types that require no instances of the number type to be in scope during
// a reinitialization procedure (e.g. ADOL-C adtl::adouble).
- Assert(false, ExcInternalError());
return data[0];
}
typename SymmetricTensorAccessors::
StorageType<4, dim, Number>::base_tensor_type &data)
{
+ static_assert(dim <= 3, "The selected dimension is not yet supported.");
+
switch (dim)
{
case 1:
// We cannot return a static variable, as this class must support number
// types that require no instances of the number type to be in scope during
// a reinitialization procedure (e.g. ADOL-C adtl::adouble).
- Assert(false, ExcInternalError());
return data[0][0];
}
const typename SymmetricTensorAccessors::
StorageType<4, dim, Number>::base_tensor_type &data)
{
+ static_assert(dim <= 3, "The selected dimension is not yet supported.");
+
switch (dim)
{
case 1:
// We cannot return a static variable, as this class must support number
// types that require no instances of the number type to be in scope during
// a reinitialization procedure (e.g. ADOL-C adtl::adouble).
- Assert(false, ExcInternalError());
return data[0][0];
}