mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Added a Tensor class skeleton
This commit is contained in:
parent
b5cfa8ab53
commit
d3adea34c2
@ -31,6 +31,7 @@ add_library( ${PROJECT_NAME}
|
||||
RigFemPartGrid.cpp
|
||||
RigFemResultAddress.h
|
||||
RigFemResultPosEnum.h
|
||||
cafTensor3D.h
|
||||
)
|
||||
|
||||
target_link_libraries( ${PROJECT_NAME} LibCore ResultStatisticsCache)
|
26
ApplicationCode/GeoMech/GeoMechDataModel/cafTensor3D.h
Normal file
26
ApplicationCode/GeoMech/GeoMechDataModel/cafTensor3D.h
Normal 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;
|
||||
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user