Commit ef1b9d9b authored by BRAMAS Berenger's avatar BRAMAS Berenger
Browse files

update interval computation in order to use morton index

parent 1868fe2d
......@@ -114,7 +114,7 @@ public:
FGroupOfCells(const MortonIndex inStartingIndex, const MortonIndex inEndingIndex, const int inNumberOfCells)
: allocatedMemoryInByte(0), memoryBuffer(nullptr), blockHeader(nullptr), cellIndexes(nullptr), blockCells(nullptr),
cellMultipoles(nullptr), cellLocals(nullptr), deleteBuffer(true){
FAssertLF(int(inEndingIndex-inStartingIndex) >= inNumberOfCells);
FAssertLF((inEndingIndex-inStartingIndex) >= MortonIndex(inNumberOfCells));
// Total number of bytes in the block
const size_t memoryToAlloc = sizeof(BlockHeader) + (inNumberOfCells*sizeof(MortonIndex))
+ (inNumberOfCells*sizeof(SymboleCellClass));
......@@ -225,8 +225,8 @@ public:
/** The size of the interval endingIndex-startingIndex (set from the constructor) */
int getSizeOfInterval() const {
return int(blockHeader->endingIndex-blockHeader->startingIndex);
MortonIndex getSizeOfInterval() const {
return MortonIndex(blockHeader->endingIndex-blockHeader->startingIndex);
/** Return true if inIndex should be located in the current block */
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment