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
87ee9756
Commit
87ee9756
authored
7 years ago
by
Van Herck, Walter
Browse files
Options
Downloads
Patches
Plain Diff
Replace old-style cast with static_cast
parent
5d8106e4
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Core/Lattice/Lattice.cpp
+9
-9
9 additions, 9 deletions
Core/Lattice/Lattice.cpp
with
9 additions
and
9 deletions
Core/Lattice/Lattice.cpp
+
9
−
9
View file @
87ee9756
...
@@ -89,9 +89,9 @@ ivector_t Lattice::getNearestLatticeVectorCoordinates(const kvector_t vector_in)
...
@@ -89,9 +89,9 @@ ivector_t Lattice::getNearestLatticeVectorCoordinates(const kvector_t vector_in)
double
a1_coord
=
vector_in
.
dot
(
m_ra
)
/
M_TWOPI
;
double
a1_coord
=
vector_in
.
dot
(
m_ra
)
/
M_TWOPI
;
double
a2_coord
=
vector_in
.
dot
(
m_rb
)
/
M_TWOPI
;
double
a2_coord
=
vector_in
.
dot
(
m_rb
)
/
M_TWOPI
;
double
a3_coord
=
vector_in
.
dot
(
m_rc
)
/
M_TWOPI
;
double
a3_coord
=
vector_in
.
dot
(
m_rc
)
/
M_TWOPI
;
int
c1
=
(
int
)
std
::
floor
(
a1_coord
+
0.5
);
int
c1
=
static_cast
<
int
>
(
std
::
floor
(
a1_coord
+
0.5
)
)
;
int
c2
=
(
int
)
std
::
floor
(
a2_coord
+
0.5
);
int
c2
=
static_cast
<
int
>
(
std
::
floor
(
a2_coord
+
0.5
)
)
;
int
c3
=
(
int
)
std
::
floor
(
a3_coord
+
0.5
);
int
c3
=
static_cast
<
int
>
(
std
::
floor
(
a3_coord
+
0.5
)
)
;
return
ivector_t
(
c1
,
c2
,
c3
);
return
ivector_t
(
c1
,
c2
,
c3
);
}
}
...
@@ -100,9 +100,9 @@ ivector_t Lattice::getNearestReciprocalLatticeVectorCoordinates(const kvector_t
...
@@ -100,9 +100,9 @@ ivector_t Lattice::getNearestReciprocalLatticeVectorCoordinates(const kvector_t
double
b1_coord
=
vector_in
.
dot
(
m_a
)
/
M_TWOPI
;
double
b1_coord
=
vector_in
.
dot
(
m_a
)
/
M_TWOPI
;
double
b2_coord
=
vector_in
.
dot
(
m_b
)
/
M_TWOPI
;
double
b2_coord
=
vector_in
.
dot
(
m_b
)
/
M_TWOPI
;
double
b3_coord
=
vector_in
.
dot
(
m_c
)
/
M_TWOPI
;
double
b3_coord
=
vector_in
.
dot
(
m_c
)
/
M_TWOPI
;
int
c1
=
(
int
)
std
::
floor
(
b1_coord
+
0.5
);
int
c1
=
static_cast
<
int
>
(
std
::
floor
(
b1_coord
+
0.5
)
)
;
int
c2
=
(
int
)
std
::
floor
(
b2_coord
+
0.5
);
int
c2
=
static_cast
<
int
>
(
std
::
floor
(
b2_coord
+
0.5
)
)
;
int
c3
=
(
int
)
std
::
floor
(
b3_coord
+
0.5
);
int
c3
=
static_cast
<
int
>
(
std
::
floor
(
b3_coord
+
0.5
)
)
;
return
ivector_t
(
c1
,
c2
,
c3
);
return
ivector_t
(
c1
,
c2
,
c3
);
}
}
...
@@ -162,9 +162,9 @@ std::vector<kvector_t> Lattice::vectorsWithinRadius(
...
@@ -162,9 +162,9 @@ std::vector<kvector_t> Lattice::vectorsWithinRadius(
const
kvector_t
v1
,
const
kvector_t
v2
,
const
kvector_t
v3
,
const
kvector_t
v1
,
const
kvector_t
v2
,
const
kvector_t
v3
,
const
kvector_t
rec1
,
const
kvector_t
rec2
,
const
kvector_t
rec3
)
const
const
kvector_t
rec1
,
const
kvector_t
rec2
,
const
kvector_t
rec3
)
const
{
{
int
max_X
=
(
int
)
std
::
floor
(
rec1
.
mag
()
*
radius
/
M_TWOPI
);
int
max_X
=
static_cast
<
int
>
(
std
::
floor
(
rec1
.
mag
()
*
radius
/
M_TWOPI
)
);
int
max_Y
=
(
int
)
std
::
floor
(
rec2
.
mag
()
*
radius
/
M_TWOPI
);
int
max_Y
=
static_cast
<
int
>
(
std
::
floor
(
rec2
.
mag
()
*
radius
/
M_TWOPI
)
);
int
max_Z
=
(
int
)
std
::
floor
(
rec3
.
mag
()
*
radius
/
M_TWOPI
);
int
max_Z
=
static_cast
<
int
>
(
std
::
floor
(
rec3
.
mag
()
*
radius
/
M_TWOPI
)
);
std
::
vector
<
kvector_t
>
ret
;
std
::
vector
<
kvector_t
>
ret
;
for
(
int
index_X
=
-
max_X
;
index_X
<=
max_X
;
++
index_X
)
{
for
(
int
index_X
=
-
max_X
;
index_X
<=
max_X
;
++
index_X
)
{
...
...
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