Contrib equationReader/Uninstallation
From OpenFOAMWiki
Contents
1 The stand-alone (new) version
1.1 Am I running the stand-alone (new) version?
Does src/equationReader/ exist? If so, then you have the stand-alone version.
1.2 How do I uninstall the stand-alone (new) version?
Enter the following commands into your console:
rm -rf $WM_PROJECT_DIR/src/equationReader rm -rf $WM_PROJECT_DIR/applications/solvers/equationReader rm -rf $WM_PROJECT_DIR/tutorials/equationReader
The stand-alone version of equationReader has been uninstalled.
2 The integrated (old) version
Since the integrated version of equationReader is compiled into the core of OpenFOAM, uninstallation requires file editting and recompiling of OpenFOAM.so.
2.1 Am I running the integrated (old) version?
Does src/OpenFOAM/db/dictionary/equation/ exist? If so, then you have the integrated version.
2.2 How do I uninstall the integrated (old) version?
To uninstall the integrated equationReader:
1. Edit the src/OpenFOAM/Make/files file:
- Find and delete the bold lines below:
functionEntries = $(dictionary)/functionEntries $(functionEntries)/functionEntry/functionEntry.C $(functionEntries)/includeEntry/includeEntry.C $(functionEntries)/includeIfPresentEntry/includeIfPresentEntry.C $(functionEntries)/inputModeEntry/inputModeEntry.C $(functionEntries)/removeEntry/removeEntry.C equation = $(dictionary)/equation $(equation)/equationReader/equationReader.C $(equation)/equationReader/equationReaderIO.C $(equation)/equation/equation.C $(equation)/equation/equationIO.C $(equation)/equationOperation/equationOperation.C IOEquationReader = db/IOobjects/IOEquationReader $(IOEquationReader)/IOEquationReader.C $(IOEquationReader)/IOEquationReaderIO.C IOdictionary = db/IOobjects/IOdictionary $(IOdictionary)/IOdictionary.C $(IOdictionary)/IOdictionaryIO.C
2. Edit the src/OpenFOAM/primitives/Scalar/Scalar.C file:
- Near the top, delete this line:
#include "equationReader.H"
- Near line 84, delete the bold section below:
if (t.isNumber()) { s = t.number(); } else if (t.isString()) { // DLFG 2010-07-21 Modifications for equationReader equationReader eqn; eqn.readEquation ( equation ( "fromScalar", t.stringToken() ) ); s = eqn.evaluate(0).value(); } else { is.setBad(); FatalIOErrorIn("operator>>(Istream&, Scalar&)", is) << "wrong token type - expected Scalar found " << t.info() << exit(FatalIOError); return is; }
3. From the terminal, enter the following commands:
rm -rf $WM_PROJECT_DIR/src/OpenFOAM/db/dictionary/equation rm -rf $WM_PROJECT_DIR/src/OpenFOAM/db/IOobjects/IOEquationReader rm -rf $WM_PROJECT_DIR/src/OpenFOAM/lnInclude rm -rf $WM_PROJECT_DIR/applications/solvers/equationReader rm -rf $WM_PROJECT_DIR/tutorials/equationReader cd $WM_PROJECT_DIR/src/OpenFOAM rmdepall wmake libso
The integrated version of equationReader has been uninstalled.