Index: mttroot/mtt/doc/mtt.texi ================================================================== --- mttroot/mtt/doc/mtt.texi +++ mttroot/mtt/doc/mtt.texi @@ -14,10 +14,13 @@ @comment %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @comment Version control history @comment %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @comment $Id$ @comment $Log$ +@comment Revision 1.19 2003/10/10 22:22:18 geraint +@comment typo. +@comment @comment Revision 1.18 2003/09/07 20:41:19 geraint @comment *** empty log message *** @comment @comment Revision 1.17 2003/08/19 14:20:38 gawthrop @comment Version 5.0 of MTT @@ -419,10 +422,14 @@ * Menu-driven interface:: * Command line interface:: * Options:: * Utilities:: +Options + +* Model-specific options:: + Utilities * Help:: * Copy:: * Clean:: @@ -546,11 +553,11 @@ * Language fig (sabg.fig):: * Stripped acausal bond graph (view):: Labels (lbl) -* SS component labels :: +* SS component labels:: * Other component labels:: * Component names:: * Component constitutive relationship:: * Component arguments:: * Parameter declarations:: @@ -677,11 +684,11 @@ Extending MTT * Makefiles:: * New (DIY) representations:: -* Component library :: +* Component library:: New (DIY) representations * Makefile (DIY representations):: * Shell-script (DIY representations):: @@ -1310,10 +1317,58 @@ print version and exit @item --versions print version of mtt and components and exit @end vtable +@menu +* Model-specific options:: +@end menu + +@node Model-specific options, , Options, Options +@subsection Model specific options +@cindex Model-specific options +It is often desirable to keep the options used to build a model associated with the directory in which the model is contained, along with information about compiler options or paths to component libraries. In these cases, it is convenient to create an executable shell script, say @code{call_mtt} which sets environment variables and options before calling mtt proper, for example: +@example +@verbatim +#! /bin/sh +# call_mtt: sets model specific environment and options + +## Processor flags + +# use 32 bit Reduce +export SYMBOLIC="reduce" + +# set compiler debug and optimization options +export MTT_CXXFLAGS="${MTT_CXXFLAGS}\ + -Wall-Wno-unused -Wuninitialized\ + -O1 -march=pentiumpro -save-temps" + +## Model flags + +# use directory ../.. as base directory +export DIR=${DIR:-${PWD}/../..} + +# additional components are in directory ../comp +export MTT_COMPONENTS="${MTT_COMPONENTS}:${DIR}/comp" + +# additional constitutive relationships are in ../cr +export MTT_CRS="${MTT_CRS}:${DIR}/cr" + +# C header files in ../cr/h +export MTT_CXXINCS="${MTT_CXXINCS} -I${DIR}/cr/h" + +# call mtt with model specific options +exec ${MTTPATH}/mtt -cc -cr -i euler -D -optl -ntmpvar 1200 $* +@end verbatim +@end example + +which may then be used in place of mtt on the command line, + +@example +./call_mtt sys gnuplot view +@end example + @node Utilities, , Options, User interface @comment node-name, next, previous, up @section Utilities @cindex Utilities @pindex Utilities @@ -2399,11 +2454,13 @@ @end menu @node Dynamically linked functions, , Simulation code, Simulation code @comment node-name, next, previous, up @subsection Dynamically linked functions - +@cindex Compiling C++ files +@cindex mex files +@cindex oct files Some model representations can be compiled into dynamically loaded code (shared objects) which are compiled prior to use in other modelling and simulation environments; in particular, .oct files can be generated for use in GNU Octave (@pxref{Creating GNU Octave .oct files}) and .mex files can be generated for use in Matlab @@ -3596,11 +3653,11 @@ The old-style lbl files (@pxref{Old-style labels (lbl)}) are NO LONGER supported -- you are encouraged to convert them ASAP. @menu -* SS component labels :: +* SS component labels:: * Other component labels:: * Component names:: * Component constitutive relationship:: * Component arguments:: * Parameter declarations:: @@ -3658,11 +3715,11 @@ %% ss1 acts as a flow sensor - it imposes zero effort. ss2 SS 0,external @end example -@node Other component labels, Component names, SS component labels , Labels (lbl) +@node Other component labels, Component names, SS component labels, Labels (lbl) @comment node-name, next, previous, up @subsection Other component labels @cindex Other component labels In addition to the label there are two information fields, @@ -4626,10 +4683,13 @@ # %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% # %% Version control history # %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% # %% $Id$ # %% $Log$ +# %% Revision 1.19 2003/10/10 22:22:18 geraint +# %% typo. +# %% # %% Revision 1.18 2003/09/07 20:41:19 geraint # %% *** empty log message *** # %% # %% Revision 1.17 2003/08/19 14:20:38 gawthrop # %% Version 5.0 of MTT @@ -5566,11 +5626,11 @@ that some of these involve the creation of `make files'. @menu * Makefiles:: * New (DIY) representations:: -* Component library :: +* Component library:: @end menu @node Makefiles, New (DIY) representations, Extending MTT, Extending MTT @comment node-name, next, previous, up @section Makefiles @@ -5602,11 +5662,11 @@ mtt -q TwoLinkGMV numpar m @end example All of the files in the line stating `all:' are created when @strong{MTT} is executed (if they don't already exist). -@node New (DIY) representations, Component library , Makefiles, Extending MTT +@node New (DIY) representations, Component library, Makefiles, Extending MTT @comment node-name, next, previous, up @section New (DIY) representations @cindex New representations @cindex DIY representations @@ -6141,11 +6201,11 @@ @item mtt hinfo Brings up an html browser containing the manual @item emacs type ^h^i followed by mmtt in the command window @item browser - point browser to mtt.sf.netb + point browser to http://mtt.sf.net @end vtable @node On-line documentation, , Manual (Documentation), Documentation @section On-line documentation @cindex Components