Skip to content
Snippets Groups Projects
Commit 33be4955 authored by Pospelov, Gennady's avatar Pospelov, Gennady
Browse files

Couple of comments

parent c886b7fe
No related branches found
No related tags found
No related merge requests found
......@@ -13,7 +13,7 @@ set(BornAgain_VERSION_PATCH 2)
# --- General project settings ---
option(BORNAGAIN_PYTHON "Build with python support" ON)
option(BORNAGAIN_APP "Build test application" OFF)
option(BORNAGAIN_APP "Build test application" ON)
option(BORNAGAIN_GUI "Build a graphical user interface" OFF)
option(BORNAGAIN_MAN "Build a user manual" OFF)
option(BUILD_DEBIAN "Build a debian package" OFF)
......
......@@ -18,19 +18,21 @@
#include "IInterferenceFunction.h"
//! Interference function of 1D paracrystal.
class BA_CORE_API_ InterferenceFunction1DParaCrystal : public IInterferenceFunction
{
public:
//! @brief constructor
//! @param peak_distance The distance to the first neighbor peak.
//! @param width Width parameter in the pair correlation function.
//! @param m_corr_length Correlation length of paracrystal.
InterferenceFunction1DParaCrystal(
double peak_distance, double width, double corr_length=0.0);
virtual ~InterferenceFunction1DParaCrystal() {}
virtual InterferenceFunction1DParaCrystal *clone() const {
InterferenceFunction1DParaCrystal *p_clone =
new InterferenceFunction1DParaCrystal(
m_peak_distance, m_width, m_corr_length);
p_clone->setKappa(m_kappa);
return p_clone;
}
virtual InterferenceFunction1DParaCrystal *clone() const;
virtual void accept(ISampleVisitor *visitor) const { visitor->visit(this); }
......@@ -41,9 +43,9 @@ public:
complex_t FTGaussianCorrLength(double qpar) const;
protected:
double m_peak_distance;
double m_width;
double m_corr_length;
double m_peak_distance; //!< the distance to the first neighbor peak
double m_width; //!< width parameter in the pair correlation function
double m_corr_length; //!< correlation length of paracrystal
bool m_use_corr_length;
double m_kappa;
......
......@@ -20,11 +20,14 @@
#include "Lattice2DIFParameters.h"
#include "FTDistributions.h"
//! ?
//! Interference function of 2D lattice
class BA_CORE_API_ InterferenceFunction2DLattice : public IInterferenceFunction
{
public:
//! @brief contructor
//! @param lattice_params Lattice parameters
InterferenceFunction2DLattice(const Lattice2DIFParameters& lattice_params);
virtual ~InterferenceFunction2DLattice();
......
......@@ -20,10 +20,18 @@
#include "FTDistributions.h"
#include <iostream>
//! Interference function of 2D paracrystal.
class BA_CORE_API_ InterferenceFunction2DParaCrystal : public IInterferenceFunction
{
public:
//! @brief constructor
//! @param length_1 Lattice length 1.
//! @param length_2 Lattice length 2.
//! @param alpha_lattice Angle between lattice basis vectors.
//! @param xi Angle between first basis vector and the x-axis of incoming beam.
//! @param m_corr_length correlation length of paracrystal
InterferenceFunction2DParaCrystal(double length_1, double length_2, double alpha_lattice, double xi=0.0, double corr_length=0.0);
virtual ~InterferenceFunction2DParaCrystal();
......@@ -36,6 +44,8 @@ public:
static InterferenceFunction2DParaCrystal *createHexagonal(double peak_distance, double corr_length=0.0,
double domain_size_1=0.0, double domain_size_2=0.0);
//! @brief Sets sizes of coherence domain
//! @param size_1
void setDomainSizes(double size_1, double size_2) {
m_domain_sizes[0] = size_1;
m_domain_sizes[1] = size_2;
......@@ -55,14 +65,14 @@ protected:
virtual void init_parameters();
void transformToPrincipalAxes(double qx, double qy, double gamma, double delta, double& q_pa_1, double& q_pa_2) const;
double m_lattice_lengths[2];
double m_lattice_lengths[2]; //!< the size of unit cell
double m_alpha_lattice; //!< Angle between lattice basis vectors
double m_xi; //!< Orientation of the lattice wrt beam axis x
bool m_integrate_xi; //!< Integrate over the orientation xi
IFTDistribution2D *m_pdfs[2];
double m_corr_length;
bool m_use_corr_length;
double m_domain_sizes[2];
double m_domain_sizes[2]; //!< Coherence domain sizes
private:
//! Returns interference function for fixed rotation xi
......
......@@ -36,6 +36,16 @@ void InterferenceFunction1DParaCrystal::init_parameters()
registerParameter("corr_length", &m_corr_length);
}
InterferenceFunction1DParaCrystal *InterferenceFunction1DParaCrystal::clone() const {
InterferenceFunction1DParaCrystal *p_clone =
new InterferenceFunction1DParaCrystal(
m_peak_distance, m_width, m_corr_length);
p_clone->setKappa(m_kappa);
return p_clone;
}
double InterferenceFunction1DParaCrystal::evaluate(const cvector_t& q) const
{
double qxr = q.x().real();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment