Differences between revisions 120 and 121
Revision 120 as of 2013-01-16 23:02:17
Size: 2198
Comment:
Revision 121 as of 2013-03-31 18:07:11
Size: 2199
Editor: 106-77-252-216-dsl
Comment: Corrected a typo
Deletions are marked like this. Additions are marked like this.
Line 43: Line 43:
To run the examples you will only have to switch into the folder an type: To run the examples you will only have to switch into the folder and type:

How to use Hedge

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

This section contains some basic information about hedge.

Source Files and Examples

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

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 and 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

Hedge/HowTo (last edited 2013-03-31 18:07:11 by 106-77-252-216-dsl)