ElInfo.h 15.6 KB
Newer Older
1
2
3
4
// ============================================================================
// ==                                                                        ==
// == AMDiS - Adaptive multidimensional simulations                          ==
// ==                                                                        ==
5
// ==  http://www.amdis-fem.org                                              ==
6
7
// ==                                                                        ==
// ============================================================================
8
9
10
11
12
13
14
15
16
17
18
19
//
// Software License for AMDiS
//
// Copyright (c) 2010 Dresden University of Technology 
// All rights reserved.
// Authors: Simon Vey, Thomas Witkowski et al.
//
// This file is part of AMDiS
//
// See also license.opensource.txt in the distribution.


20
21
22
23
24
25

/** \file ElInfo.h */

#ifndef AMDIS_ELINFO_H
#define AMDIS_ELINFO_H

26
27
#include <boost/numeric/mtl/mtl.hpp>

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

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: 
51
    /// Protected constructor. Avoids instatiation of the basis class
52
53
54
55
56
57
58
59
60
    ElInfo();

    /** \brief
     * Protected constructor. Avoids instatiation of the basis class.
     * \param mesh pointer to the corresponding mesh.
     */
    ElInfo(Mesh *mesh);

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

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

90
      return *this;
91
    }
92
93
94
95
96
97

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

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

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

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

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

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

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

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

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

    /** \brief
Thomas Witkowski's avatar
Thomas Witkowski committed
150
     * Get ElInfo's \ref coord[i]. This is a WorldVector<double> filled with the
151
152
     * coordinates of the i-th vertex of element \ref el.
     */
Thomas Witkowski's avatar
Thomas Witkowski committed
153
154
    inline const WorldVector<double>& getCoord(int i) const 
    { 
Thomas Witkowski's avatar
Thomas Witkowski committed
155
      return coord[i]; 
156
    }
157
158

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

    /** \brief
Thomas Witkowski's avatar
Thomas Witkowski committed
168
     * Get ElInfo's \ref coord. This is a FixVec<WorldVector<double> > filled with the
169
170
     * coordinates of the all vertice of element \ref el.
     */
Thomas Witkowski's avatar
Thomas Witkowski committed
171
172
    inline const FixVec<WorldVector<double>, VERTEX>& getCoords() const 
    { 
Thomas Witkowski's avatar
Thomas Witkowski committed
173
      return coord; 
174
    }
175

Thomas Witkowski's avatar
Thomas Witkowski committed
176
    /// Get ElInfo's \ref oppCoord[i]
Thomas Witkowski's avatar
Thomas Witkowski committed
177
178
    inline WorldVector<double>& getOppCoord(int i) 
    { 
Thomas Witkowski's avatar
Thomas Witkowski committed
179
      return oppCoord[i]; 
180
    }
181

Thomas Witkowski's avatar
Thomas Witkowski committed
182
    /// Get ElInfo's \ref boundary[i] 
Thomas Witkowski's avatar
Thomas Witkowski committed
183
184
    inline BoundaryType getBoundary(int i) const 
    { 
Thomas Witkowski's avatar
Thomas Witkowski committed
185
      return boundary[i]; 
186
    }
187

188
    /// Get boundary type of i-th vertex/edge/face (pos).
189
190
    BoundaryType getBoundary(GeoIndex pos, int i);

Thomas Witkowski's avatar
Thomas Witkowski committed
191
    /// Get ElInfo's \ref neighbour[i]
Thomas Witkowski's avatar
Thomas Witkowski committed
192
193
    inline Element* getNeighbour(int i) const 
    { 
Thomas Witkowski's avatar
Thomas Witkowski committed
194
      return neighbour[i]; 
195
    }
196

197
    /// Get ElInfo's \ref neighbourCoord[i]
Thomas Witkowski's avatar
Thomas Witkowski committed
198
199
    inline FixVec<WorldVector<double>, VERTEX> getNeighbourCoord(int i) const 
    {
200
      return neighbourCoord[i];
201
202
    }

203
    /// Get ElInfo's \ref oppVertex[i] 
204
    inline int getOppVertex(int i) const 
Thomas Witkowski's avatar
Thomas Witkowski committed
205
    { 
206
      return oppVertex[i]; 
207
    }
208

Thomas Witkowski's avatar
Thomas Witkowski committed
209
210
    virtual int getSideOfNeighbour(int i) 
    { 
211
      return oppVertex[i]; 
212
    }
213

Thomas Witkowski's avatar
Thomas Witkowski committed
214
    /// Get ElInfo's \ref det
Thomas Witkowski's avatar
Thomas Witkowski committed
215
216
    inline double getDet() const 
    { 
Thomas Witkowski's avatar
Thomas Witkowski committed
217
      return det; 
218
    }
219

220
    /// Returns \ref grdLambda
Thomas Witkowski's avatar
Thomas Witkowski committed
221
222
    inline const DimVec<WorldVector<double> >& getGrdLambda() const 
    { 
Thomas Witkowski's avatar
Thomas Witkowski committed
223
      return grdLambda; 
224
    }
225
226
227
228
229
230
231
232
    
    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];
    }
233

Thomas Witkowski's avatar
Thomas Witkowski committed
234
    /// Returns \ref projection[i]
Thomas Witkowski's avatar
Thomas Witkowski committed
235
236
    inline Projection *getProjection(int i) const 
    {
Thomas Witkowski's avatar
Thomas Witkowski committed
237
      return projection[i];
238
    }
239

240
    /// Returns \ref parametric
241
    inline bool getParametric() const
Thomas Witkowski's avatar
Thomas Witkowski committed
242
    { 
243
      return parametric; 
244
245
    }

246
247
248
249
250
251
252
253
254
255
256
257
    /// Returns \ref refinementPath
    inline unsigned long getRefinementPath() const
    {
      return refinementPath;
    } 

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

258
259
    virtual mtl::dense2D<double>& getSubElemCoordsMat(int degree) const 
    {
Thomas Witkowski's avatar
Thomas Witkowski committed
260
      return subElemMatrices[degree][std::make_pair(refinementPathLength, refinementPath)];
261
    }
262

263
    virtual mtl::dense2D<double>& getSubElemGradCoordsMat(int degree) const 
264
    {
Thomas Witkowski's avatar
Thomas Witkowski committed
265
      return subElemGradMatrices[degree][std::make_pair(refinementPathLength, refinementPath)];
266
    }
267
268
269
270
271
272
273

    /** \} */ 

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

Thomas Witkowski's avatar
Thomas Witkowski committed
274
    /// Set ElInfo's \ref mesh
Thomas Witkowski's avatar
Thomas Witkowski committed
275
276
    inline void setMesh(Mesh* aMesh) 
    { 
Thomas Witkowski's avatar
Thomas Witkowski committed
277
      mesh = aMesh; 
278
    }
279

Thomas Witkowski's avatar
Thomas Witkowski committed
280
    /// Set ElInfo's \ref macroElement
Thomas Witkowski's avatar
Thomas Witkowski committed
281
282
    inline void setMacroElement(MacroElement* mel) 
    { 
Thomas Witkowski's avatar
Thomas Witkowski committed
283
      macroElement = mel; 
284
    }
285

286
    /// Set ElInfo's \ref element
Thomas Witkowski's avatar
Thomas Witkowski committed
287
288
    inline void setElement(Element* elem) 
    { 
Thomas Witkowski's avatar
Thomas Witkowski committed
289
      element = elem; 
290
    }
291

Thomas Witkowski's avatar
Thomas Witkowski committed
292
    /// Set ElInfo's \ref parent
Thomas Witkowski's avatar
Thomas Witkowski committed
293
294
    inline void setParent(Element* elem) 
    { 
Thomas Witkowski's avatar
Thomas Witkowski committed
295
      parent = elem; 
296
    }
297

Thomas Witkowski's avatar
Thomas Witkowski committed
298
    /// Set ElInfo's \ref fillFlag
Thomas Witkowski's avatar
Thomas Witkowski committed
299
300
    inline void setFillFlag(Flag flag) 
    { 
Thomas Witkowski's avatar
Thomas Witkowski committed
301
      fillFlag = flag; 
302
    }
303

Thomas Witkowski's avatar
Thomas Witkowski committed
304
    /// Sets ElInfo's \ref coord[i]. 
305
    inline void setCoord(int i, WorldVector<double>& c) 
Thomas Witkowski's avatar
Thomas Witkowski committed
306
    { 
Thomas Witkowski's avatar
Thomas Witkowski committed
307
      coord[i] = c; 
308
    }
309

310
    /// Sets ElInfo's \ref coord. 
311
    inline void setCoords(FixVec<WorldVector<double>, VERTEX >& c) 
Thomas Witkowski's avatar
Thomas Witkowski committed
312
    { 
Thomas Witkowski's avatar
Thomas Witkowski committed
313
      coord = c; 
314
    }
315

316
    /// Set ElInfo's \ref level
Thomas Witkowski's avatar
Thomas Witkowski committed
317
318
    inline void setLevel(int l) 
    { 
319
320
321
      level = l; 
    }

Thomas Witkowski's avatar
Thomas Witkowski committed
322
    /// Set ElInfo's \ref boundary[i] 
Thomas Witkowski's avatar
Thomas Witkowski committed
323
324
    inline void setBoundary(int i, BoundaryType t) 
    { 
Thomas Witkowski's avatar
Thomas Witkowski committed
325
      boundary[i] = newBound(boundary[i], t);
326
    }
327

Thomas Witkowski's avatar
Thomas Witkowski committed
328
    /// Set \ref projection[i] = p
Thomas Witkowski's avatar
Thomas Witkowski committed
329
330
    inline void setProjection(int i, Projection *p) 
    {
Thomas Witkowski's avatar
Thomas Witkowski committed
331
      projection[i] = p;
332
    }
333

Praetorius, Simon's avatar
Praetorius, Simon committed
334
335
336
337
338
339
    /// Set ElInfo's \ref boundary[i] 
    inline void setNeighbor(int i, Element* neigh) 
    { 
      neighbour[i] = neigh;
    }

Thomas Witkowski's avatar
Thomas Witkowski committed
340
    /// Set \ref det = d
Thomas Witkowski's avatar
Thomas Witkowski committed
341
342
    inline void setDet(double d) 
    { 
Thomas Witkowski's avatar
Thomas Witkowski committed
343
      det = d; 
344
    }
345

346
    /// Set \ref parametric = param
Thomas Witkowski's avatar
Thomas Witkowski committed
347
348
    inline void setParametric(bool param) 
    { 
349
      parametric = param; 
350
351
    }

352
353
354
355
356
357
358
359
360
361
362
363
    /// Set \ref refinementPath
    inline void setRefinementPath(unsigned long rPath)
    {
      refinementPath = rPath;
    } 

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

364
365
366
367
368
369
    /// Set ElInfo's \ref elType.
    inline void setType(int t) 
    { 
      elType = t; 
    }

370
371
372
373
374
375
376
377
378
379
380
381
382
    /** \} */


    /** \brief
     * Returns the absolute value of the determinant of the affine linear 
     * parametrization's Jacobian
     */
    virtual double calcDet() const;

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

385
386
387
    /// from CFE_Integration
    double calcSurfaceDet(VectorOfFixVecs<DimVec<double> > &surfVert) const;

388
    /// Checks whether flag is set in ElInfo's \ref fillFlag. If not, the program exits.
389
390
391
    void testFlag(const Flag& flag) const;

    /** \brief
392
393
     * Transforms local barycentric coordinates of a point defined on this element
     * to global world coordinates.
394
     */
395
396
    void coordToWorld(const DimVec<double>& lambda,
		      WorldVector<double>& world) const;
397
  
Thomas Witkowski's avatar
Thomas Witkowski committed
398
    /// Fills ElInfo's \ref det and \ref grdLambda entries.
399
400
401
402
403
404
405
406
407
    virtual void fillDetGrdLambda();

    /** \brief
     * 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.
     */
    virtual const int worldToCoord(const WorldVector<double>& world, 
408
				   DimVec<double>* lambda) const = 0;
409
410
411
412
413
414
415
416
417
418
419
420

    /** \brief
     * Fills this ElInfo with macro element information of mel.
     * pure virtual => must be overriden in sub-class.
     */
    virtual void fillMacroInfo(const MacroElement *mel) = 0;

    /** \brief
     * Fills this ElInfo for the child ichild using hierarchy information and
     * parent data parentInfo.
     * pure virtual => must be overriden in sub-class.
     */
421
    virtual void fillElInfo(int ichild, const ElInfo *parentInfo) = 0;
422
423
424
425
426
427
428

    /** \brief
     * 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
429
    virtual double calcGrdLambda(DimVec<WorldVector<double> >& grd_lam) = 0;
430
431

    /** \brief
432
     * calculates a normal of the given side (1d, 2d: edge, 3d: face) of \ref element.
433
434
435
436
     * Returns the absolute value of the determinant of the
     * transformation to the reference element.
     * pure virtual => must be overriden in sub-class.
     */
437
    virtual double getNormal(int side, WorldVector<double> &normal) const = 0;
438
439
440
441
442
443
444
445
446
447


    /** \brief
     * 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.
     */
    virtual double getElementNormal(WorldVector<double> &elementNormal) const 
    {
448
449
      FUNCNAME("ElInfo::getElementNormal()");

450
451
      ERROR("virtual function not implemented in this sub-class ");
    
452
      return 0.0;
453
    }
454

455
456
457
458
459
460
    /// Get ElInfo's \ref elType.
    inline int getType() const 
    { 
      return elType; 
    }

461
  protected:
462
    /// Pointer to the current mesh
Thomas Witkowski's avatar
Thomas Witkowski committed
463
    Mesh *mesh;
464

465
    /// Pointer to the current element
Thomas Witkowski's avatar
Thomas Witkowski committed
466
    Element *element;
467

Thomas Witkowski's avatar
Thomas Witkowski committed
468
469
    /// \ref element is child of element parent
    Element *parent;
470
471
472

    /** \brief 
     * \ref element is an element of the binary tree located at MacroElement 
Thomas Witkowski's avatar
Thomas Witkowski committed
473
     * macroElement
474
     */
Thomas Witkowski's avatar
Thomas Witkowski committed
475
    MacroElement *macroElement;
476
477
478
479
480

    /** \brief
     * Indicates wich elements will be called and wich information should be
     * present while mesh traversal.
     */
Thomas Witkowski's avatar
Thomas Witkowski committed
481
    Flag fillFlag;
482
483
484
485
486
487

    /** \brief 
     * 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.
     */
488
489
    unsigned char level;

490
491
492
493
494
495
496
    /** \brief
     * 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.
     */
    int elType;

497
498
499
500
501
    /** \brief
     * This ElInfo is the iChild-th child of the parent element.
     */
    int iChild;

502
    /** \brief 
Thomas Witkowski's avatar
Thomas Witkowski committed
503
     * \ref coord[i] is a WorldVector<double> storing the world coordinates of the
504
505
     * i-th vertex of element \ref element.
     */
Thomas Witkowski's avatar
Thomas Witkowski committed
506
    FixVec<WorldVector<double>, VERTEX> coord;
507
508

    /** \brief 
Thomas Witkowski's avatar
Thomas Witkowski committed
509
     * boundary[i] is the BoundaryType of the i-th edge/face
510
     * for i=0,...,N_NEIGH - 1. In 3d 
Thomas Witkowski's avatar
Thomas Witkowski committed
511
     * (*boundary)[N_FACES + i] is a pointer to the Boundary
512
513
514
     * object of the i-th edge, for i=0,..,N_EDGES - 1. It is
     * a pointer to NULL for an interior edge/face.
     */
Thomas Witkowski's avatar
Thomas Witkowski committed
515
    FixVec<BoundaryType, BOUNDARY> boundary;
516
517
518
519

    /** \brief
     * Vector storing pointers to projections for each face, edge, vertex.
     */
Thomas Witkowski's avatar
Thomas Witkowski committed
520
    FixVec<Projection*, PROJECTION> projection;
521
522

    /** \brief 
Thomas Witkowski's avatar
Thomas Witkowski committed
523
     * oppCoord[i] coordinates of the i-th neighbour vertex opposite the
524
525
     * common edge/face.
     */
Thomas Witkowski's avatar
Thomas Witkowski committed
526
    FixVec<WorldVector<double>, NEIGH> oppCoord;
527
528

    /** \brief 
Thomas Witkowski's avatar
Thomas Witkowski committed
529
     * neighbour[i] pointer to the element at the edge/face with local index i.
530
531
     * It is a pointer to NULL for boundary edges/faces.
     */
Thomas Witkowski's avatar
Thomas Witkowski committed
532
    FixVec<Element*, NEIGH> neighbour;
533
534

    /** \brief
535
     * neighbourCoord[i][j] are the coordinate of the j-th vertex of the i-th
536
537
     * neighbour element with the common edge/face.
     */
538
    FixVec<FixVec<WorldVector<double>, VERTEX>, NEIGH> neighbourCoord;
539
540

    /** \brief 
Thomas Witkowski's avatar
Thomas Witkowski committed
541
     * oppVertex[i] is undefined if neighbour[i] is a pointer to NULL. 
542
543
544
     * Otherwise it is the local index of the neighbour's vertex opposite the
     * common edge/face.
     */
545
    FixVec<int, NEIGH> oppVertex;
546

Thomas Witkowski's avatar
Thomas Witkowski committed
547
    /// Elements determinant.
Thomas Witkowski's avatar
Thomas Witkowski committed
548
    double det;
549

Thomas Witkowski's avatar
Thomas Witkowski committed
550
    /// Gradient of lambda.
Thomas Witkowski's avatar
Thomas Witkowski committed
551
    DimVec<WorldVector<double> > grdLambda;
552

Thomas Witkowski's avatar
Thomas Witkowski committed
553
    /// True, if this elInfo stores parametrized information. False, otherwise.
554
    bool parametric;
555

Thomas Witkowski's avatar
Thomas Witkowski committed
556
    /// Stores the world dimension.
Thomas Witkowski's avatar
Thomas Witkowski committed
557
558
    int dimOfWorld;

559
560
561
562
    unsigned long refinementPath;

    int refinementPathLength;

563
  public:
Thomas Witkowski's avatar
Thomas Witkowski committed
564
    static std::vector<std::map<std::pair<int, unsigned long>, mtl::dense2D<double> > > subElemMatrices;
565
    
Thomas Witkowski's avatar
Thomas Witkowski committed
566
    static std::vector<std::map<std::pair<int, unsigned long>, mtl::dense2D<double> > > subElemGradMatrices;
567

568
569
570
571
572
573
574
    /** \brief 
     * child_vertex[el_type][child][i] = father's local vertex index of new 
     * vertex i. 4 stands for the newly generated vertex .
     */
    static const int childVertex[3][2][4];

    /** \brief 
575
     * child_edge[el_type][child][i] = father's local edge index of new edge i.
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
     * 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.
     */
    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