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.

Member Typedef Documentation

◆ CoordinatesType

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

Constructor & Destructor Documentation

◆ Gauss() [1/2]

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

Default constructor, it simply creates an empty GaussCoordinates.

◆ Gauss() [2/2]

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

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

◆ ~Gauss()

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

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

Member Function Documentation

◆ evaluateCGFunction()

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

Evaluates the coarse-graining function.

◆ evaluateCGFunctionDerivatives()

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

◆ evaluateCGFunctionDerivativeWithFD()

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

◆ evaluateCGIntegral()

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.

◆ evaluateCGIntegral1D()

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.

◆ evaluateCylindricalCGFunction()

template<class Coordinates >
Mdouble CGFunctions::Gauss< Coordinates >::evaluateCylindricalCGFunction ( const Vec3D position,
const CGCoordinates::R  r 
)
inline
157  { return constants::NaN; }
const Mdouble NaN
Definition: GeneralDefine.h:43

References constants::NaN.

◆ evaluateCylindricalCGIntegral()

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

References constants::NaN.

◆ getCutoff()

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

Returns the cutoff of the coarse-graining function.

◆ getEps()

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

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

◆ getWidth()

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

Returns the width of the coarse-graining function.

◆ setEps()

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

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

◆ setStandardDeviation()

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

Sets the standard deviation of the coarse-graining function.

◆ setWidth()

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

Sets the width of the coarse-graining function.

◆ setWidthAndCutoff()

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

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

◆ write()

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

◆ currentInteraction_

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.

◆ cutoff_

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.

◆ eps_

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

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

◆ integralPrefactor_

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.

◆ normal_

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

◆ normalLength_

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

◆ prefactor_

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.

◆ width_

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

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