DFT-EFE
 
Loading...
Searching...
No Matches
dftefe::utils Namespace Reference

Namespaces

namespace  mathConstants
 
namespace  mathFunctions
 
namespace  mpi
 
namespace  PeriodicTableInternal
 
namespace  splineInternal
 
namespace  stringOps
 

Classes

class  ConditionalOStream
 Provides an interface to print based on whether a certain condition is met or not. Typical use cases include: (a) printing based on different verbosity level (b) printing only from a certain processor while running in parallel. More...
 
class  DiscontiguousDataOperations
 
class  ExpModX
 
class  Function
 
class  LogModX
 
class  MemoryManager
 
class  MemoryManager< ValueType, MemorySpace::HOST >
 
class  MemoryStorage
 
class  MemoryTransfer
 
class  MemoryTransfer< MemorySpace::HOST, MemorySpace::HOST >
 
class  MPICommunicatorP2PKernels
 
class  OptimizedIndexSet
 
class  PeriodicTableManager
 Provides a map from Atomic Number to Atomic Symbol. More...
 
class  PointChargePotentialFunction
 
class  PointImpl
 
class  RandNumGen
 
class  RandNumGen< double >
 
class  RandNumGen< float >
 
class  RandNumGen< int >
 
class  RandNumGen< long >
 
class  RandNumGen< long double >
 
class  RandNumGen< long long >
 
class  RandNumGen< short >
 
class  RandNumGen< std::complex< double > >
 
class  RandNumGen< std::complex< float > >
 
class  RandNumGen< std::complex< long double > >
 
class  RandNumGen< unsigned int >
 
class  RandNumGen< unsigned long >
 
class  RandNumGen< unsigned long long >
 
class  RandNumGen< unsigned short >
 
class  ScalarZeroFunctionReal
 
class  SmearChargeDensityFunction
 
class  SmearChargePotentialFunction
 
class  Spline
 
class  Types
 
class  Types< char >
 
class  Types< double >
 
class  Types< float >
 
class  Types< int >
 
class  Types< long int >
 
class  Types< short int >
 
class  Types< std::complex< double > >
 
class  Types< std::complex< float > >
 
class  Types< std::string >
 
class  Types< unsigned int >
 
class  Types< unsigned long int >
 
class  Types< unsigned short int >
 

Typedefs

typedef std::logic_error LogicError
 
typedef std::invalid_argument InvalidArgument
 
typedef std::domain_error DomainError
 
typedef std::length_error LengthError
 
typedef std::out_of_range OutOfRangeError
 
typedef std::runtime_error RuntimeError
 
typedef std::overflow_error OverflowError
 
typedef std::underflow_error UnderflowError
 
typedef PointImpl< double > Point
 
template<typename T >
using ScalarSpatialFunction = Function< utils::Point, T >
 
using ScalarSpatialFunctionReal = Function< utils::Point, double >
 
using ScalarSpatialFunctionComplex = Function< utils::Point, std::complex< double > >
 

Enumerations

enum class  MemorySpace { HOST , HOST_PINNED , DEVICE }
 

Functions

unsigned int abs_ (unsigned int a)
 
int abs_ (int a)
 
double abs_ (double a)
 
float abs_ (float a)
 
double abs_ (std::complex< double > a)
 
float abs_ (std::complex< float > a)
 
unsigned int absSq (unsigned int a)
 
int absSq (int a)
 
double absSq (double a)
 
float absSq (float a)
 
double absSq (std::complex< double > a)
 
float absSq (std::complex< float > a)
 
template<typename ValueType >
bool absCompare (ValueType a, ValueType b)
 
template<typename T >
RealType< T >::Type realPart (const T &x)
 
template<>
RealType< float >::Type realPart (const float &x)
 
template<>
RealType< double >::Type realPart (const double &x)
 
template<>
RealType< std::complex< float > >::Type realPart (const std::complex< float > &x)
 
template<>
RealType< std::complex< double > >::Type realPart (const std::complex< double > &x)
 
template<typename T >
RealType< T >::Type imagPart (const T &x)
 
template<>
RealType< float >::Type imagPart (const float &x)
 
template<>
RealType< double >::Type imagPart (const double &x)
 
template<>
RealType< std::complex< float > >::Type imagPart (const std::complex< float > &x)
 
template<>
RealType< std::complex< double > >::Type imagPart (const std::complex< double > &x)
 
template<typename T >
conjugate (const T &x)
 
template<>
float conjugate (const float &x)
 
template<>
double conjugate (const double &x)
 
template<>
std::complex< float > conjugate (const std::complex< float > &x)
 
template<>
std::complex< double > conjugate (const std::complex< double > &x)
 
void throwException (bool condition, std::string msg)
 
template<class T >
void throwException (bool condition, std::string msg="")
 
template<typename ValueType , utils::MemorySpace memorySpaceDst>
MemoryStorage< ValueType, memorySpaceDst > memoryStorageFromSTL (const std::vector< ValueType > &src)
 Create a MemoryStorage object from an input C++ STL vector. More...
 
template<>
double getRealPart (const std::complex< float > &t)
 
template<>
double getRealPart (const std::complex< double > &t)
 
template<>
double getImagPart (const std::complex< float > &t)
 
template<>
double getImagPart (const std::complex< double > &t)
 
template<typename T >
double getRealPart (const T &t)
 
template<typename T >
double getImagPart (const T &t)
 
template<typename T >
double getAbs (const T &t)
 
template<typename T >
PointImpl< T > & operator*= (PointImpl< T > &p, T a)
 In-plance multiplication of the point by a scalar p->p*a. More...
 
template<typename T >
PointImpl< T > operator* (const PointImpl< T > &p, T a)
 Multiplication by a scalar q = p*a. More...
 
template<typename T >
PointImpl< T > operator* (T a, const PointImpl< T > &p)
 Multiplication by a scalar q = p*a. More...
 
template<typename T >
PointImpl< T > & operator+= (PointImpl< T > &p, const PointImpl< T > &q)
 In-place addition of two pointts p-> p + q. More...
 
template<typename T >
PointImpl< T > operator+ (const PointImpl< T > &v, const PointImpl< T > &u)
 Addition of two points r = p + q. More...
 
template<typename T >
PointImpl< T > & operator-= (PointImpl< T > &p, const PointImpl< T > &q)
 In-place subtraction of two points p -> p - q;. More...
 
template<typename T >
PointImpl< T > operator- (const PointImpl< T > &p, const PointImpl< T > &q)
 Subtraction of two points = p - q. More...
 
template<typename T >
std::ostream & operator<< (std::ostream &outputStream, const PointImpl< T > &p)
 Output perator. More...
 

Typedef Documentation

◆ DomainError

typedef std::domain_error dftefe::utils::DomainError

◆ InvalidArgument

typedef std::invalid_argument dftefe::utils::InvalidArgument

◆ LengthError

typedef std::length_error dftefe::utils::LengthError

◆ LogicError

typedef std::logic_error dftefe::utils::LogicError

◆ OutOfRangeError

typedef std::out_of_range dftefe::utils::OutOfRangeError

◆ OverflowError

typedef std::overflow_error dftefe::utils::OverflowError

◆ Point

◆ RuntimeError

typedef std::runtime_error dftefe::utils::RuntimeError

◆ ScalarSpatialFunction

template<typename T >
using dftefe::utils::ScalarSpatialFunction = typedef Function<utils::Point, T>

◆ ScalarSpatialFunctionComplex

using dftefe::utils::ScalarSpatialFunctionComplex = typedef Function<utils::Point, std::complex<double> >

◆ ScalarSpatialFunctionReal

◆ UnderflowError

typedef std::underflow_error dftefe::utils::UnderflowError

Enumeration Type Documentation

◆ MemorySpace

enum class dftefe::utils::MemorySpace
strong
Enumerator
HOST 
HOST_PINNED 
DEVICE 

Function Documentation

◆ abs_() [1/6]

double dftefe::utils::abs_ ( double  a)
inline

◆ abs_() [2/6]

float dftefe::utils::abs_ ( float  a)
inline

◆ abs_() [3/6]

int dftefe::utils::abs_ ( int  a)
inline

◆ abs_() [4/6]

double dftefe::utils::abs_ ( std::complex< double >  a)
inline

◆ abs_() [5/6]

float dftefe::utils::abs_ ( std::complex< float >  a)
inline

◆ abs_() [6/6]

unsigned int dftefe::utils::abs_ ( unsigned int  a)
inline
Here is the caller graph for this function:

◆ absCompare()

template<typename ValueType >
bool dftefe::utils::absCompare ( ValueType  a,
ValueType  b 
)
inline
Here is the call graph for this function:

◆ absSq() [1/6]

double dftefe::utils::absSq ( double  a)
inline

◆ absSq() [2/6]

float dftefe::utils::absSq ( float  a)
inline

◆ absSq() [3/6]

int dftefe::utils::absSq ( int  a)
inline

◆ absSq() [4/6]

double dftefe::utils::absSq ( std::complex< double >  a)
inline

◆ absSq() [5/6]

float dftefe::utils::absSq ( std::complex< float >  a)
inline

◆ absSq() [6/6]

unsigned int dftefe::utils::absSq ( unsigned int  a)
inline
Here is the caller graph for this function:

◆ conjugate() [1/5]

template<>
double dftefe::utils::conjugate ( const double &  x)
inline

◆ conjugate() [2/5]

template<>
float dftefe::utils::conjugate ( const float &  x)
inline

◆ conjugate() [3/5]

template<>
std::complex< double > dftefe::utils::conjugate ( const std::complex< double > &  x)
inline

◆ conjugate() [4/5]

template<>
std::complex< float > dftefe::utils::conjugate ( const std::complex< float > &  x)
inline

◆ conjugate() [5/5]

template<typename T >
T dftefe::utils::conjugate ( const T &  x)
inline
Here is the call graph for this function:

◆ getAbs()

template<typename T >
double dftefe::utils::getAbs ( const T &  t)

◆ getImagPart() [1/3]

template<>
double dftefe::utils::getImagPart ( const std::complex< double > &  t)

◆ getImagPart() [2/3]

template<>
double dftefe::utils::getImagPart ( const std::complex< float > &  t)

◆ getImagPart() [3/3]

template<typename T >
double dftefe::utils::getImagPart ( const T &  t)

◆ getRealPart() [1/3]

template<>
double dftefe::utils::getRealPart ( const std::complex< double > &  t)

◆ getRealPart() [2/3]

template<>
double dftefe::utils::getRealPart ( const std::complex< float > &  t)
Here is the caller graph for this function:

◆ getRealPart() [3/3]

template<typename T >
double dftefe::utils::getRealPart ( const T &  t)

◆ imagPart() [1/5]

template<>
RealType< double >::Type dftefe::utils::imagPart ( const double &  x)
inline

◆ imagPart() [2/5]

template<>
RealType< float >::Type dftefe::utils::imagPart ( const float &  x)
inline

◆ imagPart() [3/5]

template<>
RealType< std::complex< double > >::Type dftefe::utils::imagPart ( const std::complex< double > &  x)
inline

◆ imagPart() [4/5]

template<>
RealType< std::complex< float > >::Type dftefe::utils::imagPart ( const std::complex< float > &  x)
inline

◆ imagPart() [5/5]

template<typename T >
RealType< T >::Type dftefe::utils::imagPart ( const T &  x)
inline
Here is the call graph for this function:

◆ memoryStorageFromSTL()

template<typename ValueType , utils::MemorySpace memorySpaceDst>
MemoryStorage< ValueType, memorySpaceDst > dftefe::utils::memoryStorageFromSTL ( const std::vector< ValueType > &  src)

Create a MemoryStorage object from an input C++ STL vector.

Parameters
[in]srcInput C++ STL vector from which the MemoryStorage object is to be created
Returns
A MemoryStorage object containing the data in the input C++ STL vector
Template Parameters
ValueTypeDatatype of the underlying data in MemoryStorage as well as C++ STL vector (e.g., int, double, float, complex<double>, etc)
memorySpaceDstMemorySpace (e.g. HOST, DEVICE, HOST_PINNED, etc) where the output MemoryStorage object should reside
Here is the call graph for this function:

◆ operator*() [1/2]

template<typename T >
PointImpl< T > dftefe::utils::operator* ( const PointImpl< T > &  p,
a 
)
inline

Multiplication by a scalar q = p*a.

Template Parameters
valuetype for the point (int, float, double, ...)
Parameters
[in]pthe point to be scaled
[in]athe scalar value
Returns
a new point containing the scaled coordinates

◆ operator*() [2/2]

template<typename T >
PointImpl< T > dftefe::utils::operator* ( a,
const PointImpl< T > &  p 
)
inline

Multiplication by a scalar q = p*a.

Template Parameters
valuetype for the point (int, float, double, ...)
Parameters
[in]athe scalar value
[in]pthe point to be scaled
Returns
a new point containing the scaled coordinates

◆ operator*=()

template<typename T >
PointImpl< T > & dftefe::utils::operator*= ( PointImpl< T > &  p,
a 
)
inline

In-plance multiplication of the point by a scalar p->p*a.

Template Parameters
valuetype for the point (int, float, double, ...)
Parameters
[in]pthe point to be scaled
[in]athe scalar value
Returns
reference to updated point p.
Here is the call graph for this function:

◆ operator+()

template<typename T >
PointImpl< T > dftefe::utils::operator+ ( const PointImpl< T > &  v,
const PointImpl< T > &  u 
)
inline

Addition of two points r = p + q.

Template Parameters
valuetype for the point (int, float, double, ...)
Parameters
[in]pthe first point
[in]qthe second point
Returns
Object containing p + q.
Exceptions
exceptionif the two points have different dimensions

◆ operator+=()

template<typename T >
PointImpl< T > & dftefe::utils::operator+= ( PointImpl< T > &  p,
const PointImpl< T > &  q 
)
inline

In-place addition of two pointts p-> p + q.

Template Parameters
valuetype for the point (int, float, double, ...)
Parameters
[in]pthe first point (will be modified)
[in]qthe second point
Returns
Reference to updated point p.
Exceptions
exceptionif the two points have different dimensions
Here is the call graph for this function:

◆ operator-()

template<typename T >
PointImpl< T > dftefe::utils::operator- ( const PointImpl< T > &  p,
const PointImpl< T > &  q 
)
inline

Subtraction of two points = p - q.

Template Parameters
valuetype for the point (int, float, double, ...)
Parameters
[in]pthe first point
[in]qthe second point
Returns
Object containing p - q.
Exceptions
exceptionif the two points have different dimensions

◆ operator-=()

template<typename T >
PointImpl< T > & dftefe::utils::operator-= ( PointImpl< T > &  p,
const PointImpl< T > &  q 
)
inline

In-place subtraction of two points p -> p - q;.

Template Parameters
valuetype for the point (int, float, double, ...)
Parameters
[in]pthe first point
[in]qthe second point
Returns
reference to updated point p.
Exceptions
exceptionif the two points have different dimensions
Here is the call graph for this function:

◆ operator<<()

template<typename T >
std::ostream & dftefe::utils::operator<< ( std::ostream &  outputStream,
const PointImpl< T > &  p 
)
inline

Output perator.

Template Parameters
valuetype for the point (int, float, double, ...)
Parameters
outputStreamOutput stream to use for output.
pPointImpl object.
Returns
Updated output stream.
Here is the call graph for this function:

◆ realPart() [1/5]

template<>
RealType< double >::Type dftefe::utils::realPart ( const double &  x)
inline

◆ realPart() [2/5]

template<>
RealType< float >::Type dftefe::utils::realPart ( const float &  x)
inline

◆ realPart() [3/5]

template<>
RealType< std::complex< double > >::Type dftefe::utils::realPart ( const std::complex< double > &  x)
inline

◆ realPart() [4/5]

template<>
RealType< std::complex< float > >::Type dftefe::utils::realPart ( const std::complex< float > &  x)
inline

◆ realPart() [5/5]

template<typename T >
RealType< T >::Type dftefe::utils::realPart ( const T &  x)
inline
Here is the call graph for this function:

◆ throwException() [1/2]

void dftefe::utils::throwException ( bool  condition,
std::string  msg 
)

◆ throwException() [2/2]

template<class T >
void dftefe::utils::throwException ( bool  condition,
std::string  msg = "" 
)