If you are using GitLab outside of the ILL, then you will need to use HTTPS and not SSH for clone/push/pull operations. SSH will work normally if you are using the VPN.

Commit 3bb12f12 authored by Tobias WEBER's avatar Tobias WEBER

convex hull calculation

parent 9fe71ee3
......@@ -169,6 +169,7 @@ message("Qt moc: ${QT_MOC_EXECUTABLE}\nQt uic: ${QT_UIC_EXECUTABLE}")
add_definitions(-DUSE_NET -DUSE_CIF)
add_definitions(-DNO_LAPACK)
add_definitions(-DNO_QHULL)
add_definitions(-DNO_JPEG -DNO_TIFF)
add_definitions(-DINSTALL_PREFIX="${CMAKE_INSTALL_PREFIX}")
#add_definitions(${Boost_CXX_FLAGS} -DBOOST_FILESYSTEM_NO_DEPRECATED -DBOOST_ERROR_CODE_HEADER_ONLY)
......
......@@ -183,11 +183,24 @@ License: GNU LGPL version 2.1 (see below)
--------------------------------------------------------------------------------
Qhull
URL: http://www.qhull.org/
URL: https://github.com/qhull/qhull
Copyright (c) 1993-2019 by C.B. Barber
License URL: https://github.com/qhull/qhull/blob/master/COPYING.txt
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
NICOS
URL: https://forge.frm2.tum.de/cgit/cgit.cgi/frm2/nicos/nicos.git/
URL: http://forge.frm2.tum.de/cgit/cgit.cgi/frm2/nicos/nicos-core.git/
Copyright (c) 2009-2015 by the NICOS contributors
Copyright (c) 2009-2020 by the NICOS contributors
License: GNU GPL version 2 (see below)
--------------------------------------------------------------------------------
......
......@@ -20,6 +20,9 @@
#include "libs/version.h"
#include <sstream>
#ifndef NO_QHULL
#include <Qhull.h>
#endif
//#define PRIVATE_SRC_VERSION
......@@ -117,7 +120,7 @@ AboutDlg::AboutDlg(QWidget* pParent, QSettings *pSett)
ostrLibs << "<dd><a href=\"http://www.netlib.org/lapack\">http://www.netlib.org/lapack</a><br></dd>";
#endif
#ifndef DNO_FIT
#ifndef NO_FIT
ostrLibs << "<dt>Uses Minuit version 2.</dt>";
ostrLibs << "<dd><a href=\"https://root.cern.ch\">https://root.cern.ch</a><br></dd>";
#endif
......@@ -130,6 +133,11 @@ AboutDlg::AboutDlg(QWidget* pParent, QSettings *pSett)
ostrLibs << "<dd><a href=\"http://ab-initio.mit.edu/wiki/index.php/Faddeeva_Package\">http://ab-initio.mit.edu/wiki/index.php/Faddeeva_Package</a><br></dd>";
#endif
#ifndef NO_QHULL
ostrLibs << "<dt>Uses QHull version " << qh_version << ". " << "</dt>";
ostrLibs << "<dd><a href=\"http://www.qhull.org\">http://www.qhull.org</a><br></dd>";
#endif
ostrLibs << "<dt>Uses resolution algorithms ported from Rescal version 5.</dt>";
ostrLibs << "<dd><a href=\"http://www.ill.eu/en/html/instruments-support/computing-for-science/cs-software/all-software/matlab-ill/rescal-for-matlab\">http://www.ill.eu/en/html/instruments-support/computing-for-science/cs-software/all-software/matlab-ill/rescal-for-matlab</a><br></dd>";
......
......@@ -9,7 +9,7 @@
#define __LATTICE_HELPER_H__
#include "tlibs/math/linalg.h"
#include "tlibs/math/geo.h"
#include "tlibs/math/geo2.h"
#include "tlibs/phys/lattice.h"
#include "spacegroup.h"
......@@ -193,16 +193,7 @@ struct LatticeCommon
// calculate coordination polyhedron if enough next neighbours are in list
if(vecNN.size() >= 4)
{
atomaux.vecPolys =
tl::verts_to_polyhedron<t_vec, std::vector, t_real>(vecNN, g_dEps);
/*static int iNum = 0;
std::ofstream ofstr("/home/tw/tmp/verts_" + tl::var_to_str<int>(iNum++) + ".dat");
for(const auto& vert : vecNN)
ofstr << vert << "\n";
ofstr << "# " << atomaux.vecPolys.size() << " polys\n";*/
}
atomaux.vecPolys = tl::get_convexhull<t_vec, std::vector, t_real>(vecNN, g_dEps);
}
return atomaux;
......
......@@ -53,6 +53,9 @@ USE_PLUGINS = 1
# compile the faddeeva functions?
USE_FADDEEVA = 1
# use the qhull library?
USE_QHULL = 1
# which ABI to use: C++98 or C++11?
USE_CPP11_ABI = 1
......@@ -330,6 +333,14 @@ else
FAD_LIBS =
endif
ifeq (${USE_QHULL}, 1)
DEFINES += -DUSE_QHULL -I/usr/local/include/libqhullcpp -I/usr/include/libqhullcpp
QH_LIBS += -lqhull_r -lqhullcpp
else
DEFINES += -DNO_QHULL
QH_LIBS =
endif
ifeq ($(USE_PLUGINS), 1)
DL_LIBS = -ldl
else
......@@ -487,7 +498,7 @@ all: ${ALL_PROGS}
takin: ${OBJ_COMMON} ${OBJ_TAZ}
${CC} ${FLAGS} ${FAD_DEFS} ${LIB_DIRS} -o bin/takin $+ ${LIB_MIN} ${LIBS_TAZ} -lboost_program_options
${CC} ${FLAGS} ${FAD_DEFS} ${LIB_DIRS} -o bin/takin $+ ${LIB_MIN} ${LIBS_TAZ} ${QH_LIBS} -lboost_program_options
${STRIP} bin/takin
montereso: ${OBJ_COMMON} ${OBJ_MONTERESO}
......
......@@ -25,7 +25,7 @@ std::string export_scan_to_gnuplot(
const std::string& strFile = "")
{
using t_real = typename t_vec::value_type;
std::string strSrc =
R"RAWSTR(#!gnuplot --persist
......@@ -384,7 +384,7 @@ std::string export_scan_to_hermelin(
const std::string& strFile = "")
{
using t_real = typename t_vec::value_type;
std::string strStoatSrc =
R"RAWSTR(#!./hermelin -t
......
......@@ -1021,7 +1021,7 @@ void ScanViewerDlg::GenerateExternal(int iLang)
textRoot->clear();
if(!m_vecX.size() || !m_vecY.size())
return;
std::string strSrc;
if(iLang == 0) // gnuplot
......@@ -1036,7 +1036,7 @@ void ScanViewerDlg::GenerateExternal(int iLang)
strSrc = export_scan_to_hermelin<decltype(m_vecX)>(m_vecX, m_vecY, m_vecYErr, m_strX, m_strY, m_strCmd, m_strCurDir + m_strCurFile);
else
tl::log_err("Unknown external language.");
textRoot->setText(strSrc.c_str());
}
......
......@@ -257,8 +257,12 @@ int main(int argc, char** argv)
tl::log_debug("Logging to file \"", strLog, "\".");
tl::log_info("--------------------------------------------------------------------------------");
tl::log_info("This is Takin version " TAKIN_VER ".");
tl::log_info("Written by Tobias Weber <tweber@ill.fr>, 2014 - 2020.");
tl::log_info("Authored by Tobias Weber <tweber@ill.fr>, 2014 - 2020.");
tl::log_info("Licensed under GPLv2, see the about dialog.");
tl::log_info("--------------------------------------------------------------------------------");
tl::log_debug("Using ", sizeof(t_real_glob)*8, " bit ", tl::get_typename<t_real_glob>(), "s as internal data type.");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment