Changeset 25500


Ignore:
Timestamp:
08/31/20 17:04:13 (5 years ago)
Author:
jdquinn
Message:

BUG: Check if attribute exists

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/m/classes/model.py

    r25499 r25500  
    915915        if np.size(md.mesh.scale_factor) == md.mesh.numberofvertices:
    916916            mesh.scale_factor = project2d(md, md.mesh.scale_factor, 1)
    917         if not np.isnan(md.mesh.vertexonboundary).all():
     917        if hasattr(md.mesh, 'vertexonboundary') and not np.isnan(md.mesh.vertexonboundary).all():
    918918            mesh.vertexonboundary= project2d(md, md.mesh.vertexonboundary, 1)
    919         if not np.isnan(md.mesh.elementonboundary).all():
     919        if hasattr(md.mesh, 'elementonboundary') and not np.isnan(md.mesh.elementonboundary).all():
    920920            mesh.elementonboundary = project2d(md, md.mesh.elementonboundary, 1)
    921921        md.mesh = mesh
Note: See TracChangeset for help on using the changeset viewer.