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
8ceae5e7
Commit
8ceae5e7
authored
4 years ago
by
Wuttke, Joachim
Browse files
Options
Downloads
Patches
Plain Diff
rm unused Lattice::computeInverseVectors
can never have worked, as output arguments are not passed by reference
parent
3c083a2e
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Sample/Lattice/Lattice.cpp
+0
-40
0 additions, 40 deletions
Sample/Lattice/Lattice.cpp
Sample/Lattice/Lattice.h
+1
-2
1 addition, 2 deletions
Sample/Lattice/Lattice.h
with
1 addition
and
42 deletions
Sample/Lattice/Lattice.cpp
+
0
−
40
View file @
8ceae5e7
...
...
@@ -192,46 +192,6 @@ std::vector<kvector_t> Lattice::vectorsWithinRadius(const kvector_t input_vector
return
ret
;
}
void
Lattice
::
computeInverseVectors
(
const
kvector_t
v1
,
const
kvector_t
v2
,
const
kvector_t
v3
,
kvector_t
o1
,
kvector_t
o2
,
kvector_t
o3
)
{
gsl_matrix
*
p_basisMatrix
=
gsl_matrix_alloc
(
3
,
3
);
gsl_matrix
*
p_inverseMatrix
=
gsl_matrix_alloc
(
3
,
3
);
gsl_permutation
*
p_perm
=
gsl_permutation_alloc
(
3
);
int
s
;
gsl_matrix_set
(
p_basisMatrix
,
0
,
0
,
v1
.
x
());
gsl_matrix_set
(
p_basisMatrix
,
0
,
1
,
v2
.
x
());
gsl_matrix_set
(
p_basisMatrix
,
0
,
2
,
v3
.
x
());
gsl_matrix_set
(
p_basisMatrix
,
1
,
0
,
v1
.
y
());
gsl_matrix_set
(
p_basisMatrix
,
1
,
1
,
v2
.
y
());
gsl_matrix_set
(
p_basisMatrix
,
1
,
2
,
v3
.
y
());
gsl_matrix_set
(
p_basisMatrix
,
2
,
0
,
v1
.
z
());
gsl_matrix_set
(
p_basisMatrix
,
2
,
1
,
v2
.
z
());
gsl_matrix_set
(
p_basisMatrix
,
2
,
2
,
v3
.
z
());
gsl_linalg_LU_decomp
(
p_basisMatrix
,
p_perm
,
&
s
);
gsl_linalg_LU_invert
(
p_basisMatrix
,
p_perm
,
p_inverseMatrix
);
o1
.
setX
(
gsl_matrix_get
(
p_inverseMatrix
,
0
,
0
));
o1
.
setY
(
gsl_matrix_get
(
p_inverseMatrix
,
1
,
0
));
o1
.
setZ
(
gsl_matrix_get
(
p_inverseMatrix
,
2
,
0
));
o2
.
setX
(
gsl_matrix_get
(
p_inverseMatrix
,
0
,
1
));
o2
.
setY
(
gsl_matrix_get
(
p_inverseMatrix
,
1
,
1
));
o2
.
setZ
(
gsl_matrix_get
(
p_inverseMatrix
,
2
,
1
));
o3
.
setX
(
gsl_matrix_get
(
p_inverseMatrix
,
0
,
2
));
o3
.
setY
(
gsl_matrix_get
(
p_inverseMatrix
,
1
,
2
));
o3
.
setZ
(
gsl_matrix_get
(
p_inverseMatrix
,
2
,
2
));
gsl_permutation_free
(
p_perm
);
gsl_matrix_free
(
p_basisMatrix
);
gsl_matrix_free
(
p_inverseMatrix
);
}
void
Lattice
::
setSelectionRule
(
const
ISelectionRule
&
p_selection_rule
)
{
delete
m_selection_rule
;
...
...
This diff is collapsed.
Click to expand it.
Sample/Lattice/Lattice.h
+
1
−
2
View file @
8ceae5e7
...
...
@@ -88,8 +88,7 @@ private:
const
kvector_t
rec2
,
const
kvector_t
rec3
)
const
;
void
computeReciprocalVectors
()
const
;
static
void
computeInverseVectors
(
const
kvector_t
v1
,
const
kvector_t
v2
,
const
kvector_t
v3
,
kvector_t
o1
,
kvector_t
o2
,
kvector_t
o3
);
ISelectionRule
*
m_selection_rule
;
kvector_t
m_a
,
m_b
,
m_c
;
//!< Basis vectors in real space
mutable
kvector_t
m_ra
,
m_rb
,
m_rc
;
//!< Cache of basis vectors in reciprocal space
...
...
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