From a2d8646306b3a8b40af97066e5faea8f99d178ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20Sch=C3=A4fer?= Date: Tue, 17 May 2016 17:36:34 +0200 Subject: [PATCH] ugly workaround to fix dgswem, re #39 --- src/storage/unstructuredgrid.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/storage/unstructuredgrid.h b/src/storage/unstructuredgrid.h index f86d0e382..1bf093f52 100644 --- a/src/storage/unstructuredgrid.h +++ b/src/storage/unstructuredgrid.h @@ -53,13 +53,14 @@ class UnstructuredGrid : public GridBase const ELEMENT_TYPE& defaultElement = ELEMENT_TYPE(), const ELEMENT_TYPE& edgeElement = ELEMENT_TYPE(), const Coord& /* topological dimension is irrelevant here */ = Coord()) : - elements(box.dimensions.x(), defaultElement), + // fixme: dirty hack, we're allocating way too many cells. trim this down! + elements(box.origin.x() + box.dimensions.x(), defaultElement), edgeElement(edgeElement), - dimension(box.dimensions) + dimension(box.origin + box.dimensions) { for (std::size_t i = 0; i < MATRICES; ++i) { matrices[i] = - SellCSigmaSparseMatrixContainer(dimension.x()); + SellCSigmaSparseMatrixContainer(box.origin.x() + dimension.x()); } }