$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 #ifndef FLOW_TO_WALL_3D_H 00026 #define FLOW_TO_WALL_3D_H 00027 00028 #include "core/globalDefs.h" 00029 #include "atomicBlock/blockLattice3D.h" 00030 00031 namespace plb { 00032 00033 template<typename T, template<typename U> class Descriptor, class ValueT> 00034 class ComputeValue3D { 00035 public: 00036 virtual ~ComputeValue3D() { } 00037 virtual ValueT operator() ( 00038 BlockLattice3D<T,Descriptor> const& lattice, T x, T y, T z ) const =0; 00039 virtual ComputeValue3D<T,Descriptor, ValueT>* clone() const =0; 00040 }; 00041 00042 template<typename T, template<typename U> class Descriptor, class ValueT> 00043 class ExtrapolateValue3D { 00044 public: 00045 ExtrapolateValue3D(ComputeValue3D<T,Descriptor, ValueT>* computeValue_); 00046 ExtrapolateValue3D(ExtrapolateValue3D<T,Descriptor, ValueT> const& rhs); 00047 ExtrapolateValue3D<T,Descriptor, ValueT>& operator=(ExtrapolateValue3D<T,Descriptor, ValueT> const& rhs); 00048 void swap(ExtrapolateValue3D<T,Descriptor, ValueT>& rhs); 00049 virtual ~ExtrapolateValue3D(); 00050 virtual ValueT operator() ( 00051 BlockLattice3D<T,Descriptor> const& lattice, plint increment, 00052 T x, T y, T z ) const =0; 00053 virtual ExtrapolateValue3D<T,Descriptor, ValueT>* clone() const =0; 00054 void compute( BlockLattice3D<T,Descriptor> const& lattice, plint iX, plint iY, plint iZ ) const { 00055 computeValue->compute(lattice, iX,iY,iZ); 00056 } 00057 private: 00058 ComputeValue3D<T,Descriptor, ValueT>* computeValue; 00059 }; 00060 00061 template<typename T, template<typename U> class Descriptor, class ValueT> 00062 ValueT optimalInterpolate(Lattice<T,Descriptor>& lattice, T x, T y, T z, ExtrapolateValue3D<T,Descriptor,ValueT> const& extrapValue); 00063 00064 template<typename T, template<typename U> class Descriptor, class ValueT> 00065 class TerminalExtrapolateValue3D { 00066 public: 00067 TerminalExtrapolateValue3D(ComputeValue3D<T,Descriptor, ValueT>* computeValue_); 00068 virtual ValueT operator() ( 00069 BlockLattice3D<T,Descriptor> const& lattice, plint increment, 00070 T x, T y, T z ) const; 00071 virtual TerminalExtrapolateValue3D<T,Descriptor, ValueT>* clone() const; 00072 }; 00073 00074 template<typename T, template<typename U> class Descriptor, class ValueT> 00075 class X_ExtrapolateValue3D { 00076 public: 00077 X_ExtrapolateValue3D( ComputeValue3D<T,Descriptor, ValueT>* computeValue_, 00078 X_ExtrapolateValue3D<T,Descriptor, ValueT>* recurseValue_ 00079 = new TerminalExtrapolateValue3D<T,Descriptor, ValueT> ); 00080 X_ExtrapolateValue3D(X_ExtrapolateValue3D<T,Descriptor, ValueT> const& rhs); 00081 X_ExtrapolateValue3D<T,Descriptor, ValueT>& operator=(X_ExtrapolateValue3D<T,Descriptor, ValueT> const& rhs); 00082 void swap(X_ExtrapolateValue3D<T,Descriptor, ValueT>& rhs); 00083 virtual ~X_ExtrapolateValue3D(); 00084 virtual ValueT operator() ( 00085 BlockLattice3D<T,Descriptor> const& lattice, plint increment, 00086 T x, T y, T z ) const; 00087 virtual X_ExtrapolateValue3D<T,Descriptor, ValueT>* clone() const; 00088 private: 00089 ExtrapolateValue3D<T,Descriptor, ValueT>* recurseValue; 00090 }; 00091 00092 } // namespace plb 00093 00094 #endif // FLOW_TO_WALL_3D_H
1.6.3
1.6.3