/[ascend]/trunk/models/plotbvp.a4c
ViewVC logotype

Diff of /trunk/models/plotbvp.a4c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1157 by aw0a, Fri Oct 29 20:54:12 2004 UTC revision 1158 by johnpye, Tue Jan 16 12:44:13 2007 UTC
# Line 1  Line 1 
1    (*  ASCEND modelling environment
2        Copyright (C) 1997 Benjamin Andrew Allan
3        Copyright (C) 2006 Carnegie Mellon University
4    
5        This program is free software; you can redistribute it and/or modify
6        it under the terms of the GNU General Public License as published by
7        the Free Software Foundation; either version 2, or (at your option)
8        any later version.
9    
10        This program is distributed in the hope that it will be useful,
11        but WITHOUT ANY WARRANTY; without even the implied warranty of
12        MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13        GNU General Public License for more details.
14        
15        You should have received a copy of the GNU General Public License
16        along with this program; if not, write to the Free Software
17        Foundation, Inc., 59 Temple Place - Suite 330,
18        Boston, MA 02111-1307, USA.
19    *)
20  REQUIRE "bvp.a4l";  REQUIRE "bvp.a4l";
 (* => bvp.a4l, atoms.a4l, measures.a4l, system.a4l, basemodel.a4l *)  
21  REQUIRE "plot.a4l";  REQUIRE "plot.a4l";
 (* => plot.a4l, atoms.a4l, measures.a4l, system.a4l, basemodel.a4l *)  
 PROVIDE "plotbvp.a4c";  
22  (*  (*
23   * This file is part of the ASCEND Modeling Library and is released      This model demonstrates how to make a plot using a boundary value problem
24   * under the GNU Public License as described at the end of this file.      (BVP).
25   *)  
26        by Benjamin Allan, May 17 1998.
27  MODEL plot_bvp_demo1;  
28  NOTES      @NOTE we avoid tangling plot modeling with the mathematics @ENDNOTE
29  'purpose' SELF {  *)
30  This MODEL demonstrates how to make a plot out of a bvp MODEL.  
31  }  MODEL plotbvp;
 'author' SELF {Benjamin Allan}  
 'created' SELF {May 17, 1998}  
 'revision' SELF {$Revision: 1.2 $}  
 'comment' SELF {  
 Once again, we avoid tangling plot modeling with the mathematics.}  
 END NOTES;  
32    
33      bt IS_A bvp_test;      bt IS_A bvp_test;
34    
# Line 41  END NOTES; Line 51  END NOTES;
51    
52  METHODS  METHODS
53    
54  METHOD default_self;      METHOD default_self;
55      RUN Plot_Y.default_self;          RUN Plot_Y.default_self;
56      RUN Y_curve.default_self;          RUN Y_curve.default_self;
57      RUN bt.default_self;          RUN bt.default_self;
58      Plot_Y.title := 'd/dx = 2x exp(-2t) cos(t)';          Plot_Y.title := 'd/dx = 2x exp(-2t) cos(t)';
59      Plot_Y.XLabel := 'time t';          Plot_Y.XLabel := 'time t';
60      Plot_Y.YLabel := 'x';          Plot_Y.YLabel := 'x';
61      Y_curve.legend := 'd/dx';          Y_curve.legend := 'd/dx';
62  END default_self;      END default_self;
63    
64  METHOD check_self;      METHOD check_self;
65      RUN Plot_Y.check_self;          RUN Plot_Y.check_self;
66      RUN Y_curve.check_self;          RUN Y_curve.check_self;
67      RUN bt.check_self;          RUN bt.check_self;
68  END check_self;      END check_self;
69    
70  METHOD scale_self;      METHOD scale_self;
71      RUN bt.scale_self;          RUN bt.scale_self;
72  END scale_self;      END scale_self;
73    
74  METHOD bound_self;      METHOD bound_self;
75      RUN Plot_Y.bound_self;          RUN Plot_Y.bound_self;
76      RUN Y_curve.bound_self;          RUN Y_curve.bound_self;
77      RUN bt.bound_self;          RUN bt.bound_self;
78  END bound_self;      END bound_self;
79    
80  METHOD default_all;      METHOD default_all;
81      RUN default_self;          RUN default_self;
82  END default_all;      END default_all;
83    
84  METHOD check_all;      METHOD check_all;
85      RUN check_self;          RUN check_self;
86  END check_all;      END check_all;
87    
88  METHOD bound_all;      METHOD bound_all;
89      RUN bound_self;          RUN bound_self;
90  END bound_all;      END bound_all;
91    
92  METHOD scale_all;      METHOD scale_all;
93      RUN scale_self;          RUN scale_self;
94  END scale_all;      END scale_all;
95    
96  METHOD specify;      METHOD specify;
97      RUN bt.reset;          RUN bt.reset;
98  END specify;      END specify;
99    
100        METHOD on_load;
101            RUN reset;
102        END on_load;
103    
104  END plot_bvp_demo1;  END plotbvp;
105    (* :ex: set ts=4: *)
   
 (*  
  *  plotbvp.a4c  
  *  by Ben Allan  
  *  May 1998  
  *  Part of the ASCEND Library  
  *  $Date: 1998/06/17 19:21:54 $  
  *  $Revision: 1.2 $  
  *  $Author: mthomas $  
  *  $Source: /afs/cs.cmu.edu/project/ascend/Repository/models/plotbvp.a4c,v $  
  *  
  *  This file is part of the ASCEND Modeling Library.  
  *  
  *  Copyright (C) 1997 Benjamin Andrew Allan  
  *  
  *  The ASCEND Modeling Library is free software; you can redistribute  
  *  it and/or modify it under the terms of the GNU General Public  
  *  License as published by the Free Software Foundation; either  
  *  version 2 of the License, or (at your option) any later version.  
  *  
  *  The ASCEND Modeling Library is distributed in hope that it  
  *  will be useful, but WITHOUT ANY WARRANTY; without even the implied  
  *  warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
  *  See the GNU General Public License for more details.  
  *  
  *  You should have received a copy of the GNU General Public License  
  *  along with the program; if not, write to the Free Software  
  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139 USA.  Check  
  *  the file named COPYING.  
  *)  

Legend:
Removed from v.1157  
changed lines
  Added in v.1158

john.pye@anu.edu.au
ViewVC Help
Powered by ViewVC 1.1.22