Skip to content

Commit 36a93b0

Browse files
authored
add additional mesh stubs (#4005)
1 parent 1f918ef commit 36a93b0

File tree

1 file changed

+35
-5
lines changed

1 file changed

+35
-5
lines changed

lib/iris/experimental/ugrid.py

Lines changed: 35 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -641,6 +641,7 @@ def equal(self, other, lenient=None):
641641
# - copy is off the table!!
642642
#
643643
# - MeshCoord.guess_points()
644+
# - MeshCoord.to_AuxCoord()
644645
#
645646
# - don't provide public methods to return the coordinate and connectivity
646647
# managers
@@ -690,14 +691,14 @@ def equal(self, other, lenient=None):
690691
#
691692
# @property
692693
# def all_coords(self):
694+
# # return a namedtuple
693695
# # coords = mesh.all_coords
694696
# # coords.face_x, coords.edge_y
695697
# pass
696698
#
697699
# @property
698700
# def node_coords(self):
699-
# # perhaps return a namedtuple?
700-
# # this would give:
701+
# # return a namedtuple
701702
# # node_coords = mesh.node_coords
702703
# # node_coords.x
703704
# # node_coords.y
@@ -715,6 +716,7 @@ def equal(self, other, lenient=None):
715716
#
716717
# @property
717718
# def all_connectivities(self):
719+
# # return a namedtuple
718720
# # conns = mesh.all_connectivities
719721
# # conns.edge_node, conns.boundary_node
720722
# pass
@@ -786,15 +788,15 @@ def equal(self, other, lenient=None):
786788
# pass
787789
#
788790
# def add_coords(self, node_x=None, node_y=None, edge_x=None, edge_y=None, face_x=None, face_y=None):
789-
# # this supports add a new coord to the manager, but also replacing an exiting coord
791+
# # this supports adding a new coord to the manager, but also replacing an existing coord
790792
# self._coord_manager.add(...)
791793
#
792794
# def add_connectivities(self, *args):
793-
# # this supports add a new connectivity to the manager, but also replacing an exiting connectivity
795+
# # this supports adding a new connectivity to the manager, but also replacing an existing connectivity
794796
# self._connectivity_manager.add(*args)
795797
#
796798
# def remove_coords(self, ...):
797-
# # could prove the "name", "metadata", "coord"-instance
799+
# # could provide the "name", "metadata", "coord"-instance
798800
# # this could use mesh.coords() to find the coords
799801
# self._coord_manager.remove(...)
800802
#
@@ -822,6 +824,12 @@ def equal(self, other, lenient=None):
822824
# def __unicode__(self, ...):
823825
# pass
824826
#
827+
# def __getstate__(self):
828+
# pass
829+
#
830+
# def __setstate__(self, state):
831+
# pass
832+
#
825833
# def xml_element(self):
826834
# pass
827835
#
@@ -830,11 +838,21 @@ def equal(self, other, lenient=None):
830838
# # after using MeshCoord.guess_points(), the user may wish to add the associated MeshCoord.points into
831839
# # the Mesh as face_coordinates.
832840
#
841+
# def to_AuxCoord(self, location, axis):
842+
# # factory method
843+
# # return the lazy AuxCoord(...) for the given location and axis
844+
#
845+
# def to_AuxCoords(self, location):
846+
# # factory method
847+
# # return the lazy AuxCoord(...), AuxCoord(...)
848+
#
833849
# def to_MeshCoord(self, location, axis):
850+
# # factory method
834851
# # return MeshCoord(..., location=location, axis=axis)
835852
# # use Connectivity.indices_by_src() for fetching indices.
836853
#
837854
# def to_MeshCoords(self, location):
855+
# # factory method
838856
# # return MeshCoord(..., location=location, axis="x"), MeshCoord(..., location=location, axis="y")
839857
# # use Connectivity.indices_by_src() for fetching indices.
840858
#
@@ -901,6 +919,12 @@ def equal(self, other, lenient=None):
901919
# for member in self._members:
902920
# yield member
903921
#
922+
# def __getstate__(self):
923+
# pass
924+
#
925+
# def __setstate__(self, state):
926+
# pass
927+
#
904928
# def coord(self, **kwargs):
905929
# # see Cube.coord for pattern, checking for a single result
906930
# return self.coords(**kwargs)[0]
@@ -978,6 +1002,12 @@ def equal(self, other, lenient=None):
9781002
# for member in self._members:
9791003
# yield member
9801004
#
1005+
# def __getstate__(self):
1006+
# pass
1007+
#
1008+
# def __setstate__(self, state):
1009+
# pass
1010+
#
9811011
# def connectivity(self, **kwargs):
9821012
# # see Cube.coord for pattern, checking for a single result
9831013
# return self.connectivities(**kwargs)[0]

0 commit comments

Comments
 (0)