Changes between Version 2 and Version 3 of CalcObject
- Timestamp:
- Jun 11, 2007, 2:34:46 PM (15 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
CalcObject
v2 v3 1 = CalcObject- External Calculation Objects =1 = Plugin - External Calculation Objects = 2 2 3 3 [wiki:EMSO] is an equation-based tool, therefore most type of mathematical … … 12 12 Exactly for the above cases, EMSO provides a mechanism where the user can ''plug'' code written in C, C++, or FORTRAN into the models. 13 13 14 == Using a CalcObject's ==14 == Using a Plugin's == 15 15 16 In order to ''plug'' external calculation code into the models the user needs to declare a ''special'' parameter, a CalcObject:16 In order to ''plug'' external calculation code into the models the user needs to declare a ''special'' parameter, a Plugin: 17 17 18 18 {{{ … … 20 20 Model stream_therm as stream 21 21 PARAMETERS 22 PP as CalcObject (Brief = "External Physical Properties");22 PP as Plugin (Brief = "External Physical Properties", Type = "PP"); 23 23 24 24 EQUATIONS … … 27 27 }}} 28 28 29 In the above example (see [../browser/mso/eml/streams.mso streams.mso]), the parameter '''PP''' is the CalcObject.29 In the above example (see [../browser/mso/eml/streams.mso streams.mso]), the parameter '''PP''' is the Plugin. 30 30 31 == CalcObjectMethods ==31 == Plugin Methods == 32 32 33 Once the CalcObjectwas declared, the user can '''call''' its methods.33 Once the Plugin was declared, the user can '''call''' its methods. 34 34 Methods can have arguments and are called using the '''dot''' notation, eg: 35 35 … … 40 40 41 41 In the above '''call''' three arguments are supplied: T, P, and z. 42 Before running a simulation, EMSO will check if all methods used in models actually were implemented by the CalcObject.42 Before running a simulation, EMSO will check if all methods used in models actually were implemented by the Plugin. 43 43 EMSO also check if the number of arguments and its units of measurement are correct.