Mantid
Loading...
Searching...
No Matches
Public Member Functions | Private Member Functions | Private Attributes | List of all members
Mantid::Geometry::HKLFilterDRange Class Referencefinal

A class to filter HKLs by their d-values. More...

#include <BasicHKLFilters.h>

Inheritance diagram for Mantid::Geometry::HKLFilterDRange:
Mantid::Geometry::HKLFilter

Public Member Functions

std::string getDescription () const noexcept override
 Returns a description containing the parameters of the filter. More...
 
 HKLFilterDRange (const UnitCell &cell, double dMin)
 Constructor, dMax is set to the largest lattice parameter. More...
 
 HKLFilterDRange (const UnitCell &cell, double dMin, double dMax)
 Constructor with explicit dMax. More...
 
bool isAllowed (const Kernel::V3D &hkl) const noexcept override
 Returns true if the d-value of the HKL is within the specified range. More...
 
- Public Member Functions inherited from Mantid::Geometry::HKLFilter
std::function< bool(const Kernel::V3D &)> fn () const noexcept
 Returns a function object that wraps HKLFilter::isAllowed. More...
 
virtual std::string getDescription () const =0
 
virtual bool isAllowed (const Kernel::V3D &hkl) const =0
 
virtual ~HKLFilter ()=default
 

Private Member Functions

void checkProperDRangeValues ()
 Throws exception if m_dMin or m_dMax is <= 0 or if m_dMax < m_dMin. More...
 

Private Attributes

UnitCell m_cell
 
double m_dmax
 
double m_dmin
 

Detailed Description

A class to filter HKLs by their d-values.

This class takes a UnitCell object and calculates the spacing of the lattice planes for each HKL. If the lattice spacing is within the spcified range of values, the reflection is allowed.

If the first constructor with only dMin is used, dMax is taken to be the lattice parameter with the largest value. There can not be a greater interplanar spacing than that value.

Definition at line 81 of file BasicHKLFilters.h.

Constructor & Destructor Documentation

◆ HKLFilterDRange() [1/2]

Mantid::Geometry::HKLFilterDRange::HKLFilterDRange ( const UnitCell cell,
double  dMin 
)

Constructor, dMax is set to the largest lattice parameter.

Definition at line 14 of file BasicHKLFilters.cpp.

References Mantid::Geometry::UnitCell::a(), Mantid::Geometry::UnitCell::b(), Mantid::Geometry::UnitCell::c(), checkProperDRangeValues(), m_cell, and m_dmax.

◆ HKLFilterDRange() [2/2]

Mantid::Geometry::HKLFilterDRange::HKLFilterDRange ( const UnitCell cell,
double  dMin,
double  dMax 
)

Constructor with explicit dMax.

Definition at line 21 of file BasicHKLFilters.cpp.

References checkProperDRangeValues().

Member Function Documentation

◆ checkProperDRangeValues()

void Mantid::Geometry::HKLFilterDRange::checkProperDRangeValues ( )
private

Throws exception if m_dMin or m_dMax is <= 0 or if m_dMax < m_dMin.

Definition at line 42 of file BasicHKLFilters.cpp.

References m_dmax, and m_dmin.

Referenced by HKLFilterDRange().

◆ getDescription()

std::string Mantid::Geometry::HKLFilterDRange::getDescription ( ) const
overridevirtualnoexcept

Returns a description containing the parameters of the filter.

Implements Mantid::Geometry::HKLFilter.

Definition at line 27 of file BasicHKLFilters.cpp.

References m_dmax, and m_dmin.

◆ isAllowed()

bool Mantid::Geometry::HKLFilterDRange::isAllowed ( const Kernel::V3D hkl) const
overridevirtualnoexcept

Returns true if the d-value of the HKL is within the specified range.

Implements Mantid::Geometry::HKLFilter.

Definition at line 35 of file BasicHKLFilters.cpp.

References Mantid::Geometry::d.

Member Data Documentation

◆ m_cell

UnitCell Mantid::Geometry::HKLFilterDRange::m_cell
private

Definition at line 92 of file BasicHKLFilters.h.

Referenced by HKLFilterDRange().

◆ m_dmax

double Mantid::Geometry::HKLFilterDRange::m_dmax
private

Definition at line 93 of file BasicHKLFilters.h.

Referenced by checkProperDRangeValues(), getDescription(), and HKLFilterDRange().

◆ m_dmin

double Mantid::Geometry::HKLFilterDRange::m_dmin
private

Definition at line 93 of file BasicHKLFilters.h.

Referenced by checkProperDRangeValues(), and getDescription().


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