Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
BornAgain
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mlz
BornAgain
Commits
8b160191
Commit
8b160191
authored
2 years ago
by
Wuttke, Joachim
Browse files
Options
Downloads
Patches
Plain Diff
consolidate Polyhedra.cpp
parent
2dea3012
No related branches found
No related tags found
1 merge request
!1188
All polyhedral formfactors now constructed by libff; files merged into Polyhedra.h|cpp
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Sample/HardParticle/Polyhedra.cpp
+4
-207
4 additions, 207 deletions
Sample/HardParticle/Polyhedra.cpp
with
4 additions
and
207 deletions
Sample/HardParticle/Polyhedra.cpp
+
4
−
207
View file @
8b160191
...
...
@@ -12,9 +12,12 @@
//
// ************************************************************************************************
#include
"Sample/HardParticle/Polyhedra.h"
#include
"Base/Math/Constants.h"
#include
"Base/Math/Functions.h"
#include
"Base/Util/Assert.h"
#include
"Sample/HardParticle/Polyhedra
.h
"
#include
<ff/Make
.h
>
Box
::
Box
(
const
std
::
vector
<
double
>
P
)
:
IFormFactorPrism
(
P
)
...
...
@@ -55,22 +58,7 @@ std::string Box::validate() const
m_validated
=
true
;
return
""
;
}
// ************************************************************************************************
//
// BornAgain: simulate and fit reflection and scattering
//
//! @file Sample/HardParticle/Prism3.cpp
//! @brief Implements class Prism3.
//!
//! @homepage http://www.bornagainproject.org
//! @license GNU General Public License v3 or higher (see COPYING)
//! @copyright Forschungszentrum Jülich GmbH 2018
//! @authors Scientific Computing Group at MLZ (see CITATION, AUTHORS)
//
// ************************************************************************************************
#include
"Sample/HardParticle/Polyhedra.h"
#include
<ff/Make.h>
Prism3
::
Prism3
(
const
std
::
vector
<
double
>
P
)
:
IFormFactorPrism
(
P
)
...
...
@@ -85,22 +73,7 @@ Prism3::Prism3(double base_edge, double height)
:
Prism3
(
std
::
vector
<
double
>
{
base_edge
,
height
})
{
}
// ************************************************************************************************
//
// BornAgain: simulate and fit reflection and scattering
//
//! @file Sample/HardParticle/Prism6.cpp
//! @brief Implements class Prism6.
//!
//! @homepage http://www.bornagainproject.org
//! @license GNU General Public License v3 or higher (see COPYING)
//! @copyright Forschungszentrum Jülich GmbH 2018
//! @authors Scientific Computing Group at MLZ (see CITATION, AUTHORS)
//
// ************************************************************************************************
#include
"Sample/HardParticle/Polyhedra.h"
#include
<ff/Make.h>
Prism6
::
Prism6
(
const
std
::
vector
<
double
>
P
)
:
IFormFactorPrism
(
P
)
...
...
@@ -115,24 +88,7 @@ Prism6::Prism6(double base_edge, double height)
:
Prism6
(
std
::
vector
<
double
>
{
base_edge
,
height
})
{
}
// ************************************************************************************************
//
// BornAgain: simulate and fit reflection and scattering
//
//! @file Sample/HardParticle/PlatonicTetrahedron.cpp
//! @brief Implements class PlatonicTetrahedron.
//!
//! @homepage http://www.bornagainproject.org
//! @license GNU General Public License v3 or higher (see COPYING)
//! @copyright Forschungszentrum Jülich GmbH 2018
//! @authors Scientific Computing Group at MLZ (see CITATION, AUTHORS)
//
// ************************************************************************************************
#include
"Base/Math/Constants.h"
#include
"Base/Math/Functions.h"
#include
"Sample/HardParticle/Polyhedra.h"
#include
<ff/Make.h>
PlatonicTetrahedron
::
PlatonicTetrahedron
(
const
std
::
vector
<
double
>
P
)
:
IFormFactorPolyhedron
(
P
)
...
...
@@ -146,24 +102,7 @@ PlatonicTetrahedron::PlatonicTetrahedron(double edge)
:
PlatonicTetrahedron
(
std
::
vector
<
double
>
{
edge
})
{
}
// ************************************************************************************************
//
// BornAgain: simulate and fit reflection and scattering
//
//! @file Sample/HardParticle/PlatonicOctahedron.cpp
//! @brief Implements class PlatonicOctahedron.
//!
//! @homepage http://www.bornagainproject.org
//! @license GNU General Public License v3 or higher (see COPYING)
//! @copyright Forschungszentrum Jülich GmbH 2018
//! @authors Scientific Computing Group at MLZ (see CITATION, AUTHORS)
//
// ************************************************************************************************
#include
"Base/Math/Constants.h"
#include
"Base/Math/Functions.h"
#include
"Sample/HardParticle/Polyhedra.h"
#include
<ff/Make.h>
PlatonicOctahedron
::
PlatonicOctahedron
(
const
std
::
vector
<
double
>
P
)
:
IFormFactorPolyhedron
(
P
)
...
...
@@ -177,22 +116,7 @@ PlatonicOctahedron::PlatonicOctahedron(double edge)
:
PlatonicOctahedron
(
std
::
vector
<
double
>
{
edge
})
{
}
// ************************************************************************************************
//
// BornAgain: simulate and fit reflection and scattering
//
//! @file Sample/HardParticle/Dodecahedron.cpp
//! @brief Implements class Dodecahedron.
//!
//! @homepage http://www.bornagainproject.org
//! @license GNU General Public License v3 or higher (see COPYING)
//! @copyright Forschungszentrum Jülich GmbH 2018
//! @authors Scientific Computing Group at MLZ (see CITATION, AUTHORS)
//
// ************************************************************************************************
#include
"Sample/HardParticle/Polyhedra.h"
#include
<ff/Make.h>
Dodecahedron
::
Dodecahedron
(
const
std
::
vector
<
double
>
P
)
:
IFormFactorPolyhedron
(
P
)
...
...
@@ -206,22 +130,7 @@ Dodecahedron::Dodecahedron(double edge)
:
Dodecahedron
(
std
::
vector
<
double
>
{
edge
})
{
}
// ************************************************************************************************
//
// BornAgain: simulate and fit reflection and scattering
//
//! @file Sample/HardParticle/Icosahedron.cpp
//! @brief Implements class Icosahedron.
//!
//! @homepage http://www.bornagainproject.org
//! @license GNU General Public License v3 or higher (see COPYING)
//! @copyright Forschungszentrum Jülich GmbH 2018
//! @authors Scientific Computing Group at MLZ (see CITATION, AUTHORS)
//
// ************************************************************************************************
#include
"Sample/HardParticle/Polyhedra.h"
#include
<ff/Make.h>
Icosahedron
::
Icosahedron
(
const
std
::
vector
<
double
>
P
)
:
IFormFactorPolyhedron
(
P
)
...
...
@@ -235,24 +144,7 @@ Icosahedron::Icosahedron(double edge)
:
Icosahedron
(
std
::
vector
<
double
>
{
edge
})
{
}
// ************************************************************************************************
//
// BornAgain: simulate and fit reflection and scattering
//
//! @file Sample/HardParticle/Pyramid2.cpp
//! @brief Implements class Pyramid2.
//!
//! @homepage http://www.bornagainproject.org
//! @license GNU General Public License v3 or higher (see COPYING)
//! @copyright Forschungszentrum Jülich GmbH 2018
//! @authors Scientific Computing Group at MLZ (see CITATION, AUTHORS)
//
// ************************************************************************************************
#include
"Base/Math/Constants.h"
#include
"Base/Math/Functions.h"
#include
"Sample/HardParticle/Polyhedra.h"
#include
<ff/Make.h>
Pyramid2
::
Pyramid2
(
const
std
::
vector
<
double
>
P
)
:
IFormFactorPolyhedron
(
P
)
...
...
@@ -269,24 +161,7 @@ Pyramid2::Pyramid2(double length, double width, double height, double alpha)
:
Pyramid2
(
std
::
vector
<
double
>
{
length
,
width
,
height
,
alpha
})
{
}
// ************************************************************************************************
//
// BornAgain: simulate and fit reflection and scattering
//
//! @file Sample/HardParticle/Pyramid3.cpp
//! @brief Implements class Pyramid3.
//!
//! @homepage http://www.bornagainproject.org
//! @license GNU General Public License v3 or higher (see COPYING)
//! @copyright Forschungszentrum Jülich GmbH 2018
//! @authors Scientific Computing Group at MLZ (see CITATION, AUTHORS)
//
// ************************************************************************************************
#include
"Base/Math/Constants.h"
#include
"Base/Math/Functions.h"
#include
"Sample/HardParticle/Polyhedra.h"
#include
<ff/Make.h>
Pyramid3
::
Pyramid3
(
const
std
::
vector
<
double
>
P
)
:
IFormFactorPolyhedron
(
P
)
...
...
@@ -302,23 +177,7 @@ Pyramid3::Pyramid3(double base_edge, double height, double alpha)
:
Pyramid3
(
std
::
vector
<
double
>
{
base_edge
,
height
,
alpha
})
{
}
// ************************************************************************************************
//
// BornAgain: simulate and fit reflection and scattering
//
//! @file Sample/HardParticle/Pyramid4.cpp
//! @brief Implements class Pyramid4.
//!
//! @homepage http://www.bornagainproject.org
//! @license GNU General Public License v3 or higher (see COPYING)
//! @copyright Forschungszentrum Jülich GmbH 2018
//! @authors Scientific Computing Group at MLZ (see CITATION, AUTHORS)
//
// ************************************************************************************************
#include
"Base/Math/Constants.h"
#include
"Base/Math/Functions.h"
#include
"Sample/HardParticle/Polyhedra.h"
const
ff
::
Topology
Pyramid4
::
topology
=
{{{{
3
,
2
,
1
,
0
},
true
},
{{
0
,
1
,
5
,
4
},
false
},
...
...
@@ -378,23 +237,7 @@ std::string Pyramid4::validate() const
m_validated
=
true
;
return
""
;
}
// ************************************************************************************************
//
// BornAgain: simulate and fit reflection and scattering
//
//! @file Sample/HardParticle/Pyramid6.cpp
//! @brief Implements class Pyramid6.
//!
//! @homepage http://www.bornagainproject.org
//! @license GNU General Public License v3 or higher (see COPYING)
//! @copyright Forschungszentrum Jülich GmbH 2018
//! @authors Scientific Computing Group at MLZ (see CITATION, AUTHORS)
//
// ************************************************************************************************
#include
"Base/Math/Constants.h"
#include
"Base/Math/Functions.h"
#include
"Sample/HardParticle/Polyhedra.h"
const
ff
::
Topology
Pyramid6
::
topology
=
{{{{
5
,
4
,
3
,
2
,
1
,
0
},
true
},
{{
0
,
1
,
7
,
6
},
false
},
...
...
@@ -465,24 +308,7 @@ std::string Pyramid6::validate() const
m_validated
=
true
;
return
""
;
}
// ************************************************************************************************
//
// BornAgain: simulate and fit reflection and scattering
//
//! @file Sample/HardParticle/Bipyramid4.cpp
//! @brief Implements class Bipyramid4.
//!
//! @homepage http://www.bornagainproject.org
//! @license GNU General Public License v3 or higher (see COPYING)
//! @copyright Forschungszentrum Jülich GmbH 2018
//! @authors Scientific Computing Group at MLZ (see CITATION, AUTHORS)
//
// ************************************************************************************************
#include
"Base/Math/Constants.h"
#include
"Base/Math/Functions.h"
#include
"Sample/HardParticle/Polyhedra.h"
#include
"Sample/HardParticle/Polyhedra.h"
const
ff
::
Topology
Bipyramid4
::
topology
=
{{{{
3
,
2
,
1
,
0
},
true
},
{{
0
,
1
,
5
,
4
},
false
},
...
...
@@ -564,21 +390,7 @@ std::string Bipyramid4::validate() const
m_validated
=
true
;
return
""
;
}
// ************************************************************************************************
//
// BornAgain: simulate and fit reflection and scattering
//
//! @file Sample/HardParticle/CantellatedCube.cpp
//! @brief Implements class CantellatedCube.
//!
//! @homepage http://www.bornagainproject.org
//! @license GNU General Public License v3 or higher (see COPYING)
//! @copyright Forschungszentrum Jülich GmbH 2018
//! @authors Scientific Computing Group at MLZ (see CITATION, AUTHORS)
//
// ************************************************************************************************
#include
"Sample/HardParticle/Polyhedra.h"
const
ff
::
Topology
CantellatedCube
::
topology
=
{{
/* 0 */
{{
0
,
1
,
2
,
3
},
true
},
...
...
@@ -650,21 +462,7 @@ std::string CantellatedCube::validate() const
m_validated
=
true
;
return
""
;
}
// ************************************************************************************************
//
// BornAgain: simulate and fit reflection and scattering
//
//! @file Sample/HardParticle/TruncatedCube.cpp
//! @brief Implements class TruncatedCube.
//!
//! @homepage http://www.bornagainproject.org
//! @license GNU General Public License v3 or higher (see COPYING)
//! @copyright Forschungszentrum Jülich GmbH 2018
//! @authors Scientific Computing Group at MLZ (see CITATION, AUTHORS)
//
// ************************************************************************************************
#include
"Sample/HardParticle/Polyhedra.h"
const
ff
::
Topology
TruncatedCube
::
topology
=
{{{{
0
,
1
,
7
,
6
,
9
,
10
,
4
,
3
},
true
},
{{
0
,
2
,
1
},
false
},
...
...
@@ -708,7 +506,6 @@ std::string TruncatedCube::validate() const
if
(
c
<
0
)
return
jointError
({
"parameters violate condition removed_length <= 0.5*length"
});
setPolyhedron
(
topology
,
-
a
,
{{
-
c
,
-
a
,
-
a
},
{
-
a
,
-
c
,
-
a
},
{
-
a
,
-
a
,
-
c
},
{
c
,
-
a
,
-
a
},
{
a
,
-
c
,
-
a
},
{
a
,
-
a
,
-
c
},
{
-
c
,
a
,
-
a
},
{
-
a
,
c
,
-
a
},
{
-
a
,
a
,
-
c
},
{
c
,
a
,
-
a
},
{
a
,
c
,
-
a
},
{
a
,
a
,
-
c
},
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment