Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
md_uebung
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
Torda, Prof. Dr. Andrew Ernest
md_uebung
Commits
2c96a7d7
Commit
2c96a7d7
authored
11 months ago
by
Andrew E. Torda
Browse files
Options
Downloads
Patches
Plain Diff
rvec_dot() and rvec_sub_pbc() were declared static and not listed in
rvec.h. This was confusing.
parent
d1833e2c
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
rvec.c
+3
-3
3 additions, 3 deletions
rvec.c
rvec.h
+2
-0
2 additions, 0 deletions
rvec.h
with
5 additions
and
3 deletions
rvec.c
+
3
−
3
View file @
2c96a7d7
...
...
@@ -20,7 +20,7 @@ void rvec_rand(rvec *u) {
}
/* dot product of u and v */
static
real
rvec_dot
(
rvec
u
,
rvec
v
)
{
real
rvec_dot
(
rvec
u
,
rvec
v
)
{
real
r
=
0
;
for
(
uint
i
=
0
;
i
<
NDIM
;
i
++
)
r
+=
u
[
i
]
*
v
[
i
];
...
...
@@ -39,7 +39,7 @@ void rvec_add(rvec *u, rvec v, rvec w) {
}
/* u = v - w */
static
void
rvec_sub
(
rvec
*
u
,
rvec
v
,
rvec
w
)
{
void
rvec_sub
(
rvec
*
u
,
rvec
v
,
rvec
w
)
{
for
(
uint
i
=
0
;
i
<
NDIM
;
i
++
)
(
*
u
)[
i
]
=
v
[
i
]
-
w
[
i
];
}
...
...
@@ -58,7 +58,7 @@ void rvec_muladd(rvec *u, rvec v, real r, rvec w) {
/* calculate v - w, taking periodic boundary conditions into
account */
static
void
rvec_sub_pbc
(
rvec
*
u
,
rvec
box
,
rvec
v
,
rvec
w
)
{
void
rvec_sub_pbc
(
rvec
*
u
,
rvec
box
,
rvec
v
,
rvec
w
)
{
for
(
uint
i
=
0
;
i
<
NDIM
;
i
++
)
{
(
*
u
)[
i
]
=
v
[
i
]
-
w
[
i
];
while
((
*
u
)[
i
]
<
-
box
[
i
]
/
2
)
...
...
This diff is collapsed.
Click to expand it.
rvec.h
+
2
−
0
View file @
2c96a7d7
...
...
@@ -17,5 +17,7 @@ void rvecary_muladd(uint n, rvec *a, rvec *b, real r, rvec *c);
void
rvec_muladd
(
rvec
*
u
,
rvec
v
,
real
r
,
rvec
w
);
real
rvec_len
(
rvec
u
);
void
rvec_rand
(
rvec
*
u
);
void
rvec_sub_pbc
(
rvec
*
u
,
rvec
box
,
rvec
v
,
rvec
w
);
real
rvec_dot
(
rvec
u
,
rvec
v
);
#endif
/* RVEC_H */
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