interpol.h 16.5 KB
Newer Older
Phillip Lino Rall's avatar
Phillip Lino Rall committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
/**********************************************************************************
 * Copyright 2010 Christoph Pflaum 
 * 		Department Informatik Lehrstuhl 10 - Systemsimulation
 *		Friedrich-Alexander Universität Erlangen-Nürnberg
 * 
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 **********************************************************************************/

// ------------------------------------------------------------
//
Phillip Lino Rall's avatar
Phillip Lino Rall committed
21
// variable.h
Phillip Lino Rall's avatar
Phillip Lino Rall committed
22
23
24
25
26
27
28
29
30
//
// ------------------------------------------------------------

#ifndef INTERPOL_H
#define INTERPOL_H

/////////////////////////////////////////////////////////////
// 1. Interpolate from  blockgrid to rectangular blockgrid
// 2. Interpolate from  blockgrid  to  blockgrid
31
32
// 3. Interpolate from Variable on a blockgrid to any point using structured intermediate grid
// 4. Interpolate from blockgrid direct to any point
Phillip Lino Rall's avatar
Phillip Lino Rall committed
33
34
35
36
37
38
/////////////////////////////////////////////////////////////

/////////////////////////////////////////////////////////////
// 1. Interpolate from  blockgrid to rectangular blockgrid
/////////////////////////////////////////////////////////////

Christoph Pflaum's avatar
Christoph Pflaum committed
39
40
41
42
/** \addtogroup InterpolationOperators **/
/* @{ */  
/**
 * Interpolation 3D:
Phillip Lino Rall's avatar
Phillip Lino Rall committed
43
data structure on structured grid
Christoph Pflaum's avatar
Christoph Pflaum committed
44
 \verbatim
Phillip Lino Rall's avatar
Phillip Lino Rall committed
45
46
ny    *  *  *  *  *  *
ny-1  *  +  +  +  +  *
Phillip Lino Rall's avatar
Phillip Lino Rall committed
47
48
49
50
3     *  +  +  +  +  *
2     *  +  +  +  +  *
1     *  +  +  +  +  *
0     *  *  *  *  *  *
Phillip Lino Rall's avatar
Phillip Lino Rall committed
51
      0  1  2  3 nx-1 nx
Christoph Pflaum's avatar
Christoph Pflaum committed
52
  \endverbatim      
Phillip Lino Rall's avatar
Phillip Lino Rall committed
53
 * interpolates data from blockgrid_ to rectangular block [pWSD, pENT]
Christoph Pflaum's avatar
Christoph Pflaum committed
54
**/
Phillip Lino Rall's avatar
Phillip Lino Rall committed
55
56
class Interpolate_on_structured_grid {
 public:
Christoph Pflaum's avatar
Christoph Pflaum committed
57
/**
Phillip Lino Rall's avatar
Phillip Lino Rall committed
58
59
60
61
62
63
64
 * preparation for interpolation
 @param  nx_ number of structured grid points x-direction
 @param  ny_ number of structured grid points y-direction
 @param  nz_ number of structured grid points z-direction
 @param  pWSD Corner WSD of structured grid
 @param  pENT Corner WSD of structured grid
 @param  blockgrid_ of unstructured grid
Christoph Pflaum's avatar
Christoph Pflaum committed
65
**/
Phillip Lino Rall's avatar
Phillip Lino Rall committed
66
67
68
  Interpolate_on_structured_grid(int nx_, int ny_, int nz_,
				 D3vector pWSD, D3vector pENT,
				 Blockgrid& blockgrid_);
Phillip Lino Rall's avatar
Phillip Lino Rall committed
69
70
  Interpolate_on_structured_grid(int nx_, int ny_, int nz_,
				 Blockgrid& blockgrid_);
71
  ~Interpolate_on_structured_grid();
Christoph Pflaum's avatar
Christoph Pflaum committed
72
/**
Phillip Lino Rall's avatar
Phillip Lino Rall committed
73
74
75
 * interpolates from Variable u(of unstructured blockgrid) to structured data
 @param  u:  Variable on unstructured blockgrid
 @param  data: pointer to structured grid data i+nx*(j+ny*k)
Christoph Pflaum's avatar
Christoph Pflaum committed
76
**/
Phillip Lino Rall's avatar
Phillip Lino Rall committed
77
78
  template <class DTyp>
    void interpolate(Variable<DTyp>& u, DTyp* data, DTyp defaultInterpolation);
Phillip Lino Rall's avatar
Phillip Lino Rall committed
79
80
81
82
  public:
  int nx, ny, nz;
  D3vector pENT,pWSD;
  private:
Phillip Lino Rall's avatar
Phillip Lino Rall committed
83
84
85
86
87
88
  int* ids_hex;
  int *ids_i, *ids_j, *ids_k;
  int *typ_tet;

  D3vector *lambda;

Phillip Lino Rall's avatar
Phillip Lino Rall committed
89
  
Phillip Lino Rall's avatar
Phillip Lino Rall committed
90
91
92
93
94
  double hx, hy, hz;

  Blockgrid*        blockgrid;
  Unstructured_grid*       ug;
};
Christoph Pflaum's avatar
Christoph Pflaum committed
95
/* @} */
96
97


Phillip Lino Rall's avatar
Phillip Lino Rall committed
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
template <class DTyp>
class Give_corner_data_of_cube {
 public:
  Give_corner_data_of_cube(Variable<DTyp>& u_, int hex_, int i_, int j_, int k_);
  
  DTyp WSD() { return u->template Give_data<hexahedronEl>(id, i,   j,   k,   Nx, Ny); }
  DTyp ESD() { return u->template Give_data<hexahedronEl>(id, i+1, j,   k,   Nx, Ny); }
  DTyp WND() { return u->template Give_data<hexahedronEl>(id, i,   j+1, k,   Nx, Ny); }
  DTyp END() { return u->template Give_data<hexahedronEl>(id, i+1, j+1, k,   Nx, Ny); }
  DTyp WST() { return u->template Give_data<hexahedronEl>(id, i,   j,   k+1, Nx, Ny); }
  DTyp EST() { return u->template Give_data<hexahedronEl>(id, i+1, j,   k+1, Nx, Ny); }
  DTyp WNT() { return u->template Give_data<hexahedronEl>(id, i,   j+1, k+1, Nx, Ny); }
  DTyp ENT() { return u->template Give_data<hexahedronEl>(id, i+1, j+1, k+1, Nx, Ny); }

 private:
  int id, i, j, k;
  int Nx, Ny;
  Variable<DTyp>* u;
};

template <class DTyp>
Give_corner_data_of_cube<DTyp>::Give_corner_data_of_cube(Variable<DTyp>& u_,
							 int hex_, int i_, int j_, int k_) {
  Blockgrid*        blockgrid;

  u = &u_;
  blockgrid = u->Give_blockgrid();
  id = hex_; i = i_;  j = j_;  k = k_;
  
  Nx = blockgrid->Give_Nx_hexahedron(id);
  Ny = blockgrid->Give_Ny_hexahedron(id);
}


template <class DTyp>
void Interpolate_on_structured_grid::interpolate(Variable<DTyp>& u, DTyp* data, DTyp defaultInterpolation) {
  int i,j,k, id_hex, typ;
  int ind_global;


  for(int id=0;id<ug->Give_number_hexahedra();++id)
    u.template Update<hexahedronEl>(id);

  for(int ks = 0; ks < nz;++ks)
    for(int js = 0; js < ny;++js)
      for(int is = 0; is < nx;++is) {
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
    ind_global = is+nx*(js+ny*ks);
    i = ids_i[ind_global];
    j = ids_j[ind_global];
    k = ids_k[ind_global];
    id_hex = ids_hex[ind_global];

    /*
    // test : das geht nicht::
    if(id_hex < 0) {
      ind_global = is+nx*((ny-1-js)+ny*ks);
      i = ids_i[ind_global];
      j = ids_j[ind_global];
      k = ids_k[ind_global];
      id_hex = ids_hex[ind_global];
    }
*/
Phillip Lino Rall's avatar
Phillip Lino Rall committed
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
	if(id_hex < 0) data[ind_global] = defaultInterpolation;
	else {
	  Give_corner_data_of_cube<DTyp> du(u, id_hex, i,j,k);

	  typ = typ_tet[ind_global];

	
	  /*
	  if( ind_global == 3)
	    cout << " \n ind_global: " << is + nx * (js + ny * ks)
	         << " typ: " << typ
	         << " id_hex " << id_hex
	         << " i: " << i
	         << " j: " << j
	         << " k: " << k
	         << endl;
  	  */

178
      if(typ==0) data[ind_global] = interpolate_in_tet(lambda[ind_global],
Phillip Lino Rall's avatar
Phillip Lino Rall committed
179
							   du.WND(),du.WNT(),du.WST(),du.EST());
180
      if(typ==1) data[ind_global] = interpolate_in_tet(lambda[ind_global],
Phillip Lino Rall's avatar
Phillip Lino Rall committed
181
							   du.EST(),du.WND(),du.WST(),du.ESD());
182
      if(typ==2) data[ind_global] = interpolate_in_tet(lambda[ind_global],
Phillip Lino Rall's avatar
Phillip Lino Rall committed
183
							   du.WND(),du.WSD(),du.WST(),du.ESD());
184
185
186
      if(typ==3) data[ind_global] = interpolate_in_tet(lambda[ind_global],
                               du.EST(),du.WND(),du.ESD(),du.END());
      if(typ==4) data[ind_global] = interpolate_in_tet(lambda[ind_global],
Phillip Lino Rall's avatar
Phillip Lino Rall committed
187
							   du.ENT(),du.WNT(),du.EST(),du.END());
188
      if(typ==5) data[ind_global] = interpolate_in_tet(lambda[ind_global],
Phillip Lino Rall's avatar
Phillip Lino Rall committed
189
190
191
192
193
194
195
196
197
							   du.WNT(),du.WND(),du.EST(),du.END());
	}
      }
}

/////////////////////////////////////////////////////////////
// 2. Interpolate from  blockgrid  to  blockgrid
/////////////////////////////////////////////////////////////

Christoph Pflaum's avatar
Christoph Pflaum committed
198
199
200
/** \addtogroup InterpolationOperators **/
/* @{ */  
/**
Phillip Lino Rall's avatar
Phillip Lino Rall committed
201
 * interpolates data from blockgrid_from to blockgrid_to_ using an internal rectangular grid if size nx,ny,nz
Christoph Pflaum's avatar
Christoph Pflaum committed
202
**/
Phillip Lino Rall's avatar
Phillip Lino Rall committed
203
204
class Interpolate_on_block_grid {
 public:
Christoph Pflaum's avatar
Christoph Pflaum committed
205
/**
Phillip Lino Rall's avatar
Phillip Lino Rall committed
206
207
208
209
210
 * preparation for interpolation
 @param  nx_ number of structured grid points x-direction
 @param  ny_ number of structured grid points y-direction
 @param  nz_ number of structured grid points z-direction
 @param  blockgrid_ of unstructured grid
Christoph Pflaum's avatar
Christoph Pflaum committed
211
**/
Phillip Lino Rall's avatar
Phillip Lino Rall committed
212
213
214
215
216
217
218
219
220
  Interpolate_on_block_grid(int nx_, int ny_, int nz_,
		            Blockgrid* blockgrid_from, Blockgrid* blockgrid_to_);
  ~Interpolate_on_block_grid();
  
  /**
   * interpoliert Daten. Falls an einem Punkt nicht interpoliert werden kann
   * da U_from keine Zelle hat, dann wird
   *     defaultInterpolation
   * verwendet.
Christoph Pflaum's avatar
Christoph Pflaum committed
221
   **/ 
Phillip Lino Rall's avatar
Phillip Lino Rall committed
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
  void interpolate(Variable<double>* U_from, Variable<double>* U_to, double defaultInterpolation = 0.0);
    		
  double evaluate(double coord_x, double coord_y, double coord_z);
		  
private:
  int nx, ny, nz;
  double hx, hy, hz;
  Interpolate_on_structured_grid* interpolatorStructured;
  double* data;
  Blockgrid* blockgrid_to;
  
  D3vector pWSD;
  D3vector pENT;
  
};
Christoph Pflaum's avatar
Christoph Pflaum committed
237
/* @} */
Phillip Lino Rall's avatar
Phillip Lino Rall committed
238

Phillip Lino Rall's avatar
Phillip Lino Rall committed
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255

/////////////////////////////////////////////////////////////
// 3. Interpolate from Variable on a blockgrid to any point using structured intermediate grid  
/////////////////////////////////////////////////////////////

/*
class Intermadiate_grid_for_PointInterpolator : public Interpolate_on_structured_grid
{
public:
  Intermadiate_grid_for_PointInterpolator(int nx_, int ny_, int nz_, Variable<double>* U_from);
  int nx, ny, nz;
  Interpolate_on_structured_grid* interpolatorStructured(int nx_, int ny_, int nz_,D3vector pWSD, D3vector pENT,
		                                          Variable<double>* U_from);  
  
  D3vector pWSD;
  D3vector pENT;
};
Christoph Pflaum's avatar
Christoph Pflaum committed
256
*/
Phillip Lino Rall's avatar
Phillip Lino Rall committed
257

Christoph Pflaum's avatar
Christoph Pflaum committed
258
259
260
/** \addtogroup InterpolationOperators **/
/* @{ */  
/**
Phillip Lino Rall's avatar
Phillip Lino Rall committed
261
262
263
264
265
 * interpolates data from blockgrid_from to blockgrid_to_ using an internal rectangular grid if size nx,ny,nz
***/
class PointInterpolator {
  friend Interpolate_on_structured_grid;
 public:
Christoph Pflaum's avatar
Christoph Pflaum committed
266
/**
Phillip Lino Rall's avatar
Phillip Lino Rall committed
267
268
269
270
271
 * preparation for interpolation
 @param  nx_ number of structured grid points x-direction
 @param  ny_ number of structured grid points y-direction
 @param  nz_ number of structured grid points z-direction
 @param  blockgrid_ of unstructured grid
Christoph Pflaum's avatar
Christoph Pflaum committed
272
**/
Phillip Lino Rall's avatar
Phillip Lino Rall committed
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
  PointInterpolator(int nx_, int ny_, int nz_,
		    Variable<double>* U_from, double defaultInterpolation_ = 0.0);
  
  PointInterpolator(int nx_, int ny_, int nz_,
	            D3vector pWSD, D3vector pENT,
		    Variable<double>* U_from, double defaultInterpolation_ = 0.0);  
  
  PointInterpolator(Interpolate_on_structured_grid* intermediateGrid,
		    Variable<double>* U_from, double defaultInterpolation_ = 0.0);  
  




  /**
   * Calculates an intermediate Grid for above constructor
   */
  Interpolate_on_structured_grid* intermediateGrid;  

  
  ~PointInterpolator();
  
  
  
  /**
   * interpoliert Daten. Falls an einem Punkt nicht interpoliert werden kann
   * da U_from keine Zelle hat, dann wird
   *     defaultInterpolation
   * verwendet.
   * @param coord_x, coord_y, coord_z, Koordinaten des Punktes
   * @return interpolierter Wert
Christoph Pflaum's avatar
Christoph Pflaum committed
304
   **/
Phillip Lino Rall's avatar
Phillip Lino Rall committed
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
  double evaluate(double coord_x, double coord_y, double coord_z);
  std::vector<double> evaluateGradient(double coord_x, double coord_y, double coord_z);
  void smoothGrid();
		 

  void writeOnInterpolatedGrid(double coord_x, double coord_y, double coord_z, double value);
  void subtractOnInterpolatedGrid(double coord_x, double coord_y, double coord_z, double value);
  void shiftInterpolatedGrid(double coord_x, double coord_y, double coord_z);
  void scaleInterpolatedData(double scale, double zeroVal = 0.0);

  void QPrint_VTK(QString DateiName);
  
private:
  int nx, ny, nz;
  double hx, hy, hz;
  double shiftx, shifty, shiftz;
  Interpolate_on_structured_grid* interpolatorStructured;
  double* data;
  
  D3vector pWSD;
  D3vector pENT;
  
  double defaultInterpolation;
  
};
Christoph Pflaum's avatar
Christoph Pflaum committed
330
/* @} */
331

332
333
334
335
336
337
338
339
340
341
342

/////////////////////////////////////////////////////////////
// 4. Interpolate from blockgrid direct to any point
/////////////////////////////////////////////////////////////


/** \addtogroup InterpolationOperators **/
/* @{ */
/**
 * Interpolate from blockgrid direct to any point
***/
343
344
class Interpolate_direct {
 public:
345
    Interpolate_direct (Blockgrid* bg):blockgrid(bg){}
346

347
348
349
350
    /**
     * preparation for interpolation : calculates the neighbour index for each cell.
     * also  calculates the neighbour cell, if in other blockgrid.
    **/
351
    void init();
352
    void updateBoundaryBoxes();
353

354
355
356
357
358
359
    /**
     * Iterates throuh all cells : if D3vector v is inside of a cell, the weighting of the 8 cell points are calculated (D3vector lambda).
     * Uses previously cell indexes and its neighbours, since it's assumed that two consecutive find_cell(v) calls are close to each other.
     * Saves : idNow, idPrev, ifPrevPrev, idPrevPrevPrev
     *
    **/
360
    void find_cell(D3vector v);
361
362
363
    /**
     * Print a vtk file with a box, surrounding the cell.
    **/
364
    void writeBox(D3vector vWSD, D3vector vENT, std::string str);
365
366
367
    /**
     * Print a vtk file with a point.
    **/
368
    static void writePoint(D3vector v, std::string str, int Counter);
369
370
371
    /**
     * Writes interpolation efficiency: how many direct hits, second try, iterate through all, ect...
    **/
372
   void writeInterpolationEfficiency();
373
374
375
376
   //   void interpolate(Variable<DTyp>& u, DTyp* data, DTyp defaultInterpolation);
    template <class DTyp>
    DTyp evaluate(Variable<DTyp>& u);

377
    std::vector<std::vector<std::vector<int> > > getBoundaryBox(){return array_box_boundary;}
378
379
380
381
    std::vector<std::vector<std::vector<D3vector> > > * getArrayBox() {return &arrayBoxWSDENT;}
    void setArrayBox(std::vector<std::vector<std::vector<D3vector> > > arrayBoxWSDENT_){arrayBoxWSDENT = arrayBoxWSDENT_;}


382

383
384
385
386
    int counterFast{}, counterFastest{}, counterSamePoint{}, counterSecondTry{}, counterThirdTry{}, counterSlow{}, counterHexa{}, counterCorner{}, counterEdge{};
    int checkCounter{};
    int boxCounter{};
    int typCounter0{},typCounter1{},typCounter2{},typCounter3{},typCounter4{},typCounter5{};
387
388
    bool debugTest;
    D3vector lambda;
389
    D3vector vNow{1e10,1e10,1e10}, vPrev, vPrevPrev, vPrevPrevPrev;
390
391
392
393


        bool vectorInBox(D3vector vWSD, D3vector vENT, D3vector v, double eps = 1e-10);
        int checkBox(int idHex, int i, int j, int k, D3vector v);
394
    private:
395
396
397
398
      int idHexPrev{-1}, iPrev{-1}, jPrev{-1}, kPrev{-1};
      int idHexPrevPrevPrev{-1}, iPrevPrevPrev{-1}, jPrevPrevPrev{-1}, kPrevPrevPrev{-1};
      int idHexPrevPrev{-1}, iPrevPrev{-1}, jPrevPrev{-1}, kPrevPrev{-1};
      int idHexNow{-1}, iNow{-1}, jNow{-1}, kNow{-1};
399

400
401
      double lamLowerLimit{-0.1};
      double lamUpperLimit{1.1};
402
403
404
405
406
407
408
      int typ_tet;


      Blockgrid    *blockgrid;
      std::vector<std::vector<std::vector<D3vector> > > arrayBoxWSDENT;

      std::vector<std::vector<std::vector<int> > > array_box_boundary;
409
      std::vector<std::vector<std::vector<int> > > array_point_boundary;
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
private:
      /**
       * Necessary to calculate the neighbour relation.
      **/
      std::vector<std::vector<int> > calculateNeighbourIndexRelation(std::vector<std::vector<int> > inner, std::vector<std::vector<int> > outer);
      std::vector<int> calculateNeighbourIndex(std::vector<std::vector<int> > relation, int id_hex_outside,int id_hex_inside, int i, int j, int k, int Nx, int Ny, int Nz);
      std::vector<std::vector<int> > filterCorrectNeighbours(std::vector<std::vector<int> > outer);
      bool compareIndicies(std::vector<std::vector<int> > inner, std::vector<std::vector<int> > outer, int notCheck);
      std::vector<std::vector<int> > switchIJ(std::vector<std::vector<int> > v);
      std::vector<std::vector<int> > switchIK(std::vector<std::vector<int> > v);
      std::vector<std::vector<int> > switchJK(std::vector<std::vector<int> > v);
      std::vector<std::vector<int> > invertI (std::vector<std::vector<int> > v);
      std::vector<std::vector<int> > invertJ (std::vector<std::vector<int> > v);
      std::vector<std::vector<int> > invertK (std::vector<std::vector<int> > v);

      /**
       * Necessary to evaluate the neighbour cell relation.
      **/
      void setPrevIndex();
      void setPrevPrevIndex();
      void setPrevPrevPrevIndex();
      int checkForHexaNeighbours(int idHex, int i, int j, int k, D3vector v);
      int checkBoxSurrounding(int idHex, int i, int j, int k, D3vector v);
      int checkBoxSurroundingOptimized(int idHex, int i, int j, int k, D3vector v);
      int checkCorner(int idHex, int i, int j, int k, D3vector v);
      int checkEdge(int idHex, int i, int j, int k, D3vector v);
      bool checkOverlapOfBoxes(D3vector vWSD, D3vector vENT, D3vector wWSD, D3vector wENT);
      double calculateOverlapOfBoxes(D3vector vWSD, D3vector vENT, D3vector wWSD, D3vector wENT);
438
439


440
441
442
443
444


};

/* @} */
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
template<class DTyp>
DTyp Interpolate_direct::evaluate(Variable<DTyp> &u)
{
 int i,j,k, id_hex, typ;
 int ind_global;

 DTyp returnVal;

 //for(int id=0;id<ug->Give_number_hexahedra();++id)
  // u.template Update<hexahedronEl>(id);


   if(idHexNow < 0)
   {returnVal = -1;}
   else {
     Give_corner_data_of_cube<DTyp> du(u, idHexNow , iNow,jNow,kNow);

     int typ = typ_tet;

     if (lambda == D3vector(0,0,0))
     {
         cout << "no point found " << endl;
     }
     //cout << "lambda : " ; lambda.Print();cout<<endl;
     if(typ==0) returnVal = interpolate_in_tet(lambda,
                              du.WND(),du.WNT(),du.WST(),du.EST());
     if(typ==1) returnVal = interpolate_in_tet(lambda,
                              du.EST(),du.WND(),du.WST(),du.ESD());
     if(typ==2) returnVal = interpolate_in_tet(lambda,
                              du.WND(),du.WSD(),du.WST(),du.ESD());
     if(typ==3) returnVal = interpolate_in_tet(lambda,
                              du.EST(),du.WND(),du.ESD(),du.END());
     if(typ==4) returnVal = interpolate_in_tet(lambda,
                              du.ENT(),du.WNT(),du.EST(),du.END());
     if(typ==5) returnVal = interpolate_in_tet(lambda,
                              du.WNT(),du.WND(),du.EST(),du.END());
   }
    return returnVal;
};


Phillip Lino Rall's avatar
Phillip Lino Rall committed
486
#endif // INTERPOL_H