Overview
Comment:Declare size of vectors (mttnu,mttnx,etc) which now appear in ode code
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | origin/master | trunk
Files: files | file ages | folders
SHA3-256: f282a6206447d97c9bd351779e84b04a1a734fedb19c04989da2031b7a233944
User & Date: geraint@users.sourceforge.net on 2014-07-12 22:30:45
Other Links: branch diff | manifest | tags
Context
2014-07-13
13:53:52
Fixed some problems with generation of C++ code.

Representations such as ode now appear to have multiple outputs (mttdx,mtty) listed in mtt_header, so the write_cc_header parses the string and only returns the first one.

Vector sizes mttnu, mttnx, etc. now appear in the code of sys_ode.m etc., so they are declared as static int in sys_def.h.

The following now works properly on Ubuntu 12: mtt -cc -i euler -o rc gnuplot view check-in: 8e2a1aea1b user: geraint@users.sourceforge.net tags: origin/master, trunk

2014-07-12
22:30:45
Declare size of vectors (mttnu,mttnx,etc) which now appear in ode code check-in: f282a62064 user: geraint@users.sourceforge.net tags: origin/master, trunk
21:43:48
Fixed curly brackets around strong and removed at signs from log of mtt.texi check-in: 8566613971 user: geraint@users.sourceforge.net tags: origin/master, trunk
Changes

Modified mttroot/mtt/cc/def_m2h.sh from [8879414d17] to [1106fa706f].

1
2
3








4
5
6
7
8
9
10
#! /bin/sh
# $Id$
# $Log$








# Revision 1.2  2002/04/28 18:58:06  geraint
# Fixed [ 549658 ] awk should be gawk.
# Replaced calls to awk with call to gawk.
#
# Revision 1.1  2000/12/28 09:46:05  peterg
# put under RCS
#



>
>
>
>
>
>
>
>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#! /bin/sh
# $Id$
# $Log$
# Revision 1.3  2002/05/15 14:22:25  geraint
# Code for Simulink S-function target written direct to sfun.cc instead of
# calling .mexglx files. This eliminates the sfun dependency on Octave
# ColumnVectors. sys_sfun.cc should build directly on a MS Windows machine
# (can't test this yet).
#
# added sfun.zip target to create source code to export.
#
# Revision 1.2  2002/04/28 18:58:06  geraint
# Fixed [ 549658 ] awk should be gawk.
# Replaced calls to awk with call to gawk.
#
# Revision 1.1  2000/12/28 09:46:05  peterg
# put under RCS
#
36
37
38
39
40
41
42
43

44
45
46
 echo ""								>> ${OUT}
 echo "const int MTTNU   = `cat ${IN} | get_array_size nu`;"		>> ${OUT}
 echo "const int MTTNX   = `cat ${IN} | get_array_size nx`;"		>> ${OUT}
 echo "const int MTTNY   = `cat ${IN} | get_array_size ny`;"		>> ${OUT}
 echo "const int MTTNZ   = `cat ${IN} | get_array_size nz`;"		>> ${OUT}
 echo "const int MTTNYZ  = `cat ${IN} | get_array_size nyz`;"		>> ${OUT}
 echo "const int MTTNPAR = `wc -l ${SYM} | gawk '{ print $1 }'`;"      	>> ${OUT}












|
>



44
45
46
47
48
49
50
51
52
53
54
55
 echo ""								>> ${OUT}
 echo "const int MTTNU   = `cat ${IN} | get_array_size nu`;"		>> ${OUT}
 echo "const int MTTNX   = `cat ${IN} | get_array_size nx`;"		>> ${OUT}
 echo "const int MTTNY   = `cat ${IN} | get_array_size ny`;"		>> ${OUT}
 echo "const int MTTNZ   = `cat ${IN} | get_array_size nz`;"		>> ${OUT}
 echo "const int MTTNYZ  = `cat ${IN} | get_array_size nyz`;"		>> ${OUT}
 echo "const int MTTNPAR = `wc -l ${SYM} | gawk '{ print $1 }'`;"      	>> ${OUT}
 echo ""								>> ${OUT}
 echo "int mttnu, mttnx, mttny, mttnyz, mttnz;"				>> ${OUT}




MTT: Model Transformation Tools
GitHub | SourceHut | Sourceforge | Fossil RSS ]