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

guoAdvDiffOffLatticeModel3D.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 #ifndef GUO_ADV_DIFF_OFF_LATTICE_MODEL_3D_H
00026 #define GUO_ADV_DIFF_OFF_LATTICE_MODEL_3D_H
00027 
00028 #include "core/globalDefs.h"
00029 #include "offLattice/offLatticeModel3D.h"
00030 
00031 namespace plb {
00032 
00033 template<typename T, template<typename U> class Descriptor>
00034 class GuoAdvDiffOffLatticeModel3D : public OffLatticeModel3D<T,Array<T,2> >
00035 {
00036 public:
00037     GuoAdvDiffOffLatticeModel3D(BoundaryShape3D<T,Array<T,2> >* shape_, int flowType_);
00038     GuoAdvDiffOffLatticeModel3D(GuoAdvDiffOffLatticeModel3D<T,Descriptor> const& rhs);
00039     GuoAdvDiffOffLatticeModel3D<T,Descriptor>& operator=(GuoAdvDiffOffLatticeModel3D<T,Descriptor> const& rhs);
00040     virtual GuoAdvDiffOffLatticeModel3D<T,Descriptor>* clone() const;
00041     virtual plint getNumNeighbors() const;
00042     virtual void prepareCell (
00043             Dot3D const& cellLocation, AtomicContainerBlock3D& container );
00044     virtual void boundaryCompletion (
00045             AtomicBlock3D& lattice, AtomicContainerBlock3D& container,
00046             std::vector<AtomicBlock3D const*> const& args );
00047     virtual ContainerBlockData* generateOffLatticeInfo() const;
00048     virtual Array<T,3> getLocalForce(AtomicContainerBlock3D& container) const { return Array<T,3>(T(),T(),T()); }
00049 private:
00050     void cellCompletion (
00051             BlockLattice3D<T,Descriptor>& lattice,
00052             Dot3D const& guoNode,
00053             std::vector<std::pair<int,int> > const& dryNodeFluidDirections,
00054             std::vector<plint> const& dryNodeIds, Dot3D const& absoluteOffset );
00055     void computeRhoBarJNeq (
00056               BlockLattice3D<T,Descriptor> const& lattice, Dot3D const& guoNode,
00057               Dot3D const& fluidDirection, int depth, Array<T,3> const& wallNode, T delta,
00058               Array<T,2> wallData, OffBoundary::Type bdType, Array<T,3> const& wallNormal,
00059               T& rhoBar, Array<T,Descriptor<T>::d>& jNeq ) const;
00060 private:
00063     class GuoAdvDiffOffLatticeInfo3D : public ContainerBlockData {
00064     public:
00065         std::vector<Dot3D> const&                               getDryNodes() const
00066         { return dryNodes; }
00067         std::vector<Dot3D>&                                     getDryNodes()
00068         { return dryNodes; }
00069         std::vector<std::vector<std::pair<int,int> > > const&   getDryNodeFluidDirections() const
00070         { return dryNodeFluidDirections; }
00071         std::vector<std::vector<std::pair<int,int> > >&         getDryNodeFluidDirections()
00072         { return dryNodeFluidDirections; }
00073         std::vector<std::vector<plint> > const&                 getDryNodeIds() const
00074         { return dryNodeIds; }
00075         std::vector<std::vector<plint> >&                       getDryNodeIds()
00076         { return dryNodeIds; }
00077         virtual GuoAdvDiffOffLatticeInfo3D* clone() const {
00078             return new GuoAdvDiffOffLatticeInfo3D(*this);
00079         }
00080     private:
00081         std::vector<Dot3D> dryNodes;
00082         std::vector<std::vector<std::pair<int,int> > >   dryNodeFluidDirections;
00083         std::vector<std::vector<plint> >                 dryNodeIds;
00084     };
00085 };
00086 
00087 }  // namespace plb
00088 
00089 #endif  // GUO_ADV_DIFF_OFF_LATTICE_MODEL_3D_H