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
b80fb3c3
Commit
b80fb3c3
authored
8 years ago
by
Matthieu Schaller
Browse files
Options
Downloads
Patches
Plain Diff
Fixed a mangled merge in the Minimal-SPH hydro scheme.
parent
c7307172
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/hydro/Minimal/hydro.h
+0
-21
0 additions, 21 deletions
src/hydro/Minimal/hydro.h
tests/benchmarkInteractions.c
+1
-1
1 addition, 1 deletion
tests/benchmarkInteractions.c
with
1 addition
and
22 deletions
src/hydro/Minimal/hydro.h
+
0
−
21
View file @
b80fb3c3
...
...
@@ -249,27 +249,6 @@ __attribute__((always_inline)) INLINE static void hydro_part_has_no_neighbours(
p
->
density
.
wcount_dh
=
0
.
f
;
}
/**
* @brief Sets all particle fields to sensible values when the #part has 0 ngbs.
*
* @param p The particle to act upon
* @param xp The extended particle data to act upon
*/
__attribute__
((
always_inline
))
INLINE
static
void
hydro_part_has_no_neighbours
(
struct
part
*
restrict
p
,
struct
xpart
*
restrict
xp
)
{
/* Some smoothing length multiples. */
const
float
h
=
p
->
h
;
const
float
h_inv
=
1
.
0
f
/
h
;
/* 1/h */
const
float
h_inv_dim
=
pow_dimension
(
h_inv
);
/* 1/h^d */
/* Re-set problematic values */
p
->
rho
=
p
->
mass
*
kernel_root
*
h_inv_dim
;
p
->
density
.
wcount
=
kernel_root
*
kernel_norm
*
h_inv_dim
;
p
->
density
.
rho_dh
=
0
.
f
;
p
->
density
.
wcount_dh
=
0
.
f
;
}
/**
* @brief Prepare a particle for the force calculation.
*
...
...
This diff is collapsed.
Click to expand it.
tests/benchmarkInteractions.c
+
1
−
1
View file @
b80fb3c3
...
...
@@ -125,7 +125,7 @@ struct part *make_particles(size_t count, double *offset, double spacing,
*/
void
prepare_force
(
struct
part
*
parts
,
size_t
count
)
{
#if !defined(GIZMO_SPH) && !defined(SHADOWFAX_SPH)
#if !defined(GIZMO_SPH) && !defined(SHADOWFAX_SPH)
&& !defined(MINIMAL_SPH)
struct
part
*
p
;
for
(
size_t
i
=
0
;
i
<
count
;
++
i
)
{
p
=
&
parts
[
i
];
...
...
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