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 >
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.

110  {
111  for (std::size_t i = 0; i < nComponents; i++)
112  {
113  out << round((t.*member)[i]) << " ";
114  }
115  }
int i
Definition: BiCGSTAB_step_by_step.cpp:9
double round(double in)
Definition: Tools/VTKData.h:100
t
Definition: plotPSD.py:36
std::ofstream out("Result.txt")

References i, out(), round(), and plotPSD::t.

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 
)
120  {
121  out << round(t.*member) << " ";
122  }

References out(), round(), and plotPSD::t.

◆ round() [1/2]

template<>
double Detail::round ( double  in)
100  {
101  //logger.assert_debug(fabs(in)>1e-33 or fabs(in)==0, "Detected underflow: corrected double value % to 0", in);
102  logger.assert_debug(std::isfinite(in), "Detected nans!");
103  return (fabs(in)<1e-33)?0.0:in;
104  }
Array< double, 1, 3 > e(1./3., 0.5, 2.)
Logger< MERCURYDPM_LOGLEVEL > logger("MercuryKernel")
Definition of different loggers with certain modules. A user can define its own custom logger here.
#define isfinite(X)
Definition: main.h:111
Real fabs(const Real &a)
Definition: boostmultiprec.cpp:117

References e(), boost::multiprecision::fabs(), isfinite, and logger.

◆ round() [2/2]

template<typename V >
V Detail::round ( V  in)
95  {
96  return in;
97  }

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

69  {
70  return "Float32";
71  }

◆ toVTKDataType() [2/4]

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

◆ toVTKDataType() [3/4]

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

◆ toVTKDataType() [4/4]

template<typename V >
std::enable_if<std::is_array<V>::value, std::string>::type Detail::toVTKDataType ( )
90  {
92  }
type
Definition: compute_granudrum_aor.py:141

References compute_granudrum_aor::type.