Typical .bashrc for ESTEL

From SourceWiki
Revision as of 11:02, 24 August 2007 by Jprenaud (talk | contribs)
Jump to navigation Jump to search

This article describes a typical extract of the .bashrc file which is used to set one's environment. Note that it is an incomplete file. It shows only the entries related to the TELEMAC system and is missing sections about your Fortran 90 compiler, and Tecplot if you are using Tecplot.

How it works

The code below is self explanatory but to summarise:

  • The TELEMAC system is installed in $HOME/systel90/, as defined by the variable $SYSTEL90. Edit this line!
  • by default, version v5p8 is used which uses the configuration folder $HOME/systel90/configv5p8/
  • Some functions are defined:
v5p7 -> switch to version v5p7
v5p8 -> switch to version v5p8
e3d  -> Goes to $HOME/systel90/estel3d/estel3d_version
e2d  -> Goes to $HOME/systel90/estel2d/estel2d_version


The code


##################
# TELEMAC SYSTEM #
##################

export SYSTEL90=/path/to/systel90

PATH=$SYSTEL90/systel90/bin:$PATH
PATH=./:$PATH
# The TELEMAC perl scripts needs ./ in $PATH
# This is _very_ bad practice but hey ... I did not write them!!

export PATH

# Location of config directory (defaults to v5p8)
# Can be overridden with the functions v5p6() and  v5p7(), see below
SYSTELCFG=$SYSTEL90/systel90/configv5p8
export SYSTELCFG

TOE2D=$SYSTEL90/systel90/estel2d/estel2d_v5p8/
TOE3D=$SYSTEL90/systel90/estel3d/estel3d_v5p8/
TOBIEF=$SYSTEL90/systel90/bief/bief_v5p8/sources/
TOT2D=$SYSTEL90/systel90/telemac2d/tel2d_v5p8
TOPARALLEL=$SYSTEL90/systel90/parallel/parallel_v5p8/

function v5p7 ()
{
	eval `change_systel_version -v v5p7`
}

function v5p8 ()
{
	eval `change_systel_version -v v5p8`
}

function e3d ()
# Takes you to the estel3d directory 
{
	cd $TOE3D
}

function e2d ()
# Takes you to the estel2d directory
{
	cd $TOE2D
}

function t2d ()
# Takes you to the telemac2d directory
{
	cd $TOT2D
}

function bief ()
# Takes you to the bief directory
{
	cd $TOBIEF
}

function parallel ()
# Takes you to the bief directory
{
	cd $TOPARALLEL
}