$treeview $search $mathjax
|
Palabos
Version 1.1
$projectbrief
|
$projectbrief
|
$searchbox |
00001 /* This file is part of the Palabos library. 00002 * 00003 * Copyright (C) 2011 FlowKit Sarl 00004 * Avenue de Chailly 23 00005 * 1012 Lausanne, Switzerland 00006 * E-mail contact: contact@flowkit.com 00007 * 00008 * The most recent release of Palabos can be downloaded at 00009 * <http://www.palabos.org/> 00010 * 00011 * The library Palabos is free software: you can redistribute it and/or 00012 * modify it under the terms of the GNU Affero General Public License as 00013 * published by the Free Software Foundation, either version 3 of the 00014 * License, or (at your option) any later version. 00015 * 00016 * The library is distributed in the hope that it will be useful, 00017 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00018 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00019 * GNU Affero General Public License for more details. 00020 * 00021 * You should have received a copy of the GNU Affero General Public License 00022 * along with this program. If not, see <http://www.gnu.org/licenses/>. 00023 */ 00024 00025 00026 #ifndef BLOCK_2D_H 00027 #define BLOCK_2D_H 00028 00029 #include "core/globalDefs.h" 00030 #include "core/blockIdentifiers.h" 00031 #include "core/serializer.h" 00032 #include "core/blockStatistics.h" 00033 #include "core/geometry2D.h" 00034 00035 namespace plb { 00036 00037 class Block2D { 00038 public: 00039 virtual ~Block2D() { } 00040 virtual Box2D getBoundingBox() const =0; 00041 virtual DataSerializer* getBlockSerializer ( 00042 Box2D const& domain, IndexOrdering::OrderingT ordering ) const =0; 00043 virtual DataUnSerializer* getBlockUnSerializer ( 00044 Box2D const& domain, IndexOrdering::OrderingT ordering ) =0; 00045 }; 00046 00047 void copySerializedBlock( Block2D const& from, Block2D& to, 00048 IndexOrdering::OrderingT ordering = IndexOrdering::forward ); 00049 00052 class CachePolicy2D { 00053 public: 00054 CachePolicy2D(plint blockSize_) : blockSize(blockSize_) 00055 { } 00056 void setBlockSize(plint blockSize_) { 00057 blockSize = blockSize_; 00058 } 00059 plint getBlockSize() const { 00060 return blockSize; 00061 } 00062 private: 00063 plint blockSize; 00064 }; 00065 00066 } // namespace plb 00067 00068 #endif // BLOCK_2D_H
1.6.3
1.6.3