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