Commit 0ddb59fc authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

Don't use the self-gravity time-step criterion yet as we don't have appropriate softening lenghts

parent 1aa5f450
......@@ -43,6 +43,7 @@
/* Local headers. */
#include "atomic.h"
#include "error.h"
#include "inline.h"
#include "lock.h"
/* Task type names. */
......@@ -59,8 +60,11 @@ const char *subtaskID_names[task_type_count] = {"none", "density", "force",
/**
* @brief Computes the overlap between the parts array of two given cells.
*/
size_t task_cell_overlap_part(const struct cell *ci, const struct cell *cj) {
__attribute__((always_inline)) INLINE static size_t task_cell_overlap_part(
const struct cell *ci, const struct cell *cj) {
if (ci == NULL || cj == NULL) return 0;
if (ci->parts <= cj->parts &&
ci->parts + ci->count >= cj->parts + cj->count) {
return cj->count;
......@@ -68,14 +72,18 @@ size_t task_cell_overlap_part(const struct cell *ci, const struct cell *cj) {
cj->parts + cj->count >= ci->parts + ci->count) {
return ci->count;
}
return 0;
}
/**
* @brief Computes the overlap between the gparts array of two given cells.
*/
size_t task_cell_overlap_gpart(const struct cell *ci, const struct cell *cj) {
__attribute__((always_inline)) INLINE static size_t task_cell_overlap_gpart(
const struct cell *ci, const struct cell *cj) {
if (ci == NULL || cj == NULL) return 0;
if (ci->gparts <= cj->gparts &&
ci->gparts + ci->gcount >= cj->gparts + cj->gcount) {
return cj->gcount;
......@@ -83,6 +91,7 @@ size_t task_cell_overlap_gpart(const struct cell *ci, const struct cell *cj) {
cj->gparts + cj->gcount >= ci->gparts + ci->gcount) {
return ci->gcount;
}
return 0;
}
......@@ -91,7 +100,8 @@ size_t task_cell_overlap_gpart(const struct cell *ci, const struct cell *cj) {
*
* @param t The #task.
*/
enum task_actions task_acts_on(const struct task *t) {
__attribute__((always_inline)) INLINE static enum task_actions task_acts_on(
const struct task *t) {
switch (t->type) {
......
......@@ -112,6 +112,5 @@ int task_lock(struct task *t);
void task_print_mask(unsigned int mask);
void task_print_submask(unsigned int submask);
void task_do_rewait(struct task *t);
enum task_actions task_acts_on(const struct task *t);
#endif /* SWIFT_TASK_H */
......@@ -106,8 +106,9 @@ __attribute__((always_inline)) INLINE static int get_part_timestep(
const float new_dt_external = gravity_compute_timestep_external(
e->external_potential, e->physical_constants, p->gpart);
const float new_dt_self =
gravity_compute_timestep_self(e->physical_constants, p->gpart);
/* const float new_dt_self = */
/* gravity_compute_timestep_self(e->physical_constants, p->gpart); */
const float new_dt_self = FLT_MAX; // MATTHIEU
new_dt_grav = fminf(new_dt_external, new_dt_self);
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment