README.md 4.18 KB
Newer Older
1
Giraffe
Derek Gaston's avatar
Derek Gaston committed
2 3
=====

4
[![build status](https://xgitlab.cels.anl.gov/nek5000/giraffe/badges/develop/build.svg)](https://xgitlab.cels.anl.gov/nek5000/giraffe/commits/develop)
Ron Rahaman's avatar
Ron Rahaman committed
5 6


7
Giraffe uses the [MOOSE](http://www.mooseframework.org/) framework to implement multiphysics coupling with [Nek5000](https://nek5000.mcs.anl.gov/) CFD simulations.  The project is a collaboration between [Idaho National Laboratory](https://www.inl.gov/) and [Argonne National Laboratory](https://www.inl.gov/).
Derek Gaston's avatar
Derek Gaston committed
8

Ron Rahaman's avatar
Ron Rahaman committed
9 10 11

Downloading the Repo
--------------------
12
Cloning the Giraffe repository requires the `--recursive` flag, since MOOSE and libmesh are included as [Git submodules](https://git-scm.com/book/en/v2/Git-Tools-Submodules).  For example:
Ron Rahaman's avatar
Ron Rahaman committed
13
```
14
git clone --recursive https://xgitlab.cels.anl.gov/nek5000/giraffe.git
Ron Rahaman's avatar
Ron Rahaman committed
15 16 17 18
```
This will download and populate the src/moose and src/moose/libmesh.


Ron Rahaman's avatar
Ron Rahaman committed
19 20
Building PETSc
--------------
21
Giraffe requires PETSc, as described in the [MOOSE installation instructions](http://mooseframework.com/getting-started/).  PETSc is not distributed with Giraffe.  PETSc must either be compiled from source or installed as part of the MOOSE Environment package.  After installing PETSc, you must define the `$PETSC_DIR` variable in your environment.
Ron Rahaman's avatar
Ron Rahaman committed
22 23 24 25


Building libmesh
----------------
26
Giraffe also requires libmesh, as described in the [MOOSE installation instructions](http://mooseframework.com/getting-started/).  The libmesh source code is distributed with MOOSE.  It should be compiled using the following scripts:
Ron Rahaman's avatar
Ron Rahaman committed
27 28 29 30 31 32 33
```
$ cd moose/
$ scripts/update\_and\_rebuild\_libmesh.sh.  
```
After installing libmesh, you must define the `$LIBMESH_DIR` in your environment.


Ron Rahaman's avatar
Ron Rahaman committed
34 35 36
The Example Problems
--------------------

37
Currently, the only working example problem is "integration_example" in `giraffe/examples/integration_example`.  
Ron Rahaman's avatar
Ron Rahaman committed
38 39 40

### Building Example Problems

41
To configure and build each example problem, first generate the `configure` script in the top-level Giraffe directory:
Ron Rahaman's avatar
Ron Rahaman committed
42
```
43
$ cd giraffe
Ron Rahaman's avatar
Ron Rahaman committed
44
$ ./bootstrap
Ron Rahaman's avatar
Ron Rahaman committed
45
```
Ron Rahaman's avatar
Ron Rahaman committed
46
Then cd into the example subdirectory and simply run `configure` && `make`.  This will build the MOOSE and Nek5000 libraries, then link them to the executable driver.
Ron Rahaman's avatar
Ron Rahaman committed
47
```
48
$ cd giraffe/examples/integration_example`
Ron Rahaman's avatar
Ron Rahaman committed
49 50 51 52 53 54
$ ../../configure
$ make
```
The `configure` script may be run with additional options (for example, to point to a custom libmesh or MOOSE installation).  Run `./configure --help` to see a list of the available options.

### Running Example Problems
Ron Rahaman's avatar
Ron Rahaman committed
55

56
To run an example problem, it is recommended to use the convenience script `giraffe/examples/build_coupled_nek`.  This script will automatically setup some input files needed by Nek5000 (such as SESSION.NAME).  The script takes one command-line argument for the MOOSE configuration file, `-i <config_file>.i`.
Ron Rahaman's avatar
Ron Rahaman committed
57
```
58 59
$ cd giraffe/examples/integration_example
$ ../../giraffe-opt -i coefficient_integration.i
Ron Rahaman's avatar
Ron Rahaman committed
60
```
Ron Rahaman's avatar
Ron Rahaman committed
61

62
Linking to libgiraffe
Ron Rahaman's avatar
Ron Rahaman committed
63 64
------------------

65
The Giraffe libraries are output to the top-level lib/ directory.
Ron Rahaman's avatar
Ron Rahaman committed
66

67
Developing Nek5000 in Giraffe
Ron Rahaman's avatar
Ron Rahaman committed
68
--------------------------
69
Developers may freely modify src/Nek5000 as if it were a normal part of the Giraffe repo.  This is because Nek5000 is included as a Git subtree (rather than a submodule).  For routine commits, pushes, and pulls to the Giraffe repository, no extra Git commands are necessary.
Ron Rahaman's avatar
Ron Rahaman committed
70 71 72 73

With some additional Git commands, developers may easily merge upstream changes from [https://github.com/Nek5000/Nek5000](https://github.com/Nek5000/Nek5000) into src/Nek5000.  Finally, developers may also request to merge changes from src/Nek5000 to [https://github.com/Nek5000/Nek5000](https://github.com/Nek5000/Nek5000). This [blog post](http://blogs.atlassian.com/2013/05/alternatives-to-git-submodule-git-subtree/) from Atlassian gives a brief rundown of the procedures.  


74
Developing MOOSE and libmesh in Giraffe
Ron Rahaman's avatar
Ron Rahaman committed
75
------------------------------------
76
Modifying src/moose and src/moose/libmesh require additional Git commands, since they are included as Git submodules (rather than subtrees).  Modifying either of these libraries for Giraffe is intended to be unnecessary.  Should the situation arise, this [chapter](https://git-scm.com/book/en/v2/Git-Tools-Submodules) from _Pro Git_ describes the procedure for making modifications to submodules.