Skip to content
Snippets Groups Projects
Commit a1f54db5 authored by Wuttke, Joachim's avatar Wuttke, Joachim
Browse files

wip

parent a77e8cb0
No related branches found
No related tags found
1 merge request!488start using libformfactor
Showing
with 23 additions and 21 deletions
......@@ -21,8 +21,10 @@ set(${lib}_LIBRARY ${lib} PARENT_SCOPE)
target_link_libraries(${lib}
PUBLIC
${BornAgainParam_LIBRARY}
${formfactor_LIBRARY}
)
target_include_directories(${lib}
PUBLIC
${formfactor_INCLUDE_DIR}
${CMAKE_SOURCE_DIR}
)
......@@ -16,7 +16,7 @@
#include "Base/Math/Constants.h"
#include "Base/Math/Functions.h"
const PolyhedralTopology FormFactorAnisoPyramid::topology = {{{{3, 2, 1, 0}, true},
const ff::PolyhedralTopology FormFactorAnisoPyramid::topology = {{{{3, 2, 1, 0}, true},
{{0, 1, 5, 4}, false},
{{1, 2, 6, 5}, false},
{{2, 3, 7, 6}, false},
......
......@@ -46,7 +46,7 @@ protected:
void onChange() override;
private:
static const PolyhedralTopology topology;
static const ff::PolyhedralTopology topology;
const double& m_length;
const double& m_width;
......
......@@ -14,7 +14,7 @@
#include "Sample/HardParticle/FormFactorCantellatedCube.h"
const PolyhedralTopology FormFactorCantellatedCube::topology = {
const ff::PolyhedralTopology FormFactorCantellatedCube::topology = {
{
/* 0 */ {{0, 1, 2, 3}, true},
/* 1 */ {{0, 8, 5, 1}, true},
......
......@@ -41,7 +41,7 @@ protected:
void onChange() override;
private:
static const PolyhedralTopology topology;
static const ff::PolyhedralTopology topology;
const double& m_length;
const double& m_removed_length;
};
......
......@@ -16,7 +16,7 @@
#include "Base/Math/Constants.h"
#include "Base/Math/Functions.h"
const PolyhedralTopology FormFactorCone6::topology = {{{{5, 4, 3, 2, 1, 0}, true},
const ff::PolyhedralTopology FormFactorCone6::topology = {{{{5, 4, 3, 2, 1, 0}, true},
{{0, 1, 7, 6}, false},
{{1, 2, 8, 7}, false},
{{2, 3, 9, 8}, false},
......
......@@ -45,7 +45,7 @@ protected:
void onChange() override;
private:
static const PolyhedralTopology topology;
static const ff::PolyhedralTopology topology;
const double& m_base_edge;
const double& m_height;
const double& m_alpha;
......
......@@ -17,7 +17,7 @@
#include "Base/Math/Functions.h"
#include "Sample/HardParticle/FormFactorPyramid.h"
const PolyhedralTopology FormFactorCuboctahedron::topology = {{{{3, 2, 1, 0}, true},
const ff::PolyhedralTopology FormFactorCuboctahedron::topology = {{{{3, 2, 1, 0}, true},
{{0, 1, 5, 4}, false},
{{1, 2, 6, 5}, false},
{{2, 3, 7, 6}, false},
......
......@@ -46,7 +46,7 @@ protected:
void onChange() override;
private:
static const PolyhedralTopology topology;
static const ff::PolyhedralTopology topology;
const double& m_length;
const double& m_height;
......
......@@ -14,7 +14,7 @@
#include "Sample/HardParticle/FormFactorDodecahedron.h"
const PolyhedralTopology FormFactorDodecahedron::topology = {{// bottom:
const ff::PolyhedralTopology FormFactorDodecahedron::topology = {{// bottom:
{{0, 4, 3, 2, 1}, false},
// lower ring:
{{0, 5, 12, 9, 4}, false},
......
......@@ -37,7 +37,7 @@ protected:
void onChange() override;
private:
static const PolyhedralTopology topology;
static const ff::PolyhedralTopology topology;
const double& m_edge;
};
......
......@@ -14,7 +14,7 @@
#include "Sample/HardParticle/FormFactorIcosahedron.h"
const PolyhedralTopology FormFactorIcosahedron::topology = {{// bottom:
const ff::PolyhedralTopology FormFactorIcosahedron::topology = {{// bottom:
{{0, 2, 1}, false},
// 1st row:
{{0, 5, 2}, false},
......
......@@ -37,7 +37,7 @@ protected:
void onChange() override;
private:
static const PolyhedralTopology topology;
static const ff::PolyhedralTopology topology;
const double& m_edge;
};
......
......@@ -16,7 +16,7 @@
#include "Base/Math/Constants.h"
#include "Base/Math/Functions.h"
const PolyhedralTopology FormFactorPyramid::topology = {{
const ff::PolyhedralTopology FormFactorPyramid::topology = {{
{{3, 2, 1, 0}, true}, // TODO -> true
{{0, 1, 5, 4}, false},
{{1, 2, 6, 5}, false},
......
......@@ -45,7 +45,7 @@ protected:
void onChange() override;
private:
static const PolyhedralTopology topology;
static const ff::PolyhedralTopology topology;
const double& m_base_edge;
const double& m_height;
......
......@@ -16,7 +16,7 @@
#include "Base/Math/Constants.h"
#include "Base/Math/Functions.h"
const PolyhedralTopology FormFactorTetrahedron::topology = {{{{2, 1, 0}, false},
const ff::PolyhedralTopology FormFactorTetrahedron::topology = {{{{2, 1, 0}, false},
{{0, 1, 4, 3}, false},
{{1, 2, 5, 4}, false},
{{2, 0, 3, 5}, false},
......
......@@ -45,7 +45,7 @@ protected:
void onChange() override;
private:
static const PolyhedralTopology topology;
static const ff::PolyhedralTopology topology;
const double& m_base_edge;
const double& m_height;
const double& m_alpha;
......
......@@ -14,7 +14,7 @@
#include "Sample/HardParticle/FormFactorTruncatedCube.h"
const PolyhedralTopology FormFactorTruncatedCube::topology = {
const ff::PolyhedralTopology FormFactorTruncatedCube::topology = {
{{{0, 1, 7, 6, 9, 10, 4, 3}, true},
{{0, 2, 1}, false},
{{3, 4, 5}, false},
......
......@@ -41,7 +41,7 @@ protected:
void onChange() override;
private:
static const PolyhedralTopology topology;
static const ff::PolyhedralTopology topology;
const double& m_length;
const double& m_removed_length;
};
......
......@@ -17,7 +17,7 @@
//! "Form factor (Fourier shape transform) of polygon and polyhedron."
#include "Sample/HardParticle/IFormFactorPolyhedron.h"
#include "Sample/LibFF/Polyhedron.h"
#include <ff/Polyhedron.h>
// #ifdef ALGORITHM_DIAGNOSTIC // TODO restore
// void IFormFactorPolyhedron::setLimits(double _q, int _n)
......@@ -37,10 +37,10 @@ IFormFactorPolyhedron::~IFormFactorPolyhedron() = default;
//! Called by child classes to set faces and other internal variables.
void IFormFactorPolyhedron::setPolyhedron(const PolyhedralTopology& topology, double z_bottom,
void IFormFactorPolyhedron::setPolyhedron(const ff::PolyhedralTopology& topology, double z_bottom,
const std::vector<R3>& vertices)
{
pimpl = std::make_unique<Polyhedron>(topology, z_bottom, vertices);
pimpl = std::make_unique<ff::Polyhedron>(topology, z_bottom, vertices);
}
double IFormFactorPolyhedron::bottomZ(const IRotation& rotation) const
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment