Added a Tensor class skeleton

This commit is contained in:
Jacob Støren 2015-06-12 10:38:57 +02:00
parent b5cfa8ab53
commit d3adea34c2
2 changed files with 27 additions and 0 deletions

View File

@ -31,6 +31,7 @@ add_library( ${PROJECT_NAME}
RigFemPartGrid.cpp
RigFemResultAddress.h
RigFemResultPosEnum.h
cafTensor3D.h
)
target_link_libraries( ${PROJECT_NAME} LibCore ResultStatisticsCache)

View File

@ -0,0 +1,26 @@
#pragma once
namespace caf
{
template< typename S>
class Tensor3D
{
S v[6];
public:
void setFromAbaqusLayout(S* tensorData)
{
v[0] = tensorData[0];
v[1] = tensorData[1];
v[2] = tensorData[2];
v[3] = tensorData[3];
v[4] = tensorData[4];
v[5] = tensorData[5];
}
};
typedef Tensor3D<float> Ten3Df;
}