# EPOCH instructions
To clone this repository from GitHub, use the command:
```
git clone --recursive https://github.com/Warwick-Plasma/epoch.git
```
The "--recursive" flag is important, as this is required to download the SDF
subdirectory used for writing the data.
Do not use the use the "Download zip" buttons, as they will miss the SDF
subdirectory.
A list of the EPOCH releases may be found
[here](https://github.com/Warwick-Plasma/epoch/releases)
EPOCH documentation is currently hosted on
[https://epochpic.github.io/](https://epochpic.github.io/)
Users and developers may also find the original EPOCH manuals useful, which
are hosted [here](https://github.com/Warwick-Plasma/EPOCH_manuals/releases)
All EPOCH development is carried out using the [git](https://git-scm.com)
revision control system. The master repository is hosted on a web-based
collaborative development site
[here](https://github.com/Warwick-Plasma/epoch)
Further details on this are provided below.
## Compiling the code
The "Releases" section of the GitHub site contains files in the form
"epoch-4.4.5.tar.gz". These are tarred and gzipped packages of the code
which can be unpacked with the command `tar xzf epoch-4.4.5.tar.gz`.
This will create a directory called "epoch-4.4.5".
Within this directory there are various epochXd subdirectories, each of which
has a "Makefile" containing the instructions for compiling the code.
Many people will be used to editing Makefiles by hand in order to set them up
for their own working environment. However, this is not the recommended way
of working with the EPOCH codebase. In theory, all the changes necessary for
compiling EPOCH on any given environment should be possible using command-line
variables.
For most setups, it should only be necessary to set the COMPILER variable to
correspond to the Fortran compiler to be used. This can either be set as an
option to the "make" command or as an environment variable.
For example, to compile the code using Intel's "ifort" Fortran compiler, you
can either type the following:
```
$> make COMPILER=intel
```
or alternatively:
```
$> export COMPILER=intel
$> make
```
In these two examples `$>` represents the terminal's command-line prompt.
After compilation is complete, the binary file will be created in "bin/epochXd",
where X is 1, 2 or 3.
Since most people will always be using the same compiler on a specific machine,
it is often easiest to just add the line `export COMPILER=intel` to your shell
script initialisation file (ie. "$HOME/.bashrc" on most modern UNIX machines).
The actual compiler command used is the MPI fortran wrapper. On nearly all
machines, this is called "mpif90" and so this is what is used by default.
Occasionally, some machines will call it something different. For example,
Intel's MPI wrapper script is sometimes called "mpiifort". If your machine has
such a setup, you can set the name of the wrapper script using the variable
MPIF90. For example:
```
$> make COMPILER=intel MPIF90=mpiifort
```
Again, it is often easiest to add the line `export MPIF90=mpiifort` to your
$HOME/.bashrc file.
Finally, there are two more variables which can be used to control the options
used when building the code.
Setting "MODE=debug" will build the code with optimisation disabled and
debugging flags turned on. If this variable is not set then the default is to
build a fully optimised version of the code.
There are several pre-processor flags which can be passed at compile-time to
change the behaviour of the code. These flags are described in the Makefile
with the lines beginning "#DEFINES += " and they are commented out by default.
Rather than uncommenting these lines, it is possible to set them on the
command-line using the "DEFINE" variable. For example, to compile a
single-precision version with global particle IDs you would type:
```
$> make DEFINE="-DPARTICLE_ID -DSINGLE"
```
## COMPILING SDF AND THE VISIT READER
The EPOCH codes use a self-describing file format called SDF. The routines
used in reading and writing such files, along with reader plugins for Matlab,
IDL, python and VisIt are contained in the SDF directory.
The library used by EPOCH for reading and writing the files is automatically
built when you first build EPOCH. However, it is important to note that
whenever you rebuild EPOCH, the SDF library is NOT rebuilt by default. It is
also not removed when you type "make clean". Most of the time, this is what
you want since rebuilding the library adds a significant amount of time to
the compilation of the code. However, occasionally you might want to force the
library to be rebuilt, such as when you switch compilers. To accomplish this
you must first type "make cleanall" which will remove the existing library and
it will then get rebuilt next time you type "make".
In order to visualise data using the VisIt program, you must first build the
SDF VisIt reader plugin. As a pre-requisite, you must have the VisIt binary
in your shell's search path. You can check this by typing:
```
$> visit -version
```
which should return with a message such as "The current version of VisIt is .."
If instead you get "visit: command not found" then you may need to edit your
PATH environment variable appropriately. Your system administrator should be
able to help.
Next you will need to ensure that you have a C++ compiler (preferably GNU g++)
and CMake. Again, you can check these using `g++ --version` and
`cmake -version`. Note that the appropriate version of these utilities may
depend on the version of VisIt that you have installed.
Once these pre-requisites have been met, you should be able to build the
reader plugin by typing `make visit`. You do not need to do this again unless
you upgrade your version of the VisIt utility. It is rare that any changes to
EPOCH will require an update of the VisIt reader, but if you do start to
encounter errors when reading SDF files then you can try rebuilding the reader
using the commands `make visitclean` followed by `make visit`.
Note that older versions of EPOCH used the CFD format. This is now obsolete
and current versions of the code no longer contain any reader plugin for this
format. However, existing installations of the VisIt CFD plugin will happily
co-exist with the SDF plugin and issuing `make visitclean` will not remove
such plugins.
## WORKING WITH THE GIT REPOSITORY
For more advanced users, the code is also hosted on a git repository. There is
quite a steep learning curve for using git, so using this repository is only
recommended for more advanced users who are comfortable that they can deal with
a "git conflict".
One other added complication, is that the EPOCH repository also uses git
submodules for tracking the SDF file format. This adds an extra source of
possible issues. However, once a workflow is established it can all be quite
straightforward to work with.
To perform an initial checkout of the code using git, you should issue the
following command:
```
git clone --recursive https://github.com/Warwick-Plasma/epoch.git
```
The "--recursive" flag ensures that not only the "epoch"
repository is checked out, but also the "SDF" submodules.
It is recommended that after checking out a copy of the git repository, users
immediately create a new working branch and leave the default "master" branch
untouched. A new branch can be created and switched to with the command
`git checkout -b work`.
When you wish to update to the latest version, do the following sequence of
actions. First, commit or stash any changes you have made in your "work"
branch. Next, switch to the "master" branch with
`git checkout master`. Now pull the changes with `git pull`,
followed by `git submodule update --recursive`.
At this stage your "master" branch should be fully up to date.
Merging the new version in with your "work" branch is prone to error, so it
is recommended that you create a temporary copy of this branch just in case
everything goes wron
没有合适的资源?快使用搜索试试~ 我知道了~
用于等离子体物理模拟的粒子单元代码___下载.zip
共1374个文件
f90:237个
inc:66个
deck:50个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 136 浏览量
2023-04-16
20:26:56
上传
评论
收藏 17.19MB ZIP 举报
温馨提示
用于等离子体物理模拟的粒子单元代码___下载.zip
资源推荐
资源详情
资源评论
收起资源包目录
用于等离子体物理模拟的粒子单元代码___下载.zip (1374个子文件)
be_1 527B
be_1 527B
be_1 527B
be_10 3KB
be_10 3KB
be_10 3KB
be_100 26KB
be_100 26KB
be_100 26KB
be_11 3KB
be_11 3KB
be_11 3KB
be_12 3KB
be_12 3KB
be_12 3KB
be_13 4KB
be_13 4KB
be_13 4KB
be_14 4KB
be_14 4KB
be_14 4KB
be_15 4KB
be_15 4KB
be_15 4KB
be_16 4KB
be_16 4KB
be_16 4KB
be_17 5KB
be_17 5KB
be_17 5KB
be_18 5KB
be_18 5KB
be_18 5KB
be_19 5KB
be_19 5KB
be_19 5KB
be_2 792B
be_2 792B
be_2 792B
be_20 5KB
be_20 5KB
be_20 5KB
be_21 6KB
be_21 6KB
be_21 6KB
be_22 6KB
be_22 6KB
be_22 6KB
be_23 6KB
be_23 6KB
be_23 6KB
be_24 6KB
be_24 6KB
be_24 6KB
be_25 7KB
be_25 7KB
be_25 7KB
be_26 7KB
be_26 7KB
be_26 7KB
be_27 7KB
be_27 7KB
be_27 7KB
be_28 8KB
be_28 8KB
be_28 8KB
be_29 8KB
be_29 8KB
be_29 8KB
be_3 1KB
be_3 1KB
be_3 1KB
be_30 8KB
be_30 8KB
be_30 8KB
be_31 8KB
be_31 8KB
be_31 8KB
be_32 9KB
be_32 9KB
be_32 9KB
be_33 9KB
be_33 9KB
be_33 9KB
be_34 9KB
be_34 9KB
be_34 9KB
be_35 9KB
be_35 9KB
be_35 9KB
be_36 10KB
be_36 10KB
be_36 10KB
be_37 10KB
be_37 10KB
be_37 10KB
be_38 10KB
be_38 10KB
be_38 10KB
be_39 10KB
共 1374 条
- 1
- 2
- 3
- 4
- 5
- 6
- 14
资源评论
快撑死的鱼
- 粉丝: 1w+
- 资源: 9154
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功