FixVecConvert.h 1.14 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

/** \file FixVecConvert.h */

#ifndef AMDIS_FIXVECCONVERT_H_
Praetorius, Simon's avatar
Praetorius, Simon committed
26
#define AMDIS_FIXVECCONVERT_H_
27
28
29
30
31
32
33
34
35

#include "Global.h"

namespace AMDiS {

  template<typename T,GeoIndex d1,GeoIndex d2>
  class VecConv
  {
  public:
36
37
    static FixVec<T,d1>& convertVec(FixVec<T,d2>& rhs, Mesh* mesh) 
    {
38
      TEST_EXIT(mesh->getGeo(d1) == mesh->getGeo(d2))("Incompatible dimensions!\n");
39
      return reinterpret_cast<FixVec<T,d1>&>(rhs);
Thomas Witkowski's avatar
Thomas Witkowski committed
40
    }
41
42
43
44
  };

}

Praetorius, Simon's avatar
Praetorius, Simon committed
45
#endif // AMDIS_FIXVECCONVERT_H_