gmsh-TingyuanDoc
0.1
An Open-Source Timing-driven Analytical Mixed-size FPGA Placer
|
Go to the documentation of this file.
32 for(
int i = 0; i < 6; i++)
_val[i] = m.
_val[i];
35 const double l2,
const double l3,
const SVector3 &t1,
39 static int _index[3][3] = {{0, 1, 3}, {1, 2, 4}, {3, 4, 5}};
51 for(
int i = 0; i < 6; i++) res.
_val[i] += other.
_val[i];
56 for(
int i = 0; i < 6; i++)
_val[i] += other.
_val[i];
61 for(
int i = 0; i < 6; i++)
_val[i] *= other;
67 void print(
const char *)
const;
73 return b.
x() * (m(0, 0) * a.
x() + m(1, 0) * a.
y() + m(2, 0) * a.
z()) +
74 b.
y() * (m(0, 1) * a.
x() + m(1, 1) * a.
y() + m(2, 1) * a.
z()) +
75 b.
z() * (m(0, 2) * a.
x() + m(1, 2) * a.
y() + m(2, 2) * a.
z());
91 const SMetric3 &m3,
const double u,
const double v);
94 const double v,
const double w);
112 for(
int i = 0; i < 9; i++)
_val[i] = other.
_val[i];
116 static int _index[3][3] = {{0, 1, 2}, {3, 4, 5}, {6, 7, 8}};
155 ((*this)(1, 1) * (*
this)(2, 2) - (*
this)(1, 2) * (*
this)(2, 1)) * udet;
157 -((*this)(1, 0) * (*
this)(2, 2) - (*
this)(1, 2) * (*
this)(2, 0)) * udet;
159 ((*this)(1, 0) * (*
this)(2, 1) - (*
this)(1, 1) * (*
this)(2, 0)) * udet;
161 -((*this)(0, 1) * (*
this)(2, 2) - (*
this)(0, 2) * (*
this)(2, 1)) * udet;
163 ((*this)(0, 0) * (*
this)(2, 2) - (*
this)(0, 2) * (*
this)(2, 0)) * udet;
165 -((*this)(0, 0) * (*
this)(2, 1) - (*
this)(0, 1) * (*
this)(2, 0)) * udet;
167 ((*this)(0, 1) * (*
this)(1, 2) - (*
this)(0, 2) * (*
this)(1, 1)) * udet;
169 -((*this)(0, 0) * (*
this)(1, 2) - (*
this)(0, 2) * (*
this)(1, 0)) * udet;
171 ((*this)(0, 0) * (*
this)(1, 1) - (*
this)(0, 1) * (*
this)(1, 0)) * udet;
177 for(
int i = 0; i < 3; i++)
178 for(
int j = 0; j < 3; j++) ithis(i, j) = (*this)(j, i);
183 for(
int i = 0; i < 9; i++)
_val[i] = other.
_val[i];
189 for(
int i = 0; i < 9; i++) res.
_val[i] += other.
_val[i];
194 for(
int i = 0; i < 9; i++)
_val[i] += other.
_val[i];
199 for(
int i = 0; i < 9; i++)
_val[i] *= other;
204 double a00 = 0., a01 = 0., a02 = 0., a10 = 0., a11 = 0., a12 = 0., a20 = 0.,
206 for(
int i = 0; i < 3; i++) {
207 a00 += (*this)(0, i) * other(i, 0);
208 a01 += (*this)(0, i) * other(i, 1);
209 a02 += (*this)(0, i) * other(i, 2);
210 a10 += (*this)(1, i) * other(i, 0);
211 a11 += (*this)(1, i) * other(i, 1);
212 a12 += (*this)(1, i) * other(i, 2);
213 a20 += (*this)(2, i) * other(i, 0);
214 a21 += (*this)(2, i) * other(i, 1);
215 a22 += (*this)(2, i) * other(i, 2);
230 for(
int i = 0; i < 9; i++)
_val[i] -= other.
_val[i];
235 for(
int i = 0; i < 9; i++)
_val[i] += other.
_val[i];
237 for(
int i = 0; i < 9; i++)
_val[i] += alpha * other.
_val[i];
243 for(
int i = 0; i < 9; i++) prod +=
_val[i] *
_val[i];
251 ((*
this)(1, 1) * (*
this)(2, 2) - (*
this)(1, 2) * (*
this)(2, 1)) -
253 ((*
this)(1, 0) * (*
this)(2, 2) - (*
this)(1, 2) * (*
this)(2, 0)) +
255 ((*
this)(1, 0) * (*
this)(2, 1) - (*
this)(1, 1) * (*
this)(2, 0)));
261 for(
int i = 0; i < 9; i++)
262 if(fabs(
_val[i]) > val) val = fabs(
_val[i]);
268 for(
int i = 0; i < 3; i++) {
269 for(
int j = 0; j < 3; j++) {
277 double p =
trace() / 3.;
285 void print(
const char *)
const;
291 for(
int i = 0; i < 3; i++)
292 for(
int j = 0; j < 3; j++)
c(i, j) = a(i) * b(j);
298 for(
int i = 0; i < 3; i++)
299 for(
int j = 0; j < 3; j++) prod += a(i, j) * b(i, j);
306 for(
int i = 0; i < 3; i++)
307 for(
int j = 0; j < 3; j++) temp[i] += t(i, j) * v[j];
314 for(
int i = 0; i < 3; i++)
315 for(
int j = 0; j < 3; j++) temp[j] += v[i] * t(i, j);
SVector3 operator*(const STensor3 &t, const SVector3 &v)
int getIndex(int i, int j) const
void print(const char *) const
SMetric3 & operator+=(const SMetric3 &other)
double dot(const SVector3 &a, const SMetric3 &m, const SVector3 &b)
void daxpy(const STensor3 &other, const double alpha=1.)
SMetric3(const double v=1.0)
double operator()(int i, int j) const
static double c(int i, int j, fullMatrix< double > &CA, const std::vector< SPoint3 > &P, const std::vector< SPoint3 > &Q)
double operator()(int i, int j) const
static void Error(const char *fmt,...)
void eig(fullMatrix< double > &V, fullVector< double > &S, bool s=false) const
SMetric3(const SMetric3 &m)
void tensprod(const SVector3 &a, const SVector3 &b, STensor3 &c)
SMetric3 interpolation(const SMetric3 &m1, const SMetric3 &m2, const double t)
STensor3 operator+(const STensor3 &other) const
double determinant() const
void getMat(fullMatrix< double > &mat) const
void print(const char *) const
int getIndex(int i, int j) const
SMetric3 intersection_conserveM1(const SMetric3 &m1, const SMetric3 &m2)
double & operator()(int i, int j)
SMetric3 & operator*=(const double &other)
STensor3 & operator*=(const double &other)
const double * data() const
double determinant() const
void operator-=(const STensor3 &other)
SMetric3 intersection_conserve_mostaniso(const SMetric3 &m1, const SMetric3 &m2)
STensor3(const STensor3 &other)
STensor3 & operator+=(const STensor3 &other)
void eig(fullMatrix< double > &V, fullVector< double > &S, bool s=false) const
double operator[](int i) const
SMetric3 intersection(const SMetric3 &m1, const SMetric3 &m2)
STensor3 & operator=(const STensor3 &other)
SMetric3 intersection_alauzet(const SMetric3 &m1, const SMetric3 &m2)
SMetric3 transform(fullMatrix< double > &V)
STensor3 & operator*=(const STensor3 &other)
void getMat(fullMatrix< double > &mat) const
void setMat(const fullMatrix< double > &mat)
STensor3(const double v=0.0)
double & operator()(int i, int j)
double & operator[](int i)
void setMat(const fullMatrix< double > &mat)
SMetric3 intersection_conserve_mostaniso_2d(const SMetric3 &m1, const SMetric3 &m2)
SMetric3 operator+(const SMetric3 &other) const
STensor3 transpose() const