BornAgain
1.19.79
Open-source research software to simulate and fit neutron and x-ray reflectometry and grazing-incidence small-angle scattering
Icosahedron.cpp
Go to the documentation of this file.
1
// ************************************************************************************************
2
//
3
// BornAgain: simulate and fit reflection and scattering
4
//
5
//! @file Sample/HardParticle/Icosahedron.cpp
6
//! @brief Implements 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
#include "
Sample/HardParticle/Icosahedron.h
"
16
#include <ff/Platonic.h>
17
18
Icosahedron::Icosahedron
(
const
std::vector<double> P)
19
:
IFormFactorPolyhedron
(P)
20
, m_edge(m_P[0])
21
{
22
checkNodeArgs
();
23
setPolyhedron
(ff::platonic::Icosahedron::topology(), -0.7557613140761708 *
m_edge
,
24
ff::platonic::Icosahedron::vertices(
m_edge
));
25
assert_platonic
();
26
}
27
28
Icosahedron::Icosahedron
(
double
edge)
29
:
Icosahedron
(std::vector<double>{
edge
})
30
{
31
}
Icosahedron.h
Defines class Icosahedron.
IFormFactorPolyhedron
A polyhedron, for form factor computation.
Definition:
IFormFactorPolyhedron.h:30
IFormFactorPolyhedron::assert_platonic
void assert_platonic() const
Assertions for Platonic solid.
Definition:
IFormFactorPolyhedron.cpp:79
IFormFactorPolyhedron::setPolyhedron
void setPolyhedron(const ff::PolyhedralTopology &topology, double z_bottom, const std::vector< R3 > &vertices)
Called by child classes to set faces and other internal variables.
Definition:
IFormFactorPolyhedron.cpp:41
INode::checkNodeArgs
void checkNodeArgs() const
Raises exception if a parameter value is invalid.
Definition:
INode.cpp:27
Icosahedron
A regular icosahedron.
Definition:
Icosahedron.h:23
Icosahedron::edge
double edge() const
Definition:
Icosahedron.h:37
Icosahedron::Icosahedron
Icosahedron(double edge)
Definition:
Icosahedron.cpp:28
Icosahedron::m_edge
const double & m_edge
Definition:
Icosahedron.h:41
Sample
HardParticle
Icosahedron.cpp
Generated by
1.9.1