C++ mpi module for stochmagnet_main Package
SM_VTK.hpp
1 template<class VTK_Impl>
2 const tFlag SM_VTK<VTK_Impl>::CELL=0;
3 
4 
5 template<class VTK_Impl>
6 const tFlag SM_VTK<VTK_Impl>::POINT=1;
7 
10 template<class VTK_Impl>
11 tString SM_VTK<VTK_Impl>::getVTKType(const tString& typeName) const { // get the type of T
12  //translate in vtk type
13  tString vtkType="";
14  if (typeName.compare("bool")==0) vtkType="UInt8";
15  else if (typeName.compare("unsigned char")==0) vtkType="UInt8";
16  else if (typeName.compare("unsigned short")==0) vtkType="UInt8";
17  else if (typeName.compare("unsigned int")==0) vtkType="UInt16";
18  else if (typeName.compare("unsigned long")==0) vtkType="UInt32";
19  else if (typeName.compare("unsigned long long")==0){
20  if (CORE_Run::Is64Architecture()) vtkType="UInt64";
21  else vtkType="UInt32";
22  }
23  else if (typeName.compare("char")==0) vtkType="Int8";
24  else if (typeName.compare("short")==0) vtkType="Int8";
25  else if (typeName.compare("int")==0) vtkType="Int16";
26  else if (typeName.compare("long")==0) vtkType="Int32";
27  else if (typeName.compare("unsigned long long")==0){
28  if (CORE_Run::Is64Architecture()) vtkType="Int64";
29  else vtkType="Int32";
30  }
31 
32  else if (typeName.compare("float")==0) vtkType="Float32";
33  else if (typeName.compare("double")==0) vtkType="Float32";
34  else if (typeName.compare("long double")==0) vtkType="Float64";
35  return vtkType;
36 }
37 
38 
static tBoolean Is64Architecture()
return true if the machine is a 64 bits machine
Definition: CORE_Run.h:150
This class is a beam output interface for VTK / Paraview software.
Definition: SM_VTK.h:21
tString getVTKType() const
return the VTK type of the template Type
Definition: SM_VTK.h:122