From d3adea34c2262a90b10b401d515bfefe29674d50 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jacob=20St=C3=B8ren?= Date: Fri, 12 Jun 2015 10:38:57 +0200 Subject: [PATCH] Added a Tensor class skeleton --- .../GeoMech/GeoMechDataModel/CMakeLists.txt | 1 + .../GeoMech/GeoMechDataModel/cafTensor3D.h | 26 +++++++++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 ApplicationCode/GeoMech/GeoMechDataModel/cafTensor3D.h diff --git a/ApplicationCode/GeoMech/GeoMechDataModel/CMakeLists.txt b/ApplicationCode/GeoMech/GeoMechDataModel/CMakeLists.txt index 0716337f52..c4d8af488c 100644 --- a/ApplicationCode/GeoMech/GeoMechDataModel/CMakeLists.txt +++ b/ApplicationCode/GeoMech/GeoMechDataModel/CMakeLists.txt @@ -31,6 +31,7 @@ add_library( ${PROJECT_NAME} RigFemPartGrid.cpp RigFemResultAddress.h RigFemResultPosEnum.h + cafTensor3D.h ) target_link_libraries( ${PROJECT_NAME} LibCore ResultStatisticsCache) \ No newline at end of file diff --git a/ApplicationCode/GeoMech/GeoMechDataModel/cafTensor3D.h b/ApplicationCode/GeoMech/GeoMechDataModel/cafTensor3D.h new file mode 100644 index 0000000000..04290183cc --- /dev/null +++ b/ApplicationCode/GeoMech/GeoMechDataModel/cafTensor3D.h @@ -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 Ten3Df; + +} + +