BornAgain  1.19.79
Open-source research software to simulate and fit neutron and x-ray reflectometry and grazing-incidence small-angle scattering
CantellatedCube.h
Go to the documentation of this file.
1 // ************************************************************************************************
2 //
3 // BornAgain: simulate and fit reflection and scattering
4 //
5 //! @file Sample/HardParticle/CantellatedCube.h
6 //! @brief Defines class CantellatedCube.
7 //!
8 //! @homepage http://www.bornagainproject.org
9 //! @license GNU General Public License v3 or higher (see COPYING)
10 //! @copyright Forschungszentrum Jülich GmbH 2018
11 //! @authors Scientific Computing Group at MLZ (see CITATION, AUTHORS)
12 //
13 // ************************************************************************************************
14 
15 #ifndef BORNAGAIN_SAMPLE_HARDPARTICLE_CANTELLATEDCUBE_H
16 #define BORNAGAIN_SAMPLE_HARDPARTICLE_CANTELLATEDCUBE_H
17 
19 
20 //! A cube, with truncation of all edges and corners, as in Croset (2017) Fig 7
21 //! @ingroup hardParticle
22 
24 public:
25  CantellatedCube(double length, double removed_length);
26 #ifndef USER_API
27  CantellatedCube(std::vector<double> P);
28 
29  CantellatedCube* clone() const override
30  {
32  }
33  std::string className() const final { return "CantellatedCube"; }
34  // const auto tooltip = "a cube with truncated edges and vertices";
35  std::vector<ParaMeta> parDefs() const final
36  {
37  return {{"Length", "nm", "length of untruncated edge", 0, +INF, 0},
38  {"RemovedLength", "nm",
39  "side length of the trirectangular tetrahedron removed one corner", 0, +INF, 0}};
40  }
41 
42  double length() const { return m_length; }
43  double removedLength() const { return m_removed_length; }
44 #endif // USER_API
45 
46 private:
47  static const ff::PolyhedralTopology topology;
48  const double& m_length;
49  const double& m_removed_length;
50 };
51 
52 #endif // BORNAGAIN_SAMPLE_HARDPARTICLE_CANTELLATEDCUBE_H
Defines interface IFormFactorPolyhedron.
const double INF
Definition: INode.h:26
A cube, with truncation of all edges and corners, as in Croset (2017) Fig 7.
double removedLength() const
CantellatedCube * clone() const override
Returns a clone of this ISampleNode object.
const double & m_length
CantellatedCube(double length, double removed_length)
std::vector< ParaMeta > parDefs() const final
Returns the parameter definitions, to be hard-coded in each leaf class.
std::string className() const final
Returns the class name, to be hard-coded in each leaf class that inherits from INode.
double length() const
const double & m_removed_length
static const ff::PolyhedralTopology topology
A polyhedron, for form factor computation.