Commit 01902d5c authored by Volker Springel's avatar Volker Springel

some more edits in documentation

parent 82be2881
......@@ -2,77 +2,98 @@ Code development
************************
Scientific software development is a crucial aspect of computational (astro-)physics.
With the progess made over the past decades, numerical methods as well as implementations
have evolved and increased in complexity. The scope of simulation codes has
increased accordingly, such that the question how to organize development becomes important
to scientific progress.
This version of Arepo is intended as a basis, providing an efficient code structure
and state of the art numerical techniques for gravity and hydrodynamics. The code is
completely documented and should allow computational astrophysicists to develop their
own specialized modules on top of it. Practically, this is best done by hosting an
own repository for the development, which is occasonally updated from the main
repository to include latest bugfixes. For this workflow to work properly, it is
important to keep the code-base relatively static. For this reason
**the base version of the code is not meant to be extended in functionality.**
This means that only bugfixes as well as updates in the documentation and examples will
be included.
Scientific software development is a crucial aspect of computational
(astro-)physics. With the progess made over the past decades,
numerical methods as well as implementations have evolved and
increased in complexity. The scope of simulation codes has increased
accordingly, such that the question on how to organize development
becomes important for further scientific progress.
This version of Arepo is intended as a basis, providing an efficient
code structure and state of the art numerical techniques for gravity
and hydrodynamics. The code is completely documented and should allow
computational astrophysicists to develop their own specialized modules
on top of it. Practically, this is best done by hosting an own
repository for the development, which is occasonally updated from the
main repository to include latest bugfixes. For this workflow to work
properly, it is helpful to keep the code-base relatively static. For
this reason
**the base version of the code is not meant to be extended in
functionality.**
This means that only bugfixes as well as updates in the documentation
and examples will be included in revisions of this public release.
Issue reporting
===============
A code of the scope of Arepo will ineviably have a number of issues and so far undetected bugs.
Detection of all issues is very complicated and time-consuming work. This means in practice that
we rely on users that actually report all bugs and issues they come across to improve the quality
of the code. We therefore encourage users to report all issues they have, including things
that remain unclear after reading the documentation. This way we hope to constantly improve the
qualtiy of the code in all its aspects.
A code of the scope of Arepo will inevitably have a number of issues
and so far undiscovered bugs. Detection of all issues is very
complicated and time-consuming work. This means in practice that we
rely on users to actually report all bugs and issues they come across,
helping us to improve the quality of the code. We therefore encourage
users to report all issues they have, including things that remain
unclear after reading the documentation. This way we hope to
constantly improve the qualtiy of the code in all its aspects.
To organize this, we created a code support forum (www.arepo-code.org/forums/forum/arepo-forum)
which is publically visible. To create posts on this forum, a registration with admin-approval
is required. We encourage users to sign up under www.arepo-code.org/register and make
use of the forum whenever they have problems.
To organize this, we set up a code support forum
(www.arepo-code.org/forums/forum/arepo-forum) which is publicly
visible. To create posts on this forum, a registration with
admin-approval is required. We encourage users to sign up under
www.arepo-code.org/register and make use of the forum whenever they
have problems.
Issues reported in the forum will then be confirmed by one of the authors and added to the
repository issue tracker, which serves as a to-do list for bug fixes and improvements to
the code. Therefore, if a problem occurs, the first thing to check is whether there already exists
an open issue, i.e. whether this is a known and confirmed problem.
Issues reported in the forum will then be confirmed by one of the
authors and added to the repository issue tracker, which serves as a
to-do list for bug fixes and improvements to the code. Therefore, if a
problem occurs, the first thing to check is whether there already
exists an open issue, i.e. whether this is a known and confirmed
problem.
**Please use the support forum instead of contacting the authors by email.**
**Please whenever possible use the support forum instead of contacting
the authors by email.**
**We encourage experienced users to provide help and answer some of the open questions on this forum.**
**We encourage experienced users to provide help and answer some of
the open questions on this forum.**
Code extensions
===============
Extensions should be hosted in separate repositories or branches of the main repository.
We highly welcome such extensions and encourage developers to make them publically
available (under GNU GPL v3). While this can be done independently of the authors,
we would encourage developers to inform the authors once there is a publically
available module in order to have a list of available extensions on the code homepage.
Extensions should be hosted in separate repositories or branches of
the main repository. We highly welcome such extensions and encourage
developers to make them publicly available (under GNU GPL v3). While
this can be done independently of the authors, we would encourage
developers to inform the authors once there is a publicly available
module they are willing to share, in order to have a list of available
extensions on the code homepage.
Some guidelines for code extensions and new modules:
* Modularity
* Strive for modularity
* Minimize the number of changes in existing source code files to a few function calls
and structured variables within existing elements.
* The source code of an own modue should largely be in separate (i.e. new) files.
* Minimize the number of changes in existing source code files to a
few function calls and structured variables within existing
elements.
* The source code of a new modue should largely be in separate
(i.e. new) files.
* Documentation
* Document the module
* All parameter and config-options should be clearly explained in this documentation.
Feel free to add an addional page to this documentation explaining how your module
works.
* All parameter and config-options should be clearly explained in
this documentation. Feel free to add an addional page to this
documentation explaining how your module works.
* Document what each function does in the source code.
* The Template-Config.sh file should have a short explanation for each flag.
* The Template-Config.sh file should have a short explanation for
each added flag.
* Verification and examples
* Verification and examples
* If possible, create one or more addional examples illustrating and testing the module.
* If possible, create one or more addional examples illustrating and
testing the module.
This diff is collapsed.
......@@ -2,50 +2,60 @@
Related codes
*************
The general code structure of Arepo is similar to the Gadget code, but with
significant further developments and improvements. However, keeping in mind
that the code architecture originates from an Tree-PM-SPH code helps to
understand why certain things are done in certain ways.
One of the obvious signs of this are the name of some global structures and
functions. For example the array holding the information for gas cells only is
called SphP. Another example would be the routines in ``src/init/density.c``,
which used to be an SPH density calculation, but now only used for an estimate
for the typical distance to neighbouring cells. Another aspect is the
presence of the neighbour tree, a search-tree structure on gas cells. In
practice this means that many of the routines that depend on the state of
neighbouring cells, including sub-grid feedback models etc., can be based on
this neighbour search. This makes it possible to port these models from earlier
versions of Gadget to Arepo.
However, it is important to realize that routines written for the Gadget code
will in general not work directly when ported to Arepo. We encourage developers
to carefully test that the implementation is still having the same effect.
Apart from the differences in implementation, it is also important to realize
that a grid-based finite volume scheme might react different to a particular to
a sub-grid implementation.
The general high-level code structure of Arepo is quite similar to the
Gadget code, but with significant changes and improvements. However,
keeping in mind that the code architecture originates from an
Tree-PM-SPH code can help to understand why certain things are done in
certain ways.
One of the obvious signs of this are the names of some global
structures and functions. For example the array holding the
information for gas cells is called SphP. Another example would be the
routines in ``src/init/density.c``, which used to be an SPH density
calculation, but is now only used for an estimate for the typical
distance to neighbouring cells. Another aspect is the presence of the
neighbour tree, a search-tree structure on gas cells. In practice this
means that many of the routines that depend on the state of
neighbouring cells, including sub-grid feedback models etc., can be
based on this neighbour search. This makes it possible to port these
models relatively easily from earlier versions of Gadget to Arepo.
However, it is important to also realize that routines written for the
Gadget code will in general not work without some porting adjustments
when inserted in to Arepo. We thus encourage developers to carefully
test that their implementations still have the intended effect when
such a porting is done. Apart from the differences in implementation,
it is also important to realize that a grid-based finite volume scheme
can react differently to certain sub-grid implementations than a
particle-based approach.
Differences to the development Version
======================================
This public version of Arepo was branched off from the development version in
November 2017, substantially cut down, cleand up and the documentation completed
by Rainer Weinberger. The main reason for doing this is to provide a code to the
community that researchers are able to understand and use without the need of
an extensive introduction by one of the authors. We belive that the public
version, being better documented on a developer level, also provides a better
starting point for new developments.
The general idea for this public verson was to preserve the well-tested code
with a limited number of changes. However, some compile-time options have been
eliminated and to recover the same running mode **in the development version
of Arepo**, the following compile-time flags need to be set in `Config.sh`
This public version of Arepo was branched off from the development
version in November 2017, and then Rainer Weinberger substantially cut
it down, cleaned it up and completed the documentation. The main
reason for doing this was to provide a code to the community that
researchers are able to understand and use without the need of an
extensive introduction by one of the authors. We believe that the
public version, which is better documented at a developer level, also
provides a better starting point for new developments.
The general idea for this public verson was to preserve the
well-tested code with a limited number of changes. However, some
compile-time options have been eliminated and to recover the same
running mode **in the development version of Arepo**, the following
compile-time flags need to be set in `Config.sh`
* ``PERIODIC`` (has become obsolete over the years)
* ``VORONOI`` (the development version also has an AMR mode)
* ``VORONOI_DYNAMIC_UPDATE`` (in practice now a default)
* ``AUTO_SWAP_ENDIAN_READIC`` (only relevant for file formats 1 and 2)
* ``CHUNKING``
* the switch ``EXACT_GRAVITY_FOR_PARTICLE_TYPE`` automatically activates ``NO_SELFGRAVITY_TYPE``, ``NO_GRAVITY_TYPE`` and ``EXACT_GRAVITY_REACTION`` (see src/main/allvars.h) in the public version. This is not the case in the development version where all these flags need to be set individually in Config.sh.
* the switch ``EXACT_GRAVITY_FOR_PARTICLE_TYPE`` automatically
activates ``NO_SELFGRAVITY_TYPE``, ``NO_GRAVITY_TYPE`` and
``EXACT_GRAVITY_REACTION`` (see src/main/allvars.h) in the public
version. This is not the case in the development version where all
these flags need to be set individually in Config.sh.
Markdown is supported
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