Changeset 27845


Ignore:
Timestamp:
07/22/23 14:39:45 (20 months ago)
Author:
jdquinn
Message:

CHG: Excluding failing tests until MEX files can be compiled natively under Silicon and differences in generated meshes can be debugged

Location:
issm/trunk-jpl
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/jenkins/mac-silicon-solid_earth

    r27810 r27845  
    100100# - Excluding 2012 until it can be looked at by Eric ("FindParam error message: Parameter HydrologyModel not set")
    101101# - Excluding 2091 until it can be debugged (resource starvation)
     102# - Excluding 2110:2113 until we can compile MEX modules natively for Silicon and then can debug differences in mesh generation between different platforms
    102103#
    103104MATLAB_NROPTIONS="'benchmark','slc','exclude',[2004 2006 2012 2051 2052 2053 2085 2424 2425]"
    104 PYTHON_NROPTIONS="--benchmark slc --exclude 2004 2006 2012 2051 2052 2053 2085 2424 2425"
     105PYTHON_NROPTIONS="--benchmark slc --exclude 2004 2006 2012 2051 2052 2053 2085 2110:2113 2424 2425"
  • issm/trunk-jpl/src/c/shared/Exp/exp.h

    r24030 r27845  
    115115        closed=xNew<bool>(nprof);
    116116
    117         /*Reaset file pointer to beginning of file: */
     117        /*Reset file pointer to beginning of file: */
    118118        fseek(fid,0,SEEK_SET);
    119119
  • issm/trunk-jpl/src/m/classes/mesh2d.m

    r24884 r27845  
    7676                function self = setdefaultparameters(self) % {{{
    7777
    78                         %the connectivity is the averaged number of nodes linked to a
    79                         %given node through an edge. This connectivity is used to initially
    80                         %allocate memory to the stiffness matrix. A value of 16 seems to
    81                         %give a good memory/time ration. This value can be checked in
    82                         %trunk/test/Miscellaneous/runme.m
     78                        %The connectivity is the average number of nodes linked to a given
     79                        %node through an edge. This connectivity is used to initially allocate
     80                        %memory to the stiffness matrix. A value of 16 seems to give a good
     81                        %memory/time ratio. This value can be checked in
     82                        %test/Miscellaneous/runme.m
    8383                        self.average_vertex_connectivity=25;
    8484                end % }}}
  • issm/trunk-jpl/src/m/classes/mesh2d.py

    r27458 r27845  
    11import numpy as np
     2from checkfield import checkfield
    23from fielddisplay import fielddisplay
    3 from checkfield import checkfield
    44import MatlabFuncs as m
    55from WriteData import WriteData
     
    77
    88class mesh2d(object):
    9     """
    10     MESH2D class definition
     9    """mesh2d class definition
    1110
    12        Usage:
    13           mesh2d = mesh2d()
     11    Usage:
     12        mesh2d = mesh2d()
    1413    """
    1514
    1615    def __init__(self):  # {{{
    17         self.x = float('NaN')
    18         self.y = float('NaN')
    19         self.elements = float('NaN')
     16        self.x = np.nan
     17        self.y = np.nan
     18        self.elements = np.nan
    2019        self.numberofelements = 0
    2120        self.numberofvertices = 0
    2221        self.numberofedges = 0
    2322
    24         self.lat = float('NaN')
    25         self.long = float('NaN')
     23        self.lat = np.nan
     24        self.long = np.nan
    2625        self.epsg = 0
    27         self.scale_factor = float('NaN')
     26        self.scale_factor = np.nan
    2827
    29         self.vertexonboundary = float('NaN')
    30         self.edges = float('NaN')
    31         self.segments = float('NaN')
    32         self.segmentmarkers = float('NaN')
    33         self.vertexconnectivity = float('NaN')
    34         self.elementconnectivity = float('NaN')
     28        self.vertexonboundary = np.nan
     29        self.edges = np.nan
     30        self.segments = np.nan
     31        self.segmentmarkers = np.nan
     32        self.vertexconnectivity = np.nan
     33        self.elementconnectivity = np.nan
    3534        self.average_vertex_connectivity = 0
    3635
    37         self.extractedvertices = float('NaN')
    38         self.extractedelements = float('NaN')
     36        self.extractedvertices = np.nan
     37        self.extractedelements = np.nan
    3938
    40     #set defaults
     39        # Set defaults
    4140        self.setdefaultparameters()
    4241
     
    4443
    4544    def __repr__(self):  # {{{
    46         string = "   2D tria Mesh (horizontal):"
     45        s = '   2D tria Mesh (horizontal):\n'
    4746
    48         string = "%s\n%s" % (string, "\n      Elements and vertices:")
    49         string = "%s\n%s" % (string, fielddisplay(self, "numberofelements", "number of elements"))
    50         string = "%s\n%s" % (string, fielddisplay(self, "numberofvertices", "number of vertices"))
    51         string = "%s\n%s" % (string, fielddisplay(self, "elements", "vertex indices of the mesh elements"))
    52         string = "%s\n%s" % (string, fielddisplay(self, "x", "vertices x coordinate [m]"))
    53         string = "%s\n%s" % (string, fielddisplay(self, "y", "vertices y coordinate [m]"))
    54         string = "%s\n%s" % (string, fielddisplay(self, "edges", "edges of the 2d mesh (vertex1 vertex2 element1 element2)"))
    55         string = "%s\n%s" % (string, fielddisplay(self, "numberofedges", "number of edges of the 2d mesh"))
     47        s += '{}\n'.format('      Elements and vertices:')
     48        s += '{}\n'.format(fielddisplay(self, 'numberofelements', 'number of elements'))
     49        s += '{}\n'.format(fielddisplay(self, 'numberofvertices', 'number of vertices'))
     50        s += '{}\n'.format(fielddisplay(self, 'elements', 'vertex indices of the mesh elements'))
     51        s += '{}\n'.format(fielddisplay(self, 'x', 'vertices x coordinate [m]'))
     52        s += '{}\n'.format(fielddisplay(self, 'y', 'vertices y coordinate [m]'))
     53        s += '{}\n'.format(fielddisplay(self, 'edges', 'edges of the 2d mesh (vertex1 vertex2 element1 element2)'))
     54        s += '{}\n'.format(fielddisplay(self, 'numberofedges', 'number of edges of the 2d mesh'))
     55        s += '\n'
     56        s += '{}\n'.format('      Properties:')
     57        s += '{}\n'.format(fielddisplay(self, 'vertexonboundary', 'vertices on the boundary of the domain flag list'))
     58        s += '{}\n'.format(fielddisplay(self, 'segments', 'edges on domain boundary (vertex1 vertex2 element)'))
     59        s += '{}\n'.format(fielddisplay(self, 'segmentmarkers', 'number associated to each segment'))
     60        s += '{}\n'.format(fielddisplay(self, 'vertexconnectivity', 'list of elements connected to vertex_i'))
     61        s += '{}\n'.format(fielddisplay(self, 'elementconnectivity', 'list of elements adjacent to element_i'))
     62        s += '{}\n'.format(fielddisplay(self, 'average_vertex_connectivity', 'average number of vertices connected to one vertex'))
     63        s += '\n'
     64        s += '{}\n'.format('      Extracted model:')
     65        s += '{}\n'.format(fielddisplay(self, 'extractedvertices', 'vertices extracted from the model'))
     66        s += '{}\n'.format(fielddisplay(self, 'extractedelements', 'elements extracted from the model'))
     67        s += '\n'
     68        s += '{}\n'.format('      Projection:')
     69        s += '{}\n'.format(fielddisplay(self, 'lat', 'vertices latitude [degrees]'))
     70        s += '{}\n'.format(fielddisplay(self, 'long', 'vertices longitude [degrees]'))
     71        s += '{}\n'.format(fielddisplay(self, 'epsg', 'EPSG code (ex: 3413 for UPS Greenland, 3031 for UPS Antarctica)'))
     72        s += '{}\n'.format(fielddisplay(self, 'scale_factor', 'Projection correction for volume, area, etc. computation'))
    5673
    57         string = "%s%s" % (string, "\n\n      Properties:")
    58         string = "%s\n%s" % (string, fielddisplay(self, "vertexonboundary", "vertices on the boundary of the domain flag list"))
    59         string = "%s\n%s" % (string, fielddisplay(self, "segments", "edges on domain boundary (vertex1 vertex2 element)"))
    60         string = "%s\n%s" % (string, fielddisplay(self, "segmentmarkers", "number associated to each segment"))
    61         string = "%s\n%s" % (string, fielddisplay(self, "vertexconnectivity", "list of elements connected to vertex_i"))
    62         string = "%s\n%s" % (string, fielddisplay(self, "elementconnectivity", "list of elements adjacent to element_i"))
    63         string = "%s\n%s" % (string, fielddisplay(self, "average_vertex_connectivity", "average number of vertices connected to one vertex"))
    64 
    65         string = "%s%s" % (string, "\n\n      Extracted model:")
    66         string = "%s\n%s" % (string, fielddisplay(self, "extractedvertices", "vertices extracted from the model"))
    67         string = "%s\n%s" % (string, fielddisplay(self, "extractedelements", "elements extracted from the model"))
    68 
    69         string = "%s%s" % (string, "\n\n      Projection:")
    70         string = "%s\n%s" % (string, fielddisplay(self, "lat", "vertices latitude [degrees]"))
    71         string = "%s\n%s" % (string, fielddisplay(self, "long", "vertices longitude [degrees]"))
    72         string = "%s\n%s" % (string, fielddisplay(self, "epsg", "EPSG code (ex: 3413 for UPS Greenland, 3031 for UPS Antarctica)"))
    73         string = "%s\n%s" % (string, fielddisplay(self, "scale_factor", "Projection correction for volume, area, etc. computation"))
    74         return string
     74        return s
    7575    # }}}
    7676
    7777    def setdefaultparameters(self):  # {{{
    78         #the connectivity is the averaged number of nodes linked to a
    79         #given node through an edge. This connectivity is used to initially
    80         #allocate memory to the stiffness matrix. A value of 16 seems to
    81         #give a good memory / time ration. This value can be checked in
    82         #trunk / test / Miscellaneous / runme.m
     78        # The connectivity is the average number of nodes linked to a given
     79        # node through an edge. This connectivity is used to initially allocate
     80        # memory to the stiffness matrix. A value of 16 seems to give a good
     81        # memory/time ratio. This value can be checked in
     82        # test/Miscellaneous/runme.m
    8383        self.average_vertex_connectivity = 25
    8484
     
    9595        md = checkfield(md, 'fieldname', 'mesh.elements', 'size', [md.mesh.numberofelements, 3])
    9696        if np.any(np.logical_not(m.ismember(np.arange(1, md.mesh.numberofvertices + 1), md.mesh.elements))):
    97             md.checkmessage("orphan nodes have been found. Check the mesh outline")
     97            md.checkmessage('orphan nodes have been found. Check the mesh outline')
    9898        md = checkfield(md, 'fieldname', 'mesh.numberofelements', '>', 0)
    9999        md = checkfield(md, 'fieldname', 'mesh.numberofvertices', '>', 0)
    100         md = checkfield(md, 'fieldname', 'mesh.average_vertex_connectivity', '>=', 9, 'message', "'mesh.average_vertex_connectivity' should be at least 9 in 2d")
     100        md = checkfield(md, 'fieldname', 'mesh.average_vertex_connectivity', '>=', 9, 'message', '\'mesh.average_vertex_connectivity\' should be at least 9 in 2d')
    101101        md = checkfield(md, 'fieldname', 'mesh.segments', 'NaN', 1, 'Inf', 1, '>', 0, 'size', [np.nan, 3])
    102102        if(np.size(self.scale_factor) > 1):
     
    104104
    105105        if solution == 'ThermalSolution':
    106             md.checkmessage("thermal not supported for 2d mesh")
     106            md.checkmessage('thermal not supported for 2d mesh')
    107107
    108108        return md
     
    110110
    111111    def domaintype(self):  # {{{
    112         return "2Dhorizontal"
     112        return '2Dhorizontal'
    113113    # }}}
    114114
     
    118118
    119119    def elementtype(self):  # {{{
    120         return "Tria"
     120        return 'Tria'
    121121    # }}}
    122122
    123123    def marshall(self, prefix, md, fid):  # {{{
    124         WriteData(fid, prefix, 'name', 'md.mesh.domain_type', 'data', "Domain" + self.domaintype(), 'format', 'String')
     124        WriteData(fid, prefix, 'name', 'md.mesh.domain_type', 'data', 'Domain' + self.domaintype(), 'format', 'String')
    125125        WriteData(fid, prefix, 'name', 'md.mesh.domain_dimension', 'data', self.dimension(), 'format', 'Integer')
    126126        WriteData(fid, prefix, 'name', 'md.mesh.elementtype', 'data', self.elementtype(), 'format', 'String')
  • issm/trunk-jpl/src/m/mesh/roundmesh.m

    r27843 r27845  
    22%ROUNDMESH - create an unstructured round mesh
    33%
    4 %   This script will generate a structured round mesh
     4%   This script will generate an unstructured round mesh
    55%   - radius     : specifies the radius of the circle in meters
    66%   - resolution : specifies the resolution in meters
  • issm/trunk-jpl/src/m/mesh/roundmesh.py

    r27843 r27845  
    1010    """roundmesh - create an unstructured round mesh
    1111
    12     This script will generate a structured round mesh
     12    This script will generate an unstructured round mesh
    1313    - radius     : specifies the radius of the circle in meters
    1414    - resolution : specifies the resolution in meters
  • issm/trunk-jpl/src/m/mesh/triangle.py

    r27799 r27845  
    1212    """triangle - create model mesh using the triangle package
    1313
    14     This routine creates a model mesh using Triangle and a domain outline, to within a certain resolution
    15     where md is a @model object, domainname is the name of an Argus domain outline file,
    16     and resolution is a characteristic length for the mesh (same unit as the domain outline
    17     unit). Riftname is an optional argument (Argus domain outline) describing rifts.
     14    This routine creates a model mesh using Triangle and a domain outline, to
     15    within a certain resolution where md is a @model object, domainname is the
     16    name of an Argus domain outline file, and resolution is a characteristic
     17    length for the mesh (same unit as the domain outline unit). Riftname is an optional argument (Argus domain outline) describing rifts.
    1818
    1919    Usage:
     
    2727    """
    2828
    29     # Figure out a characteristic area. Resolution is a node oriented concept (ex a 1000m  resolution node would
    30     # be made of 1000 * 1000 area squares).
     29    # Figure out a characteristic area. Resolution is a node oriented concept
     30    # (ex a 1000m resolution node would be made of 1000 * 1000 area squares).
    3131
    3232    if len(args) == 1:
     
    3737        resolution = args[1]
    3838
    39     # Check that mesh was not already run, and warn user:
     39    # Check that mesh was not already run, and warn user
    4040    if md.mesh.numberofelements:
    4141        choice = input('This model already has a mesh. Are you sure you want to go ahead? (y / n)')
     
    4949    area = resolution ** 2
    5050
    51     # Check that file exist (this is a very very common mistake)
     51    # Check that file exists (this is a very common mistake)
    5252    if not os.path.exists(domainname):
    5353        raise IOError('file {} not found'.format(domainname))
     
    8686    md.mesh.segmentmarkers = segmentmarkers.astype(int)
    8787
    88     # Fill in rest of fields:
     88    # Fill in rest of fields
    8989    md.mesh.numberofelements = np.size(md.mesh.elements, axis=0)
    9090    md.mesh.numberofvertices = np.size(md.mesh.x)
     
    9292    md.mesh.vertexonboundary[md.mesh.segments[:, 0:2] - 1] = 1
    9393
    94     # Now, build the connectivity tables for this mesh.
     94    # Now, build the connectivity tables for this mesh
    9595    md.mesh.vertexconnectivity = NodeConnectivity(md.mesh.elements, md.mesh.numberofvertices)
    9696    md.mesh.elementconnectivity = ElementConnectivity(md.mesh.elements, md.mesh.vertexconnectivity)
Note: See TracChangeset for help on using the changeset viewer.