BornAgain
1.19.79
Open-source research software to simulate and fit neutron and x-ray reflectometry and grazing-incidence small-angle scattering
Dodecahedron.cpp
Go to the documentation of this file.
1
// ************************************************************************************************
2
//
3
// BornAgain: simulate and fit reflection and scattering
4
//
5
//! @file Sample/HardParticle/Dodecahedron.cpp
6
//! @brief Implements 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
#include "
Sample/HardParticle/Dodecahedron.h
"
16
#include <ff/Platonic.h>
17
18
Dodecahedron::Dodecahedron
(
const
std::vector<double> P)
19
:
IFormFactorPolyhedron
(P)
20
, m_edge(m_P[0])
21
{
22
checkNodeArgs
();
23
setPolyhedron
(ff::platonic::Dodecahedron::topology(), -1.113516364411607 *
m_edge
,
24
ff::platonic::Dodecahedron::vertices(
m_edge
));
25
assert_platonic
();
26
}
27
28
Dodecahedron::Dodecahedron
(
double
edge)
29
:
Dodecahedron
(std::vector<double>{
edge
})
30
{
31
}
Dodecahedron.h
Defines class Dodecahedron.
Dodecahedron
A regular dodecahedron.
Definition:
Dodecahedron.h:23
Dodecahedron::Dodecahedron
Dodecahedron(double edge)
Definition:
Dodecahedron.cpp:28
Dodecahedron::edge
double edge() const
Definition:
Dodecahedron.h:37
Dodecahedron::m_edge
const double & m_edge
Definition:
Dodecahedron.h:41
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
Sample
HardParticle
Dodecahedron.cpp
Generated by
1.9.1