Detail Namespace Reference

Classes

class  VTKPointDescriptorEntry
 
class  VTKPointDescriptorEntryImpl
 

Functions

template<typename V >
std::enable_if< std::is_floating_point< V >::value, std::string >::type toVTKDataType ()
 
template<typename V >
std::enable_if< std::is_integral< V >::value &&std::is_unsigned< V >::value, std::string >::type toVTKDataType ()
 
template<typename V >
std::enable_if< std::is_integral< V >::value &&std::is_signed< V >::value, std::string >::type toVTKDataType ()
 
template<typename V >
std::enable_if< std::is_array< V >::value, std::string >::type toVTKDataType ()
 
template<typename V >
round (V in)
 
template<>
double round (double in)
 
template<typename T , typename V >
std::enable_if< std::is_array< V >::value||std::is_pointer< V >::value, void >::type emitProxy (std::ostream &out, const T &t, std::size_t nComponents, V T::*member)
 This function actually writes the correct datatype to ostream. More...
 
template<typename T , typename V >
std::enable_if<!(std::is_array< V >::value||std::is_pointer< V >::value), void >::type emitProxy (std::ostream &out, const T &t, std::size_t nComponents, V T::*member)
 

Function Documentation

◆ emitProxy() [1/2]

template<typename T , typename V >
std::enable_if<std::is_array<V>::value || std::is_pointer<V>::value, void>::type Detail::emitProxy ( std::ostream &  out,
const T &  t,
std::size_t  nComponents,
V T::*  member 
)

This function actually writes the correct datatype to ostream.

131  {
132  for (std::size_t i = 0; i < nComponents; i++)
133  {
134  out << round((t.*member)[i]) << " ";
135  }
136  }
double round(double in)
Definition: Tools/VTKData.h:121
const std::complex< Mdouble > i
Definition: ExtendedMath.h:51

References constants::i, and round().

Referenced by Detail::VTKPointDescriptorEntryImpl< T, V >::emit().

◆ emitProxy() [2/2]

template<typename T , typename V >
std::enable_if<!(std::is_array<V>::value || std::is_pointer<V>::value), void>::type Detail::emitProxy ( std::ostream &  out,
const T &  t,
std::size_t  nComponents,
V T::*  member 
)
141  {
142  out << round(t.*member) << " ";
143  }

References round().

◆ round() [1/2]

template<>
double Detail::round ( double  in)
121  {
122  //logger.assert_debug(fabs(in)>1e-33 or fabs(in)==0, "Detected underflow: corrected double value % to 0", in);
123  logger.assert_debug(std::isfinite(in), "Detected nans!");
124  return (fabs(in)<1e-33)?0.0:in;
125  }
Logger< MERCURYDPM_LOGLEVEL > logger("MercuryKernel")
Definition of different loggers with certain modules. A user can define its own custom logger here.

References logger.

◆ round() [2/2]

template<typename V >
V Detail::round ( in)
116  {
117  return in;
118  }

Referenced by emitProxy().

◆ toVTKDataType() [1/4]

template<typename V >
std::enable_if<std::is_floating_point<V>::value, std::string>::type Detail::toVTKDataType ( )

This function returns the correct VTK data type based on the template argument

90  {
91  return "Float32";
92  }

◆ toVTKDataType() [2/4]

template<typename V >
std::enable_if<std::is_integral<V>::value && std::is_unsigned<V>::value, std::string>::type Detail::toVTKDataType ( )
97  {
98  return "UInt32";
99  }

◆ toVTKDataType() [3/4]

template<typename V >
std::enable_if<std::is_integral<V>::value && std::is_signed<V>::value, std::string>::type Detail::toVTKDataType ( )
104  {
105  return "Int32";
106  }

◆ toVTKDataType() [4/4]

template<typename V >
std::enable_if<std::is_array<V>::value, std::string>::type Detail::toVTKDataType ( )
111  {
112  return toVTKDataType< typename std::remove_extent<V>::type >();
113  }