253 | | [[CollapsibleStart(Setting up and Compiling a Problem)]] |
254 | | |
255 | | 1. 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: |
256 | | {{{ |
257 | | cd modules |
258 | | ln -s <name of problem directory> Problem |
259 | | }}} |
260 | | This will create a symbolic link to the problem directory that the compiler can use to locate the appropriate module file. For example, to compile {{{FieldLoopAdvection}}}, you would create the following symbolic link from the modules directory: |
261 | | {{{ |
262 | | ln -s FieldLoopAdvection Problem |
263 | | }}} |
264 | | If a symbolic link already exists to Problem, you must first remove it by using the command: |
265 | | {{{ |
266 | | rm Problem |
267 | | }}} |
268 | | After which you can create a new symbolic link to Problem. |
269 | | |
270 | | 2. 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 the {{{Makefile.inc}}} file for the machine you are using from the AstroBEAR root directory: |
271 | | {{{ |
272 | | ln -s Makefile.inc.<machine_name> Makefile.inc |
273 | | }}} |
274 | | Currently there are {{{Makefile.inc}}} files in the repository for three machines: grass, bluehive, and itasca. |
275 | | |
276 | | 3. If you are planning to use self-gravity or diffusion, you will need to compile AstroBEAR with [https://computation.llnl.gov/casc/hypre/software.html hypre]. To do this, open {{{Makefile.inc}}} and set the {{{HYPREFLAG}}} variable to 1. Note that if you are not using gravity or diffusion, then you will want to turn it off by setting {{{HYPREFLAG}}} to 0. |
277 | | |
278 | | 4. 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 type {{{make}}}. To wipe out {{{.mod}}} and {{{.o}}} files, type {{{make clean}}}. |
279 | | |
280 | | 5. You will now have an executable file {{{astrobear}}} in your AstroBEAR root directory. Use it wisely. |
281 | | [[CollapsibleEnd]] |
| 253 | |