FEDEM Solver  R8.0
Source code of the dynamics solver
FFaTensorTransforms.H
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: 2023 SAP SE
2 //
3 // SPDX-License-Identifier: Apache-2.0
4 //
5 // This file is part of FEDEM - https://openfedem.org
7 
13 #ifndef FFA_TENSOR_TRANSFORMS_H
14 #define FFA_TENSOR_TRANSFORMS_H
15 
16 
18 {
20  double vonMises(int N, const double* S);
22  double vonMises(double s11, double s22, double s12);
24  double vonMises(double s11, double s22, double s33,
25  double s12, double s13, double s23);
26 
28  int principalDirs(int N, const double* S, double* pVals, double* pDirs);
30  int principalDirs(const double* S,
31  double* pVal, double* p1Dir, double* p2Dir);
33  int principalDirs(const double* S,
34  double* pVal, double* p1Dir, double* p2Dir, double* p3Dir);
35 
37  bool principalValues(int N, const double* S, double* P);
39  bool principalVals2D(double s11, double s22, double s12, double* pVal);
41  bool principalVals3D(double s11, double s22, double s33,
42  double s12, double s13, double s23, double* pVal);
43 
45  double maxShearValue(double pMax, double pMin);
47  void maxShearDir (int N, const double* pMaxDir, const double* pMinDir,
48  double* maxShearDir);
49 
51  void rotate2D(const double* inTensor,
52  const double* rotMx,
53  double* outTensor);
55  void rotate (const double* inTensor,
56  const double* eX, const double* eY,
57  double* outTensor);
59  void rotate3D(const double* inTensor,
60  const double* rotMx,
61  double* outTensor);
63  void rotate (const double* inTensor,
64  const double* eX, const double* eY, const double* eZ,
65  double* outTensor);
66 
68  void from2Dto3D(const double* tensor2D, double* tensor3D);
70  void from3Dto2D(const double* tensor3D, double* tensor2D);
71 }
72 
73 #endif
Various tensor transformation utilities.
Definition: FFaTensorTransforms.H:18
bool principalVals3D(double s11, double s22, double s33, double s12, double s13, double s23, double *pVal)
Calculates the principal values of a 3D tensor.
Definition: FFaTensorTransforms.C:267
void from2Dto3D(const double *tensor2D, double *tensor3D)
Plain 2D-to-3D tensor conversion.
Definition: FFaTensorTransforms.C:417
int principalDirs(int N, const double *S, double *pVals, double *pDirs)
Calculates the principal directions and values of a tensor.
Definition: FFaTensorTransforms.C:89
double maxShearValue(double pMax, double pMin)
Returns the maximum shear value.
Definition: FFaTensorTransforms.C:300
bool principalValues(int N, const double *S, double *P)
Calculates the principal values of a tensor.
Definition: FFaTensorTransforms.C:230
void rotate3D(const double *inTensor, const double *rotMx, double *outTensor)
Coordinate transformation for a 3D tensor.
Definition: FFaTensorTransforms.C:374
void from3Dto2D(const double *tensor3D, double *tensor2D)
Plain 3D-to-2D tensor conversion.
Definition: FFaTensorTransforms.C:431
bool principalVals2D(double s11, double s22, double s12, double *pVal)
Calculates the principal values of a 2D tensor.
Definition: FFaTensorTransforms.C:247
double vonMises(int N, const double *S)
Returns the von Mises value of a symmetric stress/strain tensor.
Definition: FFaTensorTransforms.C:55
void maxShearDir(int N, const double *pMaxDir, const double *pMinDir, double *maxShearDir)
Returns the direction of maximum shear.
Definition: FFaTensorTransforms.C:314
void rotate2D(const double *inTensor, const double *rotMx, double *outTensor)
Coordinate transformation for a 2D tensor.
Definition: FFaTensorTransforms.C:340
void rotate(const double *inTensor, const double *eX, const double *eY, double *outTensor)
Coordinate transformation for a 2D tensor.
Definition: FFaTensorTransforms.C:353