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
89eccb07
Commit
89eccb07
authored
Jun 22, 2018
by
Matthieu Schaller
Browse files
Removed the now-unused runner_doiact_fft.c file.
parent
69deec12
Changes
10
Expand all
Hide whitespace changes
Inline
Side-by-side
examples/EAGLE_12/eagle_12.yml
View file @
89eccb07
...
...
@@ -24,7 +24,7 @@ TimeIntegration:
Scheduler
:
max_top_level_cells
:
8
cell_split_size
:
64
cell_split_size
:
50
# Parameters governing the snapshots
Snapshots
:
...
...
@@ -56,5 +56,5 @@ SPH:
# Parameters related to the initial conditions
InitialConditions
:
file_name
:
./EAGLE_ICs_12.hdf5
# The file to read
file_name
:
./EAGLE_ICs_12.hdf5
# The file to read
cleanup_h_factors
:
1
# Remove the h-factors inherited from Gadget
src/Makefile.am
View file @
89eccb07
...
...
@@ -56,7 +56,7 @@ AM_SOURCES = space.c runner.c queue.c task.c cell.c engine.c \
units.c common_io.c single_io.c multipole.c version.c map.c
\
kernel_hydro.c tools.c part.c partition.c clocks.c parser.c
\
physical_constants.c potential.c hydro_properties.c
\
runner_doiact_fft.c
threadpool.c cooling.c sourceterms.c
\
threadpool.c cooling.c sourceterms.c
\
statistics.c runner_doiact_vec.c profiler.c dump.c logger.c
\
part_type.c xmf.c gravity_properties.c gravity.c
\
collectgroup.c hydro_space.c equation_of_state.c
\
...
...
@@ -64,7 +64,7 @@ AM_SOURCES = space.c runner.c queue.c task.c cell.c engine.c \
# Include files for distribution, not installation.
nobase_noinst_HEADERS
=
align.h approx_math.h atomic.h barrier.h cycle.h error.h inline.h kernel_hydro.h kernel_gravity.h
\
kernel_long_gravity.h vector.h cache.h runner_doiact.h runner_doiact_vec.h runner_doiact_grav.h
runner_doiact_fft.h
\
kernel_long_gravity.h vector.h cache.h runner_doiact.h runner_doiact_vec.h runner_doiact_grav.h
\
runner_doiact_nosort.h units.h intrinsics.h minmax.h kick.h timestep.h drift.h adiabatic_index.h io_properties.h
\
dimension.h part_type.h periodic.h memswap.h dump.h logger.h sign.h
\
gravity.h gravity_io.h gravity_cache.h
\
...
...
src/engine.c
View file @
89eccb07
...
...
@@ -339,9 +339,6 @@ void engine_make_hierarchical_tasks_gravity(struct engine *e, struct cell *c) {
c
->
grav_mesh
=
scheduler_addtask
(
s
,
task_type_grav_mesh
,
task_subtype_none
,
0
,
0
,
c
,
NULL
);
// if (periodic) scheduler_addunlock(s, c->init_grav, c->grav_ghost_in);
// if (periodic) scheduler_addunlock(s, c->grav_ghost_out,
// c->grav_down);
if
(
periodic
)
scheduler_addunlock
(
s
,
c
->
drift_gpart
,
c
->
grav_mesh
);
if
(
periodic
)
scheduler_addunlock
(
s
,
c
->
grav_mesh
,
c
->
super
->
end_force
);
scheduler_addunlock
(
s
,
c
->
init_grav
,
c
->
grav_long_range
);
...
...
@@ -3556,13 +3553,6 @@ void engine_marktasks_mapper(void *map_data, int num_elements,
if
(
cell_is_active_gravity
(
t
->
ci
,
e
))
scheduler_activate
(
s
,
t
);
}
/* Periodic gravity stuff (Note this is not linked to a cell) ? */
else
if
(
t
->
type
==
task_type_grav_top_level
||
t
->
type
==
task_type_grav_ghost_in
||
t
->
type
==
task_type_grav_ghost_out
)
{
scheduler_activate
(
s
,
t
);
}
/* Time-step? */
else
if
(
t
->
type
==
task_type_timestep
)
{
t
->
ci
->
updated
=
0
;
...
...
@@ -4203,9 +4193,7 @@ void engine_skip_force_and_kick(struct engine *e) {
t
->
type
==
task_type_timestep
||
t
->
subtype
==
task_subtype_force
||
t
->
subtype
==
task_subtype_grav
||
t
->
type
==
task_type_end_force
||
t
->
type
==
task_type_grav_long_range
||
t
->
type
==
task_type_grav_ghost_in
||
t
->
type
==
task_type_grav_ghost_out
||
t
->
type
==
task_type_grav_top_level
||
t
->
type
==
task_type_grav_down
||
t
->
type
==
task_type_grav_down
||
t
->
type
==
task_type_cooling
||
t
->
type
==
task_type_sourceterms
)
t
->
skip
=
1
;
}
...
...
src/mesh_gravity.c
View file @
89eccb07
...
...
@@ -178,7 +178,7 @@ INLINE static void gpart_to_mesh_CIC(const struct gpart* gp, double* rho, int N,
void
mesh_to_gparts_CIC
(
struct
gpart
*
gp
,
const
double
*
pot
,
int
N
,
double
fac
,
const
double
dim
[
3
])
{
/* Box wrap the
multipole
's position */
/* Box wrap the
gpart
's position */
const
double
pos_x
=
box_wrap
(
gp
->
x
[
0
],
0
.,
dim
[
0
]);
const
double
pos_y
=
box_wrap
(
gp
->
x
[
1
],
0
.,
dim
[
1
]);
const
double
pos_z
=
box_wrap
(
gp
->
x
[
2
],
0
.,
dim
[
2
]);
...
...
src/runner.c
View file @
89eccb07
...
...
@@ -54,7 +54,6 @@
#include
"hydro_properties.h"
#include
"kick.h"
#include
"minmax.h"
#include
"runner_doiact_fft.h"
#include
"runner_doiact_vec.h"
#include
"scheduler.h"
#include
"sort_part.h"
...
...
@@ -95,7 +94,6 @@
#undef FUNCTION_TASK_LOOP
/* Import the gravity loop functions. */
#include
"runner_doiact_fft.h"
#include
"runner_doiact_grav.h"
/**
...
...
@@ -1750,27 +1748,27 @@ void runner_do_end_force(struct runner *r, struct cell *c, int timer) {
/* Check that this gpart has interacted with all the other
* particles (via direct or multipoles) in the box */
/*
if (gp->num_interacted != e->total_nr_gparts) {
*/
/*
/
\
* Get the ID of the gpart
*\/
*/
/*
long long my_id = 0;
*/
/*
if (gp->type == swift_type_gas)
*/
/*
my_id = e->s->parts[-gp->id_or_neg_offset].id;
*/
/*
else if (gp->type == swift_type_star)
*/
/*
my_id = e->s->sparts[-gp->id_or_neg_offset].id;
*/
/*
else if (gp->type == swift_type_black_hole)
*/
/*
error("Unexisting type");
*/
/*
else
*/
/*
my_id = gp->id_or_neg_offset;
*/
/*
error(
*/
/*
"g-particle (id=%lld, type=%s) did not interact "
*/
/*
"gravitationally with all other gparts "
*/
/*
"gp->num_interacted=%lld, total_gparts=%lld (local "
*/
/*
"num_gparts=%zd)",
*/
/*
my_id, part_type_names[gp->type], gp->num_interacted,
*/
/*
e->total_nr_gparts, e->s->nr_gparts);
*/
/* } */
if
(
gp
->
num_interacted
!=
e
->
total_nr_gparts
)
{
/* Get the ID of the gpart */
long
long
my_id
=
0
;
if
(
gp
->
type
==
swift_type_gas
)
my_id
=
e
->
s
->
parts
[
-
gp
->
id_or_neg_offset
].
id
;
else
if
(
gp
->
type
==
swift_type_star
)
my_id
=
e
->
s
->
sparts
[
-
gp
->
id_or_neg_offset
].
id
;
else
if
(
gp
->
type
==
swift_type_black_hole
)
error
(
"Unexisting type"
);
else
my_id
=
gp
->
id_or_neg_offset
;
error
(
"g-particle (id=%lld, type=%s) did not interact "
"gravitationally with all other gparts "
"gp->num_interacted=%lld, total_gparts=%lld (local "
"num_gparts=%zd)"
,
my_id
,
part_type_names
[
gp
->
type
],
gp
->
num_interacted
,
e
->
total_nr_gparts
,
e
->
s
->
nr_gparts
);
}
}
#endif
}
...
...
@@ -2224,9 +2222,6 @@ void *runner_main(void *data) {
case
task_type_grav_mesh
:
runner_do_grav_mesh
(
r
,
t
->
ci
,
1
);
break
;
case
task_type_grav_top_level
:
// runner_do_grav_fft(r, 1);
break
;
case
task_type_grav_long_range
:
runner_do_grav_long_range
(
r
,
t
->
ci
,
1
);
break
;
...
...
src/runner_doiact_fft.c
deleted
100644 → 0
View file @
69deec12
This diff is collapsed.
Click to expand it.
src/runner_doiact_fft.h
deleted
100644 → 0
View file @
69deec12
/*******************************************************************************
* This file is part of SWIFT.
* Copyright (c) 2016 Matthieu Schaller (matthieu.schaller@durham.ac.uk)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
******************************************************************************/
#ifndef SWIFT_RUNNER_DOIACT_FFT_H
#define SWIFT_RUNNER_DOIACT_FFT_H
struct
runner
;
struct
gravity_tensors
;
void
runner_do_grav_fft
(
struct
runner
*
r
,
int
timer
);
void
multipole_to_mesh_CIC
(
const
struct
gravity_tensors
*
m
,
double
*
rho
,
int
N
,
double
fac
,
const
double
dim
[
3
]);
void
mesh_to_multipole_CIC
(
struct
gravity_tensors
*
m
,
const
double
*
pot
,
int
N
,
double
fac
,
const
double
dim
[
3
]);
#endif
/* SWIFT_RUNNER_DOIACT_FFT_H */
src/scheduler.c
View file @
89eccb07
...
...
@@ -263,7 +263,7 @@ void scheduler_write_dependencies(struct scheduler *s, int verbose) {
if
(
type
==
task_type_self
+
k
&&
subtype
==
task_subtype_grav
)
gravity_cluster
[
k
]
=
1
;
}
if
(
type
==
task_type_grav_
top_level
)
gravity_cluster
[
2
]
=
1
;
if
(
type
==
task_type_grav_
mesh
)
gravity_cluster
[
2
]
=
1
;
if
(
type
==
task_type_grav_long_range
)
gravity_cluster
[
3
]
=
1
;
}
}
...
...
@@ -304,7 +304,7 @@ void scheduler_write_dependencies(struct scheduler *s, int verbose) {
fprintf
(
f
,
"
\t\t
\"
%s %s
\"
;
\n
"
,
taskID_names
[
task_type_self
+
k
],
subtaskID_names
[
task_subtype_grav
]);
if
(
gravity_cluster
[
2
])
fprintf
(
f
,
"
\t\t
%s;
\n
"
,
taskID_names
[
task_type_grav_
top_level
]);
fprintf
(
f
,
"
\t\t
%s;
\n
"
,
taskID_names
[
task_type_grav_
mesh
]);
if
(
gravity_cluster
[
3
])
fprintf
(
f
,
"
\t\t
%s;
\n
"
,
taskID_names
[
task_type_grav_long_range
]);
fprintf
(
f
,
"
\t
};
\n
"
);
...
...
@@ -901,9 +901,7 @@ void scheduler_splittasks_mapper(void *map_data, int num_elements,
scheduler_splittask_gravity
(
t
,
s
);
}
else
if
(
t
->
subtype
==
task_subtype_grav
)
{
scheduler_splittask_gravity
(
t
,
s
);
}
else
if
(
t
->
type
==
task_type_grav_top_level
||
t
->
type
==
task_type_grav_ghost_in
||
t
->
type
==
task_type_grav_ghost_out
)
{
}
else
if
(
t
->
type
==
task_type_grav_mesh
)
{
/* For future use */
}
else
{
error
(
"Unexpected task sub-type"
);
...
...
src/task.c
View file @
89eccb07
...
...
@@ -54,8 +54,7 @@ const char *taskID_names[task_type_count] = {
"ghost_out"
,
"extra_ghost"
,
"drift_part"
,
"drift_gpart"
,
"end_force"
,
"kick1"
,
"kick2"
,
"timestep"
,
"send"
,
"recv"
,
"grav_top_level"
,
"grav_long_range"
,
"grav_ghost_in"
,
"grav_ghost_out"
,
"grav_mm"
,
"recv"
,
"grav_long_range"
,
"grav_mm"
,
"grav_down"
,
"grav_mesh"
,
"cooling"
,
"sourceterms"
};
...
...
@@ -172,7 +171,6 @@ __attribute__((always_inline)) INLINE static enum task_actions task_acts_on(
break
;
case
task_type_init_grav
:
case
task_type_grav_top_level
:
case
task_type_grav_mm
:
return
task_action_multipole
;
break
;
...
...
src/task.h
View file @
89eccb07
...
...
@@ -58,10 +58,7 @@ enum task_types {
task_type_timestep
,
task_type_send
,
task_type_recv
,
task_type_grav_top_level
,
task_type_grav_long_range
,
task_type_grav_ghost_in
,
task_type_grav_ghost_out
,
task_type_grav_mm
,
task_type_grav_down
,
task_type_grav_mesh
,
...
...
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