| 1 |
|
| 2 |
2. A new @xxx command is create. |
| 3 |
@pl |
| 4 |
which should be put in $AUTO_DIR/cmds/ |
| 5 |
the graphics tool is called `plot3d' --- the coin3d version |
| 6 |
which should be put in $AUTO_DIR/bin/ |
| 7 |
The @pl command is: |
| 8 |
|
| 9 |
if ( test $# -eq 0 ) then |
| 10 |
$AUTO_DIR/bin/plot3d |
| 11 |
elif ( test $# -eq 1 ) then |
| 12 |
$AUTO_DIR/bin/plot3d $1 |
| 13 |
elif ( test $# -eq 2 ) then |
| 14 |
$AUTO_DIR/bin/plot3d $1 $2 |
| 15 |
elif ( test $# -eq 3 ) then |
| 16 |
$AUTO_DIR/bin/plot3d $1 $2 $3 |
| 17 |
else |
| 18 |
echo "Illegal command" |
| 19 |
fi |
| 20 |
|
| 21 |
|
| 22 |
3. insert following code to .autorc |
| 23 |
pl3 =commandPlot3D |
| 24 |
plot3D =commandPlot3D |
| 25 |
|
| 26 |
4. insert following code to $AUTO_DIR/python/AUTOCommands.py |
| 27 |
|
| 28 |
class commandPlot3D(command): |
| 29 |
""" Draw the solution or/and bifurcation using the 3D graphics tool |
| 30 |
|
| 31 |
Type FUNC() to draw the fort.* file in current directory. |
| 32 |
Other formats for this command are: |
| 33 |
FUNC('mu') --- draw the fort.* files with the given mu. |
| 34 |
FUNC('mu','file') --- draw the *.file with the given mu. |
| 35 |
the *.file are supposed to be in |
| 36 |
the current dir |
| 37 |
FUNC('mu','path', 'file') --- draw the *.file with the given mu. |
| 38 |
the *.file are supposed to be in |
| 39 |
the dir on the path 'path' |
| 40 |
""" |
| 41 |
|
| 42 |
def __init__(self, mu= ' ', path= ' ', file=' '): |
| 43 |
self.filename_list = mu + ' ' + path + ' ' + file |
| 44 |
|
| 45 |
def __call__(self): |
| 46 |
os.system("@pl %s " % self.filename_list) |
| 47 |
return '' |
| 48 |
|
| 49 |
5. structure of directories. |
| 50 |
|
| 51 |
|
| 52 |
$AUTO/ |
| 53 |
| |
| 54 |
|-- plot3d --- keep the makefile and .rc |
| 55 |
| | |
| 56 |
| |--- src ---- keep source file(.c++) .h, Makefile, .rc) |
| 57 |
| |--- include --- keep the headers |
| 58 |
| |--- lib --- keep the object file |
| 59 |
| |--- bin --- keep the executable |
| 60 |
| |--- widgets --- keep the widgets |
| 61 |
| |--- doc ---- keep the help/manual |
| 62 |
| |
| 63 |
|--- bin |
| 64 |
|--- cmds |
| 65 |
|--- python |
| 66 |
|
| 67 |
The default plot3d.rc should be put at $AUTO/. |
| 68 |
The script @pl3d should be put at $AUTO/cmds/. |
| 69 |
The executable plot3d should be put at $AUTO/bin/. |
| 70 |
The widget should be put at $AUTO/plot3d/widgets/. |
| 71 |
|
| 72 |
DEPENDENCE: |
| 73 |
The Coin3d should be put at /usr/local/lib |
| 74 |
libCoin.so.40.0.0 libsimage.so.20.2.2 libSoXt.so.0.0.0 |
| 75 |
The above three lib must be installed. |
| 76 |
|