Difference between revisions of "Typical .bashrc for ESTEL"

From SourceWiki
Jump to navigation Jump to search
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
 +
[[Category:Estel]]
 
This article describes a typical extract of the <code>.bashrc</code> 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.
 
This article describes a typical extract of the <code>.bashrc</code> 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 =
 
= How it works =
 
The code below is self explanatory but to summarise:
 
The code below is self explanatory but to summarise:
* The TELEMAC system is installed in <code>$HOME/systel90/</code>, as defined by the variable $SYSTEL90. '''Edit this line!'''
+
* The TELEMAC system is installed in <code>$HOME/systel90/</code>, as defined by the variable <code>SYSTEL90</code>. '''So edit this variable definition to match your installation!'''
 
* by default, version v5p8 is used which uses the configuration folder <code>$HOME/systel90/configv5p8/</code>
 
* by default, version v5p8 is used which uses the configuration folder <code>$HOME/systel90/configv5p8/</code>
* Some functions are defined:
+
* Some useful functions are defined:
 
<code><pre>
 
<code><pre>
 
v5p7 -> switch to version v5p7
 
v5p7 -> switch to version v5p7
Line 12: Line 13:
 
e2d  -> Goes to $HOME/systel90/estel2d/estel2d_version
 
e2d  -> Goes to $HOME/systel90/estel2d/estel2d_version
 
</pre></code>
 
</pre></code>
 
+
* It also provides functions to go to the BIEF, PARALLEL or TELEMAC2D directories (only of use to developers really).
  
 
= The code =
 
= The code =
Line 21: Line 22:
 
##################
 
##################
  
 +
# Location of the TELEMAC system, edit accordingly
 
export SYSTEL90=/path/to/systel90
 
export SYSTEL90=/path/to/systel90
  
PATH=$SYSTEL90/systel90/bin:$PATH
+
PATH=$SYSTEL90//bin:$PATH
 
PATH=./:$PATH
 
PATH=./:$PATH
 
# The TELEMAC perl scripts needs ./ in $PATH
 
# The TELEMAC perl scripts needs ./ in $PATH
Line 32: Line 34:
 
# Location of config directory (defaults to v5p8)
 
# Location of config directory (defaults to v5p8)
 
# Can be overridden with the functions v5p6() and  v5p7(), see below
 
# Can be overridden with the functions v5p6() and  v5p7(), see below
SYSTELCFG=$SYSTEL90/systel90/configv5p8
+
SYSTELCFG=$SYSTEL90/configv5p8
 
export SYSTELCFG
 
export SYSTELCFG
  
TOE2D=$SYSTEL90/systel90/estel2d/estel2d_v5p8/
+
TOE2D=$SYSTEL90/estel2d/estel2d_v5p8/
TOE3D=$SYSTEL90/systel90/estel3d/estel3d_v5p8/
+
TOE3D=$SYSTEL90//estel3d/estel3d_v5p8/
TOBIEF=$SYSTEL90/systel90/bief/bief_v5p8/sources/
+
TOBIEF=$SYSTEL90/bief/bief_v5p8/sources/
TOT2D=$SYSTEL90/systel90/telemac2d/tel2d_v5p8
+
TOT2D=$SYSTEL90/telemac2d/tel2d_v5p8
TOPARALLEL=$SYSTEL90/systel90/parallel/parallel_v5p8/
+
TOPARALLEL=$SYSTEL90/parallel/parallel_v5p8/
  
 
function v5p7 ()
 
function v5p7 ()

Latest revision as of 12:23, 24 August 2007

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. So edit this variable definition to match your installation!
  • by default, version v5p8 is used which uses the configuration folder $HOME/systel90/configv5p8/
  • Some useful 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
  • It also provides functions to go to the BIEF, PARALLEL or TELEMAC2D directories (only of use to developers really).

The code


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

# Location of the TELEMAC system, edit accordingly
export SYSTEL90=/path/to/systel90

PATH=$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/configv5p8
export SYSTELCFG

TOE2D=$SYSTEL90/estel2d/estel2d_v5p8/
TOE3D=$SYSTEL90//estel3d/estel3d_v5p8/
TOBIEF=$SYSTEL90/bief/bief_v5p8/sources/
TOT2D=$SYSTEL90/telemac2d/tel2d_v5p8
TOPARALLEL=$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
}