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

coarseGridProcessors2D.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 
00025 /* Main author: Daniel Lagrava
00026  */
00027 
00032 #ifndef COARSE_GRID_PROCESSORS_2D_H
00033 #define COARSE_GRID_PROCESSORS_2D_H
00034 
00035 #include "core/globalDefs.h"
00036 #include "atomicBlock/blockLattice2D.h"
00037 #include "atomicBlock/dataProcessorWrapper2D.h"
00038 #include "multiBlock/multiBlockLattice2D.h"
00039 #include "multiGrid/gridRefinement.h"
00040 #include "multiGrid/gridRefinementDynamics.h"
00041 #include <vector>
00042 
00043 namespace plb {
00044 
00046 template<typename T, template<typename U> class Descriptor1, template<typename U> class Descriptor2>
00047 class CopyFineToCoarse2D : public BoxProcessingFunctional2D_LL<T,Descriptor1,T,Descriptor2>
00048 {
00049 public:
00050     CopyFineToCoarse2D( RescaleEngine<T,Descriptor1>* rescaleEngine_,
00051                         plint numTimeSteps_, plint executionTime_, plint direction_, plint orientation_ );
00052     virtual ~CopyFineToCoarse2D();
00053     CopyFineToCoarse2D(CopyFineToCoarse2D<T,Descriptor1,Descriptor2> const& rhs);
00054     CopyFineToCoarse2D<T,Descriptor1,Descriptor2>& operator=(CopyFineToCoarse2D<T,Descriptor1,Descriptor2> const& rhs);
00055     virtual void process( Box2D domain,
00056                           BlockLattice2D<T,Descriptor1>& fineLattice,
00057                           BlockLattice2D<T,Descriptor2>& coarseLattice );
00058     virtual CopyFineToCoarse2D<T,Descriptor1,Descriptor2>* clone() const;
00059     virtual BlockDomain::DomainT appliesTo() const {
00060         return BlockDomain::bulk;
00061     }
00062     virtual void getTypeOfModification(std::vector<modif::ModifT>& modified) const {
00063         modified[0] = modif::nothing;
00064         modified[1] = modif::staticVariables;
00065     }
00066 private:
00067     RescaleEngine<T,Descriptor1>* rescaleEngine;
00068     plint numTimeSteps;
00069     plint executionTime;
00070     plint direction; // with respect to the Palabos boundary convention
00071     plint orientation; 
00072     
00073 };
00074 
00075 
00077 template<typename T, template<typename U> class Descriptor1, template<typename U> class Descriptor2>
00078 class CopyFineToCoarseWithFiltering2D : public BoxProcessingFunctional2D_LL<T,Descriptor1,T,Descriptor2>
00079 {
00080 public:
00081     CopyFineToCoarseWithFiltering2D( RescaleEngine<T,Descriptor1>* rescaleEngine_,
00082                         plint numTimeSteps_, plint executionTime_, plint direction_, plint orientation_ );
00083     virtual ~CopyFineToCoarseWithFiltering2D();
00084     CopyFineToCoarseWithFiltering2D(CopyFineToCoarseWithFiltering2D<T,Descriptor1,Descriptor2> const& rhs);
00085     CopyFineToCoarseWithFiltering2D<T,Descriptor1,Descriptor2>& operator=(CopyFineToCoarseWithFiltering2D<T,Descriptor1,Descriptor2> const& rhs);
00086     virtual void process( Box2D domain,
00087                           BlockLattice2D<T,Descriptor1>& fineLattice,
00088                           BlockLattice2D<T,Descriptor2>& coarseLattice );
00089     virtual CopyFineToCoarseWithFiltering2D<T,Descriptor1,Descriptor2>* clone() const;
00090     virtual BlockDomain::DomainT appliesTo() const {
00091         return BlockDomain::bulk;
00092     }
00093     virtual void getTypeOfModification(std::vector<modif::ModifT>& modified) const {
00094         modified[0] = modif::nothing;
00095         modified[1] = modif::staticVariables;
00096     }
00097 private:
00098     RescaleEngine<T,Descriptor1>* rescaleEngine;
00099     plint numTimeSteps;
00100     plint executionTime;
00101     plint direction; // according to palabos BC convention
00102     plint orientation; 
00103     
00104 };
00105 
00106 
00107 
00108 }  // namespace plb
00109 
00110 #endif  // COARSE_GRID_PROCESSORS_2D_H