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

externalForceMrtDynamics.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 /* Orestis Malaspinas contributed this code.
00026  */
00027 
00033 #ifndef EXTERNAL_FORCE_MRT_DYNAMICS_H
00034 #define EXTERNAL_FORCE_MRT_DYNAMICS_H
00035 
00036 #include "core/globalDefs.h"
00037 #include "basicDynamics/isoThermalDynamics.h"
00038 #include "basicDynamics/externalForceDynamics.h"
00039 #include "mrtDynamics.h"
00040 
00041 namespace plb {
00042     
00044 template<typename T, template<typename U> class Descriptor>
00045 class GuoExternalForceMRTdynamics : public ExternalForceDynamics<T,Descriptor> {
00046 public:
00047 /* *************** Construction / Destruction ************************ */
00048     GuoExternalForceMRTdynamics(plint externalParam_);
00049     GuoExternalForceMRTdynamics(MRTparam<T,Descriptor>* param_);
00050     GuoExternalForceMRTdynamics(HierarchicUnserializer& unserializer);
00051     GuoExternalForceMRTdynamics(GuoExternalForceMRTdynamics<T,Descriptor> const& rhs);
00052     GuoExternalForceMRTdynamics<T,Descriptor>& operator=(GuoExternalForceMRTdynamics<T,Descriptor> const& rhs);
00053     ~GuoExternalForceMRTdynamics<T,Descriptor>();
00054     void swap(GuoExternalForceMRTdynamics<T,Descriptor>& rhs);
00055     
00057     virtual GuoExternalForceMRTdynamics<T,Descriptor>* clone() const;
00058 
00060     virtual int getId() const;
00061 
00063     virtual void serialize(HierarchicSerializer& serializer) const;
00065     virtual void unserialize(HierarchicUnserializer& unserializer);
00066 
00067 /* *************** Collision and Equilibrium ************************* */
00068 
00070     virtual void collide(Cell<T,Descriptor>& cell,
00071                          BlockStatistics& statistics_);
00072 
00074     virtual T computeEquilibrium(plint iPop, T rhoBar, Array<T,Descriptor<T>::d> const& j,
00075                                  T jSqr, T thetaBar=T()) const;
00076                                  
00077     MRTparam<T,Descriptor> const& getMrtParameter() const;
00078 private:
00079     MRTparam<T,Descriptor>* param;
00080     plint externalParam;
00081     static int id;
00082 };
00083 
00084 }  // namespace plb
00085 
00086 #endif  // MRT_DYNAMICS_H