$treeview $search $mathjax
Palabos  Version 1.1
$projectbrief
$projectbrief
$searchbox

multiContainerBlock3D.h

Go to the documentation of this file.
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 
00030 #ifndef MULTI_CONTAINER_BLOCK_3D_H
00031 #define MULTI_CONTAINER_BLOCK_3D_H
00032 
00033 #include "core/globalDefs.h"
00034 #include "atomicBlock/atomicContainerBlock3D.h"
00035 #include "multiBlock/multiBlock3D.h"
00036 
00037 namespace plb {
00038 
00039 class MultiContainerBlock3D : public MultiBlock3D {
00040 public:
00041     typedef std::map<plint,AtomicContainerBlock3D*> BlockMap;
00042 public:
00043     MultiContainerBlock3D (
00044             MultiBlockManagement3D const& multiBlockManagement_,
00045             CombinedStatistics* combinedStatistics_ );
00046     MultiContainerBlock3D(plint nx_, plint ny_, plint nz_);
00047     MultiContainerBlock3D(MultiBlock3D const& rhs);
00048     MultiContainerBlock3D(MultiBlock3D const& rhs, Box3D subDomain, bool crop);
00049     ~MultiContainerBlock3D();
00050     MultiContainerBlock3D& operator=(MultiContainerBlock3D const& rhs);
00051     MultiContainerBlock3D(MultiContainerBlock3D const& rhs);
00052     MultiContainerBlock3D* clone() const;
00053     MultiContainerBlock3D* clone(MultiBlockManagement3D const& multiBlockManagement) const;
00054     void swap(MultiContainerBlock3D& rhs);
00055 public:
00056     virtual AtomicContainerBlock3D& getComponent(plint iBlock);
00057     virtual AtomicContainerBlock3D const& getComponent(plint iBlock) const;
00058     virtual plint sizeOfCell() const;
00059     virtual plint getCellDim() const;
00060     virtual int getStaticId() const;
00061     virtual void copyReceive (
00062                 MultiBlock3D const& fromBlock, Box3D const& fromDomain,
00063                 Box3D const& toDomain, modif::ModifT whichData=modif::dataStructure );
00064     std::string getBlockName() const;
00065     std::vector<std::string> getTypeInfo() const;
00066 private:
00067     void allocateBlocks();
00068     void deAllocateBlocks();
00069 private:
00070     BlockMap blocks;
00071 };
00072 
00073 }  // namespace plb
00074 
00075 #endif  // MULTI_CONTAINER_BLOCK_3D_H