Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Arepo (do not merge) #925

Draft
wants to merge 74 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
74 commits
Select commit Hold shift + click to select a range
4ed2054
add arepo directory
felicityguest Mar 18, 2022
5507dc4
add arepo source code
felicityguest Mar 18, 2022
5dc196f
remove '#include ./arepoconfig.h' from allvars.h
felicityguest Mar 18, 2022
b221aec
update Makefile to include arepo source code
felicityguest Mar 18, 2022
3b25036
add TODO to Makefile
felicityguest Mar 18, 2022
d56c2b3
rename classes
felicityguest Mar 28, 2022
469b04d
inherit from GravitationalDynamicsInterface
felicityguest Mar 28, 2022
a0a927c
inherit from LiteratureReferencesMixIn
felicityguest Mar 28, 2022
016c75e
remove wildcard import
felicityguest Mar 28, 2022
fae9ec3
inherit from GravitationalDynamics
felicityguest Mar 28, 2022
e8a3113
minor reformatting
felicityguest Mar 28, 2022
a3a020a
add ArepoInterface docstring
felicityguest Mar 28, 2022
1d668dd
add TODO re CodeWithDataDirectories
felicityguest Mar 28, 2022
aa1c598
add set_parameters()
felicityguest Mar 28, 2022
e312e01
change GSL_INCL to GSL_FLAGS
felicityguest Mar 28, 2022
d1c5cca
add AMUSE_DIR conditional and include config.mk
felicityguest Mar 28, 2022
c1a672f
generate interface.cc
felicityguest Mar 31, 2022
12a022d
update interface name in Makefile
felicityguest Mar 31, 2022
fb1f673
update interface name in test_arepo.py
felicityguest Mar 31, 2022
4d050da
update arepo to Arepo
felicityguest Mar 31, 2022
4ff74a9
add code from arepo main.c to initialize_code() and cleanup_code()
felicityguest Apr 1, 2022
7efa651
comment out set_parameters() and add TODO
felicityguest Apr 1, 2022
2c1f16a
add TODO to test_arepo.py
felicityguest Apr 1, 2022
5daa7e4
add TODO to Makefile
felicityguest Apr 1, 2022
ed27e20
remove test.cc as not needed
felicityguest Apr 1, 2022
5b40656
add initialize_code() and define_methods() to Arepo
felicityguest Apr 1, 2022
deb6a8b
add default parameters to arepo's interface.cc
mtwest2718 May 12, 2022
fc35f9d
Comment out read_parameter_file in begrun, add run_sim in interface.c…
mtwest2718 May 13, 2022
201535d
fixes
rieder May 18, 2022
fbcce03
define CXX flag in Arepo makefile
mtwest2718 May 18, 2022
5cf22a1
set_default values to match current arepo config data structures
mtwest2718 May 18, 2022
6e8ce9b
Merge branch 'amusecode:main' into iss9-arepo_dark_matter_interface
rieder May 19, 2022
af0f374
add #include mpi.h & run.c
mtwest2718 May 19, 2022
3ecbaa3
include GSL headers
rieder May 19, 2022
5ab0a4b
add GSL_FLAGS to CXXFLAGS
rieder May 19, 2022
dfac304
remove include
rieder May 19, 2022
d1da5b8
arepo is C not C++
rieder May 19, 2022
2f92967
re-add lines
rieder May 19, 2022
980aae5
create arepo interface.h and move #include allvars.h & proto.h along …
mtwest2718 May 19, 2022
b683887
fix typo
rieder May 19, 2022
3e84f77
fix paths
rieder May 19, 2022
1cee056
add #include statement for new interface.h header
mtwest2718 May 20, 2022
719aaa3
some fixes for c<->cpp
ipelupessy May 20, 2022
cc78562
Merge branch 'iss9-arepo_dark_matter_interface' of https://github.com…
ipelupessy May 20, 2022
81223f6
fixes to build, note the source changes
ipelupessy May 20, 2022
1e0c6b9
fix build to detect source changes
ipelupessy May 20, 2022
edc21b7
move GSL_LIBS and GMP_LIBS to the end of the flags for Arepo make file
mtwest2718 May 20, 2022
73d53b7
remove extra mpi_init from initialize_code
mtwest2718 May 23, 2022
ff2ea53
Default to non-periodic gravity
rieder May 25, 2022
5c2be48
Merge branch 'amusecode:main' into iss9-arepo_dark_matter_interface
rieder Sep 19, 2022
285b495
Add missing calls to memory management helpers
stephenpcook Sep 28, 2022
62cd345
small bug fix: in case HIERARCHICAL_GRAVITY is not used, and the maxi…
volkerspringel Jan 10, 2022
33d3f94
removed non-standard uint in favor of 'unsigned int'
volkerspringel Jun 2, 2022
0193040
disabled a superfluous call of get_starformtion_rate()
volkerspringel Jun 2, 2022
39d925e
Merge branch 'gitlab-updates' into iss9-arepo_dark_matter_interface
stephenpcook Sep 30, 2022
1a1d078
Prepare to run Arepo example
stephenpcook Oct 12, 2022
d553de2
Placeholder functions for evolution code
stephenpcook Oct 13, 2022
f3d2f8a
Add flags to arepo makefile
stephenpcook Oct 26, 2022
03f2c55
Add Arepo flags to parent Makefile
stephenpcook Nov 4, 2022
afdfa29
Force stop and skip dump
stephenpcook Nov 10, 2022
b8e2539
Add evolve_model function
stephenpcook Nov 10, 2022
f044fd0
Change snapshot format
stephenpcook Nov 10, 2022
354164c
Remove unnecessary Arepo flag
stephenpcook Nov 10, 2022
85b102e
Set restart flag in initization
stephenpcook Nov 10, 2022
44cfc5d
Add get_position interface function
stephenpcook Nov 14, 2022
d9f233d
Add arepo get functions
stephenpcook Nov 17, 2022
91716b1
Add Arepo particle ID lookup
stephenpcook Nov 18, 2022
af586a1
Match Arepo interface with Gadget2
stephenpcook Nov 18, 2022
c80426d
Add comments to Arepo interface
stephenpcook Dec 2, 2022
2f0104b
Add script to track and plot particles
stephenpcook Dec 2, 2022
a0908e0
Add HDF5 flags to Makefiles, remove missing call
stephenpcook Dec 22, 2022
817000a
Add interface getters for gas pressure, density
stephenpcook Dec 22, 2022
51facf0
Re-add HAVE_HDF5 Arepo flag
stephenpcook Dec 22, 2022
fa41c69
Change Makefiles + interface to run Noh 3D example
stephenpcook Dec 22, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/amuse/community/arepo/ICs.placeholder
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
File ICs taken from arepo examples:

- Noh 3D example: arepo/examples/noh_3d/IC.hdf5
- isolated collisionless galaxy: arepo/examples/isolated_galaxy_collisionless_3d/ICs/ICs
74 changes: 74 additions & 0 deletions src/amuse/community/arepo/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# standard amuse configuration include
# config.mk will be made after ./configure has run
ifeq ($(origin AMUSE_DIR), undefined)
AMUSE_DIR := $(shell amusifier --get-amuse-dir)
endif
-include $(AMUSE_DIR)/config.mk

## examples/Noh_3d/Config.sh
## config file for 3d Noh probelm

#--------------------------------------- Basic operation mode of code
AREPOFLAGS += -DREFLECTIVE_X=2 # in-/outflow boundary conditions in x direction
AREPOFLAGS += -DREFLECTIVE_Y=2 # in-/outflow boundary conditions in y direction
AREPOFLAGS += -DREFLECTIVE_Z=2 # in-/outflow boundary conditions in z direction

#--------------------------------------- Mesh motion and regularization
AREPOFLAGS += -DREGULARIZE_MESH_CM_DRIFT # Mesh regularization; Move mesh generating point towards center of mass to make cells rounder.
AREPOFLAGS += -DREGULARIZE_MESH_CM_DRIFT_USE_SOUNDSPEED # Limit mesh regularization speed by local sound speed
AREPOFLAGS += -DREGULARIZE_MESH_FACE_ANGLE # Use maximum face angle as roundness criterion in mesh regularization

#--------------------------------------- Time integration options
AREPOFLAGS += -DTREE_BASED_TIMESTEPS # non-local timestep criterion (take 'signal speed' into account)

#---------------------------------------- Single/Double Precision
AREPOFLAGS += -DDOUBLEPRECISION=1 # Mode of double precision: not defined: single; 1: full double precision 2: mixed, 3: mixed, fewer single precisions; unless short of memory, use 1.
AREPOFLAGS += -DINPUT_IN_DOUBLEPRECISION # initial conditions are in double precision
AREPOFLAGS += -DOUTPUT_CENTER_OF_MASS # output centers of cells

#--------------------------------------- Output/Input options
AREPOFLAGS += -DHAVE_HDF5 # needed when HDF5 I/O support is desired; should this be standard?

#--------------------------------------- Testing and Debugging options
#AREPOFLAGS += -DDEBUG # enables core-dumps, should this be standard?

HDF5_FLAGS += -DH5_USE_16_API

MPICXX ?= mpicxx
CXX = $(MPICXX)
CFLAGS += -Wall -g
CXXFLAGS += $(CFLAGS) $(GSL_FLAGS) $(AREPOFLAGS) $(HDF5_FLAGS)
LDFLAGS += -lm $(MUSE_LD_FLAGS)

OBJS = interface.o

CODELIB = src/libarepo.a

all: arepo_worker

clean:
$(RM) -rf __pycache__
$(RM) -f *.so *.o *.pyc worker_code.cc worker_code.h
$(RM) *~ arepo_worker worker_code.cc
make -C src clean

distclean: clean
make -C src distclean

$(CODELIB): .FORCE
export AREPOFLAGS
make -C src all

worker_code.cc: interface.py
$(CODE_GENERATOR) --type=c interface.py ArepoInterface -o $@

worker_code.h: interface.py
$(CODE_GENERATOR) --type=H interface.py ArepoInterface -o $@

arepo_worker: worker_code.cc worker_code.h $(CODELIB) $(OBJS)
$(MPICXX) $(CXXFLAGS) $(GSL_FLAGS) $(HDF5_FLAGS) $< $(OBJS) $(CODELIB) -o $@ $(GMP_LIBS) $(GSL_LIBS) $(HDF5_LIBS)

.cc.o: $<
$(MPICXX) $(CXXFLAGS) $(CODELIB) -c -o $@ $<

.FORCE:
2 changes: 2 additions & 0 deletions src/amuse/community/arepo/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# generated file
from .interface import Arepo