ElInfo.h 15 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/******************************************************************************
 *
 * AMDiS - Adaptive multidimensional simulations
 *
 * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved.
 * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis
 *
 * Authors: 
 * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al.
 *
 * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
 * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
 *
 *
 * This file is part of AMDiS
 *
 * See also license.opensource.txt in the distribution.
 * 
 ******************************************************************************/
20
21


22
23
24
25
26
27

/** \file ElInfo.h */

#ifndef AMDIS_ELINFO_H
#define AMDIS_ELINFO_H

28
29
#include <boost/numeric/mtl/mtl.hpp>

30
31
32
33
34
#include "Flag.h"
#include "Boundary.h"
#include "Global.h"
#include "FixVec.h"
#include "Element.h"
35
#include "AMDiS_fwd.h" 
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52

namespace AMDiS {

  /** \ingroup Traverse
   * \brief 
   * An ElInfo object holds informations wich are not stored in the corresponding
   * element. It is filled during mesh traversal by the traversal routines.
   * A fill flag determines which informations should be filled and which elements
   * should be visited. Since it is a
   * pure virtual base class for the dimension speciefic ElInfo classes, it must
   * not be instantiated directly.
   * \see ElInfo1d \see ElInfo2d \see ElInfo3d
   */

  class ElInfo
  {
  protected: 
53
    /// Protected constructor. Avoids instatiation of the basis class
54
55
    ElInfo();

Thomas Witkowski's avatar
Thomas Witkowski committed
56
57
    /// Protected constructor. Avoids instatiation of the basis class.
    /// \param mesh pointer to the corresponding mesh.
58
59
60
    ElInfo(Mesh *mesh);

  public:
61
    /// Virtual destructor because ElInfo is pure virtual.
62
63
    virtual ~ElInfo();

Thomas Witkowski's avatar
Thomas Witkowski committed
64
65
    /// Assignement operator.
    /// \param rhs right hand side.
Thomas Witkowski's avatar
Thomas Witkowski committed
66
67
    ElInfo& operator=(const ElInfo& rhs) 
    {
Thomas Witkowski's avatar
Thomas Witkowski committed
68
69
70
71
72
      mesh = rhs.mesh;
      element = rhs.element;
      parent = rhs.parent;
      macroElement = rhs.macroElement;
      fillFlag = rhs.fillFlag;
73
      level = rhs.level;
74
      elType = rhs.elType;
75
      iChild = rhs.iChild;
Thomas Witkowski's avatar
Thomas Witkowski committed
76
77
      coord = rhs.coord;
      boundary = rhs.boundary;
78
      projection = rhs.projection;
Thomas Witkowski's avatar
Thomas Witkowski committed
79
80
      oppCoord = rhs.oppCoord;
      neighbour = rhs.neighbour;
81
      neighbourCoord = rhs.neighbourCoord;
82
      oppVertex = rhs.oppVertex;
83
84
85
86
87
      det = rhs.det;
      grdLambda = rhs.grdLambda;
      parametric = rhs.parametric;
      dimOfWorld = rhs.dimOfWorld;

88
      return *this;
89
    }
90
91
92
93
94
95

  public:
    /** \name getting methods
     * \{ 
     */

Thomas Witkowski's avatar
Thomas Witkowski committed
96
    /// Get ElInfo's \ref mesh
Thomas Witkowski's avatar
Thomas Witkowski committed
97
98
    inline Mesh* getMesh() const 
    { 
Thomas Witkowski's avatar
Thomas Witkowski committed
99
      return mesh; 
100
    }
101

Thomas Witkowski's avatar
Thomas Witkowski committed
102
    /// Get ElInfo's \ref macroElement
Thomas Witkowski's avatar
Thomas Witkowski committed
103
104
    inline MacroElement* getMacroElement() const 
    { 
Thomas Witkowski's avatar
Thomas Witkowski committed
105
      return macroElement; 
106
    }
107

108
    /// Get ElInfo's \ref element
Thomas Witkowski's avatar
Thomas Witkowski committed
109
110
    inline Element* getElement() const 
    { 
Thomas Witkowski's avatar
Thomas Witkowski committed
111
      return element; 
112
    }
113

Thomas Witkowski's avatar
Thomas Witkowski committed
114
    /// Get ElInfo's \ref parent
Thomas Witkowski's avatar
Thomas Witkowski committed
115
116
    inline Element* getParent() const 
    { 
Thomas Witkowski's avatar
Thomas Witkowski committed
117
      return parent; 
118
    }
119

Thomas Witkowski's avatar
Thomas Witkowski committed
120
    /// Get ElInfo's \ref fillFlag
Thomas Witkowski's avatar
Thomas Witkowski committed
121
122
    inline Flag getFillFlag() const 
    { 
Thomas Witkowski's avatar
Thomas Witkowski committed
123
      return fillFlag; 
124
    }
125

126
    /// Get ElInfo's \ref level
Thomas Witkowski's avatar
Thomas Witkowski committed
127
128
    inline int getLevel() const 
    { 
129
130
131
      return level; 
    }

132
    /// Get ElInfo's \ref iChild
Thomas Witkowski's avatar
Thomas Witkowski committed
133
134
    inline int getIChild() const 
    {
135
      return iChild;
136
    }
137

Thomas Witkowski's avatar
Thomas Witkowski committed
138
139
    /// Get ElInfo's \ref coord[i]. This is a WorldVector<double> filled with 
    /// the coordinates of the i-th vertex of element \ref el.
Thomas Witkowski's avatar
Thomas Witkowski committed
140
141
    inline WorldVector<double>& getCoord(int i) 
    { 
Thomas Witkowski's avatar
Thomas Witkowski committed
142
      return coord[i]; 
143
    }
144

Thomas Witkowski's avatar
Thomas Witkowski committed
145
146
    /// Get ElInfo's \ref coord[i]. This is a WorldVector<double> filled with the
    /// coordinates of the i-th vertex of element \ref el.
Thomas Witkowski's avatar
Thomas Witkowski committed
147
148
    inline const WorldVector<double>& getCoord(int i) const 
    { 
Thomas Witkowski's avatar
Thomas Witkowski committed
149
      return coord[i]; 
150
    }
151

Thomas Witkowski's avatar
Thomas Witkowski committed
152
153
    /// Get ElInfo's \ref coord. This is a FixVec<WorldVector<double> > filled 
    /// with the coordinates of the all vertice of element \ref el.
Thomas Witkowski's avatar
Thomas Witkowski committed
154
155
    inline FixVec<WorldVector<double>, VERTEX>& getCoords() 
    { 
Thomas Witkowski's avatar
Thomas Witkowski committed
156
      return coord; 
157
    }
158

Thomas Witkowski's avatar
Thomas Witkowski committed
159
160
    /// Get ElInfo's \ref coord. This is a FixVec<WorldVector<double> > filled
    /// with the coordinates of the all vertice of element \ref el.
Thomas Witkowski's avatar
Thomas Witkowski committed
161
162
    inline const FixVec<WorldVector<double>, VERTEX>& getCoords() const 
    { 
Thomas Witkowski's avatar
Thomas Witkowski committed
163
      return coord; 
164
    }
165

Thomas Witkowski's avatar
Thomas Witkowski committed
166
    /// Get ElInfo's \ref oppCoord[i]
Thomas Witkowski's avatar
Thomas Witkowski committed
167
168
    inline WorldVector<double>& getOppCoord(int i) 
    { 
Thomas Witkowski's avatar
Thomas Witkowski committed
169
      return oppCoord[i]; 
170
    }
171

Thomas Witkowski's avatar
Thomas Witkowski committed
172
    /// Get ElInfo's \ref boundary[i] 
Thomas Witkowski's avatar
Thomas Witkowski committed
173
174
    inline BoundaryType getBoundary(int i) const 
    { 
Thomas Witkowski's avatar
Thomas Witkowski committed
175
      return boundary[i]; 
176
    }
177

178
    /// Get boundary type of i-th vertex/edge/face (pos).
179
180
    BoundaryType getBoundary(GeoIndex pos, int i);

Thomas Witkowski's avatar
Thomas Witkowski committed
181
    /// Get ElInfo's \ref neighbour[i]
Thomas Witkowski's avatar
Thomas Witkowski committed
182
183
    inline Element* getNeighbour(int i) const 
    { 
Thomas Witkowski's avatar
Thomas Witkowski committed
184
      return neighbour[i]; 
185
    }
186

187
    /// Get ElInfo's \ref neighbourCoord[i]
Thomas Witkowski's avatar
Thomas Witkowski committed
188
189
    inline FixVec<WorldVector<double>, VERTEX> getNeighbourCoord(int i) const 
    {
190
      return neighbourCoord[i];
191
192
    }

193
    /// Get ElInfo's \ref oppVertex[i] 
194
    inline int getOppVertex(int i) const 
Thomas Witkowski's avatar
Thomas Witkowski committed
195
    { 
196
      return oppVertex[i]; 
197
    }
198

Thomas Witkowski's avatar
Thomas Witkowski committed
199
200
    virtual int getSideOfNeighbour(int i) 
    { 
201
      return oppVertex[i]; 
202
    }
203

Thomas Witkowski's avatar
Thomas Witkowski committed
204
    /// Get ElInfo's \ref det
Thomas Witkowski's avatar
Thomas Witkowski committed
205
206
    inline double getDet() const 
    { 
Thomas Witkowski's avatar
Thomas Witkowski committed
207
      return det; 
208
    }
209

210
    /// Returns \ref grdLambda
Thomas Witkowski's avatar
Thomas Witkowski committed
211
212
    inline const DimVec<WorldVector<double> >& getGrdLambda() const 
    { 
Thomas Witkowski's avatar
Thomas Witkowski committed
213
      return grdLambda; 
214
    }
215
216
217
218
219
220
221
222
    
    inline void getGrdLambda(mtl::dense2D<double>& grd_lam)
    {
      grd_lam.change_dim(grdLambda.size(), Global::getGeo(WORLD));
      for (size_t i = 0; i < static_cast<size_t>(grdLambda.size()); i++)
	for (size_t j = 0; j < static_cast<size_t>(Global::getGeo(WORLD)); j++)
	  grd_lam(i,j) = grd_lam[i][j];
    }
223

Thomas Witkowski's avatar
Thomas Witkowski committed
224
    /// Returns \ref projection[i]
Thomas Witkowski's avatar
Thomas Witkowski committed
225
226
    inline Projection *getProjection(int i) const 
    {
Thomas Witkowski's avatar
Thomas Witkowski committed
227
      return projection[i];
228
    }
229

230
    /// Returns \ref parametric
231
    inline bool getParametric() const
Thomas Witkowski's avatar
Thomas Witkowski committed
232
    { 
233
      return parametric; 
234
235
    }

236
237
238
239
240
241
242
243
244
245
246
247
    /// Returns \ref refinementPath
    inline unsigned long getRefinementPath() const
    {
      return refinementPath;
    } 

    /// Get \ref refinementPathLength
    inline int getRefinementPathLength() const
    {
      return refinementPathLength;
    }

248
249
    virtual mtl::dense2D<double>& getSubElemCoordsMat(int degree) const 
    {
Thomas Witkowski's avatar
Thomas Witkowski committed
250
      return subElemMatrices[degree][std::make_pair(refinementPathLength, refinementPath)];
251
    }
252

253
    virtual mtl::dense2D<double>& getSubElemGradCoordsMat(int degree) const 
254
    {
255
      return getSubElemCoordsMat(degree);
256
    }
257
258
259
260
261
262
263

    /** \} */ 

    /** \name setting methods
     * \{ 
     */

Thomas Witkowski's avatar
Thomas Witkowski committed
264
    /// Set ElInfo's \ref mesh
Thomas Witkowski's avatar
Thomas Witkowski committed
265
266
    inline void setMesh(Mesh* aMesh) 
    { 
Thomas Witkowski's avatar
Thomas Witkowski committed
267
      mesh = aMesh; 
268
    }
269

Thomas Witkowski's avatar
Thomas Witkowski committed
270
    /// Set ElInfo's \ref macroElement
Thomas Witkowski's avatar
Thomas Witkowski committed
271
272
    inline void setMacroElement(MacroElement* mel) 
    { 
Thomas Witkowski's avatar
Thomas Witkowski committed
273
      macroElement = mel; 
274
    }
275

276
    /// Set ElInfo's \ref element
Thomas Witkowski's avatar
Thomas Witkowski committed
277
278
    inline void setElement(Element* elem) 
    { 
Thomas Witkowski's avatar
Thomas Witkowski committed
279
      element = elem; 
280
    }
281

Thomas Witkowski's avatar
Thomas Witkowski committed
282
    /// Set ElInfo's \ref parent
Thomas Witkowski's avatar
Thomas Witkowski committed
283
284
    inline void setParent(Element* elem) 
    { 
Thomas Witkowski's avatar
Thomas Witkowski committed
285
      parent = elem; 
286
    }
287

Thomas Witkowski's avatar
Thomas Witkowski committed
288
    /// Set ElInfo's \ref fillFlag
Thomas Witkowski's avatar
Thomas Witkowski committed
289
290
    inline void setFillFlag(Flag flag) 
    { 
Thomas Witkowski's avatar
Thomas Witkowski committed
291
      fillFlag = flag; 
292
    }
293

Thomas Witkowski's avatar
Thomas Witkowski committed
294
    /// Sets ElInfo's \ref coord[i]. 
295
    inline void setCoord(int i, WorldVector<double>& c) 
Thomas Witkowski's avatar
Thomas Witkowski committed
296
    { 
Thomas Witkowski's avatar
Thomas Witkowski committed
297
      coord[i] = c; 
298
    }
299

300
    /// Sets ElInfo's \ref coord. 
301
    inline void setCoords(FixVec<WorldVector<double>, VERTEX >& c) 
Thomas Witkowski's avatar
Thomas Witkowski committed
302
    { 
Thomas Witkowski's avatar
Thomas Witkowski committed
303
      coord = c; 
304
    }
305

306
    /// Set ElInfo's \ref level
Thomas Witkowski's avatar
Thomas Witkowski committed
307
308
    inline void setLevel(int l) 
    { 
309
310
311
      level = l; 
    }

Thomas Witkowski's avatar
Thomas Witkowski committed
312
    /// Set ElInfo's \ref boundary[i] 
Thomas Witkowski's avatar
Thomas Witkowski committed
313
314
    inline void setBoundary(int i, BoundaryType t) 
    { 
Thomas Witkowski's avatar
Thomas Witkowski committed
315
      boundary[i] = newBound(boundary[i], t);
316
    }
317

Thomas Witkowski's avatar
Thomas Witkowski committed
318
    /// Set \ref projection[i] = p
Thomas Witkowski's avatar
Thomas Witkowski committed
319
320
    inline void setProjection(int i, Projection *p) 
    {
Thomas Witkowski's avatar
Thomas Witkowski committed
321
      projection[i] = p;
322
    }
323

Praetorius, Simon's avatar
Praetorius, Simon committed
324
325
326
327
328
329
    /// Set ElInfo's \ref boundary[i] 
    inline void setNeighbor(int i, Element* neigh) 
    { 
      neighbour[i] = neigh;
    }

Thomas Witkowski's avatar
Thomas Witkowski committed
330
    /// Set \ref det = d
Thomas Witkowski's avatar
Thomas Witkowski committed
331
332
    inline void setDet(double d) 
    { 
Thomas Witkowski's avatar
Thomas Witkowski committed
333
      det = d; 
334
    }
335

336
    /// Set \ref parametric = param
Thomas Witkowski's avatar
Thomas Witkowski committed
337
338
    inline void setParametric(bool param) 
    { 
339
      parametric = param; 
340
341
    }

342
343
344
345
346
347
348
349
350
351
352
353
    /// Set \ref refinementPath
    inline void setRefinementPath(unsigned long rPath)
    {
      refinementPath = rPath;
    } 

    /// Set \ref refinementPathLength
    inline void setRefinementPathLength(int length)
    {
      refinementPathLength = length;
    }

354
355
356
357
358
359
    /// Set ElInfo's \ref elType.
    inline void setType(int t) 
    { 
      elType = t; 
    }

360
361
362
    /** \} */


Thomas Witkowski's avatar
Thomas Witkowski committed
363
364
    /// Returns the absolute value of the determinant of the affine linear 
    /// parametrization's Jacobian
365
366
    virtual double calcDet() const;

Thomas Witkowski's avatar
Thomas Witkowski committed
367
368
    /// Used by non static method \ref calcDet(). Calculates the determinant
    /// for a given vector of vertex coordinates.
Thomas Witkowski's avatar
Thomas Witkowski committed
369
    double calcDet(const FixVec<WorldVector<double>, VERTEX> &coords) const;
370

371
372
373
    /// from CFE_Integration
    double calcSurfaceDet(VectorOfFixVecs<DimVec<double> > &surfVert) const;

Thomas Witkowski's avatar
Thomas Witkowski committed
374
375
    /// Checks whether flag is set in ElInfo's \ref fillFlag. If not, the 
    /// program exits.
376
377
    void testFlag(const Flag& flag) const;

Thomas Witkowski's avatar
Thomas Witkowski committed
378
379
    /// Transforms local barycentric coordinates of a point defined on this 
    /// element to global world coordinates.
380
381
    void coordToWorld(const DimVec<double>& lambda,
		      WorldVector<double>& world) const;
382
  
Thomas Witkowski's avatar
Thomas Witkowski committed
383
    /// Fills ElInfo's \ref det and \ref grdLambda entries.
384
385
    virtual void fillDetGrdLambda();

Thomas Witkowski's avatar
Thomas Witkowski committed
386
387
388
389
    /// Returns a pointer to a vector, which contains the barycentric coordinates
    /// with respect to \ref element of a point with world coordinates world.
    /// The barycentric coordinates are stored in lambda. 
    /// pure virtual => must be overriden in sub-class.
390
    virtual int worldToCoord(const WorldVector<double>& world, 
391
				   DimVec<double>* lambda) const = 0;
392

Thomas Witkowski's avatar
Thomas Witkowski committed
393
394
    /// Fills this ElInfo with macro element information of mel.
    /// pure virtual => must be overriden in sub-class.
395
396
    virtual void fillMacroInfo(const MacroElement *mel) = 0;

Thomas Witkowski's avatar
Thomas Witkowski committed
397
398
399
    /// Fills this ElInfo for the child ichild using hierarchy information and
    /// parent data parentInfo.
    /// pure virtual => must be overriden in sub-class.
400
    virtual void fillElInfo(int ichild, const ElInfo *parentInfo) = 0;
401

402

Thomas Witkowski's avatar
Thomas Witkowski committed
403
404
405
    void fillElInfo(const MacroElement *mel, 
		    int refinementPathLength, 
		    unsigned long refinementPath);
406

Thomas Witkowski's avatar
Thomas Witkowski committed
407
408
409
410
411
    /// Calculates the Jacobian of the barycentric coordinates on \element and
    /// stores the matrix in grd_lam. The return value of the function is the
    /// absolute value of the determinant of the affine linear paraetrization's 
    /// Jacobian.
    /// pure virtual => must be overriden in sub-class.
Thomas Witkowski's avatar
Thomas Witkowski committed
412
    virtual double calcGrdLambda(DimVec<WorldVector<double> >& grd_lam) = 0;
413

Thomas Witkowski's avatar
Thomas Witkowski committed
414
415
416
417
    /// calculates a normal of the given side (1d, 2d: edge, 3d: face) of \ref element.
    /// Returns the absolute value of the determinant of the
    /// transformation to the reference element.
    /// pure virtual => must be overriden in sub-class.
418
    virtual double getNormal(int side, WorldVector<double> &normal) const = 0;
419

Thomas Witkowski's avatar
Thomas Witkowski committed
420
421
422
423
    /// calculates a normal of the element in dim of world = dim + 1.
    /// Returns the absolute value of the determinant of the
    /// transformation to the reference element.
    /// pure virtual => must be overriden in sub-class.
424
425
    virtual double getElementNormal(WorldVector<double> &elementNormal) const 
    {
426
427
      FUNCNAME("ElInfo::getElementNormal()");

428
429
      ERROR("virtual function not implemented in this sub-class ");
    
430
      return 0.0;
431
    }
432

433
434
435
436
437
438
    /// Get ElInfo's \ref elType.
    inline int getType() const 
    { 
      return elType; 
    }

439
  protected:
440
    /// Pointer to the current mesh
Thomas Witkowski's avatar
Thomas Witkowski committed
441
    Mesh *mesh;
442

443
    /// Pointer to the current element
Thomas Witkowski's avatar
Thomas Witkowski committed
444
    Element *element;
445

Thomas Witkowski's avatar
Thomas Witkowski committed
446
447
    /// \ref element is child of element parent
    Element *parent;
448

449
450
    /// \ref element is an element of the binary tree located at MacroElement 
    /// macroElement
Thomas Witkowski's avatar
Thomas Witkowski committed
451
    MacroElement *macroElement;
452

453
454
    /// Indicates wich elements will be called and wich information should be
    /// present while mesh traversal.
Thomas Witkowski's avatar
Thomas Witkowski committed
455
    Flag fillFlag;
456

457
458
459
    /// Level of the element. The level is zero for macro elements and the level
    /// of the children is (level of the parent + 1). level_ is filled always by
    /// the traversal routines.
460
461
    unsigned char level;

462
463
464
    /// Elements type index. This is used only for 3d, where type can be either 0, 1 or
    /// 2. In all other cases type is not used and the variable is set to 0.
    /// In 3d, it is filled automatically by the traversal routines.
465
466
    int elType;

467
    /// This ElInfo is the iChild-th child of the parent element.
468
469
    int iChild;

470
471
    /// \ref coord[i] is a WorldVector<double> storing the world coordinates of the
    /// i-th vertex of element \ref element.
Thomas Witkowski's avatar
Thomas Witkowski committed
472
    FixVec<WorldVector<double>, VERTEX> coord;
473
474

    /** \brief 
Thomas Witkowski's avatar
Thomas Witkowski committed
475
     * boundary[i] is the BoundaryType of the i-th edge/face
476
     * for i=0,...,N_NEIGH - 1. In 3d 
Thomas Witkowski's avatar
Thomas Witkowski committed
477
     * (*boundary)[N_FACES + i] is a pointer to the Boundary
478
     * object of the i-th edge, for i=0,..,N_EDGES - 1. It is
479
     * a NULL for an interior edge/face.
480
     */
Thomas Witkowski's avatar
Thomas Witkowski committed
481
    FixVec<BoundaryType, BOUNDARY> boundary;
482

483
    /// Vector storing pointers to projections for each face, edge, vertex.
Thomas Witkowski's avatar
Thomas Witkowski committed
484
    FixVec<Projection*, PROJECTION> projection;
485

486
487
    /// oppCoord[i] coordinates of the i-th neighbour vertex opposite the
    /// common edge/face.
Thomas Witkowski's avatar
Thomas Witkowski committed
488
    FixVec<WorldVector<double>, NEIGH> oppCoord;
489

490
    /// neighbour[i] pointer to the element at the edge/face with local index i.
491
    /// It is a NULL for boundary edges/faces.
Thomas Witkowski's avatar
Thomas Witkowski committed
492
    FixVec<Element*, NEIGH> neighbour;
493

494
495
    /// neighbourCoord[i][j] are the coordinate of the j-th vertex of the i-th
    /// neighbour element with the common edge/face.
496
    FixVec<FixVec<WorldVector<double>, VERTEX>, NEIGH> neighbourCoord;
497

498
    /// oppVertex[i] is undefined if neighbour[i] is a pointer to NULL. 
499
500
    /// Otherwise it is the local index of the neighbour's vertex opposite the
    /// common edge/face.
501
    FixVec<int, NEIGH> oppVertex;
502

Thomas Witkowski's avatar
Thomas Witkowski committed
503
    /// Elements determinant.
Thomas Witkowski's avatar
Thomas Witkowski committed
504
    double det;
505

Thomas Witkowski's avatar
Thomas Witkowski committed
506
    /// Gradient of lambda.
Thomas Witkowski's avatar
Thomas Witkowski committed
507
    DimVec<WorldVector<double> > grdLambda;
508

Thomas Witkowski's avatar
Thomas Witkowski committed
509
    /// True, if this elInfo stores parametrized information. False, otherwise.
510
    bool parametric;
511

Thomas Witkowski's avatar
Thomas Witkowski committed
512
    /// Stores the world dimension.
Thomas Witkowski's avatar
Thomas Witkowski committed
513
514
    int dimOfWorld;

515
516
517
518
    unsigned long refinementPath;

    int refinementPathLength;

519
  public:
Thomas Witkowski's avatar
Thomas Witkowski committed
520
    static std::vector<std::map<std::pair<int, unsigned long>, mtl::dense2D<double> > > subElemMatrices;
521
    
Thomas Witkowski's avatar
Thomas Witkowski committed
522
    static std::vector<std::map<std::pair<int, unsigned long>, mtl::dense2D<double> > > subElemGradMatrices;
523

524
525
    /// child_vertex[el_type][child][i] = father's local vertex index of new 
    /// vertex i. 4 stands for the newly generated vertex .     
526
527
    static const int childVertex[3][2][4];

528
529
530
531
    /// child_edge[el_type][child][i] = father's local edge index of new edge i.
    /// new edge 2 is half of old edge 0, new edges 4,5 are really new edges, and
    /// value is different: child_edge[][][4,5] = index of same edge in other
    /// child.
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
    static const int childEdge[3][2][6];

    friend class ElInfo1d;
    friend class ElInfo2d;
    friend class ElInfo3d;
  };

}

#include "ElInfo1d.h"
#include "ElInfo2d.h"
#include "ElInfo3d.h"

#endif  // AMDIS_ELINFO_H