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

serialMultiDataField2D.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 
00028 #ifndef SERIAL_MULTI_DATA_FIELD_2D_H
00029 #define SERIAL_MULTI_DATA_FIELD_2D_H
00030 
00031 #include "core/globalDefs.h"
00032 #include "multiBlock/multiDataField2D.h"
00033 
00034 namespace plb {
00035 
00036 template<typename T>
00037 class SerialScalarAccess2D : public MultiScalarAccess2D<T> {
00038 public:
00039     SerialScalarAccess2D();
00040     virtual T& getDistributedScalar (
00041             plint iX, plint iY,
00042             MultiBlockManagement2D const& multiBlockManagement,
00043             std::map<plint,ScalarField2D<T>*>& fields );
00044     virtual T const& getDistributedScalar (
00045             plint iX, plint iY,
00046             MultiBlockManagement2D const& multiBlockManagement,
00047             std::map<plint,ScalarField2D<T>*> const& fields ) const;
00048     virtual SerialScalarAccess2D<T>* clone() const;
00049 private:
00050     mutable plint locatedBlock;
00051 };
00052 
00053 
00054 template<typename T, int nDim>
00055 class SerialTensorAccess2D : public MultiTensorAccess2D<T,nDim> {
00056 public:
00057     SerialTensorAccess2D();
00058     virtual Array<T,nDim>& getDistributedTensor (
00059             plint iX, plint iY,
00060             MultiBlockManagement2D const& multiBlockManagement,
00061             std::map<plint,TensorField2D<T,nDim>*>& fields );
00062     virtual Array<T,nDim> const& getDistributedTensor (
00063             plint iX, plint iY,
00064             MultiBlockManagement2D const& multiBlockManagement,
00065             std::map<plint,TensorField2D<T,nDim>*> const& fields ) const;
00066     virtual SerialTensorAccess2D<T,nDim>* clone() const;
00067 private:
00068     mutable plint locatedBlock;
00069 };
00070 
00071 
00072 template<typename T>
00073 class SerialNTensorAccess2D : public MultiNTensorAccess2D<T> {
00074 public:
00075     SerialNTensorAccess2D();
00076     virtual T* getDistributedNTensor (
00077             plint iX, plint iY,
00078             MultiBlockManagement2D const& multiBlockManagement,
00079             std::map<plint,NTensorField2D<T>*>& fields );
00080     virtual T const* getDistributedNTensor (
00081             plint iX, plint iY,
00082             MultiBlockManagement2D const& multiBlockManagement,
00083             std::map<plint,NTensorField2D<T>*> const& fields ) const;
00084     virtual SerialNTensorAccess2D<T>* clone() const;
00085 private:
00086     mutable plint locatedBlock;
00087 };
00088  
00089 }  // namespace plb
00090 
00091 #endif  // SERIAL_MULTI_DATA_FIELD_2D_H