@@ -422,7 +422,7 @@ def field_scalar(cls, f, methods=False):
422422 return f
423423
424424 @classmethod
425- def geometry_area (
425+ def polygon_area (
426426 cls ,
427427 f ,
428428 domain_axis ,
@@ -478,7 +478,7 @@ def geometry_area(
478478
479479 from .units import Units
480480
481- axis , aux_X , aux_Y , aux_Z = cls .yyy (
481+ axis , aux_X , aux_Y , aux_Z = cls ._geometry_cells (
482482 f , domain_axis , "polygon" , methods = methods , auto = auto
483483 )
484484
@@ -585,7 +585,7 @@ def geometry_area(
585585
586586 col0 = cols .item (0 )
587587 equal_nodes = (cols == col0 ).all ()
588- if equal_nodes :
588+ if equal_nodes :
589589 # All polygons have the same number of nodes, so we can
590590 # use an integer and a slice in place of two integer
591591 # arrays, which is much faster.
@@ -756,7 +756,7 @@ def geometry_area(
756756 return True
757757
758758 @classmethod
759- def geometry_line (
759+ def line_length (
760760 cls ,
761761 f ,
762762 domain_axis ,
@@ -807,7 +807,7 @@ def geometry_line(
807807 """
808808 from .units import Units
809809
810- axis , aux_X , aux_Y , aux_Z = cls .yyy (
810+ axis , aux_X , aux_Y , aux_Z = cls ._geometry_cells (
811811 f , domain_axis , "line" , methods = methods , auto = auto
812812 )
813813
@@ -945,7 +945,7 @@ def geometry_volume(
945945 """
946946 from .units import Units
947947
948- axis , aux_X , aux_Y , aux_Z = cls .yyy (
948+ axis , aux_X , aux_Y , aux_Z = cls ._geometry_cells (
949949 f , "polygon" , methods = methods , auto = auto
950950 )
951951
@@ -979,7 +979,7 @@ def geometry_volume(
979979
980980 if not methods :
981981 # Initialise cell volumes as the cell areas
982- areas = cls .geometry_area (
982+ areas = cls .polygon_area (
983983 f ,
984984 weights ,
985985 weights_axes ,
@@ -1431,7 +1431,9 @@ def scale(cls, w, scale):
14311431 return w
14321432
14331433 @classmethod
1434- def yyy (cls , f , domain_axis , geometry_type , methods = False , auto = False ):
1434+ def _geometry_cells (
1435+ cls , f , domain_axis , geometry_type , methods = False , auto = False
1436+ ):
14351437 """Checks whether weights can be created for given coordinates.
14361438
14371439 .. versionadded:: UGRIDVER
@@ -1463,8 +1465,10 @@ def yyy(cls, f, domain_axis, geometry_type, methods=False, auto=False):
14631465
14641466 for key , aux in auxiliary_coordinates_1d .items ():
14651467 aux_axis = f .get_data_axes (key )[0 ]
1466- dt = f .domain_topology (default = None , filter_by_axis = (aux_axis ,))
1467- if dt is None and aux .get_geometry (None ) != geometry_type :
1468+ topology = f .domain_topology (
1469+ default = None , filter_by_axis = (aux_axis ,)
1470+ )
1471+ if topology is None and aux .get_geometry (None ) != geometry_type :
14681472 continue
14691473
14701474 # Still here? Then this auxiliary coordinate has either UGRID
0 commit comments