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
tlibs
Commits
c2f0a124
Commit
c2f0a124
authored
Apr 06, 2020
by
Tobias WEBER
Browse files
cleanups
parent
ec07f2fd
Changes
3
Hide whitespace changes
Inline
Side-by-side
file/file.h
View file @
c2f0a124
...
...
@@ -79,7 +79,7 @@ std::pair<bool, std::shared_ptr<T[]>> get_file_mem(std::basic_istream<t_char>& i
istr
.
seekg
(
offs
,
std
::
ios_base
::
beg
);
istr
.
read
((
char
*
)
ptr
.
get
(),
len
*
sizeof
(
T
));
if
(
istr
.
gcount
()
!=
len
*
sizeof
(
T
))
if
(
istr
.
gcount
()
!=
std
::
streamsize
(
len
*
sizeof
(
T
))
)
ok
=
false
;
// move back to original position
...
...
phys/lattice.h
View file @
c2f0a124
...
...
@@ -48,6 +48,8 @@ class Lattice
Lattice
(
T
a
,
T
b
,
T
c
,
T
alpha
,
T
beta
,
T
gamma
);
Lattice
(
const
t_vec
&
vec0
,
const
t_vec
&
vec1
,
const
t_vec
&
vec2
);
Lattice
(
const
Lattice
<
T
>&
lattice
);
const
Lattice
<
T
>&
operator
=
(
const
Lattice
<
T
>&
lattice
);
Lattice
()
=
default
;
~
Lattice
()
=
default
;
...
...
@@ -121,10 +123,18 @@ Lattice<T>::Lattice(const t_vec& vec0, const t_vec& vec1, const t_vec& vec2)
template
<
typename
T
>
Lattice
<
T
>::
Lattice
(
const
Lattice
<
T
>&
lattice
)
{
this
->
operator
=
(
lattice
);
}
template
<
typename
T
>
const
Lattice
<
T
>&
Lattice
<
T
>::
operator
=
(
const
Lattice
<
T
>&
lattice
)
{
this
->
m_vecs
[
0
]
=
lattice
.
m_vecs
[
0
];
this
->
m_vecs
[
1
]
=
lattice
.
m_vecs
[
1
];
this
->
m_vecs
[
2
]
=
lattice
.
m_vecs
[
2
];
return
*
this
;
}
...
...
phys/mag.h
View file @
c2f0a124
...
...
@@ -281,7 +281,7 @@ void metrop(
// calculate energy
auto
calcE
=
[
dJ
](
const
t_arr
&
arr
,
const
t_dim
&
idxSpin
,
const
std
::
vector
<
t_dim
>&
vecNN
,
bool
bFlip
=
0
)
->
t_real
bool
bFlip
)
->
t_real
{
t_real
dE
=
t_real
(
0
);
bool
bSpin
=
arr
(
idxSpin
);
...
...
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