MercuryDPM  Trunk
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
CGFunctions::Gauss< Coordinates > Class Template Reference

Defines the position of the CGPoint (e.g. x, y, z) and the parameters of the Gauss coarse-graining function (width and cutoff). More...

#include <Gauss.h>

Public Types

typedef Coordinates CoordinatesType
 

Public Member Functions

 Gauss ()
 Default constructor, it simply creates an empty GaussCoordinates. More...
 
 Gauss (const Gauss &c)=default
 Copy constructor. It copies the GaussCoordinates and all objects it contains. More...
 
 ~Gauss ()=default
 Destructor, does nothing, as no new'ed objects are used. More...
 
void write (std::ostream &os) const
 Writes class content into an output stream, usually a stat file. More...
 
void setWidth (Mdouble width)
 Sets the width of the coarse-graining function. More...
 
void setStandardDeviation (Mdouble std)
 Sets the standard deviation of the coarse-graining function. More...
 
void setWidthAndCutoff (Mdouble width, Mdouble cutoff)
 Sets the width and cutoff of the coarse-graining function. More...
 
Mdouble getWidth () const
 Returns the width of the coarse-graining function. More...
 
Mdouble getCutoff () const
 Returns the cutoff of the coarse-graining function. More...
 
Mdouble getEps () const
 Returns the finite difference step size used to evaluate derivatives of the CG function. More...
 
void setEps (Mdouble eps)
 Sets the finite difference step size used to evaluate derivatives of the CG function. More...
 
Mdouble evaluateCGFunction (const Vec3D &position, const Coordinates r)
 Evaluates the coarse-graining function. More...
 
Vec3D evaluateCGFunctionDerivatives (const Vec3D &position, const Coordinates &r)
 
Mdouble evaluateCGFunctionDerivativeWithFD (const Vec3D &position, const Coordinates &r, const int i)
 
Mdouble evaluateCylindricalCGFunction (const Vec3D &position, const CGCoordinates::R r)
 
Mdouble evaluateCGIntegral (const BaseInteraction &i, const Coordinates r, IntegralType type=IntegralType::I_TO_P)
 Evaluates the line integral needed for the calculation of stresses. More...
 
Mdouble evaluateCylindricalCGIntegral (const BaseInteraction &c, const CGCoordinates::R r, IntegralType type=IntegralType::I_TO_P)
 
Mdouble evaluateCGIntegral1D (const BaseInteraction &i, const Coordinates r, IntegralType type=IntegralType::I_TO_P)
 Evaluates the line integral needed for the calculation of stresses for 1D CGCoordinates. More...
 

Protected Attributes

Mdouble width_
 
Mdouble cutoff_
 
Mdouble prefactor_
 
Mdouble integralPrefactor_
 
Mdouble normalLength_
 
Vec3D normal_
 
unsigned currentInteraction_
 
Mdouble eps_
 

Detailed Description

template<class Coordinates>
class CGFunctions::Gauss< Coordinates >

Defines the position of the CGPoint (e.g. x, y, z) and the parameters of the Gauss coarse-graining function (width and cutoff).

The class is derived from a CGCoordinates class, thus it contains the position of the CGPoint in the non-averaged directions. It also contains the parameters of the Gauss coarse-graining function (width and cutoff), as well as internal variables (not user-defined, but set by the code), like the prefactor of the Gauss function (which depends on width, cutoff, and the coordinate type). It also contains all functions that only depend on the coordinate and function type; e.g. evaluateCGFunction and evaluateCGIntegral.

See CGFunctions for more details.

Definition at line 79 of file Gauss.h.

Member Typedef Documentation

template<class Coordinates >
typedef Coordinates CGFunctions::Gauss< Coordinates >::CoordinatesType

Definition at line 83 of file Gauss.h.

Constructor & Destructor Documentation

template<class Coordinates >
CGFunctions::Gauss< Coordinates >::Gauss ( )

Default constructor, it simply creates an empty GaussCoordinates.

template<class Coordinates >
CGFunctions::Gauss< Coordinates >::Gauss ( const Gauss< Coordinates > &  c)
default

Copy constructor. It copies the GaussCoordinates and all objects it contains.

template<class Coordinates >
CGFunctions::Gauss< Coordinates >::~Gauss ( )
default

Destructor, does nothing, as no new'ed objects are used.

Member Function Documentation

template<class Coordinates >
Mdouble CGFunctions::Gauss< Coordinates >::evaluateCGFunction ( const Vec3D position,
const Coordinates  r 
)

Evaluates the coarse-graining function.

template<class Coordinates >
Vec3D CGFunctions::Gauss< Coordinates >::evaluateCGFunctionDerivatives ( const Vec3D position,
const Coordinates r 
)
template<class Coordinates >
Mdouble CGFunctions::Gauss< Coordinates >::evaluateCGFunctionDerivativeWithFD ( const Vec3D position,
const Coordinates r,
const int  i 
)
template<class Coordinates >
Mdouble CGFunctions::Gauss< Coordinates >::evaluateCGIntegral ( const BaseInteraction i,
const Coordinates  r,
IntegralType  type = IntegralType::I_TO_P 
)

Evaluates the line integral needed for the calculation of stresses.

template<class Coordinates >
Mdouble CGFunctions::Gauss< Coordinates >::evaluateCGIntegral1D ( const BaseInteraction i,
const Coordinates  r,
IntegralType  type = IntegralType::I_TO_P 
)

Evaluates the line integral needed for the calculation of stresses for 1D CGCoordinates.

template<class Coordinates >
Mdouble CGFunctions::Gauss< Coordinates >::evaluateCylindricalCGFunction ( const Vec3D position,
const CGCoordinates::R  r 
)
inline

Definition at line 156 of file Gauss.h.

References constants::NaN.

157  { return constants::NaN; }
const Mdouble NaN
Definition: GeneralDefine.h:43
template<class Coordinates >
Mdouble CGFunctions::Gauss< Coordinates >::evaluateCylindricalCGIntegral ( const BaseInteraction c,
const CGCoordinates::R  r,
IntegralType  type = IntegralType::I_TO_P 
)
inline

Definition at line 165 of file Gauss.h.

References constants::NaN.

167  { return constants::NaN; }
const Mdouble NaN
Definition: GeneralDefine.h:43
template<class Coordinates >
Mdouble CGFunctions::Gauss< Coordinates >::getCutoff ( ) const

Returns the cutoff of the coarse-graining function.

template<class Coordinates >
Mdouble CGFunctions::Gauss< Coordinates >::getEps ( ) const

Returns the finite difference step size used to evaluate derivatives of the CG function.

template<class Coordinates >
Mdouble CGFunctions::Gauss< Coordinates >::getWidth ( ) const

Returns the width of the coarse-graining function.

template<class Coordinates >
void CGFunctions::Gauss< Coordinates >::setEps ( Mdouble  eps)

Sets the finite difference step size used to evaluate derivatives of the CG function.

template<class Coordinates >
void CGFunctions::Gauss< Coordinates >::setStandardDeviation ( Mdouble  std)

Sets the standard deviation of the coarse-graining function.

template<class Coordinates >
void CGFunctions::Gauss< Coordinates >::setWidth ( Mdouble  width)

Sets the width of the coarse-graining function.

template<class Coordinates >
void CGFunctions::Gauss< Coordinates >::setWidthAndCutoff ( Mdouble  width,
Mdouble  cutoff 
)

Sets the width and cutoff of the coarse-graining function.

template<class Coordinates >
void CGFunctions::Gauss< Coordinates >::write ( std::ostream &  os) const

Writes class content into an output stream, usually a stat file.

Member Data Documentation

template<class Coordinates >
unsigned CGFunctions::Gauss< Coordinates >::currentInteraction_
protected

The length of the branch vector of the current interaction. If this parameter is changed, the integralPrefactor_ has to be recomputed. This parameter is internal, thus cannot be set directly by the user.

Definition at line 218 of file Gauss.h.

template<class Coordinates >
Mdouble CGFunctions::Gauss< Coordinates >::cutoff_
protected

The cutoff of the coarse-graining function. It is 3.0 by default, unless modified by the user.

Definition at line 194 of file Gauss.h.

template<class Coordinates >
Mdouble CGFunctions::Gauss< Coordinates >::eps_
protected

Finite Difference step size, used to compute the derivative of the CG function

Definition at line 223 of file Gauss.h.

template<class Coordinates >
Mdouble CGFunctions::Gauss< Coordinates >::integralPrefactor_
protected

The prefactor of the coarse-graining integral. Depends on the value of currentDistance_. This parameter is internal, thus cannot be set directly by the user.

Definition at line 207 of file Gauss.h.

template<class Coordinates >
Vec3D CGFunctions::Gauss< Coordinates >::normal_
protected

Definition at line 211 of file Gauss.h.

template<class Coordinates >
Mdouble CGFunctions::Gauss< Coordinates >::normalLength_
protected

Definition at line 209 of file Gauss.h.

template<class Coordinates >
Mdouble CGFunctions::Gauss< Coordinates >::prefactor_
protected

The prefactor of the coarse-graining function. This parameter is internal, thus cannot be set directly by the user.

Definition at line 200 of file Gauss.h.

template<class Coordinates >
Mdouble CGFunctions::Gauss< Coordinates >::width_
protected

The coarse-graining width. It is 1.0 by default, unless modified by the user.

Todo:
TW I thought of implementing width_, cutoff_ and prefactor_ as const Mdouble&, as theses parameters are not set per CGPoint, but per CG object (i.e. all points share the same values). However, this site seems to discourage this: http://stackoverflow.com/questions/12387239/reference-member-variables-as-class-members Anyone has an opinion on this? @dducks @thorntonar

Definition at line 188 of file Gauss.h.


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