gmsh-TingyuanDoc
0.1
An Open-Source Timing-driven Analytical Mixed-size FPGA Placer
|
Go to the documentation of this file.
14 std::vector<fullVector<T2> > vv;
17 int nbFF=vv[0].size();
21 for(
int i = 0; i < npts; i++)
23 const double u = GP[i].
pt[0];
const double v = GP[i].
pt[1];
const double w = GP[i].
pt[2];
24 const double weight = GP[i].
weight;
const double detJ = ele->
getJacobian(u, v, w, jac);
25 for(
int j = 0; j < nbFF; j++)
27 double contrib = weight * detJ;
28 vec(j) += contrib*vv[i](j);
36 a->get(ele,npts,GP,v);
37 b->get(ele,npts,GP,v2);
38 for (
int i=0;i<v2.
size();++i) v(i)+=v2(i);
45 for(
int i = 0; i < npts; i++)
47 const double u = GP[i].
pt[0];
const double v = GP[i].
pt[1];
const double w = GP[i].
pt[2];
48 const double weight = GP[i].
weight;
const double detJ = ele->
getJacobian(u, v, w, jac);
49 eval += weight * detJ;
56 for(
int i = 0; i < npts; i++)
73 for(
int i = 0; i < npts; i++){
74 const double u = GP[i].
pt[0];
const double v = GP[i].
pt[1];
const double w = GP[i].
pt[2];
75 const double weight = GP[i].
weight;
const double detJ = ele->
getJacobian(u, v, w, jac);
76 std::vector<typename TensorialTraits<T1>::GradType> Grads;
78 for(
int j = 0; j < nbFF; j++)
80 for(
int k = j; k < nbFF; k++)
82 double contrib = weight * detJ *
dot(Grads[j], Grads[k]) * diffusivity;
84 if(j != k) m(k, j) += contrib;
97 for(
int i = 0; i < npts; i++){
98 const double u = GP[i].
pt[0];
const double v = GP[i].
pt[1];
const double w = GP[i].
pt[2];
99 const double weight = GP[i].
weight;
const double detJ = ele->
getJacobian(u, v, w, jac);
100 std::vector<typename TensorialTraits<T1>::ValType> Vals;
103 ele->
pnt(u, v, w, p);
105 for(
int j = 0; j < nbFF ; ++j)
107 m(j) +=
dot(Vals[j], load) * weight * detJ;
121 a->get(ele,npts,GP,va);
122 b->get(ele,npts,GP,vb);
125 for (
int i=0;i<va.
size();++i)
126 for (
int j=0;j<vb.
size();++j)
127 m(i,j)=
dot(va(i),vb(j));
138 std::vector<fullVector<T2> > va(npts);
139 std::vector<fullVector<T2> > vb(npts);
140 std::vector<typename TensorialTraits<T2>::TensProdType> tens(npts);
143 c->get(ele,npts,GP,tens);
144 for (
int k=0;k<npts;k++)
146 mv[k].resize(va[k].size(), vb[k].size());
147 for (
int i=0;i<va[k].size();++i)
148 for (
int j=0;j<vb[k].size();++j)
149 mv[k](i,j)=
dot(va[k](i),tens[k]*vb[k](j));
181 for(
int i = 0; i < npts; i++)
183 vvec[i].resize(nbFF);
184 std::vector<typename TensorialTraits<T1>::GradType> Grads;
185 const double u = GP[i].
pt[0];
const double v = GP[i].
pt[1];
const double w = GP[i].
pt[2];
187 for(
int j = 0; j < nbFF; j++)
189 vvec[i](j) = Grads[j];
201 for(
int i = 0; i < npts; i++)
203 double u = GP[i].
pt[0];
double v = GP[i].
pt[1];
double w = GP[i].
pt[2];
204 const double weight = GP[i].
weight;
const double detJ = ele->
getJacobian(u, v, w, jac);
205 std::vector<typename TensorialTraits<T1>::ValType> Vals;
206 std::vector<TensorialTraits<double>::ValType> ValsT;
209 for(
int j = 0; j < nbFF1; j++)
211 for(
int k = 0; k < nbFF2; k++)
213 m(j, k) +=
dot(Vals[j], _d) * ValsT[k] * weight * detJ;
225 for(
int i = 0; i < npts; i++)
227 double u = GP[i].
pt[0];
double v = GP[i].
pt[1];
double w = GP[i].
pt[2];
228 const double weight = GP[i].
weight;
const double detJ = ele->
getJacobian(u, v, w, jac);
229 std::vector<typename TensorialTraits<T1>::ValType> Vals;
235 ele->
pnt(u, v, w, p);
237 for(
int j = 0; j < nbFF ; ++j){
238 m(j) += _eqfac *
dot(Vals[j], load) * weight * detJ;
virtual void get(MElement *ele, int npts, IntPt *GP, fullMatrix< double > &m) const
double dot(const SVector3 &a, const SMetric3 &m, const SVector3 &b)
virtual void get(MElement *ele, int npts, IntPt *GP, T2 &val) const
virtual int getTypeForMSH() const
static double c(int i, int j, fullMatrix< double > &CA, const std::vector< SPoint3 > &P, const std::vector< SPoint3 > &Q)
void setAll(const scalar &m)
virtual MElement * getParent() const
void scale(const scalar s)
bool resize(int r, bool resetValue=true)
BilinearTermContract< T2 > operator|(const LinearTermBase< T2 > &L1, const LinearTermBase< T2 > &L2)
virtual void get(MElement *ele, int npts, IntPt *GP, fullVector< typename TensorialTraits< T1 >::GradType > &vec) const
virtual void get(MElement *ele, int npts, IntPt *GP, fullVector< double > &m) const
virtual void get(MElement *ele, int npts, IntPt *GP, fullVector< T2 > &v) const
virtual void get(MElement *ele, int npts, IntPt *GP, fullMatrix< double > &m) const
virtual void pnt(double u, double v, double w, SPoint3 &p) const
virtual void get(MElement *ele, int npts, IntPt *GP, fullVector< double > &m) const
virtual void get(MElement *ele, int npts, IntPt *GP, fullMatrix< double > &m) const
virtual void movePointFromParentSpaceToElementSpace(double &u, double &v, double &w) const
virtual void get(MElement *ele, int npts, IntPt *GP, fullMatrix< double > &m) const
virtual void get(MElement *ele, int npts, IntPt *GP, fullMatrix< double > &m) const
PlusTerm< T2 > operator+(const LinearTermBase< T2 > &other)
virtual double getJacobian(const fullMatrix< double > &gsf, double jac[3][3]) const
bool resize(int r, int c, bool resetValue=true)
void setAll(const scalar &m)
virtual void get(MElement *ele, int npts, IntPt *GP, fullVector< T2 > &v) const