Changeset 27115


Ignore:
Timestamp:
06/29/22 03:29:22 (3 years ago)
Author:
bdef
Message:

CHG: Syntax and matlab consistency fixes

Location:
issm/trunk-jpl/test/NightlyRun
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/test/NightlyRun/test2002.py

    r26842 r27115  
    1111
    1212
     13# Mesh earth
     14#
     15# NOTE: In MATLAB, we currently use cached mesh to account for differences in
     16# mesh generated under Linux versus under macOS
     17#
    1318md = model()
    1419
    15 ## Generate and save mesh (need to uncomment import of gmshplanet as well)
     20# Generate and save mesh (need to uncomment import of gmshplanet as well)
    1621# md.mesh = gmshplanet('radius', 6.371012 * 1e3, 'resolution', 700.) # 700 km resolution mesh
    1722# with open('../Data/SlcTestMesh.pkl', 'wb') as slc_test_mesh_file:
     
    6065
    6166icemask = np.ones((md.mesh.numberofvertices, ))
    62 # NOTE: Need to be careful here: when using multidimensional array elements to 
     67# NOTE: Need to be careful here: when using multidimensional array elements to
    6368# address a one-dimensional array in MATLAB, only first column is used
    6469#
  • issm/trunk-jpl/test/NightlyRun/test2006.py

    r26842 r27115  
    1818md = model()
    1919md.cluster = generic('name', gethostname(), 'np', 5)
     20md.mesh = gmshplanet('radius', 6.371012 * 1e3, 'resolution', 700.)  #700 km resolution mesh
    2021
    2122# Load precomputed mesh
     
    163164for i in range(len(locations)):
    164165    if i == 0:
    165         md.outputdefinition.definitions = [
    166             nodalvalue(
    167                 'name',             'SNode',
    168                 'definitionstring', 'Outputdefinition1',
    169                 'model_string',     'Sealevel',
    170                 'node',             locations[i]
    171             )
    172         ]
     166        md.outputdefinition.definitions = [nodalvalue('name', 'SNode',
     167                                                      'definitionstring', 'Outputdefinition1',
     168                                                      'model_string', 'Sealevel',
     169                                                      'node', locations[i])]
    173170    else:
    174171        md.outputdefinition.definitions.append(
    175             nodalvalue(
    176                 'name',             'SNode',
    177                 'definitionstring', 'Outputdefinition' + str(i + 1),
    178                 'model_string',     'Sealevel',
    179                 'node',             locations[i]
    180             )
    181         )
     172            nodalvalue('name', 'SNode',
     173                       'definitionstring', 'Outputdefinition' + str(i + 1),
     174                       'model_string', 'Sealevel',
     175                       'node', locations[i]))
    182176#}}}
    183177
    184178# Algorithm #{{{
    185179md.qmu.method = dakota_method.dakota_method('nond_samp')
    186 md.qmu.method = dmeth_params_set(
    187     md.qmu.method,
    188     'seed',             1234,
    189     'samples',          10,
    190     'sample_type',      'random'
    191 )
     180md.qmu.method = dmeth_params_set(md.qmu.method,
     181                                 'seed', 1234,
     182                                 'samples', 10,
     183                                 'sample_type', 'random')
    192184md.qmu.output = 1
    193185#}}}
     
    235227
    236228# Compare statistics with our own here
    237 svalues = mds.results.StatisticsSolution[-1].SealevelSamples # all values at locations
     229svalues = mds.results.StatisticsSolution[-1].SealevelSamples  # all values at locations
    238230
    239231dvalues = np.zeros((md.qmu.method.params.samples, len(locations)))
  • issm/trunk-jpl/test/NightlyRun/test417.py

    r25135 r27115  
    4141    'mean', np.ones((npart, 1)),
    4242    'stddev', .01 * np.ones((npart, 1)),
    43     'partition', partition
    44     )
     43    'partition', partition)
    4544
    4645#responses
    47 md.qmu.responses.MaxVel = response_function.response_function('descriptor','MaxVel')
    48 md.qmu.responses.IceVolume = response_function.response_function('descriptor','IceVolume')
    49 md.qmu.responses.MassFlux1 = response_function.response_function('descriptor','indexed_MassFlux_1')
    50 md.qmu.responses.MassFlux2 = response_function.response_function('descriptor','indexed_MassFlux_2')
    51 md.qmu.responses.MassFlux3 = response_function.response_function('descriptor','indexed_MassFlux_3')
    52 md.qmu.responses.MassFlux4 = response_function.response_function('descriptor','indexed_MassFlux_4')
    53 md.qmu.responses.MassFlux5 = response_function.response_function('descriptor','indexed_MassFlux_5')
    54 md.qmu.responses.massFlux6 = response_function.response_function('descriptor','indexed_MassFlux_6')
    55 md.qmu.responses.massFlux7 = response_function.response_function('descriptor','indexed_MassFlux_7')
     46md.qmu.responses.MaxVel = response_function.response_function('descriptor', 'MaxVel')
     47#md.qmu.responses.IceVolume = response_function.response_function('descriptor', 'IceVolume')  #commented for matlab consistency
     48md.qmu.responses.MassFlux1 = response_function.response_function('descriptor', 'indexed_MassFlux_1')
     49md.qmu.responses.MassFlux2 = response_function.response_function('descriptor', 'indexed_MassFlux_2')
     50md.qmu.responses.MassFlux3 = response_function.response_function('descriptor', 'indexed_MassFlux_3')
     51md.qmu.responses.MassFlux4 = response_function.response_function('descriptor', 'indexed_MassFlux_4')
     52md.qmu.responses.MassFlux5 = response_function.response_function('descriptor', 'indexed_MassFlux_5')
     53md.qmu.responses.massFlux6 = response_function.response_function('descriptor', 'indexed_MassFlux_6')
     54md.qmu.responses.massFlux7 = response_function.response_function('descriptor', 'indexed_MassFlux_7')
    5655
    5756#mass flux profiles
  • issm/trunk-jpl/test/NightlyRun/test440.py

    r26638 r27115  
    3030
    3131#variables
    32 md.qmu.variables.rho_ice = normal_uncertain.normal_uncertain(
    33     'descriptor', 'MaterialsRhoIce',
    34     'mean', 1,
    35     'stddev', 0.01
    36     )
     32md.qmu.variables.rho_ice = normal_uncertain.normal_uncertain('descriptor', 'MaterialsRhoIce',
     33                                                             'mean', 1,
     34                                                             'stddev', 0.01)
    3735
    3836#responses
    39 md.qmu.responses.MaxVel = response_function.response_function(
    40     'descriptor', 'scaled_Thickness',
    41     'partition', partition
    42     )
     37md.qmu.responses.MaxVel = response_function.response_function('descriptor', 'scaled_Thickness',
     38                                                              'partition', partition)
    4339
    4440#method
  • issm/trunk-jpl/test/NightlyRun/test446.py

    r27031 r27115  
    1515md.cluster = generic('name', gethostname(), 'np', 3)
    1616md.stressbalance.requested_outputs = ['default', 'VxSurface', 'VySurface', 'VxShear', 'VyShear', 'VxBase', 'VyBase']
    17 md = SetMOLHOBC(md);
     17md = SetMLHOBC(md)
    1818md = solve(md, 'Stressbalance')
    1919
Note: See TracChangeset for help on using the changeset viewer.