Differences From Artifact [1106fa706f]:
- Executable file mttroot/mtt/cc/def_m2h.sh — part of check-in [f282a62064] at 2014-07-12 22:30:45 on branch origin/master — Declare size of vectors (mttnu,mttnx,etc) which now appear in ode code (user: geraint@users.sourceforge.net, size: 1670) [annotate] [blame] [check-ins using] [more...]
To Artifact [e00c7a936e]:
- Executable file mtt/cc/def_m2h.sh — part of check-in [af3953deae] at 2021-03-01 11:39:42 on branch master — Cleanup repository after cvs2git conversion. (user: jeff@gridfinity.com, size: 1863) [annotate] [blame] [check-ins using] [more...]
- Executable file
mttroot/mtt/cc/def_m2h.sh
— part of check-in
[8e2a1aea1b]
at
2014-07-13 13:53:52
on branch origin/master
— 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 (user: geraint@users.sourceforge.net, size: 1863) [annotate] [blame] [check-ins using]
︙ | |||
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 | 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 | + + + - + + + | get_array_size () { vec=$1 gawk -v vec=${vec} '($1 == vec && $2 == "=") { print $3 }' | sed s/\;// } echo "/* ${SYS}_def.h, generated by MTT on `date` */" > ${OUT} echo "" >> ${OUT} echo "#ifndef HAVE_${SYS}_DEF_H" >> ${OUT} echo "#define HAVE_${SYS}_DEF_H" >> ${OUT} 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} |