gmsh-TingyuanDoc  0.1
An Open-Source Timing-driven Analytical Mixed-size FPGA Placer
functionSpace.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 
6 #ifndef FUNCTION_SPACE_H
7 #define FUNCTION_SPACE_H
8 
9 #include "SVector3.h"
10 #include "STensor3.h"
11 #include "STensor33.h"
12 #include "STensor43.h"
13 #include <vector>
14 #include <iterator>
15 #include <iostream>
16 #include "Numeric.h"
17 #include "MElement.h"
18 #include "dofManager.h"
19 #include "simpleFunction.h"
20 
21 // class SVoid{};
22 template <class T> struct TensorialTraits {
23  typedef T ValType;
24  typedef T GradType[3];
25  typedef T HessType[3][3];
26  typedef T ThirdDevType[3][3][3];
27  /* typedef SVoid DivType;
28  typedef SVoid CurlType;*/
29 };
30 
31 template <> struct TensorialTraits<double> {
32  typedef double ValType;
33  typedef SVector3 GradType;
34  typedef STensor3 HessType;
35  typedef double TensProdType;
37  /* typedef SVoid DivType;
38  typedef SVoid CurlType;*/
39 };
40 
41 template <> struct TensorialTraits<SVector3> {
42  typedef SVector3 ValType;
43  typedef STensor3 GradType;
44  typedef STensor3 HessType;
47  // typedef double DivType;
48  // typedef SVector3 CurlType;
49 };
50 
51 template <> struct TensorialTraits<STensor3> {
52  typedef STensor3 ValType;
53  // typedef STensor3 GradType;
54  // typedef STensor3 HessType;
55  // typedef STensor3 TensProdType;
57  // typedef double DivType;
58  // typedef SVector3 CurlType;
59 };
60 
62 public:
63  virtual ~FunctionSpaceBase() {}
64  virtual int getId(void) const = 0;
65  virtual int
66  getNumKeys(MElement *ele) const = 0; // if one needs the number of dofs
67  virtual void getKeys(MElement *ele, std::vector<Dof> &keys) const = 0;
68  virtual void getKeysOnVertex(MElement *ele, MVertex *v,
69  const std::vector<int> &comp,
70  std::vector<Dof> &keys) const
71  {
73  "this function is defined to get Dofs of vertex %d on element %d",
74  v->getNum(), ele->getNum());
75  }
76  virtual FunctionSpaceBase *clone(const int id) const
77  {
78  return nullptr;
79  }; // copy space with new Id
80 };
81 
82 template <class T> class FunctionSpace : public FunctionSpaceBase {
83 protected:
84  int _iField; // field number (used to build dof keys)
85 public:
90  virtual int getId(void) const { return _iField; }
91  virtual void f(MElement *ele, double u, double v, double w,
92  std::vector<ValType> &vals) const = 0;
93  virtual void fuvw(MElement *ele, double u, double v, double w,
94  std::vector<ValType> &vals) const
95  {
96  } // should return to pure virtual once all is done.
97  virtual void gradf(MElement *ele, double u, double v, double w,
98  std::vector<GradType> &grads) const = 0;
99  virtual void gradfuvw(MElement *ele, double u, double v, double w,
100  std::vector<GradType> &grads) const
101  {
102  } // should return to pure virtual once all is done.
103  virtual void hessfuvw(MElement *ele, double u, double v, double w,
104  std::vector<HessType> &hess) const = 0;
105  virtual void hessf(MElement *ele, double u, double v, double w,
106  std::vector<HessType> &hess) const
107  {
108  } // need to high order fem
109  virtual void thirdDevfuvw(
110  MElement *ele, double u, double v, double w,
111  std::vector<ThirdDevType> &third) const {}; // need to high order fem
112  virtual void thirdDevf(
113  MElement *ele, double u, double v, double w,
114  std::vector<ThirdDevType> &third) const {}; // need to high order fem
115 
116  virtual int
117  getNumKeys(MElement *ele) const = 0; // if one needs the number of dofs
118  virtual void getKeys(MElement *ele, std::vector<Dof> &keys) const = 0;
119 };
120 
122 public:
126 
127 private:
128  virtual void getKeys(MVertex *ver, std::vector<Dof> &keys) const
129  {
130  keys.push_back(Dof(ver->getNum(), _iField));
131  }
132 
133 public:
135  virtual void f(MElement *ele, double u, double v, double w,
136  std::vector<ValType> &vals) const
137  {
138  if(ele->getParent()) {
139  if(ele->getTypeForMSH() == MSH_LIN_B ||
140  ele->getTypeForMSH() == MSH_TRI_B ||
141  ele->getTypeForMSH() == MSH_POLYG_B) { // FIXME MPolygonBorders...
143  }
144  }
145  int ndofs = ele->getNumShapeFunctions();
146  int curpos = vals.size();
147  vals.resize(curpos + ndofs);
148  ele->getShapeFunctions(u, v, w, &(vals[curpos]));
149  }
150  // Fonction renvoyant un vecteur contenant le grandient de chaque FF
151  virtual void gradf(MElement *ele, double u, double v, double w,
152  std::vector<GradType> &grads) const
153  {
154  if(ele->getParent()) {
155  if(ele->getTypeForMSH() == MSH_LIN_B ||
156  ele->getTypeForMSH() == MSH_TRI_B ||
157  ele->getTypeForMSH() == MSH_POLYG_B) { // FIXME MPolygonBorders...
159  }
160  }
161  int ndofs = ele->getNumShapeFunctions();
162  grads.reserve(grads.size() + ndofs);
163  double gradsuvw[256][3];
164  ele->getGradShapeFunctions(u, v, w, gradsuvw);
165  double jac[3][3];
166  double invjac[3][3];
167  ele->getJacobian(u, v, w,
168  jac); // redondant : on fait cet appel a l'exterieur
169  inv3x3(jac, invjac);
170  for(int i = 0; i < ndofs; ++i)
171  grads.push_back(
172  GradType(invjac[0][0] * gradsuvw[i][0] + invjac[0][1] * gradsuvw[i][1] +
173  invjac[0][2] * gradsuvw[i][2],
174  invjac[1][0] * gradsuvw[i][0] + invjac[1][1] * gradsuvw[i][1] +
175  invjac[1][2] * gradsuvw[i][2],
176  invjac[2][0] * gradsuvw[i][0] + invjac[2][1] * gradsuvw[i][1] +
177  invjac[2][2] * gradsuvw[i][2]));
178  }
179  // Fonction renvoyant un vecteur contenant le hessien [][] de chaque FF dans
180  // l'espace ISOPARAMETRIQUE
181  virtual void hessfuvw(MElement *ele, double u, double v, double w,
182  std::vector<HessType> &hess) const
183  {
184  if(ele->getParent()) {
185  if(ele->getTypeForMSH() == MSH_LIN_B ||
186  ele->getTypeForMSH() == MSH_TRI_B ||
187  ele->getTypeForMSH() == MSH_POLYG_B) { // FIXME MPolygonBorders...
189  }
190  }
191  int ndofs = ele->getNumShapeFunctions();
192  hess.reserve(hess.size() + ndofs); // permet de mettre les composantes
193  // suivantes à la suite du vecteur
194  double hessuvw[256][3][3];
195  ele->getHessShapeFunctions(u, v, w, hessuvw);
196  HessType hesst;
197  for(int i = 0; i < ndofs; ++i) {
198  hesst(0, 0) = hessuvw[i][0][0];
199  hesst(0, 1) = hessuvw[i][0][1];
200  hesst(0, 2) = hessuvw[i][0][2];
201  hesst(1, 0) = hessuvw[i][1][0];
202  hesst(1, 1) = hessuvw[i][1][1];
203  hesst(1, 2) = hessuvw[i][1][2];
204  hesst(2, 0) = hessuvw[i][2][0];
205  hesst(2, 1) = hessuvw[i][2][1];
206  hesst(2, 2) = hessuvw[i][2][2];
207  hess.push_back(hesst);
208  }
209  }
210  virtual void gradfuvw(MElement *ele, double u, double v, double w,
211  std::vector<GradType> &grads) const
212  {
213  if(ele->getParent()) {
214  if(ele->getTypeForMSH() == MSH_LIN_B ||
215  ele->getTypeForMSH() == MSH_TRI_B ||
216  ele->getTypeForMSH() == MSH_POLYG_B) { // FIXME MPolygonBorders...
218  }
219  }
220  int ndofs = ele->getNumShapeFunctions();
221  grads.reserve(grads.size() + ndofs);
222  double gradsuvw[256][3];
223  ele->getGradShapeFunctions(u, v, w, gradsuvw);
224  for(int i = 0; i < ndofs; ++i)
225  grads.push_back(GradType(gradsuvw[i][0], gradsuvw[i][1], gradsuvw[i][2]));
226  }
227  virtual int getNumKeys(MElement *ele) const
228  {
229  return ele->getNumShapeFunctions();
230  }
231  virtual void getKeys(MElement *ele,
232  std::vector<Dof> &keys) const // appends ...
233  {
234  int ndofs = ele->getNumShapeFunctions();
235  keys.reserve(keys.size() + ndofs);
236  for(int i = 0; i < ndofs; ++i) getKeys(ele->getShapeFunctionNode(i), keys);
237  }
238 };
239 
241 public:
245 
246 private:
247  virtual void getKeys(MVertex *ver, std::vector<Dof> &keys) const
248  {
249  keys.push_back(Dof(ver->getNum(), _iField));
250  }
251 
252 public:
254  virtual void f(MElement *ele, double u, double v, double w,
255  std::vector<ValType> &vals) const
256  {
257  if(ele->getParent()) ele = ele->getParent();
258  int ndofs = ele->getNumShapeFunctions();
259  int curpos = vals.size();
260  vals.resize(curpos + ndofs);
261  ele->getShapeFunctions(u, v, w, &(vals[curpos]));
262  }
263  // Fonction renvoyant un vecteur contenant le grandient de chaque FF
264  virtual void gradf(MElement *ele, double u, double v, double w,
265  std::vector<GradType> &grads) const
266  {
267  if(ele->getParent()) ele = ele->getParent();
268  int ndofs = ele->getNumShapeFunctions();
269  grads.reserve(grads.size() + ndofs);
270  double gradsuvw[256][3];
271  ele->getGradShapeFunctions(u, v, w, gradsuvw);
272  double jac[3][3];
273  double invjac[3][3];
274  ele->getJacobian(u, v, w,
275  jac); // redondant : on fait cet appel a l'exterieur
276  inv3x3(jac, invjac);
277  for(int i = 0; i < ndofs; ++i)
278  grads.push_back(
279  GradType(invjac[0][0] * gradsuvw[i][0] + invjac[0][1] * gradsuvw[i][1] +
280  invjac[0][2] * gradsuvw[i][2],
281  invjac[1][0] * gradsuvw[i][0] + invjac[1][1] * gradsuvw[i][1] +
282  invjac[1][2] * gradsuvw[i][2],
283  invjac[2][0] * gradsuvw[i][0] + invjac[2][1] * gradsuvw[i][1] +
284  invjac[2][2] * gradsuvw[i][2]));
285  }
286  // Fonction renvoyant un vecteur contenant le hessien [][] de chaque FF dans
287  // l'espace ISOPARAMETRIQUE
288  virtual void hessfuvw(MElement *ele, double u, double v, double w,
289  std::vector<HessType> &hess) const
290  {
291  if(ele->getParent()) ele = ele->getParent();
292  int ndofs = ele->getNumShapeFunctions();
293  hess.reserve(hess.size() + ndofs); // permet de mettre les composantes
294  // suivantes à la suite du vecteur
295  double hessuvw[256][3][3];
296  ele->getHessShapeFunctions(u, v, w, hessuvw);
297  HessType hesst;
298  for(int i = 0; i < ndofs; ++i) {
299  hesst(0, 0) = hessuvw[i][0][0];
300  hesst(0, 1) = hessuvw[i][0][1];
301  hesst(0, 2) = hessuvw[i][0][2];
302  hesst(1, 0) = hessuvw[i][1][0];
303  hesst(1, 1) = hessuvw[i][1][1];
304  hesst(1, 2) = hessuvw[i][1][2];
305  hesst(2, 0) = hessuvw[i][2][0];
306  hesst(2, 1) = hessuvw[i][2][1];
307  hesst(2, 2) = hessuvw[i][2][2];
308  hess.push_back(hesst);
309  }
310  }
311  virtual void gradfuvw(MElement *ele, double u, double v, double w,
312  std::vector<GradType> &grads) const
313  {
314  if(ele->getParent()) ele = ele->getParent();
315  int ndofs = ele->getNumShapeFunctions();
316  grads.reserve(grads.size() + ndofs);
317  double gradsuvw[256][3];
318  ele->getGradShapeFunctions(u, v, w, gradsuvw);
319  for(int i = 0; i < ndofs; ++i)
320  grads.push_back(GradType(gradsuvw[i][0], gradsuvw[i][1], gradsuvw[i][2]));
321  }
322  virtual void fuvw(MElement *ele, double u, double v, double w,
323  std::vector<ValType> &vals) const
324  {
325  if(ele->getParent()) ele = ele->getParent();
326  int ndofs = ele->getNumShapeFunctions();
327  vals.reserve(vals.size() + ndofs);
328  double valsuvw[1256];
329  ele->getShapeFunctions(u, v, w, valsuvw);
330  for(int i = 0; i < ndofs; ++i) vals.push_back(valsuvw[i]);
331  }
332  virtual int getNumKeys(MElement *ele) const
333  {
334  if(ele->getParent()) ele = ele->getParent();
335  return ele->getNumShapeFunctions();
336  }
337  virtual void getKeys(MElement *ele,
338  std::vector<Dof> &keys) const // appends ...
339  {
340  if(ele->getParent()) ele = ele->getParent();
341  int ndofs = ele->getNumShapeFunctions();
342  keys.reserve(keys.size() + ndofs);
343  for(int i = 0; i < ndofs; ++i) getKeys(ele->getShapeFunctionNode(i), keys);
344  }
345 };
346 
347 template <class T> class ScalarToAnyFunctionSpace : public FunctionSpace<T> {
348 public:
352 
353 protected:
354  std::vector<T> multipliers;
355  std::vector<int> comp;
357 
358 public:
359  template <class T2>
360  ScalarToAnyFunctionSpace(const T2 &SFS, const T &mult, int comp_)
361  : ScalarFS(new T2(SFS))
362  {
363  multipliers.push_back(mult);
364  comp.push_back(comp_);
365  }
366 
367  template <class T2>
368  ScalarToAnyFunctionSpace(const T2 &SFS, const T &mult1, int comp1_,
369  const T &mult2, int comp2_)
370  : ScalarFS(new T2(SFS))
371  {
372  multipliers.push_back(mult1);
373  multipliers.push_back(mult2);
374  comp.push_back(comp1_);
375  comp.push_back(comp2_);
376  }
377 
378  template <class T2>
379  ScalarToAnyFunctionSpace(const T2 &SFS, const T &mult1, int comp1_,
380  const T &mult2, int comp2_, const T &mult3,
381  int comp3_)
382  : ScalarFS(new T2(SFS))
383  {
384  multipliers.push_back(mult1);
385  multipliers.push_back(mult2);
386  multipliers.push_back(mult3);
387  comp.push_back(comp1_);
388  comp.push_back(comp2_);
389  comp.push_back(comp3_);
390  }
391 
392  virtual ~ScalarToAnyFunctionSpace() { delete ScalarFS; }
393 
394  virtual void f(MElement *ele, double u, double v, double w,
395  std::vector<ValType> &vals) const
396  {
397  std::vector<double> valsd;
398  ScalarFS->f(ele, u, v, w, valsd);
399  int nbdofs = valsd.size();
400  int nbcomp = comp.size();
401  int curpos = vals.size();
402  vals.reserve(curpos + nbcomp * nbdofs);
403  for(int j = 0; j < nbcomp; ++j) {
404  for(int i = 0; i < nbdofs; ++i) vals.push_back(multipliers[j] * valsd[i]);
405  }
406  }
407 
408  virtual void gradf(MElement *ele, double u, double v, double w,
409  std::vector<GradType> &grads) const
410  {
411  std::vector<SVector3> gradsd;
412  ScalarFS->gradf(ele, u, v, w, gradsd);
413  int nbdofs = gradsd.size();
414  int nbcomp = comp.size();
415  int curpos = grads.size();
416  grads.reserve(curpos + nbcomp * nbdofs);
417  GradType val;
418  for(int j = 0; j < nbcomp; ++j) {
419  for(int i = 0; i < nbdofs; ++i) {
420  tensprod(multipliers[j], gradsd[i], val);
421  grads.push_back(val);
422  }
423  }
424  }
425  virtual void hessfuvw(MElement *ele, double u, double v, double w,
426  std::vector<HessType> &hess) const
427  {
428  ScalarFS->hessfuvw(ele, u, v, w, hess);
429  }
430  virtual void gradfuvw(MElement *ele, double u, double v, double w,
431  std::vector<GradType> &grads) const
432  {
433  std::vector<SVector3> gradsd;
434  ScalarFS->gradfuvw(ele, u, v, w, gradsd);
435  int nbdofs = gradsd.size();
436  int nbcomp = comp.size();
437  int curpos = grads.size();
438  grads.reserve(curpos + nbcomp * nbdofs);
439  GradType val;
440  for(int j = 0; j < nbcomp; ++j) {
441  for(int i = 0; i < nbdofs; ++i) {
442  tensprod(multipliers[j], gradsd[i], val);
443  grads.push_back(val);
444  }
445  }
446  }
447 
448  virtual int getNumKeys(MElement *ele) const
449  {
450  return ScalarFS->getNumKeys(ele) * comp.size();
451  }
452 
453  virtual void getKeys(MElement *ele, std::vector<Dof> &keys) const
454  {
455  int nk = ScalarFS->getNumKeys(ele);
456  std::vector<Dof> bufk;
457  bufk.reserve(nk);
458  ScalarFS->getKeys(ele, bufk);
459  int nbdofs = bufk.size();
460  int nbcomp = comp.size();
461  int curpos = keys.size();
462  keys.reserve(curpos + nbcomp * nbdofs);
463  for(int j = 0; j < nbcomp; ++j) {
464  for(int i = 0; i < nk; ++i) {
465  int i1, i2;
466  Dof::getTwoIntsFromType(bufk[i].getType(), i1, i2);
467  keys.push_back(
468  Dof(bufk[i].getEntity(), Dof::createTypeWithTwoInts(comp[j], i1)));
469  }
470  }
471  }
472 };
473 
475  : public ScalarToAnyFunctionSpace<SVector3> {
476 protected:
477  static const SVector3 BasisVectors[3];
478 
479 public:
480  enum Along { VECTOR_X = 0, VECTOR_Y = 1, VECTOR_Z = 2 };
486  VECTOR_X, SVector3(0., 1., 0.), VECTOR_Y, SVector3(0., 0., 1.),
487  VECTOR_Z)
488  {
489  }
493  {
494  }
498  BasisVectors[comp2], comp2)
499  {
500  }
502  Along comp3)
505  BasisVectors[comp2], comp2, BasisVectors[comp3], comp3)
506  {
507  }
508 };
509 
511 protected:
512  static const SVector3 BasisVectors[3];
513 
514 public:
515  enum Along { VECTOR_X = 0, VECTOR_Y = 1, VECTOR_Z = 2 };
521  SVector3(0., 1., 0.), VECTOR_Y, SVector3(0., 0., 1.), VECTOR_Z)
522  {
523  }
526  ScalarLagrangeFunctionSpace(id), BasisVectors[comp1], comp1)
527  {
528  }
531  ScalarLagrangeFunctionSpace(id), BasisVectors[comp1], comp1,
532  BasisVectors[comp2], comp2)
533  {
534  }
535  VectorLagrangeFunctionSpace(int id, Along comp1, Along comp2, Along comp3)
537  ScalarLagrangeFunctionSpace(id), BasisVectors[comp1], comp1,
538  BasisVectors[comp2], comp2, BasisVectors[comp3], comp3)
539  {
540  }
541 };
542 
543 template <class T> class CompositeFunctionSpace : public FunctionSpace<T> {
544 public:
548  typedef typename std::vector<FunctionSpace<T> *>::iterator iterFS;
549 
550 protected:
551  std::vector<FunctionSpace<T> *> _spaces;
552 
553 public:
554  template <class T1> CompositeFunctionSpace(const T1 &t)
555  {
556  _spaces.push_back(new T1(t));
557  }
558  template <class T1, class T2>
559  CompositeFunctionSpace(const T1 &t1, const T2 &t2)
560  {
561  _spaces.push_back(new T1(t1));
562  _spaces.push_back(new T2(t2));
563  }
564  template <class T1, class T2, class T3>
565  CompositeFunctionSpace(const T1 &t1, const T2 &t2, const T3 &t3)
566  {
567  _spaces.push_back(new T1(t1));
568  _spaces.push_back(new T2(t2));
569  _spaces.push_back(new T3(t3));
570  }
571  template <class T1, class T2, class T3, class T4>
572  CompositeFunctionSpace(const T1 &t1, const T2 &t2, const T3 &t3, const T4 &t4)
573  {
574  _spaces.push_back(new T1(t1));
575  _spaces.push_back(new T2(t2));
576  _spaces.push_back(new T3(t3));
577  _spaces.push_back(new T4(t4));
578  }
579  template <class T1> void insert(const T1 &t) { _spaces.push_back(new T(t)); }
581  {
582  for(iterFS it = _spaces.begin(); it != _spaces.end(); ++it) delete(*it);
583  }
584  virtual void f(MElement *ele, double u, double v, double w,
585  std::vector<ValType> &vals) const
586  {
587  for(iterFS it = _spaces.begin(); it != _spaces.end(); ++it)
588  (*it)->f(ele, u, v, w, vals);
589  }
590 
591  virtual void gradf(MElement *ele, double u, double v, double w,
592  std::vector<GradType> &grads) const
593  {
594  for(iterFS it = _spaces.begin(); it != _spaces.end(); ++it)
595  (*it)->gradf(ele, u, v, w, grads);
596  }
597 
598  virtual void hessfuvw(MElement *ele, double u, double v, double w,
599  std::vector<HessType> &hess) const
600  {
601  for(iterFS it = _spaces.begin(); it != _spaces.end(); ++it)
602  (*it)->hessfuvw(ele, u, v, w, hess);
603  }
604 
605  virtual int getNumKeys(MElement *ele) const
606  {
607  int ndofs = 0;
608  for(iterFS it = _spaces.begin(); it != _spaces.end(); ++it)
609  ndofs += (*it)->getNumKeys(ele);
610  return ndofs;
611  }
612 
613  virtual void getKeys(MElement *ele, std::vector<Dof> &keys) const
614  {
615  for(iterFS it = _spaces.begin(); it != _spaces.end(); ++it)
616  (*it)->getKeys(ele, keys);
617  }
618 };
619 
620 template <class T> class xFemFunctionSpace : public FunctionSpace<T> {
621 public:
625 
626 protected:
629 
630 public:
631  virtual void hessfuvw(MElement *ele, double u, double v, double w,
632  std::vector<HessType> &hess) const
633  {
634  }
636  simpleFunctionOnElement<double> *funcEnrichment)
637  : _spacebase(spacebase), _funcEnrichment(funcEnrichment)
638  {
639  }
640  virtual void f(MElement *ele, double u, double v, double w,
641  std::vector<ValType> &vals) const;
642  virtual void gradf(MElement *ele, double u, double v, double w,
643  std::vector<GradType> &grads) const;
644  virtual int getNumKeys(MElement *ele) const;
645  virtual void getKeys(MElement *ele, std::vector<Dof> &keys) const;
646 };
647 
648 template <class T, class F>
650 public:
654 
655 protected:
658 
659 public:
660  virtual void hessfuvw(MElement *ele, double u, double v, double w,
661  std::vector<HessType> &hess) const
662  {
663  }
664  FilteredFunctionSpace<T, F>(FunctionSpace<T> *spacebase, F *filter)
665  : _spacebase(spacebase), _filter(filter)
666  {
667  }
668  virtual void f(MElement *ele, double u, double v, double w,
669  std::vector<ValType> &vals) const;
670  virtual void gradf(MElement *ele, double u, double v, double w,
671  std::vector<GradType> &grads) const;
672  virtual int getNumKeys(MElement *ele) const;
673  virtual void getKeys(MElement *ele, std::vector<Dof> &keys) const;
674 };
675 
676 template <class T>
677 void xFemFunctionSpace<T>::f(MElement *ele, double u, double v, double w,
678  std::vector<ValType> &vals) const
679 {
680  // We need parent parameters
681  MElement *elep;
682  if(ele->getParent())
683  elep = ele->getParent();
684  else
685  elep = ele;
686 
687  // Get the spacebase valsd
688  std::vector<ValType> valsd;
689  xFemFunctionSpace<T>::_spacebase->f(elep, u, v, w, valsd);
690 
691  int nbdofs = valsd.size();
692  int curpos = vals.size(); // if in composite function space
693  vals.reserve(curpos + nbdofs);
694 
695  // then enriched dofs so the order is ex:(a2x,a2y,a3x,a3y)
696  if(nbdofs > 0) { // if enriched
697  // Enrichment function calcul
698  SPoint3 p;
699  elep->pnt(u, v, w, p); // parametric to cartesian coordinates
700  double func;
701  _funcEnrichment->setElement(elep);
702  func = (*_funcEnrichment)(p.x(), p.y(), p.z());
703  for(int i = 0; i < nbdofs; i++) {
704  vals.push_back(valsd[i] * func);
705  }
706  }
707 }
708 
709 template <class T>
710 void xFemFunctionSpace<T>::gradf(MElement *ele, double u, double v, double w,
711  std::vector<GradType> &grads) const
712 {
713  // We need parent parameters
714  MElement *elep;
715  if(ele->getParent())
716  elep = ele->getParent();
717  else
718  elep = ele;
719 
720  // Get the spacebase gradsd
721  std::vector<GradType> gradsd;
722  xFemFunctionSpace<T>::_spacebase->gradf(elep, u, v, w, gradsd);
723 
724  int nbdofs = gradsd.size();
725 
726  // We need spacebase valsd to compute total gradient
727  std::vector<ValType> valsd;
728  xFemFunctionSpace<T>::_spacebase->f(elep, u, v, w, valsd);
729 
730  int curpos = grads.size(); // if in composite function space
731  grads.reserve(curpos + nbdofs);
732 
733  // then enriched dofs so the order is ex:(a2x,a2y,a3x,a3y)
734  if(nbdofs > 0) { // if enriched
735  double df[3];
736  SPoint3 p;
737  elep->pnt(u, v, w, p);
738  _funcEnrichment->setElement(elep);
739  _funcEnrichment->gradient(p.x(), p.y(), p.z(), df[0], df[1], df[2]);
740  ValType gradfuncenrich(df[0], df[1], df[2]);
741 
742  // Enrichment function calcul
743  double func;
744  _funcEnrichment->setElement(elep);
745  func = (*_funcEnrichment)(p.x(), p.y(), p.z());
746 
747  for(int i = 0; i < nbdofs; i++) {
748  GradType GradFunc;
749  tensprod(valsd[i], gradfuncenrich, GradFunc);
750  grads.push_back(gradsd[i] * func + GradFunc);
751  }
752  }
753 }
754 
755 template <class T> int xFemFunctionSpace<T>::getNumKeys(MElement *ele) const
756 {
757  MElement *elep;
758  if(ele->getParent())
759  elep = ele->getParent();
760  else
761  elep = ele;
762  int nbdofs = xFemFunctionSpace<T>::_spacebase->getNumKeys(elep);
763  return nbdofs;
764 }
765 
766 template <class T>
767 void xFemFunctionSpace<T>::getKeys(MElement *ele, std::vector<Dof> &keys) const
768 {
769  MElement *elep;
770  if(ele->getParent())
771  elep = ele->getParent();
772  else
773  elep = ele;
774 
775  int normalk = xFemFunctionSpace<T>::_spacebase->getNumKeys(elep);
776 
777  std::vector<Dof> bufk;
778  bufk.reserve(normalk);
780  int normaldofs = bufk.size();
781  int nbdofs = normaldofs;
782 
783  int curpos = keys.size();
784  keys.reserve(curpos + nbdofs);
785 
786  // get keys so the order is ex:(a2x,a2y,a3x,a3y)
787  // enriched dof tagged with ( i2 -> i2 + 1 )
788  for(int i = 0; i < nbdofs; i++) {
789  int i1, i2;
790  Dof::getTwoIntsFromType(bufk[i].getType(), i1, i2);
791  keys.push_back(
792  Dof(bufk[i].getEntity(), Dof::createTypeWithTwoInts(i1, i2 + 1)));
793  }
794 }
795 
796 // Filtered function space
797 //
798 
799 template <class T, class F>
800 void FilteredFunctionSpace<T, F>::f(MElement *ele, double u, double v, double w,
801  std::vector<ValType> &vals) const
802 {
803  // We need parent parameters
804  MElement *elep;
805  if(ele->getParent())
806  elep = ele->getParent();
807  else
808  elep = ele;
809 
810  std::vector<ValType> valsd;
811 
812  _spacebase->f(elep, u, v, w, valsd);
813 
814  int normalk = _spacebase->getNumKeys(elep);
815  std::vector<Dof> bufk;
816  bufk.reserve(normalk);
817  _spacebase->getKeys(elep, bufk);
818 
819  for(int i = 0; i < bufk.size(); i++) {
820  if((*_filter)(bufk[i])) vals.push_back(valsd[i]);
821  }
822 }
823 
824 template <class T, class F>
825 void FilteredFunctionSpace<T, F>::gradf(MElement *ele, double u, double v,
826  double w,
827  std::vector<GradType> &grads) const
828 {
829  // We need parent parameters
830  MElement *elep;
831  if(ele->getParent())
832  elep = ele->getParent();
833  else
834  elep = ele;
835 
836  // Get space base gradsd
837  std::vector<GradType> gradsd;
838  _spacebase->gradf(elep, u, v, w, gradsd);
839 
840  // Get numkeys
841  int normalk = _spacebase->getNumKeys(elep);
842  std::vector<Dof> bufk;
843  bufk.reserve(normalk);
844  _spacebase->getKeys(elep, bufk);
845 
846  for(int i = 0; i < bufk.size(); i++) {
847  if((*_filter)(bufk[i])) grads.push_back(gradsd[i]);
848  }
849 }
850 
851 template <class T, class F>
853 {
854  MElement *elep;
855  if(ele->getParent())
856  elep = ele->getParent();
857  else
858  elep = ele;
859 
860  int nbdofs = 0;
861 
862  int normalk = _spacebase->getNumKeys(elep);
863  std::vector<Dof> bufk;
864  bufk.reserve(normalk);
865  _spacebase->getKeys(elep, bufk);
866 
867  for(int i = 0; i < bufk.size(); i++) {
868  if((*_filter)(bufk[i])) nbdofs = nbdofs + 1;
869  }
870  return nbdofs;
871 }
872 
873 template <class T, class F>
875  std::vector<Dof> &keys) const
876 {
877  MElement *elep;
878  if(ele->getParent())
879  elep = ele->getParent();
880  else
881  elep = ele;
882 
883  int normalk = _spacebase->getNumKeys(elep);
884 
885  std::vector<Dof> bufk;
886  bufk.reserve(normalk);
887  _spacebase->getKeys(elep, bufk);
888 
889  for(int i = 0; i < bufk.size(); i++) {
890  if((*_filter)(bufk[i])) keys.push_back(bufk[i]);
891  }
892 }
893 
894 #endif
MElement::getNum
virtual std::size_t getNum() const
Definition: MElement.h:68
ScalarToAnyFunctionSpace::gradfuvw
virtual void gradfuvw(MElement *ele, double u, double v, double w, std::vector< GradType > &grads) const
Definition: functionSpace.h:430
ScalarLagrangeFunctionSpaceOfElement::GradType
TensorialTraits< double >::GradType GradType
Definition: functionSpace.h:124
xFemFunctionSpace::getKeys
virtual void getKeys(MElement *ele, std::vector< Dof > &keys) const
Definition: functionSpace.h:767
FilteredFunctionSpace::_filter
F * _filter
Definition: functionSpace.h:657
ScalarLagrangeFunctionSpace::getKeys
virtual void getKeys(MVertex *ver, std::vector< Dof > &keys) const
Definition: functionSpace.h:247
simpleFunctionOnElement< double >
CompositeFunctionSpace::CompositeFunctionSpace
CompositeFunctionSpace(const T1 &t)
Definition: functionSpace.h:554
FunctionSpace::ThirdDevType
TensorialTraits< T >::ThirdDevType ThirdDevType
Definition: functionSpace.h:89
ScalarLagrangeFunctionSpace::gradf
virtual void gradf(MElement *ele, double u, double v, double w, std::vector< GradType > &grads) const
Definition: functionSpace.h:264
ScalarToAnyFunctionSpace::HessType
TensorialTraits< T >::HessType HessType
Definition: functionSpace.h:351
ScalarLagrangeFunctionSpace
Definition: functionSpace.h:240
inv3x3
double inv3x3(double mat[3][3], double inv[3][3])
Definition: Numeric.cpp:232
ScalarToAnyFunctionSpace::gradf
virtual void gradf(MElement *ele, double u, double v, double w, std::vector< GradType > &grads) const
Definition: functionSpace.h:408
ScalarLagrangeFunctionSpace::HessType
TensorialTraits< double >::HessType HessType
Definition: functionSpace.h:244
VectorLagrangeFunctionSpace
Definition: functionSpace.h:510
VectorLagrangeFunctionSpace::VECTOR_Z
@ VECTOR_Z
Definition: functionSpace.h:515
TensorialTraits< double >::ValType
double ValType
Definition: functionSpace.h:32
FunctionSpace::hessf
virtual void hessf(MElement *ele, double u, double v, double w, std::vector< HessType > &hess) const
Definition: functionSpace.h:105
CompositeFunctionSpace::gradf
virtual void gradf(MElement *ele, double u, double v, double w, std::vector< GradType > &grads) const
Definition: functionSpace.h:591
xFemFunctionSpace::_spacebase
FunctionSpace< T > * _spacebase
Definition: functionSpace.h:627
TensorialTraits< STensor3 >::ValType
STensor3 ValType
Definition: functionSpace.h:52
MElement::getTypeForMSH
virtual int getTypeForMSH() const
Definition: MElement.h:488
F
#define F
Definition: DefaultOptions.h:23
FunctionSpace::HessType
TensorialTraits< T >::HessType HessType
Definition: functionSpace.h:88
CompositeFunctionSpace::HessType
TensorialTraits< T >::HessType HessType
Definition: functionSpace.h:547
FunctionSpace::getId
virtual int getId(void) const
Definition: functionSpace.h:90
xFemFunctionSpace::xFemFunctionSpace
xFemFunctionSpace(FunctionSpace< T > *spacebase, simpleFunctionOnElement< double > *funcEnrichment)
Definition: functionSpace.h:635
MVertex
Definition: MVertex.h:24
Msg::Warning
static void Warning(const char *fmt,...)
Definition: GmshMessage.cpp:543
CompositeFunctionSpace::CompositeFunctionSpace
CompositeFunctionSpace(const T1 &t1, const T2 &t2, const T3 &t3, const T4 &t4)
Definition: functionSpace.h:572
STensor3
Definition: STensor3.h:97
Dof::getTwoIntsFromType
static void getTwoIntsFromType(int t, int &i1, int &i2)
Definition: dofManager.h:32
ScalarLagrangeFunctionSpace::GradType
TensorialTraits< double >::GradType GradType
Definition: functionSpace.h:243
tensprod
void tensprod(const SVector3 &a, const SVector3 &b, STensor3 &c)
Definition: STensor3.h:289
TensorialTraits< double >::GradType
SVector3 GradType
Definition: functionSpace.h:33
VectorLagrangeFunctionSpaceOfElement::VECTOR_Z
@ VECTOR_Z
Definition: functionSpace.h:480
SPoint3
Definition: SPoint3.h:14
MElement::getParent
virtual MElement * getParent() const
Definition: MElement.h:231
MVertex::getNum
std::size_t getNum() const
Definition: MVertex.h:86
VectorLagrangeFunctionSpaceOfElement::VECTOR_Y
@ VECTOR_Y
Definition: functionSpace.h:480
xFemFunctionSpace::HessType
TensorialTraits< T >::HessType HessType
Definition: functionSpace.h:624
SVector3
Definition: SVector3.h:16
FunctionSpaceBase
Definition: functionSpace.h:61
TensorialTraits::GradType
T GradType[3]
Definition: functionSpace.h:24
CompositeFunctionSpace::iterFS
std::vector< FunctionSpace< T > * >::iterator iterFS
Definition: functionSpace.h:548
FilteredFunctionSpace::ValType
TensorialTraits< T >::ValType ValType
Definition: functionSpace.h:651
FilteredFunctionSpace::GradType
TensorialTraits< T >::GradType GradType
Definition: functionSpace.h:652
ScalarToAnyFunctionSpace::ScalarToAnyFunctionSpace
ScalarToAnyFunctionSpace(const T2 &SFS, const T &mult1, int comp1_, const T &mult2, int comp2_)
Definition: functionSpace.h:368
CompositeFunctionSpace::hessfuvw
virtual void hessfuvw(MElement *ele, double u, double v, double w, std::vector< HessType > &hess) const
Definition: functionSpace.h:598
TensorialTraits::HessType
T HessType[3][3]
Definition: functionSpace.h:25
ScalarLagrangeFunctionSpaceOfElement::HessType
TensorialTraits< double >::HessType HessType
Definition: functionSpace.h:125
TensorialTraits< SVector3 >::ThirdDevType
STensor3 ThirdDevType
Definition: functionSpace.h:46
SVector3.h
ScalarLagrangeFunctionSpace::hessfuvw
virtual void hessfuvw(MElement *ele, double u, double v, double w, std::vector< HessType > &hess) const
Definition: functionSpace.h:288
FunctionSpaceBase::clone
virtual FunctionSpaceBase * clone(const int id) const
Definition: functionSpace.h:76
ScalarToAnyFunctionSpace
Definition: functionSpace.h:347
MElement::getHessShapeFunctions
virtual void getHessShapeFunctions(double u, double v, double w, double s[][3][3], int order=-1) const
Definition: MElement.cpp:478
CompositeFunctionSpace::~CompositeFunctionSpace
~CompositeFunctionSpace(void)
Definition: functionSpace.h:580
ScalarToAnyFunctionSpace::hessfuvw
virtual void hessfuvw(MElement *ele, double u, double v, double w, std::vector< HessType > &hess) const
Definition: functionSpace.h:425
ScalarToAnyFunctionSpace::ScalarFS
FunctionSpace< double > * ScalarFS
Definition: functionSpace.h:356
VectorLagrangeFunctionSpace::VECTOR_Y
@ VECTOR_Y
Definition: functionSpace.h:515
ScalarLagrangeFunctionSpace::fuvw
virtual void fuvw(MElement *ele, double u, double v, double w, std::vector< ValType > &vals) const
Definition: functionSpace.h:322
VectorLagrangeFunctionSpaceOfElement::Along
Along
Definition: functionSpace.h:480
ScalarLagrangeFunctionSpace::getNumKeys
virtual int getNumKeys(MElement *ele) const
Definition: functionSpace.h:332
ScalarLagrangeFunctionSpace::f
virtual void f(MElement *ele, double u, double v, double w, std::vector< ValType > &vals) const
Definition: functionSpace.h:254
ScalarToAnyFunctionSpace::ScalarToAnyFunctionSpace
ScalarToAnyFunctionSpace(const T2 &SFS, const T &mult1, int comp1_, const T &mult2, int comp2_, const T &mult3, int comp3_)
Definition: functionSpace.h:379
VectorLagrangeFunctionSpace::GradType
TensorialTraits< SVector3 >::GradType GradType
Definition: functionSpace.h:517
SPoint3::x
double x(void) const
Definition: SPoint3.h:125
xFemFunctionSpace::f
virtual void f(MElement *ele, double u, double v, double w, std::vector< ValType > &vals) const
Definition: functionSpace.h:677
ScalarLagrangeFunctionSpaceOfElement::gradfuvw
virtual void gradfuvw(MElement *ele, double u, double v, double w, std::vector< GradType > &grads) const
Definition: functionSpace.h:210
VectorLagrangeFunctionSpaceOfElement::VECTOR_X
@ VECTOR_X
Definition: functionSpace.h:480
FilteredFunctionSpace::f
virtual void f(MElement *ele, double u, double v, double w, std::vector< ValType > &vals) const
Definition: functionSpace.h:800
ScalarLagrangeFunctionSpaceOfElement::hessfuvw
virtual void hessfuvw(MElement *ele, double u, double v, double w, std::vector< HessType > &hess) const
Definition: functionSpace.h:181
VectorLagrangeFunctionSpace::VECTOR_X
@ VECTOR_X
Definition: functionSpace.h:515
FunctionSpace::gradfuvw
virtual void gradfuvw(MElement *ele, double u, double v, double w, std::vector< GradType > &grads) const
Definition: functionSpace.h:99
TensorialTraits< SVector3 >::ValType
SVector3 ValType
Definition: functionSpace.h:42
Dof
Definition: dofManager.h:19
VectorLagrangeFunctionSpace::VectorLagrangeFunctionSpace
VectorLagrangeFunctionSpace(int id, Along comp1)
Definition: functionSpace.h:524
ScalarLagrangeFunctionSpace::ValType
TensorialTraits< double >::ValType ValType
Definition: functionSpace.h:242
Dof::createTypeWithTwoInts
static int createTypeWithTwoInts(int i1, int i2)
Definition: dofManager.h:28
STensor43
Definition: STensor43.h:19
ElementType::getType
int getType(int parentType, int order, bool serendip=false)
Definition: ElementType.cpp:757
TensorialTraits::ValType
T ValType
Definition: functionSpace.h:23
CompositeFunctionSpace::getNumKeys
virtual int getNumKeys(MElement *ele) const
Definition: functionSpace.h:605
FunctionSpaceBase::getId
virtual int getId(void) const =0
TensorialTraits< SVector3 >::TensProdType
STensor3 TensProdType
Definition: functionSpace.h:45
FunctionSpace::fuvw
virtual void fuvw(MElement *ele, double u, double v, double w, std::vector< ValType > &vals) const
Definition: functionSpace.h:93
VectorLagrangeFunctionSpaceOfElement::BasisVectors
static const SVector3 BasisVectors[3]
Definition: functionSpace.h:477
FunctionSpaceBase::getNumKeys
virtual int getNumKeys(MElement *ele) const =0
ScalarToAnyFunctionSpace::getKeys
virtual void getKeys(MElement *ele, std::vector< Dof > &keys) const
Definition: functionSpace.h:453
Numeric.h
MSH_TRI_B
#define MSH_TRI_B
Definition: GmshDefines.h:147
STensor43.h
ScalarLagrangeFunctionSpaceOfElement::ValType
TensorialTraits< double >::ValType ValType
Definition: functionSpace.h:123
MElement::getNumShapeFunctions
virtual std::size_t getNumShapeFunctions() const
Definition: MElement.h:387
TensorialTraits< STensor3 >::TensProdType
STensor43 TensProdType
Definition: functionSpace.h:56
ScalarLagrangeFunctionSpace::getKeys
virtual void getKeys(MElement *ele, std::vector< Dof > &keys) const
Definition: functionSpace.h:337
FilteredFunctionSpace::hessfuvw
virtual void hessfuvw(MElement *ele, double u, double v, double w, std::vector< HessType > &hess) const
Definition: functionSpace.h:660
FunctionSpace::_iField
int _iField
Definition: functionSpace.h:84
SPoint3::y
double y(void) const
Definition: SPoint3.h:127
CompositeFunctionSpace
Definition: functionSpace.h:543
VectorLagrangeFunctionSpace::BasisVectors
static const SVector3 BasisVectors[3]
Definition: functionSpace.h:512
FunctionSpace::f
virtual void f(MElement *ele, double u, double v, double w, std::vector< ValType > &vals) const =0
ScalarToAnyFunctionSpace::getNumKeys
virtual int getNumKeys(MElement *ele) const
Definition: functionSpace.h:448
MSH_POLYG_B
#define MSH_POLYG_B
Definition: GmshDefines.h:148
TensorialTraits< SVector3 >::HessType
STensor3 HessType
Definition: functionSpace.h:44
MElement
Definition: MElement.h:30
dofManager.h
FunctionSpace::thirdDevf
virtual void thirdDevf(MElement *ele, double u, double v, double w, std::vector< ThirdDevType > &third) const
Definition: functionSpace.h:112
mult
Quaternion mult(const Quaternion &A, const Quaternion &B)
Definition: Camera.cpp:459
FilteredFunctionSpace::_spacebase
FunctionSpace< T > * _spacebase
Definition: functionSpace.h:656
MSH_LIN_B
#define MSH_LIN_B
Definition: GmshDefines.h:146
VectorLagrangeFunctionSpaceOfElement::VectorLagrangeFunctionSpaceOfElement
VectorLagrangeFunctionSpaceOfElement(int id)
Definition: functionSpace.h:483
FunctionSpace::hessfuvw
virtual void hessfuvw(MElement *ele, double u, double v, double w, std::vector< HessType > &hess) const =0
CompositeFunctionSpace::_spaces
std::vector< FunctionSpace< T > * > _spaces
Definition: functionSpace.h:551
CompositeFunctionSpace::CompositeFunctionSpace
CompositeFunctionSpace(const T1 &t1, const T2 &t2, const T3 &t3)
Definition: functionSpace.h:565
ScalarToAnyFunctionSpace::ScalarToAnyFunctionSpace
ScalarToAnyFunctionSpace(const T2 &SFS, const T &mult, int comp_)
Definition: functionSpace.h:360
CompositeFunctionSpace::getKeys
virtual void getKeys(MElement *ele, std::vector< Dof > &keys) const
Definition: functionSpace.h:613
FunctionSpace::GradType
TensorialTraits< T >::GradType GradType
Definition: functionSpace.h:87
ScalarLagrangeFunctionSpace::gradfuvw
virtual void gradfuvw(MElement *ele, double u, double v, double w, std::vector< GradType > &grads) const
Definition: functionSpace.h:311
FunctionSpace::getKeys
virtual void getKeys(MElement *ele, std::vector< Dof > &keys) const =0
xFemFunctionSpace::hessfuvw
virtual void hessfuvw(MElement *ele, double u, double v, double w, std::vector< HessType > &hess) const
Definition: functionSpace.h:631
MElement::pnt
virtual void pnt(double u, double v, double w, SPoint3 &p) const
Definition: MElement.cpp:1072
LegendrePolynomials::df
void df(int n, double u, double *val)
Definition: orthogonalBasis.cpp:103
ScalarLagrangeFunctionSpaceOfElement::getKeys
virtual void getKeys(MElement *ele, std::vector< Dof > &keys) const
Definition: functionSpace.h:231
VectorLagrangeFunctionSpace::VectorLagrangeFunctionSpace
VectorLagrangeFunctionSpace(int id, Along comp1, Along comp2)
Definition: functionSpace.h:529
ScalarLagrangeFunctionSpaceOfElement::ScalarLagrangeFunctionSpaceOfElement
ScalarLagrangeFunctionSpaceOfElement(int i=0)
Definition: functionSpace.h:134
ScalarToAnyFunctionSpace::f
virtual void f(MElement *ele, double u, double v, double w, std::vector< ValType > &vals) const
Definition: functionSpace.h:394
xFemFunctionSpace::gradf
virtual void gradf(MElement *ele, double u, double v, double w, std::vector< GradType > &grads) const
Definition: functionSpace.h:710
TensorialTraits< double >::HessType
STensor3 HessType
Definition: functionSpace.h:34
FilteredFunctionSpace::gradf
virtual void gradf(MElement *ele, double u, double v, double w, std::vector< GradType > &grads) const
Definition: functionSpace.h:825
MElement::movePointFromParentSpaceToElementSpace
virtual void movePointFromParentSpaceToElementSpace(double &u, double &v, double &w) const
Definition: MElement.cpp:1188
ScalarToAnyFunctionSpace::~ScalarToAnyFunctionSpace
virtual ~ScalarToAnyFunctionSpace()
Definition: functionSpace.h:392
TensorialTraits< double >::TensProdType
double TensProdType
Definition: functionSpace.h:35
simpleFunction.h
VectorLagrangeFunctionSpaceOfElement::ValType
TensorialTraits< SVector3 >::ValType ValType
Definition: functionSpace.h:481
xFemFunctionSpace::getNumKeys
virtual int getNumKeys(MElement *ele) const
Definition: functionSpace.h:755
ScalarLagrangeFunctionSpace::ScalarLagrangeFunctionSpace
ScalarLagrangeFunctionSpace(int i=0)
Definition: functionSpace.h:253
CompositeFunctionSpace::f
virtual void f(MElement *ele, double u, double v, double w, std::vector< ValType > &vals) const
Definition: functionSpace.h:584
FunctionSpace::ValType
TensorialTraits< T >::ValType ValType
Definition: functionSpace.h:86
xFemFunctionSpace::GradType
TensorialTraits< T >::GradType GradType
Definition: functionSpace.h:623
ScalarLagrangeFunctionSpaceOfElement::f
virtual void f(MElement *ele, double u, double v, double w, std::vector< ValType > &vals) const
Definition: functionSpace.h:135
xFemFunctionSpace::ValType
TensorialTraits< T >::ValType ValType
Definition: functionSpace.h:622
MElement.h
TensorialTraits::ThirdDevType
T ThirdDevType[3][3][3]
Definition: functionSpace.h:26
VectorLagrangeFunctionSpaceOfElement::VectorLagrangeFunctionSpaceOfElement
VectorLagrangeFunctionSpaceOfElement(int id, Along comp1)
Definition: functionSpace.h:490
STensor3.h
MElement::getShapeFunctions
virtual void getShapeFunctions(double u, double v, double w, double s[], int order=-1) const
Definition: MElement.cpp:458
VectorLagrangeFunctionSpaceOfElement
Definition: functionSpace.h:475
FilteredFunctionSpace::getNumKeys
virtual int getNumKeys(MElement *ele) const
Definition: functionSpace.h:852
FunctionSpaceBase::getKeysOnVertex
virtual void getKeysOnVertex(MElement *ele, MVertex *v, const std::vector< int > &comp, std::vector< Dof > &keys) const
Definition: functionSpace.h:68
FunctionSpace
Definition: functionSpace.h:82
FunctionSpaceBase::getKeys
virtual void getKeys(MElement *ele, std::vector< Dof > &keys) const =0
SPoint3::z
double z(void) const
Definition: SPoint3.h:129
ScalarToAnyFunctionSpace::comp
std::vector< int > comp
Definition: functionSpace.h:355
TensorialTraits
Definition: functionSpace.h:22
MElement::getJacobian
virtual double getJacobian(const fullMatrix< double > &gsf, double jac[3][3]) const
Definition: MElement.cpp:868
VectorLagrangeFunctionSpaceOfElement::VectorLagrangeFunctionSpaceOfElement
VectorLagrangeFunctionSpaceOfElement(int id, Along comp1, Along comp2)
Definition: functionSpace.h:495
FunctionSpace::thirdDevfuvw
virtual void thirdDevfuvw(MElement *ele, double u, double v, double w, std::vector< ThirdDevType > &third) const
Definition: functionSpace.h:109
VectorLagrangeFunctionSpaceOfElement::GradType
TensorialTraits< SVector3 >::GradType GradType
Definition: functionSpace.h:482
FilteredFunctionSpace::HessType
TensorialTraits< T >::HessType HessType
Definition: functionSpace.h:653
FunctionSpace::getNumKeys
virtual int getNumKeys(MElement *ele) const =0
ScalarToAnyFunctionSpace::ValType
TensorialTraits< T >::ValType ValType
Definition: functionSpace.h:349
FilteredFunctionSpace::getKeys
virtual void getKeys(MElement *ele, std::vector< Dof > &keys) const
Definition: functionSpace.h:874
xFemFunctionSpace::_funcEnrichment
simpleFunctionOnElement< double > * _funcEnrichment
Definition: functionSpace.h:628
FunctionSpaceBase::~FunctionSpaceBase
virtual ~FunctionSpaceBase()
Definition: functionSpace.h:63
CompositeFunctionSpace::insert
void insert(const T1 &t)
Definition: functionSpace.h:579
ScalarLagrangeFunctionSpaceOfElement
Definition: functionSpace.h:121
ScalarLagrangeFunctionSpaceOfElement::gradf
virtual void gradf(MElement *ele, double u, double v, double w, std::vector< GradType > &grads) const
Definition: functionSpace.h:151
FunctionSpace::gradf
virtual void gradf(MElement *ele, double u, double v, double w, std::vector< GradType > &grads) const =0
ScalarLagrangeFunctionSpaceOfElement::getNumKeys
virtual int getNumKeys(MElement *ele) const
Definition: functionSpace.h:227
STensor33.h
FilteredFunctionSpace
Definition: functionSpace.h:649
STensor33
Definition: STensor33.h:19
CompositeFunctionSpace::CompositeFunctionSpace
CompositeFunctionSpace(const T1 &t1, const T2 &t2)
Definition: functionSpace.h:559
VectorLagrangeFunctionSpace::VectorLagrangeFunctionSpace
VectorLagrangeFunctionSpace(int id, Along comp1, Along comp2, Along comp3)
Definition: functionSpace.h:535
VectorLagrangeFunctionSpace::ValType
TensorialTraits< SVector3 >::ValType ValType
Definition: functionSpace.h:516
CompositeFunctionSpace::ValType
TensorialTraits< T >::ValType ValType
Definition: functionSpace.h:545
ScalarLagrangeFunctionSpaceOfElement::getKeys
virtual void getKeys(MVertex *ver, std::vector< Dof > &keys) const
Definition: functionSpace.h:128
xFemFunctionSpace
Definition: functionSpace.h:620
TensorialTraits< SVector3 >::GradType
STensor3 GradType
Definition: functionSpace.h:43
TensorialTraits< double >::ThirdDevType
STensor33 ThirdDevType
Definition: functionSpace.h:36
CompositeFunctionSpace::GradType
TensorialTraits< T >::GradType GradType
Definition: functionSpace.h:546
VectorLagrangeFunctionSpaceOfElement::VectorLagrangeFunctionSpaceOfElement
VectorLagrangeFunctionSpaceOfElement(int id, Along comp1, Along comp2, Along comp3)
Definition: functionSpace.h:501
MElement::getGradShapeFunctions
virtual void getGradShapeFunctions(double u, double v, double w, double s[][3], int order=-1) const
Definition: MElement.cpp:468
VectorLagrangeFunctionSpace::Along
Along
Definition: functionSpace.h:515
ScalarToAnyFunctionSpace::multipliers
std::vector< T > multipliers
Definition: functionSpace.h:354
VectorLagrangeFunctionSpace::VectorLagrangeFunctionSpace
VectorLagrangeFunctionSpace(int id)
Definition: functionSpace.h:518
ScalarToAnyFunctionSpace::GradType
TensorialTraits< T >::GradType GradType
Definition: functionSpace.h:350