Changeset 25836 for issm/trunk/src/m/qmu/dakota_in_data.py
- Timestamp:
- 12/08/20 08:45:53 (4 years ago)
- Location:
- issm/trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk
- Property svn:mergeinfo changed
-
issm/trunk/src
- Property svn:mergeinfo changed
-
issm/trunk/src/m/qmu/dakota_in_data.py
r24313 r25836 9 9 def dakota_in_data(dmeth, variables, responses, dparams, filei, *args): 10 10 ''' 11 define the data to write the dakota .in and .m files. 11 DAKOTA_IN_DATA - define the data to write the dakota .in and .m files. 12 13 Usage: 14 [] = dakota_in_data(dmeth, variables, responses, dparams, filei, *args) 12 15 13 [] = dakota_in_data(dmeth, variables, responses, dparams, filei, *args) 16 where the required input is: 17 dmeth (dakota_method, method class object) 18 variables (structure array, variable class objects) 19 responses (structure array, response class objects) 20 dparams (structure array, method - independent parameters) 21 filei (character, name of .in and .m files) 14 22 15 where the required input is: 16 dmeth (dakota_method, method class object) 17 variables (structure array, variable class objects) 18 responses (structure array, response class objects) 19 dparams (structure array, method - independent parameters) 20 filei (character, name of .in and .m files) 23 Params may be empty, in which case defaults will be used. 21 24 22 params may be empty, in which case defaults will be used. 25 The optional args are passed directly through to the QmuUpdateFunctions 26 brancher to be used by the analysis package. For example, this could be 27 model information. 23 28 24 the optional args are passed directly through to the 25 QmuUpdateFunctions brancher to be used by the analysis 26 package. for example, this could be model information. 29 This function defines the data to write the dakota .in and .m files. It is 30 necessary for multiple reasons. First, it collects the parameters and 31 applies some defaults that are unique to the environment. Second, some 32 analysis package ariables and/or responses may be treated differently by 33 Dakota. For example, an analysis package variable may be defined as an 34 array, so the QmuSetupDesign brancher will create Dakota variables for each 35 element of the array. Finally, it calls the functions to write the .in and 36 .m files. this function is independent of the particular analysis package. 27 37 28 this function defines the data to write the dakota .in and 29 .m files. it is necessary for multiple reasons. first, 30 it collects the parameters and applies some defaults that 31 are unique to the environment. second, some analysis package 32 variables and / or responses may be treated differently by 33 dakota. for example, an analysis package variable may be 34 defined as an array, so the QmuSetupDesign brancher will 35 create dakota variables for each element of the array. 36 finally it calls the functions to write the .in and .m files. 37 this function is independent of the particular analysis 38 package. 39 40 this data would typically be generated by a matlab script 41 for a specific model, using the method, variable, and 42 response class objects. 43 ''' 38 This data would typically be generated by a MATLAB script for a specific 39 model, using the method, variable, and response class objects. 40 ''' 44 41 45 42 # parameters … … 60 57 61 58 if strcmpi(params.analysis_driver, 'matlab') and params.analysis_components == '': 62 [pathstr, name, ext]= fileparts(filei)59 pathstr, name, ext = fileparts(filei) 63 60 params.analysis_components = fullfile(pathstr, name + '.py') 64 61
Note:
See TracChangeset
for help on using the changeset viewer.