MSpin-JCoupling  2.1
Public Types | Public Member Functions | Static Public Member Functions | Friends | List of all members
magnes::Energy Class Reference

A class for storing energy values. More...

#include <energy.h>

Public Types

enum  unity { KCAL, KJ, HARTREES }
 

Public Member Functions

 Energy ()
 
double Value () const
 
 Energy (double v)
 
 Energy (const Energy &e)
 
Energyoperator= (const Energy &e)
 
Energyoperator= (double v)
 
 operator bool_type () const
 

Static Public Member Functions

static unity Unity ()
 
static void SetUnity (unity u)
 

Friends

Energy operator+ (const Energy &a, const Energy &b)
 

Detailed Description

A class for storing energy values.

A class for storing different kind of energy values

Member Enumeration Documentation

§ unity

energy unities

Constructor & Destructor Documentation

§ Energy() [1/3]

magnes::Energy::Energy ( )
inline

Build energy with initial value 0

§ Energy() [2/3]

magnes::Energy::Energy ( double  v)
inlineexplicit
Returns
the magnitud of the energy value in unities
See also
unity Build energy object with value v

§ Energy() [3/3]

magnes::Energy::Energy ( const Energy e)
inline

copy constructor

Member Function Documentation

§ operator bool_type()

magnes::Energy::operator bool_type ( ) const
inline
Returns
true if energy has been defined

§ operator=() [1/2]

Energy& magnes::Energy::operator= ( const Energy e)
inline

assignment operator

§ operator=() [2/2]

Energy& magnes::Energy::operator= ( double  v)
inline

asignment operator

§ SetUnity()

static void magnes::Energy::SetUnity ( unity  u)
static

Setup globally energy unities

§ Unity()

static unity magnes::Energy::Unity ( )
static

return energy unities setup globally

Friends And Related Function Documentation

§ operator+

Energy operator+ ( const Energy a,
const Energy b 
)
friend

addition of energies


The documentation for this class was generated from the following file: