Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
SWIFTsim
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SWIFT
SWIFTsim
Commits
2be403ee
Commit
2be403ee
authored
7 years ago
by
Matthieu Schaller
Committed by
Matthieu Schaller
7 years ago
Browse files
Options
Downloads
Patches
Plain Diff
The gravity_M2P function does not exist anymore.
parent
495579d0
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!512
Gravitational potential
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/multipole.h
+0
-45
0 additions, 45 deletions
src/multipole.h
with
0 additions
and
45 deletions
src/multipole.h
+
0
−
45
View file @
2be403ee
...
@@ -2352,51 +2352,6 @@ INLINE static void gravity_L2P(const struct grav_tensor *lb,
...
@@ -2352,51 +2352,6 @@ INLINE static void gravity_L2P(const struct grav_tensor *lb,
gp
->
a_grav
[
1
]
+=
a_grav
[
1
];
gp
->
a_grav
[
1
]
+=
a_grav
[
1
];
gp
->
a_grav
[
2
]
+=
a_grav
[
2
];
gp
->
a_grav
[
2
]
+=
a_grav
[
2
];
}
}
INLINE
static
void
gravity_M2P
(
const
struct
multipole
*
ma
,
const
struct
gravity_props
*
props
,
const
double
loc
[
3
],
struct
gpart
*
gp
)
{
#if SELF_GRAVITY_MULTIPOLE_ORDER > 0
const
float
eps2
=
props
->
epsilon2
;
const
float
eps_inv
=
props
->
epsilon_inv
;
const
float
eps_inv3
=
props
->
epsilon_inv3
;
/* Distance to the multipole */
const
float
dx
=
gp
->
x
[
0
]
-
loc
[
0
];
const
float
dy
=
gp
->
x
[
1
]
-
loc
[
1
];
const
float
dz
=
gp
->
x
[
2
]
-
loc
[
2
];
const
float
r2
=
dx
*
dx
+
dy
*
dy
+
dz
*
dz
;
/* Get the inverse distance */
const
float
r_inv
=
1
.
f
/
sqrtf
(
r2
);
float
f
,
W
;
if
(
r2
>=
eps2
)
{
/* Get Newtonian gravity */
f
=
ma
->
M_000
*
r_inv
*
r_inv
*
r_inv
;
}
else
{
const
float
r
=
r2
*
r_inv
;
const
float
u
=
r
*
eps_inv
;
kernel_grav_force_eval
(
u
,
&
W
);
/* Get softened gravity */
f
=
ma
->
M_000
*
eps_inv3
*
W
;
}
gp
->
a_grav
[
0
]
-=
f
*
dx
;
gp
->
a_grav
[
1
]
-=
f
*
dy
;
gp
->
a_grav
[
2
]
-=
f
*
dz
;
#endif
}
/**
/**
* @brief Checks whether a cell-cell interaction can be appromixated by a M-M
* @brief Checks whether a cell-cell interaction can be appromixated by a M-M
* interaction using the distance and cell radius.
* interaction using the distance and cell radius.
...
...
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