#----------------------------------*-sh-*--------------------------------------
# =========                 |
# \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
#  \\    /   O peration     |
#   \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
#    \\/     M anipulation  |
#------------------------------------------------------------------------------
# License
#     This file is part of OpenFOAM, licensed under GNU General Public License
#     <http://www.gnu.org/licenses/>.
#
# File
#     etc/config.sh/ensight
#     - sourced by OpenFOAM-*/etc/bashrc
#
# Description
#     Setup for ENSIGHT
#
#------------------------------------------------------------------------------

# Fallback value
[ -d "$CEI_HOME" ] || export CEI_HOME=/usr/local/ensight/CEI

if [ -r $CEI_HOME ]
then

    # Special treatment for 32bit OpenFOAM and 64bit Ensight
    [ "$WM_ARCH-$(uname -m)" = linux-x86_64 ] && export CEI_ARCH=linux_2.6_32

    # Add to path if required
    if [ "$CEI_HOME/bin/ensight" != "$(command -v ensight)" ]
    then
        export PATH=$CEI_HOME/bin:$PATH
    fi

    export ENSIGHT9_INPUT=dummy
    export ENSIGHT9_READER=$FOAM_LIBBIN
else
    unset CEI_HOME
fi

#------------------------------------------------------------------------------
