Function representation of a Gaussian shape, used to evaluate the shape's density, volume, surface area and related quantities at arbitrary 3D positions.
More...
#include <GaussianShapeFunction.hpp>
Function representation of a Gaussian shape, used to evaluate the shape's density, volume, surface area and related quantities at arbitrary 3D positions.
Internally the function maintains a list of Gaussian products (up to a configurable order) derived from the underlying Shape::GaussianShape. The list is built when the shape is supplied via setShape() (or one of the corresponding constructors).
◆ SharedPointer
A reference-counted smart pointer [SHPTR] for dynamically allocated GaussianShapeFunction instances.
◆ GaussianShapeFunction() [1/3]
| CDPL::Shape::GaussianShapeFunction::GaussianShapeFunction |
( |
| ) |
|
Constructs the GaussianShapeFunction instance without an associated shape.
◆ GaussianShapeFunction() [2/3]
Constructs a copy of the GaussianShapeFunction instance func.
- Parameters
-
| func | The GaussianShapeFunction to copy. |
◆ GaussianShapeFunction() [3/3]
| CDPL::Shape::GaussianShapeFunction::GaussianShapeFunction |
( |
const GaussianShape & |
shape | ) |
|
Constructs the GaussianShapeFunction instance associated with shape.
- Parameters
-
◆ ~GaussianShapeFunction()
| CDPL::Shape::GaussianShapeFunction::~GaussianShapeFunction |
( |
| ) |
|
◆ setMaxOrder()
| void CDPL::Shape::GaussianShapeFunction::setMaxOrder |
( |
std::size_t |
max_order | ) |
|
Sets the maximum order of the Gaussian-product expansion.
- Parameters
-
| max_order | The maximum order. |
◆ getMaxOrder()
| std::size_t CDPL::Shape::GaussianShapeFunction::getMaxOrder |
( |
| ) |
const |
Returns the currently configured maximum order of the Gaussian-product expansion.
- Returns
- The configured maximum order.
◆ setDistanceCutoff()
| void CDPL::Shape::GaussianShapeFunction::setDistanceCutoff |
( |
double |
cutoff | ) |
|
Sets the distance cutoff for pruning negligible Gaussian-product contributions.
- Parameters
-
| cutoff | The cutoff distance. |
◆ getDistanceCutoff()
| double CDPL::Shape::GaussianShapeFunction::getDistanceCutoff |
( |
| ) |
const |
Returns the currently configured distance cutoff.
- Returns
- The configured distance cutoff.
◆ setShape()
| void CDPL::Shape::GaussianShapeFunction::setShape |
( |
const GaussianShape & |
shape | ) |
|
Associates the function with the Gaussian shape shape.
- Parameters
-
◆ getShape()
| const GaussianShape* CDPL::Shape::GaussianShapeFunction::getShape |
( |
| ) |
const |
Returns a pointer to the associated Gaussian shape (or nullptr if none is associated).
- Returns
- A pointer to the associated Gaussian shape.
◆ reset()
| void CDPL::Shape::GaussianShapeFunction::reset |
( |
| ) |
|
Resets the function by discarding the cached Gaussian-product expansion.
◆ transform()
| void CDPL::Shape::GaussianShapeFunction::transform |
( |
const Math::Matrix4D & |
xform | ) |
|
Applies an affine transformation to the element positions of the associated shape.
- Parameters
-
| xform | The 4x4 transformation matrix. |
◆ getElementPosition()
| const Math::Vector3D& CDPL::Shape::GaussianShapeFunction::getElementPosition |
( |
std::size_t |
idx | ) |
const |
Returns the 3D position of the element at index idx.
- Parameters
-
- Returns
- A
const reference to the element 3D position.
- Exceptions
-
◆ getElementPositions()
| void CDPL::Shape::GaussianShapeFunction::getElementPositions |
( |
Math::Vector3DArray & |
coords | ) |
const |
Returns the 3D positions of all elements of the associated shape.
- Parameters
-
| coords | The output array of 3D positions. |
◆ calcDensity()
| double CDPL::Shape::GaussianShapeFunction::calcDensity |
( |
const Math::Vector3D & |
pos | ) |
const |
Evaluates the Gaussian density of the shape at the 3D position pos.
- Parameters
-
- Returns
- The Gaussian density value.
◆ calcVolume()
| double CDPL::Shape::GaussianShapeFunction::calcVolume |
( |
| ) |
const |
Calculates the total volume enclosed by the Gaussian shape.
- Returns
- The volume.
◆ calcSurfaceArea() [1/2]
| double CDPL::Shape::GaussianShapeFunction::calcSurfaceArea |
( |
| ) |
const |
Calculates the total surface area of the Gaussian shape.
- Returns
- The total surface area.
◆ calcSurfaceArea() [2/2]
| double CDPL::Shape::GaussianShapeFunction::calcSurfaceArea |
( |
std::size_t |
elem_idx | ) |
const |
Calculates the surface area contribution of the single element at index elem_idx.
- Parameters
-
| elem_idx | The element index. |
- Returns
- The element surface area.
◆ calcCentroid()
| void CDPL::Shape::GaussianShapeFunction::calcCentroid |
( |
Math::Vector3D & |
ctr | ) |
const |
Calculates the centroid of the Gaussian shape.
- Parameters
-
| ctr | The output centroid position. |
◆ calcQuadrupoleTensor()
Calculates the quadrupole tensor of the Gaussian shape with respect to the reference point ctr.
- Parameters
-
| ctr | The reference point (typically the shape centroid). |
| quad_tensor | The output 3x3 quadrupole tensor. |
◆ operator=()
Copy assignment operator.
- Parameters
-
| func | The other GaussianShapeFunction instance. |
- Returns
- A reference to itself.
◆ FastGaussianShapeOverlapFunction
◆ ExactGaussianShapeOverlapFunction
◆ DEF_MAX_PRODUCT_ORDER
| constexpr std::size_t CDPL::Shape::GaussianShapeFunction::DEF_MAX_PRODUCT_ORDER = 6 |
|
staticconstexpr |
Default maximum order of the Gaussian-product expansion.
◆ DEF_DISTANCE_CUTOFF
| constexpr double CDPL::Shape::GaussianShapeFunction::DEF_DISTANCE_CUTOFF = 0.0 |
|
staticconstexpr |
Default distance cutoff for pruning negligible Gaussian-product contributions.
The documentation for this class was generated from the following file: