Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
SWIFT
SWIFTsim
Commits
5785631a
Commit
5785631a
authored
Nov 21, 2018
by
Loic Hausammann
Browse files
Implement feedback neighboor search
parent
aa9e87fd
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
src/runner.c
View file @
5785631a
...
...
@@ -97,8 +97,16 @@
/* Import the gravity loop functions. */
#include
"runner_doiact_grav.h"
/* Import the stars loop functions. */
/* Import the stars density loop functions. */
#define FUNCTION density
#include
"runner_doiact_stars.h"
#undef FUNCTION
/* Import the stars feedback loop functions. */
#define FUNCTION feedback
#include
"runner_doiact_stars.h"
#undef FUNCTION
/**
* @brief Perform source terms
...
...
src/runner_doiact.h
View file @
5785631a
...
...
@@ -20,9 +20,8 @@
/* Before including this file, define FUNCTION, which is the
name of the interaction function. This creates the interaction functions
runner_dopair_FUNCTION, runner_dopair_FUNCTION_naive, runner_doself_FUNCTION,
and runner_dosub_FUNCTION calling the pairwise interaction function
runner_iact_FUNCTION. */
runner_dopair_FUNCTION and runner_doself_FUNCTION calling the pairwise
interaction function runner_iact_FUNCTION. */
#define PASTE(x, y) x##_##y
...
...
src/runner_doiact_stars.h
View file @
5785631a
This diff is collapsed.
Click to expand it.
src/stars/Default/stars_iact.h
View file @
5785631a
...
...
@@ -38,3 +38,21 @@ runner_iact_nonsym_stars_density(float r2, const float *dx, float hi, float hj,
++
si
->
num_ngb_density
;
#endif
}
/**
* @brief Feedback interaction between two particles (non-symmetric).
*
* @param r2 Comoving square distance between the two particles.
* @param dx Comoving vector separating both particles (pi - pj).
* @param hi Comoving smoothing-length of particle i.
* @param hj Comoving smoothing-length of particle j.
* @param si First sparticle.
* @param pj Second particle (not updated).
* @param a Current scale factor.
* @param H Current Hubble parameter.
*/
__attribute__
((
always_inline
))
INLINE
static
void
runner_iact_nonsym_stars_feedback
(
float
r2
,
const
float
*
dx
,
float
hi
,
float
hj
,
struct
spart
*
restrict
si
,
const
struct
part
*
restrict
pj
,
float
a
,
float
H
)
{}
src/timers.c
View file @
5785631a
...
...
@@ -87,13 +87,7 @@ const char* timers_names[timer_count] = {
"locktree"
,
"runners"
,
"step"
,
"doself_stars_density"
,
"dopair_stars_density"
,
"do_stars_ghost"
,
"doself_subset_stars_density"
,
"dopair_subset_stars_density"
,
"dosubpair_stars_density"
,
"dosub_self_stars_density"
,
"logger"
,
"do_stars_sort"
,
};
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment