gmsh-TingyuanDoc  0.1
An Open-Source Timing-driven Analytical Mixed-size FPGA Placer
STensor63.h
Go to the documentation of this file.
1 // Gmsh - Copyright (C) 1997-2022 C. Geuzaine, J.-F. Remacle
2 //
3 // See the LICENSE.txt file in the Gmsh root directory for license information.
4 // Please report all issues on https://gitlab.onelab.info/gmsh/gmsh/issues.
5 #ifndef STENSOR63_H_
6 #define STENSOR63_H_
7 
8 class STensor63 {
9 protected:
10  double _val[3][3][3][3][3][3];
11 
12 public:
13  STensor63(const double val = 0);
14  STensor63(const STensor63 &src);
15  inline double &operator()(int i, int j, int k, int l, int m, int n)
16  {
17  return _val[i][j][k][l][m][n];
18  };
19  inline double operator()(int i, int j, int k, int l, int m, int n) const
20  {
21  return _val[i][j][k][l][m][n];
22  };
23  STensor63 &operator=(const STensor63 &other)
24  {
25  for(int i = 0; i < 3; i++)
26  for(int j = 0; j < 3; j++)
27  for(int k = 0; k < 3; k++)
28  for(int l = 0; l < 3; l++)
29  for(int m = 0; m < 3; m++)
30  for(int n = 0; n < 3; n++)
31  _val[i][j][k][l][m][n] = other._val[i][j][k][l][m][n];
32  return *this;
33  };
35  {
36  for(int i = 0; i < 3; i++)
37  for(int j = 0; j < 3; j++)
38  for(int k = 0; k < 3; k++)
39  for(int l = 0; l < 3; l++)
40  for(int m = 0; m < 3; m++)
41  for(int n = 0; n < 3; n++)
42  _val[i][j][k][l][m][n] += other._val[i][j][k][l][m][n];
43  return *this;
44  };
46  {
47  for(int i = 0; i < 3; i++)
48  for(int j = 0; j < 3; j++)
49  for(int k = 0; k < 3; k++)
50  for(int l = 0; l < 3; l++)
51  for(int m = 0; m < 3; m++)
52  for(int n = 0; n < 3; n++)
53  _val[i][j][k][l][m][n] -= other._val[i][j][k][l][m][n];
54  return *this;
55  };
56  STensor63 &operator*=(const double &other)
57  {
58  for(int i = 0; i < 3; i++)
59  for(int j = 0; j < 3; j++)
60  for(int k = 0; k < 3; k++)
61  for(int l = 0; l < 3; l++)
62  for(int m = 0; m < 3; m++)
63  for(int n = 0; n < 3; n++) _val[i][j][k][l][m][n] *= other;
64  return *this;
65  };
66 };
67 
68 #endif // STENSOR63_H_
STensor63::operator-=
STensor63 & operator-=(const STensor63 &other)
Definition: STensor63.h:45
STensor63::_val
double _val[3][3][3][3][3][3]
Definition: STensor63.h:10
STensor63::operator=
STensor63 & operator=(const STensor63 &other)
Definition: STensor63.h:23
STensor63::operator()
double & operator()(int i, int j, int k, int l, int m, int n)
Definition: STensor63.h:15
STensor63::STensor63
STensor63(const double val=0)
Definition: STensor63.cpp:8
STensor63::operator+=
STensor63 & operator+=(const STensor63 &other)
Definition: STensor63.h:34
STensor63
Definition: STensor63.h:8
STensor63::operator*=
STensor63 & operator*=(const double &other)
Definition: STensor63.h:56
STensor63::operator()
double operator()(int i, int j, int k, int l, int m, int n) const
Definition: STensor63.h:19