Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Scientific Software
Takin
mag-core
Commits
fdd463c5
Verified
Commit
fdd463c5
authored
Jul 28, 2020
by
Tobias WEBER
Browse files
got everything to compile again
parent
12ddf4d1
Changes
3
Hide whitespace changes
Inline
Side-by-side
CMakeLists.txt
View file @
fdd463c5
...
...
@@ -9,7 +9,7 @@ cmake_minimum_required(VERSION 3.0)
# setup tools
#
add_subdirectory(tools/setup)
add_subdirectory
(
tools/setup
)
# magnetic and nuclear structure tools
...
...
tools/setup/CMakeLists.txt
View file @
fdd463c5
...
...
@@ -7,8 +7,8 @@
project
(
setup
)
cmake_minimum_required
(
VERSION 3.0
)
set
(
CMAKE_CXX_STANDARD
17
)
add_definitions
(
-std=c++
17 -fconcepts
)
set
(
CMAKE_CXX_STANDARD
20
)
add_definitions
(
-std=c++
20
)
include_directories
(
"
${
PROJECT_SOURCE_DIR
}
"
"../.."
)
...
...
tools/setup/convmag.cpp
View file @
fdd463c5
...
...
@@ -11,10 +11,11 @@
#include <iostream>
#include <fstream>
#include <tuple>
#include <vector>
#include <boost/numeric/ublas/matrix.hpp>
#include <boost/numeric/ublas/vector.hpp>
namespace
ublas
=
boost
::
numeric
::
ublas
;
//
#include <boost/numeric/ublas/matrix.hpp>
//
#include <boost/numeric/ublas/vector.hpp>
//
namespace ublas = boost::numeric::ublas;
#include <boost/property_tree/ptree.hpp>
//#include <boost/property_tree/xml_parser.hpp>
...
...
@@ -28,8 +29,10 @@ namespace algo = boost::algorithm;
using
t_real
=
double
;
using
t_mat
=
ublas
::
matrix
<
t_real
>
;
using
t_vec
=
ublas
::
vector
<
t_real
>
;
//using t_mat = ublas::matrix<t_real>;
//using t_vec = ublas::vector<t_real>;
using
t_mat
=
tl2
::
mat
<
t_real
,
std
::
vector
>
;
using
t_vec
=
tl2
::
vec
<
t_real
,
std
::
vector
>
;
bool
bSaveOG
=
false
;
...
...
@@ -40,9 +43,9 @@ std::string to_str(const t_mat& mat)
static
const
auto
zero
=
tl2
::
zero
<
t_mat
>
(
mat
.
size1
(),
mat
.
size2
());
static
const
auto
unit
=
tl2
::
unit
<
t_mat
>
(
mat
.
size1
(),
mat
.
size2
());
if
(
tl2
::
equals
<
t_mat
>
(
mat
,
zero
))
if
(
tl2
::
equals
<
t_mat
,
t_real
>
(
mat
,
zero
))
return
"0"
;
else
if
(
tl2
::
equals
<
t_mat
>
(
mat
,
unit
))
else
if
(
tl2
::
equals
<
t_mat
,
t_real
>
(
mat
,
unit
))
return
"1"
;
// general case
...
...
@@ -64,6 +67,7 @@ std::string to_str(const t_mat& mat)
return
ostr
.
str
();
}
std
::
string
to_str
(
const
t_vec
&
vec
)
{
// spacial cases
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment