pyissm.model.classes.mesh

Classes

mesh2d([other])

Horizontal 2D Mesh Class definition for ISSM.

mesh2dvertical([other])

Vertical 2D Mesh Class definition for ISSM.

mesh3dprisms([other])

3D Prism Mesh Class definition for ISSM.

mesh3dsurface([other])

3D Surface Mesh Class definition for ISSM.

class pyissm.model.classes.mesh.mesh2d(other=None)

Bases: manage_state

Horizontal 2D Mesh Class definition for ISSM.

This class defines the default parameters for a 2D triangular mesh used in ISSM.

Parameters:

other (any, optional) – Any other class object that contains common fields to inherit from. If values in other differ from default values, they will override the default values.

x

Vertices x coordinate [m]

Type:

ndarray, default=np.nan

y

Vertices y coordinate [m]

Type:

ndarray, default=np.nan

elements

Vertex indices of the mesh elements

Type:

ndarray, default=np.nan

numberofelements

Number of elements

Type:

int, default=0

numberofvertices

Number of vertices

Type:

int, default=0

numberofedges

Number of edges of the 2d mesh

Type:

int, default=0

lat

Vertices latitude [degrees]

Type:

ndarray, default=np.nan

long

Vertices longitude [degrees]

Type:

ndarray, default=np.nan

epsg

EPSG code (ex: 3413 for UPS Greenland, 3031 for UPS Antarctica)

Type:

int, default=0

scale_factor

Projection correction for volume, area, etc. computation

Type:

float, default=np.nan

vertexonboundary

Vertices on the boundary of the domain flag list

Type:

ndarray, default=np.nan

edges

Edges of the 2d mesh (vertex1 vertex2 element1 element2)

Type:

ndarray, default=np.nan

segments

Edges on domain boundary (vertex1 vertex2 element)

Type:

ndarray, default=np.nan

segmentmarkers

Number associated to each segment

Type:

ndarray, default=np.nan

vertexconnectivity

List of elements connected to vertex_i

Type:

ndarray, default=np.nan

elementconnectivity

List of elements adjacent to element_i

Type:

ndarray, default=np.nan

average_vertex_connectivity

Average number of vertices connected to one vertex

Type:

int, default=25

extractedvertices

Vertices extracted from the model

Type:

ndarray, default=np.nan

extractedelements

Elements extracted from the model

Type:

ndarray, default=np.nan

__init__(self, other=None)

Initializes the default mesh2d parameters, optionally inheriting from another instance.

__repr__(self)

Returns a detailed string representation of the mesh2d object.

__str__(self)

Returns a short string identifying the class.

domain_type(self)

Returns the domain type of the mesh.

dimension(self)

Returns the dimension of the mesh.

element_type(self)

Returns the element type of the mesh.

marshall_class(self, fid, prefix, md=None)

Marshall parameters to a binary file

Examples

md.mesh = pyissm.model.classes.mesh.mesh2d()

check_consistency(md, solution, analyses)

Check consistency of the [mesh.mesh2d] parameters.

Parameters:
  • md (pyissm.model.Model) – The model object to check.

  • solution (str) – The solution name to check.

  • analyses (list of str) – List of analyses to check consistency for.

Returns:

md – The model object with any consistency errors noted.

Return type:

pyissm.model.Model

dimension()
domain_type()
element_type()
marshall_class(fid, prefix, md=None)

Marshall [mesh.mesh2d] parameters to a binary file.

Parameters:
  • fid (file object) – The file object to write the binary data to.

  • prefix (str) – Prefix string used for data identification in the binary file.

  • md (ISSM model object, optional.) – ISSM model object needed in some cases.

Return type:

None

class pyissm.model.classes.mesh.mesh2dvertical(other=None)

Bases: manage_state

Vertical 2D Mesh Class definition for ISSM.

This class defines the default parameters for a 2D triangular mesh in the vertical plane used in ISSM.

Parameters:

other (any, optional) – Any other class object that contains common fields to inherit from. If values in other differ from default values, they will override the default values.

x

Vertices x coordinate [m]

Type:

ndarray, default=np.nan

y

Vertices y coordinate [m]

Type:

ndarray, default=np.nan

elements

Vertex indices of the mesh elements

Type:

ndarray, default=np.nan

numberofelements

Number of elements

Type:

int, default=0

numberofvertices

Number of vertices

Type:

int, default=0

numberofedges

Number of edges of the 2d mesh

Type:

int, default=0

lat

Vertices latitude [degrees]

Type:

ndarray, default=np.nan

long

Vertices longitude [degrees]

Type:

ndarray, default=np.nan

epsg

EPSG code (ex: 3413 for UPS Greenland, 3031 for UPS Antarctica)

Type:

int or float, default=np.nan

scale_factor

Projection correction for volume, area, etc. computation

Type:

float, default=np.nan

vertexonboundary

Vertices on the boundary of the domain flag list

Type:

ndarray, default=np.nan

vertexonbase

Vertices on the bed of the domain flag list

Type:

ndarray, default=np.nan

vertexonsurface

Vertices on the surface of the domain flag list

Type:

ndarray, default=np.nan

edges

Edges of the 2d mesh (vertex1 vertex2 element1 element2)

Type:

ndarray, default=np.nan

segments

Edges on domain boundary (vertex1 vertex2 element)

Type:

ndarray, default=np.nan

segmentmarkers

Number associated to each segment

Type:

ndarray, default=np.nan

vertexconnectivity

List of elements connected to vertex_i

Type:

ndarray, default=np.nan

elementconnectivity

List of elements adjacent to element_i

Type:

ndarray, default=np.nan

average_vertex_connectivity

Average number of vertices connected to one vertex

Type:

int, default=25

__init__(self, other=None)

Initializes the default mesh2dvertical parameters, optionally inheriting from another instance.

__repr__(self)

Returns a detailed string representation of the mesh2dvertical object.

__str__(self)

Returns a short string identifying the class.

domain_type(self)

Returns the domain type of the mesh.

dimension(self)

Returns the dimension of the mesh.

element_type(self)

Returns the element type of the mesh.

marshall_class(self, fid, prefix, md=None)

Marshall parameters to a binary file

Examples

md.mesh = pyissm.model.classes.mesh.mesh2dvertical()

check_consistency(md, solution, analyses)

Check consistency of the [mesh.mesh2dvertical] parameters.

Parameters:
  • md (pyissm.model.Model) – The model object to check.

  • solution (str) – The solution name to check.

  • analyses (list of str) – List of analyses to check consistency for.

Returns:

md – The model object with any consistency errors noted.

Return type:

pyissm.model.Model

dimension()
domain_type()
element_type()
marshall_class(fid, prefix, md=None)

Marshall [mesh.mesh2dvertical] parameters to a binary file.

Parameters:
  • fid (file object) – The file object to write the binary data to.

  • prefix (str) – Prefix string used for data identification in the binary file.

  • md (ISSM model object, optional.) – ISSM model object needed in some cases.

Return type:

None

vertex_flags(value)
class pyissm.model.classes.mesh.mesh3dprisms(other=None)

Bases: manage_state

3D Prism Mesh Class definition for ISSM.

This class defines the default parameters for a 3D mesh composed of extruded prisms, used in ISSM.

Parameters:

other (any, optional) – Any other class object that contains common fields to inherit from. If values in other differ from default values, they will override the default values.

x

Vertices x coordinate [m]

Type:

ndarray, default=np.nan

y

Vertices y coordinate [m]

Type:

ndarray, default=np.nan

z

Vertices z coordinate [m]

Type:

ndarray, default=np.nan

elements

Vertex indices of the 3D mesh elements

Type:

ndarray, default=np.nan

numberoflayers

Number of extrusion layers

Type:

int, default=0

numberofelements

Number of elements in the 3D mesh

Type:

int, default=0

numberofvertices

Number of vertices in the 3D mesh

Type:

int, default=0

lat

Vertices latitude [degrees]

Type:

ndarray, default=np.nan

long

Vertices longitude [degrees]

Type:

ndarray, default=np.nan

epsg

EPSG code (ex: 3413 for UPS Greenland, 3031 for UPS Antarctica)

Type:

int, default=0

scale_factor

Projection correction for volume, area, etc. computation

Type:

float, default=np.nan

vertexonbase

Lower vertices flags list

Type:

ndarray, default=np.nan

vertexonsurface

Upper vertices flags list

Type:

ndarray, default=np.nan

lowerelements

Lower element list (NaN for element on the lower layer)

Type:

ndarray, default=np.nan

lowervertex

Lower vertex list (NaN for vertex on the lower surface)

Type:

ndarray, default=np.nan

upperelements

Upper element list (NaN for element on the upper layer)

Type:

ndarray, default=np.nan

uppervertex

Upper vertex list (NaN for vertex on the upper surface)

Type:

ndarray, default=np.nan

vertexonboundary

Vertices on the boundary of the domain flag list

Type:

ndarray, default=np.nan

vertexconnectivity

List of elements connected to vertex_i

Type:

ndarray, default=np.nan

elementconnectivity

List of elements adjacent to element_i

Type:

ndarray, default=np.nan

average_vertex_connectivity

Average number of vertices connected to one vertex

Type:

int, default=25

x2d

2D mesh vertices x coordinate [m]

Type:

ndarray, default=np.nan

y2d

2D mesh vertices y coordinate [m]

Type:

ndarray, default=np.nan

elements2d

2D mesh vertex indices of the mesh elements

Type:

ndarray, default=np.nan

numberofvertices2d

Number of vertices in the original 2D mesh

Type:

int, default=0

numberofelements2d

Number of elements in the original 2D mesh

Type:

int, default=0

extractedvertices

Vertices extracted from the model

Type:

ndarray, default=np.nan

extractedelements

Elements extracted from the model

Type:

ndarray, default=np.nan

__init__(self, other=None)

Initializes the default mesh3dprisms parameters, optionally inheriting from another instance.

__repr__(self)

Returns a detailed string representation of the mesh3dprisms object.

__str__(self)

Returns a short string identifying the class.

domain_type(self)

Returns the domain type of the mesh.

dimension(self)

Returns the dimension of the mesh.

element_type(self)

Returns the element type of the mesh.

marshall_class(self, fid, prefix, md=None)

Marshall parameters to a binary file

Examples

md.mesh = pyissm.model.classes.mesh.mesh3dprisms()

check_consistency(md, solution, analyses)

Check consistency of the [mesh.mesh3dprisms] parameters.

Parameters:
  • md (pyissm.model.Model) – The model object to check.

  • solution (str) – The solution name to check.

  • analyses (list of str) – List of analyses to check consistency for.

Returns:

md – The model object with any consistency errors noted.

Return type:

pyissm.model.Model

dimension()
domain_type()
element_type()
marshall_class(fid, prefix, md=None)

Marshall [mesh.mesh3dprisms] parameters to a binary file.

Parameters:
  • fid (file object) – The file object to write the binary data to.

  • prefix (str) – Prefix string used for data identification in the binary file.

  • md (ISSM model object, optional.) – ISSM model object needed in some cases.

Return type:

None

class pyissm.model.classes.mesh.mesh3dsurface(other=None)

Bases: manage_state

3D Surface Mesh Class definition for ISSM.

This class defines the default parameters for a 3D triangular surface mesh used in ISSM.

Parameters:

other (any, optional) – Any other class object that contains common fields to inherit from. If values in other differ from default values, they will override the default values.

x

Vertices x coordinate [m]

Type:

ndarray, default=np.nan

y

Vertices y coordinate [m]

Type:

ndarray, default=np.nan

z

Vertices z coordinate [m]

Type:

ndarray, default=np.nan

elements

Vertex indices of the mesh elements

Type:

ndarray, default=np.nan

numberofelements

Number of elements

Type:

int, default=0

numberofvertices

Number of vertices

Type:

int, default=0

numberofedges

Number of edges of the 3d mesh

Type:

int, default=0

lat

Vertices latitude [degrees]

Type:

ndarray, default=np.nan

long

Vertices longitude [degrees]

Type:

ndarray, default=np.nan

r

Vertices radius [m]

Type:

ndarray, default=np.nan

vertexonboundary

Vertices on the boundary of the domain flag list

Type:

ndarray, default=np.nan

edges

Edges of the 3d mesh (vertex1 vertex2 element1 element2)

Type:

ndarray, default=np.nan

segments

Edges on domain boundary (vertex1 vertex2 element)

Type:

ndarray, default=np.nan

segmentmarkers

Number associated to each segment

Type:

ndarray, default=np.nan

vertexconnectivity

List of elements connected to vertex_i

Type:

ndarray, default=np.nan

elementconnectivity

List of elements adjacent to element_i

Type:

ndarray, default=np.nan

average_vertex_connectivity

Average number of vertices connected to one vertex

Type:

int, default=25

extractedvertices

Vertices extracted from the model

Type:

ndarray, default=np.nan

extractedelements

Elements extracted from the model

Type:

ndarray, default=np.nan

__init__(self, other=None)

Initializes the default mesh3dsurface parameters, optionally inheriting from another instance.

__repr__(self)

Returns a detailed string representation of the mesh3dsurface object.

__str__(self)

Returns a short string identifying the class.

domain_type(self)

Returns the domain type of the mesh.

dimension(self)

Returns the dimension of the mesh.

element_type(self)

Returns the element type of the mesh.

marshall_class(self, fid, prefix, md=None)

Marshall parameters to a binary file

Examples

md.mesh = pyissm.model.classes.mesh.mesh3dsurface()

check_consistency(md, solution, analyses)

Check consistency of the [mesh.mesh3dsurface] parameters.

Parameters:
  • md (pyissm.model.Model) – The model object to check.

  • solution (str) – The solution name to check.

  • analyses (list of str) – List of analyses to check consistency for.

Returns:

md – The model object with any consistency errors noted.

Return type:

pyissm.model.Model

dimension()
domain_type()
element_type()
marshall_class(fid, prefix, md=None)

Marshall [mesh.mesh3dsurface] parameters to a binary file.

Parameters:
  • fid (file object) – The file object to write the binary data to.

  • prefix (str) – Prefix string used for data identification in the binary file.

  • md (ISSM model object, optional.) – ISSM model object needed in some cases.

Return type:

None