Version 12 (modified by 12 years ago) ( diff ) | ,
---|
Compiling AstroBEAR
- Within the
modules
directory there are a number of sample problem files. To select a problem module directory for compilation, execute the following commands from your AstroBEAR directory:cd modules ln -s <name of problem directory> Problem
This will create a symbolic link to the problem directory that the compiler can use to locate the appropriate module file. For example, to compileFieldLoopAdvection
, you would create the following symbolic link from the modules directory:ln -s FieldLoopAdvection Problem
If a symbolic link already exists to Problem, you must first remove it by using the command:rm Problem
After which you can create a new symbolic link to Problem.
- AstroBEAR comes with a makefile and several
Makefile.inc
files containing machine-specific parameters. In order to compile, you need to create a link to theMakefile.inc
file for the machine you are using from the AstroBEAR root directory:ln -s Makefile.inc.<machine_name> Makefile.inc
Currently there areMakefile.inc
files in the repository for three machines: grass, bluehive, and itasca.
- If you are planning to use self-gravity or diffusion, you will need to compile AstroBEAR with hypre. To do this, open
Makefile.inc
and set theHYPREFLAG
variable to 1. Note that if you are not using gravity or diffusion, then you will want to turn it off by settingHYPREFLAG
to 0.
- Once you have linked a problem directory and a properly-configured
Makefile.inc
, return to the AstroBEAR root directory. AstroBEAR 2.0's build process is much more streamlined than AstroBEAR 1.0; to compile, simply typemake
. To wipe out.mod
and.o
files, typemake clean
.
- You will now have an executable file
astrobear
in your AstroBEAR root directory. Use it wisely.
Note:
See TracWiki
for help on using the wiki.