BornAgain  1.19.79
Open-source research software to simulate and fit neutron and x-ray reflectometry and grazing-incidence small-angle scattering
Icosahedron.h
Go to the documentation of this file.
1 // ************************************************************************************************
2 //
3 // BornAgain: simulate and fit reflection and scattering
4 //
5 //! @file Sample/HardParticle/Icosahedron.h
6 //! @brief Defines class Icosahedron.
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_ICOSAHEDRON_H
16 #define BORNAGAIN_SAMPLE_HARDPARTICLE_ICOSAHEDRON_H
17 
19 
20 //! A regular icosahedron.
21 //! @ingroup hardParticle
22 
24 public:
25  Icosahedron(double edge);
26 #ifndef USER_API
27  Icosahedron(std::vector<double> P);
28 
29  Icosahedron* clone() const override { return new Icosahedron(m_edge); }
30  std::string className() const final { return "Icosahedron"; }
31  // const auto tooltip = "regular icosahedron";
32  std::vector<ParaMeta> parDefs() const final
33  {
34  return {{"Edge", "nm", "edge length", 0, +INF, 0}};
35  }
36 
37  double edge() const { return m_edge; }
38 
39 private:
40  static const ff::PolyhedralTopology topology;
41  const double& m_edge;
42 #endif // USER_API
43 };
44 
45 #endif // BORNAGAIN_SAMPLE_HARDPARTICLE_ICOSAHEDRON_H
Defines interface IFormFactorPolyhedron.
const double INF
Definition: INode.h:26
A polyhedron, for form factor computation.
A regular icosahedron.
Definition: Icosahedron.h:23
std::string className() const final
Returns the class name, to be hard-coded in each leaf class that inherits from INode.
Definition: Icosahedron.h:30
double edge() const
Definition: Icosahedron.h:37
std::vector< ParaMeta > parDefs() const final
Returns the parameter definitions, to be hard-coded in each leaf class.
Definition: Icosahedron.h:32
Icosahedron(double edge)
Definition: Icosahedron.cpp:28
const double & m_edge
Definition: Icosahedron.h:41
static const ff::PolyhedralTopology topology
Definition: Icosahedron.h:40
Icosahedron * clone() const override
Returns a clone of this ISampleNode object.
Definition: Icosahedron.h:29