Skip to content
Snippets Groups Projects
Commit ff5c8af4 authored by Christoph Lehmann's avatar Christoph Lehmann Committed by Dmitri Naumov
Browse files

[PL] Fixed IP data getter

parent 31dca22f
No related branches found
No related tags found
No related merge requests found
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
#include "BaseLib/DynamicSpan.h" #include "BaseLib/DynamicSpan.h"
#include "MathLib/KelvinVector.h" #include "MathLib/KelvinVector.h"
#include "MathLib/LinAlg/Eigen/EigenMapTools.h" #include "TransposeInPlace.h"
namespace ProcessLib namespace ProcessLib
{ {
...@@ -65,17 +65,25 @@ std::vector<double> const& getIntegrationPointKelvinVectorData( ...@@ -65,17 +65,25 @@ std::vector<double> const& getIntegrationPointKelvinVectorData(
return cache; return cache;
} }
//! Overload without \c cache argument.
//!
//! \note This function returns the data in transposed storage order compared to
//! the overloads that have a \c cache argument.
template <int DisplacementDim, typename IntegrationPointDataVector, template <int DisplacementDim, typename IntegrationPointDataVector,
typename MemberType> typename MemberType>
std::vector<double> getIntegrationPointKelvinVectorData( std::vector<double> getIntegrationPointKelvinVectorData(
IntegrationPointDataVector const& ip_data_vector, MemberType member) IntegrationPointDataVector const& ip_data_vector, MemberType member)
{ {
std::vector<double> ip_kelvin_vector_values; constexpr int kelvin_vector_size =
MathLib::KelvinVector::kelvin_vector_dimensions(DisplacementDim);
getIntegrationPointKelvinVectorData<DisplacementDim>(
ip_data_vector, member, ip_kelvin_vector_values);
return ip_kelvin_vector_values; return transposeInPlace<kelvin_vector_size>(
[&](std::vector<double>& values)
{
return getIntegrationPointKelvinVectorData<DisplacementDim>(
ip_data_vector, member, values);
;
});
} }
template <int DisplacementDim, typename IntegrationPointDataVector, template <int DisplacementDim, typename IntegrationPointDataVector,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment