Overview
Context
Changes
Added mttroot/mtt/cc/Makefile version [5dcbc26dbe].
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
|
.POSIX:
ifeq (0,1)
CC=g++
CFLAGS+=-static
OCTAVE_LIBS_PATH=-L/usr/local/lib/octave
OCTAVE_LIBRARIES=-loctave -lcruft -lm -lncurses -ldl -lstdc++ -lc -lkpathsea -lreadline -lf2c
%.exe: %.cc
$(CC) $< $(CFLAGS) $(OCTAVE_LIBS_PATH) $(OCTAVE_LIBRARIES) -o $@
%.oct: %.cc
mkoctfile $<
endif
all: $(sys)_$(rep).cc
parser: parse_m2cc.cc
g++ $< $(CFLAGS) -o parser
ifeq ($(rep),ode2odes)
$(sys)_ode2odes.cc: ode2odes.cc
cat ode2odes.cc | sed 's/\$$/$(sys)/' > $(sys)_ode2odes.cc
else
$(sys)_$(rep).cc: $(sys)_def.h $(sys)_sympar.h $(sys)_def.r $(sys)_$(rep).m
mtt_m2cc.sh ${sys} ${rep} parser
endif
$(sys)_def.h: $(sys)_def.m $(sys)_sympar.txt
def_m2h.sh $(sys)
$(sys)_sympar.h: $(sys)_sympar.txt
sympar_txt2h.sh $(sys)
$(sys)_def.m:
mtt $(sys) def m
# getsize needs def.r
$(sys)_def.r:
mtt $(sys) def r
$(sys)_sympar.txt:
mtt $(sys) sympar txt
|
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
Added mttroot/mtt/cc/def_m2h.sh version [48a6557660].
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
|
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
|
#! /bin/sh
# $Id$
# $Log$
# Revision 1.3 2000/12/05 12:13:52 peterg
# Changed function name to name()
#
# Revision 1.2 2000/12/04 12:04:46 peterg
# Changed $() to `` for sh compatibility -- geraint
#
# Revision 1.1 2000/12/04 12:02:23 peterg
# Initial revision
#
# Revision 1.1 2000/10/31 04:32:28 geraint
# Initial revision
#
SYS=$1
IN=${SYS}_def.m
SYM=${SYS}_sympar.txt
OUT=${SYS}_def.h
get_array_size ()
{
vec=$1
awk -v vec=${vec} '($1 == vec && $2 == "=") { print $3 }' | sed s/\;//
}
echo "// ${SYS}_def.h, generated by MTT on `date`" > ${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} | awk '{ print $1 }'`;" >> ${OUT}
cat <<EOF >> ${OUT}
// typedefs won't work because it is illegal to initialise ColumnVector in typedef
// use "ColumnVector mttx (MTTNX);" until the proper classes are ready
#if 0 // NB: These classes are not ready for use yet!
class InputVector : public ColumnVector
{
public:
InputVector (void) : ColumnVector (MTTNU) { ; }
};
class StateVector : public ColumnVector
{
public:
StateVector (void) : ColumnVector (MTTNX) { ; }
};
class OutputVector : public ColumnVector
{
public:
OutputVector (void) : ColumnVector (MTTNY) { ; }
};
class ParameterVector : public ColumnVector
{
public:
ParameterVector (void) : ColumnVector (MTTNPAR) { ; }
};
class StateMatrix : public Matrix
{
public:
StateMatrix (void) : Matrix (MTTNX, MTTNX) { ; }
};
#endif
EOF
|
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
Added mttroot/mtt/cc/include/Bracket.hh version [206254c8d0].