Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • c.trageser/bornagain
  • mlz/bornagain
2 results
Show changes
Commits on Source (6)
Showing
with 211 additions and 61 deletions
......@@ -55,7 +55,7 @@ windows:
- pwd
- echo "#--- CONFIGURE ---"
- cmake --version
- cmake -G "Visual Studio 16 2019" -A x64 -T host=x64 -DLIB_MAN=OFF -DQTDIR="$QT_MSVC_DIR" -DQt5_DIR="$QTCMake_DIR/Qt5" -DQt5Test_DIR="$QTCMake_DIR/Qt5Test" -DCMAKE_INCLUDE_PATH="$OPT_DIR/include;$BOOST_INCLUDE_DIR" -DCMAKE_LIBRARY_PATH="$OPT_DIR/lib;$BOOST_LIB_DIR" -DCMAKE_C_COMPILER="cl.exe" -DCMAKE_CXX_COMPILER="cl.exe" -B. ..
- cmake -G "Visual Studio 16 2019" -A x64 -T host=x64 -DLIB_MAN=OFF -DCMAKE_PREFIX_PATH="$OPT_DIR" -DQTDIR="$QT_MSVC_DIR" -DQt5_DIR="$QTCMake_DIR/Qt5" -DQt5Test_DIR="$QTCMake_DIR/Qt5Test" -DCMAKE_INCLUDE_PATH="$BOOST_INCLUDE_DIR" -DCMAKE_LIBRARY_PATH="$BOOST_LIB_DIR" -DCMAKE_C_COMPILER="cl.exe" -DCMAKE_CXX_COMPILER="cl.exe" -B. ..
- echo "#--- BUILD ---"
- pwd
- if($CI_PIPELINE_SOURCE -eq "schedule") { cmake --build . --target clean }
......
......@@ -175,9 +175,6 @@ if(BORNAGAIN_TIDY)
set(CMAKE_CXX_CLANG_TIDY "clang-tidy") # has effect only if compiler is clang; uses .clang-tidy
endif()
################################## TEMPORARY formfactor ####################################
add_subdirectory(ff)
# core components
foreach(lib ${CoreComponents})
add_subdirectory(${lib})
......
......@@ -21,7 +21,7 @@ set(${lib}_LIBRARY ${lib} PARENT_SCOPE)
target_link_libraries(${lib}
PUBLIC
${BornAgainParam_LIBRARY}
formfactor
# formfactor
)
target_include_directories(${lib}
PUBLIC
......
......@@ -17,8 +17,8 @@
//! "Form factor (Fourier shape transform) of polygon and polyhedron."
#include "Sample/HardParticle/IFormFactorPolyhedron.h"
#include <ff/PolyhedralComponents.h>
#include <ff/Polyhedron.h>
#include "Sample/ff/PolyhedralComponents.h"
#include "Sample/ff/Polyhedron.h"
// #ifdef ALGORITHM_DIAGNOSTIC // TODO restore
// void IFormFactorPolyhedron::setLimits(double _q, int _n)
......
......@@ -17,7 +17,7 @@
#define BORNAGAIN_SAMPLE_HARDPARTICLE_IFORMFACTORPOLYHEDRON_H
#include "Sample/Scattering/IBornFF.h"
#include <ff/PolyhedralTopology.h>
#include "Sample/ff/PolyhedralTopology.h"
#include <memory>
namespace ff {
......
......@@ -20,8 +20,8 @@
#ifndef BORNAGAIN_SAMPLE_HARDPARTICLE_PRISM_H
#define BORNAGAIN_SAMPLE_HARDPARTICLE_PRISM_H
#include <ff/PolyhedralComponents.h>
#include <ff/PolyhedralTopology.h>
#include "Sample/ff/PolyhedralComponents.h"
#include "Sample/ff/PolyhedralTopology.h"
#include <memory>
class Prism {
......
File moved
......@@ -12,8 +12,8 @@
//
// ************************************************************************************************
#include "ff/PolyhedralComponents.h"
#include "ff/Factorial.h"
#include "Sample/ff/PolyhedralComponents.h"
#include "Sample/ff/Factorial.h"
#include <iomanip>
#include <stdexcept>
......
......@@ -16,9 +16,9 @@
//! by Joachim Wuttke, entitled
//! "Numerically stable form factor of any polygon and polyhedron"
#include "ff/Polyhedron.h"
#include "ff/PolyhedralComponents.h"
#include "ff/PolyhedralTopology.h"
#include "Sample/ff/Polyhedron.h"
#include "Sample/ff/PolyhedralComponents.h"
#include "Sample/ff/PolyhedralTopology.h"
#include <stdexcept>
#ifdef ALGORITHM_DIAGNOSTIC_LEVEL2
......
File moved
......@@ -54,7 +54,7 @@ std::unique_ptr<OutputData<double>> domainData(const std::string& test_name,
#endif
std::cout << "- system call: " << sys_command << std::endl;
int err = std::system(sys_command.c_str());
std::cout << "- system call returned " << err << std::endl;
std::cout << "- system call returned " << err << " (0x" << std::hex << err << ")" << std::endl;
if (err)
throw std::runtime_error("Exported Python script did not execute properly");
......
#include "Sample/HardParticle/HardParticles.h"
#include "Tests/GTestWrapper/google_test.h"
#include "Tests/Unit/Numeric/MultiQTestbed.h"
#include <ff/PolyhedralComponents.h> // for diagnostic
#include "Sample/ff/PolyhedralComponents.h" // for diagnostic
//! Compare form factor for particle shapes A and B, where A is given special
//! parameter values so that it coincides with the more symmetric B.
......
......@@ -2,7 +2,7 @@
#include "Sample/HardParticle/HardParticles.h"
#include "Tests/GTestWrapper/google_test.h"
#include "Tests/Unit/Numeric/MultiQTestbed.h"
#include <ff/PolyhedralComponents.h> // for diagnostic
#include "Sample/ff/PolyhedralComponents.h" // for diagnostic
//! Check that form factors are invariant when q is transformed according to particle symmetry.
......
......@@ -5046,6 +5046,154 @@ Sets the relative weight of this layout.
";
// File: classff_1_1PolygonalTopology.xml
%feature("docstring") ff::PolygonalTopology "
For internal use in PolyhedralFace.
C++ includes: PolyhedralTopology.h
";
// File: classff_1_1PolyhedralEdge.xml
%feature("docstring") ff::PolyhedralEdge "
One edge of a polygon, for form factor computation.
C++ includes: PolyhedralComponents.h
";
%feature("docstring") ff::PolyhedralEdge::PolyhedralEdge "ff::PolyhedralEdge::PolyhedralEdge(R3 Vlow, R3 Vhig)
";
%feature("docstring") ff::PolyhedralEdge::E "R3 ff::PolyhedralEdge::E() const
";
%feature("docstring") ff::PolyhedralEdge::R "R3 ff::PolyhedralEdge::R() const
";
%feature("docstring") ff::PolyhedralEdge::qE "complex_t ff::PolyhedralEdge::qE(C3 q) const
";
%feature("docstring") ff::PolyhedralEdge::qR "complex_t ff::PolyhedralEdge::qR(C3 q) const
";
%feature("docstring") ff::PolyhedralEdge::contrib "complex_t ff::PolyhedralEdge::contrib(int m, C3 qpa, complex_t qrperp) const
Returns sum_l=0^M/2 u^2l v^(M-2l) / (2l+1)!(M-2l)! - vperp^M/M!
";
// File: classff_1_1PolyhedralFace.xml
%feature("docstring") ff::PolyhedralFace "
A polygon, for form factor computation.
C++ includes: PolyhedralComponents.h
";
%feature("docstring") ff::PolyhedralFace::PolyhedralFace "ff::PolyhedralFace::PolyhedralFace(const std::vector< R3 > &_V=std::vector< R3 >(), bool _sym_S2=false)
Sets internal variables for given vertex chain.
Parameters:
-----------
V:
oriented vertex list
_sym_S2:
true if face has a perpedicular two-fold symmetry axis
";
%feature("docstring") ff::PolyhedralFace::area "double ff::PolyhedralFace::area() const
";
%feature("docstring") ff::PolyhedralFace::pyramidalVolume "double ff::PolyhedralFace::pyramidalVolume() const
";
%feature("docstring") ff::PolyhedralFace::radius3d "double ff::PolyhedralFace::radius3d() const
";
%feature("docstring") ff::PolyhedralFace::normalProjectionConj "complex_t ff::PolyhedralFace::normalProjectionConj(C3 q) const
Returns conj(q)*normal [BasicVector3D::dot is antilinear in 'this' argument].
";
%feature("docstring") ff::PolyhedralFace::ff_n "complex_t ff::PolyhedralFace::ff_n(int n, C3 q) const
Returns contribution qn*f_n [of order q^(n+1)] from this face to the polyhedral form factor.
";
%feature("docstring") ff::PolyhedralFace::ff "complex_t ff::PolyhedralFace::ff(C3 q, bool sym_Ci) const
Returns the contribution ff(q) of this face to the polyhedral form factor.
";
%feature("docstring") ff::PolyhedralFace::ff_2D "complex_t ff::PolyhedralFace::ff_2D(C3 qpa) const
Returns the two-dimensional form factor of this face, for use in a prism.
";
%feature("docstring") ff::PolyhedralFace::ff_2D_direct "complex_t ff::PolyhedralFace::ff_2D_direct(C3 qpa) const
Two-dimensional form factor, for use in prism, from sum over edge form factors.
";
%feature("docstring") ff::PolyhedralFace::ff_2D_expanded "complex_t ff::PolyhedralFace::ff_2D_expanded(C3 qpa) const
Two-dimensional form factor, for use in prism, from power series.
";
%feature("docstring") ff::PolyhedralFace::assert_Ci "void ff::PolyhedralFace::assert_Ci(const PolyhedralFace &other) const
Throws if deviation from inversion symmetry is detected. Does not check vertices.
";
// File: classff_1_1PolyhedralTopology.xml
%feature("docstring") ff::PolyhedralTopology "
For internal use in IFormFactorPolyhedron.
C++ includes: PolyhedralTopology.h
";
// File: classff_1_1Polyhedron.xml
%feature("docstring") ff::Polyhedron "
A polyhedron, implementation class for use in IFormFactorPolyhedron.
C++ includes: Polyhedron.h
";
%feature("docstring") ff::Polyhedron::Polyhedron "ff::Polyhedron::Polyhedron(const PolyhedralTopology &topology, double z_bottom, const std::vector< R3 > &vertices)
";
%feature("docstring") ff::Polyhedron::Polyhedron "ff::Polyhedron::Polyhedron(const Polyhedron &)=delete
";
%feature("docstring") ff::Polyhedron::assert_platonic "void ff::Polyhedron::assert_platonic() const
";
%feature("docstring") ff::Polyhedron::volume "double ff::Polyhedron::volume() const
";
%feature("docstring") ff::Polyhedron::radius "double ff::Polyhedron::radius() const
";
%feature("docstring") ff::Polyhedron::vertices "const std::vector< R3 > ff::Polyhedron::vertices() const
";
%feature("docstring") ff::Polyhedron::evaluate_for_q "complex_t ff::Polyhedron::evaluate_for_q(const C3 &q) const
needed for topZ, bottomZ computation
Returns the form factor F(q) of this polyhedron, respecting the offset z_bottom.
";
// File: classPrism.xml
%feature("docstring") Prism "";
......@@ -5419,43 +5567,43 @@ C++ includes: ZLimits.h
";
// File: namespace_0d124.xml
// File: namespace_0d130.xml
// File: namespace_0d128.xml
// File: namespace_0d134.xml
// File: namespace_0d132.xml
// File: namespace_0d138.xml
// File: namespace_0d142.xml
// File: namespace_0d148.xml
// File: namespace_0d144.xml
// File: namespace_0d150.xml
// File: namespace_0d16.xml
// File: namespace_0d173.xml
// File: namespace_0d179.xml
// File: namespace_0d2.xml
// File: namespace_0d201.xml
// File: namespace_0d207.xml
// File: namespace_0d214.xml
// File: namespace_0d220.xml
// File: namespace_0d224.xml
// File: namespace_0d230.xml
// File: namespace_0d246.xml
// File: namespace_0d252.xml
// File: namespace_0d259.xml
// File: namespace_0d265.xml
// File: namespace_0d36.xml
......@@ -5470,6 +5618,15 @@ C++ includes: ZLimits.h
// File: namespace_0d44.xml
// File: namespace_0d46.xml
// File: namespace_0d47.xml
// File: namespace_0d50.xml
// File: namespacebake.xml
%feature("docstring") bake::CubicLattice "Lattice3D bake::CubicLattice(double a)
......@@ -5720,6 +5877,13 @@ Returns a body-centered cubic (cI) lattice with edge length a. TODO: Clarify mea
// File: namespaceff.xml
// File: namespaceff__aux.xml
%feature("docstring") ff_aux::generateReciprocalFactorialArray "constexpr std::array<double, N> ff_aux::generateReciprocalFactorialArray()
Returns a compile-time generated std::array of reciprocal factorials.
";
// File: namespaceMaterialUtils.xml
%feature("docstring") MaterialUtils::ScalarReducedPotential "complex_t MaterialUtils::ScalarReducedPotential(complex_t n, R3 k, double n_ref)
......@@ -5978,6 +6142,24 @@ Used by the hard sphere and by several soft sphere classes.
// File: IPeakShape_8h.xml
// File: Factorial_8h.xml
// File: PolyhedralComponents_8cpp.xml
// File: PolyhedralComponents_8h.xml
// File: PolyhedralTopology_8h.xml
// File: Polyhedron_8cpp.xml
// File: Polyhedron_8h.xml
// File: FormFactorAnisoPyramid_8cpp.xml
......@@ -6750,6 +6932,9 @@ Generate vertices of centered ellipse with given semi-axes at height z.
// File: dir_7b210e8d28f50f0c519681ee1b473363.xml
// File: dir_8dce49f7ddb29807dd12921987aafe35.xml
// File: dir_844f24c588eea1b259def164cc466f1a.xml
......
set(lib formfactor)
file(GLOB src_files *.cpp)
set(api_files Polyhedron.h PolyhedralTopology.h PolyhedralComponents.h)
add_library(${lib} ${src_files})
target_include_directories(${lib}
PUBLIC
$<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}>
$<INSTALL_INTERFACE:include>
)
target_include_directories(${lib} PRIVATE ${LibHeinz_INCLUDE_DIR})
set_target_properties(
${lib} PROPERTIES
OUTPUT_NAME ${lib}
VERSION ${formfactor_VERSION}
SOVERSION ${formfactor_VERSION_MAJOR})
install(
TARGETS ${lib}
EXPORT formfactorTargets
LIBRARY DESTINATION lib
RUNTIME DESTINATION lib
ARCHIVE DESTINATION lib
COMPONENT Libraries)
install(
FILES ${api_files}
DESTINATION include/ff
COMPONENT Headers)