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