Compute area as the sum of the mesh cells area values.
330862
def get_area(self):
        
        mesh = self.mesh
        _, _, _, area = mesh.get_cell_dimensions()

        return numpy.sum(area)
709919
def square_and_sum(a, s):
    
    cmin, cmax = thread_partition_array(a)
    map_noreturn(asqs, [(a, s, cmin[i], cmax[i]) for i in xrange(len(cmax))])
    return a
521852
def size(self):
        '''
        '''
        polygon_area = 0
        for a in self.arcs:
            polygon_area += box_product(a.start_point(), a.end_point())
        polygon_area /= 2.0
        return polygon_area + sum([a.sign * a.segment_area() for a in self.arcs])
998758
def calculate_solidity(labels,indexes=None):
    
    if indexes is not None:
        """ Convert to compat 32bit integer """
        indexes = np.array(indexes,dtype=np.int32)
    areas = scind.sum(np.ones(labels.shape),labels,indexes)
    convex_hull_areas = calculate_convex_hull_areas(labels, indexes)
    return areas / convex_hull_areas
305236
def area(self):
        """"""
        area = self.parse['attributes'].get('Shape_Area')
        if area:
            return round(float(area) * 10.76391)
367863
def get_width(self):
        
        areas = self._get_areas()
        widths = numpy.array([surf.get_width() for surf in self.surfaces])

        return numpy.sum(areas * widths) / numpy.sum(areas)
423586
def _compute_surface_areas(self, cell_ids):
        
        # Each of the three edges may contribute to the surface areas of all
        # three vertices. Here, only the two adjacent nodes receive a
        # contribution, but other approaches (e.g., the flat cell corrector),
        # may contribute to all three nodes.
        cn = self.cells["nodes"][cell_ids]
        ids = numpy.stack([cn, cn, cn], axis=1)

        half_el = 0.5 * self.edge_lengths[..., cell_ids]
        zero = numpy.zeros([half_el.shape[1]])
        vals = numpy.stack(
            [
                numpy.column_stack([zero, half_el[0], half_el[0]]),
                numpy.column_stack([half_el[1], zero, half_el[1]]),
                numpy.column_stack([half_el[2], half_el[2], zero]),
            ],
            axis=1,
        )

        return ids, vals
770414
function recalculateWidths(tableGrid, widths) {
        var allCells = tableGrid.getAllCells();
        return Tools.map(allCells, function (cell) {
          var width = total(cell.colIndex, cell.colIndex + cell.colspan, widths);
          return {
            element: cell.element,
            width: width,
            colspan: cell.colspan
          };
        });
      }
963660
def area_faces(self):
        
        area_faces = triangles.area(crosses=self.triangles_cross,
                                    sum=False)
        return area_faces
241738
def _handle_end_area(self):
        
        self._result.append(Area(result=self._result, **self._curr))
        self._curr = {}
116696
def surface_area(self):
        
        m = self.lattice.matrix
        return np.linalg.norm(np.cross(m[0], m[1]))
1295510
def get_visible_area(self):
        

        grid = self.grid

        top = grid.YToRow(grid.GetViewStart()[1] * grid.ScrollLineX)
        left = grid.XToCol(grid.GetViewStart()[0] * grid.ScrollLineY)

        # Now start at top left for determining the bottom right visible cell

        bottom, right = top, left

        while grid.IsVisible(bottom, left, wholeCellVisible=False):
            bottom += 1

        while grid.IsVisible(top, right, wholeCellVisible=False):
            right += 1

        # The derived lower right cell is *NOT* visible

        bottom -= 1
        right -= 1

        return (top, left), (bottom, right)
954586
def all_same_area(self):
        """"""
        all_areas = [x.attrs.get('area', None) for x in self.values()]
        all_areas = [x for x in all_areas if x is not None]
        return all(all_areas[0] == x for x in all_areas[1:])
405890
def area (self):
    
    area = 0.0
    
    for segment in self.segments():
      area += ((segment.p.x * segment.q.y) - (segment.q.x * segment.p.y))/2

    return area
591599
function() {
        var area = 0.0;
        for (var i=0, len=this.components.length; i<len; i++) {
            area += this.components[i].getArea();
        }
        return area;
    }
1268253
def i_ww(self):
        
        d_values = []
        for i in range(self.n_pads_l):
            d_values.append(self.pad_position_l(i))
        d_values = np.array(d_values) - self.length / 2
        area_d_sqrd = sum(self.pad_area * d_values ** 2) * self.n_pads_w
        i_second = self.pad_i_ww * self.n_pads
        return area_d_sqrd + i_second
512615
def get_area(self):
        """"""
        return (self.p2.x-self.p1.x)*(self.p2.y-self.p1.y)