$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 /* Main author: Daniel Lagrava 00026 **/ 00027 00028 #ifndef MULTI_GRID_LATTICE_3D_H 00029 #define MULTI_GRID_LATTICE_3D_H 00030 00031 #include "multiGrid/multiGrid3D.h" 00032 #include "core/globalDefs.h" 00033 #include "core/geometry3D.h" 00034 #include "core/array.h" 00035 #include "multiBlock/multiBlock3D.h" 00036 #include "multiBlock/multiBlockManagement3D.h" 00037 #include "multiBlock/blockCommunicator3D.h" 00038 #include "multiBlock/combinedStatistics.h" 00039 #include "core/block3D.h" 00040 #include "core/blockStatistics.h" 00041 00042 #include "multiGrid/multiGridParameterManager.h" 00043 // #include "multiGrid/gridRefinementProcessors3D.h" 00044 #include "multiGrid/gridRefinement.h" 00045 #include "multiGrid/gridRefinementDynamics.h" 00046 00047 #include <memory> 00048 00049 namespace plb { 00050 00051 template <typename T, template <typename U> class Descriptor> 00052 class MultiGridLattice3D : public BlockLatticeBase3D< T,Descriptor >, public MultiGrid3D { 00053 00054 public: 00055 MultiGridLattice3D(MultiGridManagement3D management, 00056 std::vector<BlockCommunicator3D* > communicators_, 00057 std::vector<CombinedStatistics*> combinedStatistics_, 00058 Dynamics<T,Descriptor>* backgroundDynamics, plint behaviorLevel=0) ; 00059 00060 MultiGridLattice3D(MultiGridManagement3D management, 00061 Dynamics<T,Descriptor>* backgroundDynamics, plint behaviorLevel=0) ; 00062 00064 MultiGridLattice3D(MultiGridLattice3D<T,Descriptor> const& rhs); 00066 MultiGridLattice3D(MultiGridLattice3D<T,Descriptor> const& rhs, Box3D subDomain, bool crop=true); 00067 00068 MultiGridLattice3D(MultiGrid3D const& rhs); 00069 MultiGridLattice3D(MultiGrid3D const& rhs, Box3D subDomain, bool crop=true); 00070 00071 MultiGridLattice3D<T,Descriptor>& operator=(MultiGridLattice3D<T,Descriptor> const& rhs); 00072 00073 ~MultiGridLattice3D(); 00074 00076 void initialize(); 00077 void createInterfaces(); 00078 00079 /* *** MultiGrid3D methods *** */ 00080 00081 int getBlockId () const; 00082 00084 MultiBlockLattice3D<T,Descriptor>& getComponent(plint iBlock); 00085 const MultiBlockLattice3D<T,Descriptor>& getComponent(plint iBlock) const; 00086 00087 /* **** BlockLatticeBase3D methods **** */ 00088 00089 virtual Cell<T,Descriptor>& get(plint iX, plint iY, plint iZ); 00090 virtual Cell<T,Descriptor> const& get(plint iX, plint iY, plint iZ) const; 00091 virtual void specifyStatisticsStatus (Box3D domain, bool status); 00092 virtual void collide(Box3D domain); 00093 virtual void collide(); 00094 virtual void stream(Box3D domain); 00095 virtual void stream(); 00096 virtual void collideAndStream(Box3D domain); 00097 virtual void collideAndStream(); 00098 virtual void incrementTime(); 00099 TimeCounter& getTimeCounter(); 00100 TimeCounter const& getTimeCounter() const; 00101 private: 00102 void iterateMultiGrid(plint level); 00103 private: 00104 std::vector<MultiBlockLattice3D<T,Descriptor>*> lattices; 00105 }; 00106 00107 template<typename T, template<typename U> class Descriptor> 00108 double getStoredAverageDensity(MultiGridLattice3D<T,Descriptor> const& multiGrid); 00109 00110 template<typename T, template<typename U> class Descriptor> 00111 double getStoredAverageEnergy(MultiGridLattice3D<T,Descriptor> const& multiGrid); 00112 00113 template<typename T, template<typename U> class Descriptor> 00114 double getStoredMaxVelocity(MultiGridLattice3D<T,Descriptor> const& multiGrid); 00115 00116 00117 }// namespace plb 00118 00119 #endif // MULTI_GRID_LATTICE_3D_H
1.6.3
1.6.3