How to use Hedge [Edit]

This part of the wiki will give you an idea about how hedge works and how to use it. The entire content can be found on the following pages:

Basics [Edit]

This section contains some basic information about hedge.

Source Files and Examples [Edit]

When dealing with hedge for the first time two sub folders of the main hedge folder might be interesting for you:

  1. hedge/src/python/ (older version)

  2. hedge/hedge/ (newer version)

  3. hedge/examples/

Whenever you change something in source files you will have to compile hedge again. For this you have to change into the hedge main folder and type:

python setup.py install

Compiling of source files is not required in newer versions of hedge any more. Source-Files will be linked via libraries directly without compiling them. This means, that all changes in source files will be directly after you have saved them available.

If you create a new example or just modify an existing example you don't need to compile the entire hedge source again. After saving your changes you can run the file just by typing:

python example.py

Running an Example [Edit]

As you will find a broad set of examples you can choose between different partial differential equation types:

advection
euler
heat
maxwell
poisson
wave

To run the examples you will only have to switch into the folder an type:

rm -f *.{vtk,vtu,pvtu,pvd,silo,eps,dat,dat-journal,visit,png}
python example.py

The first line will ensure that you have deleted all visualization output data in that folder which hedge would otherwise refuse to overwrite, with sometimes rather funny-looking error messages. So this is an important command to remember when dealing with error messages by running hedge! To make the clean-up easier, hedge comes with a short script called rm-vis (in the bin/ subfolder) that does this for you. Then the long-ish command above becomes

rm-vis; python example.py

Vertigo

Hedge/HowTo (last edited 2012-03-21 18:34:55 by ip174-69-125-42)