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