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

serializerIO_3D.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 SERIALIZER_IO_3D_H
00026 #define SERIALIZER_IO_3D_H
00027 
00028 #include "core/globalDefs.h"
00029 #include "core/block3D.h"
00030 #include "multiBlock/multiBlock3D.h"
00031 #include "multiBlock/multiDataField3D.h"
00032 #include "multiBlock/multiBlockLattice3D.h"
00033 #include "atomicBlock/dataField3D.h"
00034 #include "atomicBlock/blockLattice3D.h"
00035 #include "io/serializerIO.h"
00036 #include "io/parallelIO.h"
00037 
00038 namespace plb {
00039 
00041 
00048 void saveBinaryBlock(Block3D const& block, std::string fName, bool enforceUint=false);
00049 
00051 
00058 void loadBinaryBlock(Block3D& block, std::string fName, bool enforceUint=false);
00059 
00060 
00062 
00072 template<typename T>
00073 std::ostream& block2ostream(std::ostream& ostr, Block3D const& block);
00074 
00075 template<typename T>
00076 std::ostream& operator<<(std::ostream& ostr, MultiScalarField3D<T> const& block) {
00077     return block2ostream<T>(ostr, block);
00078 }
00079 
00080 template<typename T>
00081 std::ostream& operator<<(std::ostream& ostr, MultiNTensorField3D<T> const& block) {
00082     return block2ostream<T>(ostr, block);
00083 }
00084 
00085 template<typename T, int nDim>
00086 std::ostream& operator<<(std::ostream& ostr, MultiTensorField3D<T,nDim> const& block) {
00087     return block2ostream<T>(ostr, block);
00088 }
00089 
00090 template<typename T, template<typename U> class Descriptor>
00091 std::ostream& operator<<(std::ostream& ostr, MultiBlockLattice3D<T,Descriptor> const& block) {
00092     return block2ostream<T>(ostr, block);
00093 }
00094 
00095 
00096 template<typename T>
00097 std::ostream& operator<<(std::ostream& ostr, ScalarField3D<T> const& block) {
00098     return block2ostream<T>(ostr, block);
00099 }
00100 
00101 template<typename T>
00102 std::ostream& operator<<(std::ostream& ostr, NTensorField3D<T> const& block) {
00103     return block2ostream<T>(ostr, block);
00104 }
00105 
00106 template<typename T, int nDim>
00107 std::ostream& operator<<(std::ostream& ostr, TensorField3D<T,nDim> const& block) {
00108     return block2ostream<T>(ostr, block);
00109 }
00110 
00111 template<typename T, template<typename U> class Descriptor>
00112 std::ostream& operator<<(std::ostream& ostr, BlockLattice3D<T,Descriptor> const& block) {
00113     return block2ostream<T>(ostr, block);
00114 }
00115 
00117 
00125 template<typename T>
00126 std::istream& istream2block(std::istream& istr, Block3D& block);
00127 
00128 template<typename T>
00129 std::istream& operator>>(std::istream& istr, MultiScalarField3D<T>& block) {
00130     return istream2block<T>(istr, block);
00131 }
00132 
00133 template<typename T>
00134 std::istream& operator>>(std::istream& istr, MultiNTensorField3D<T>& block) {
00135     return istream2block<T>(istr, block);
00136 }
00137 
00138 template<typename T,int nDim>
00139 std::istream& operator>>(std::istream& istr, MultiTensorField3D<T,nDim>& block) {
00140     return istream2block<T>(istr, block);
00141 }
00142 
00143 template<typename T, template<typename U> class Descriptor>
00144 std::istream& operator>>(std::istream& istr, MultiBlockLattice3D<T,Descriptor>& block) {
00145     return istream2block<T>(istr, block);
00146 }
00147 
00148 
00149 template<typename T>
00150 std::istream& operator>>(std::istream& istr, ScalarField3D<T>& block) {
00151     return istream2block<T>(istr, block);
00152 }
00153 
00154 template<typename T>
00155 std::istream& operator>>(std::istream& istr, NTensorField3D<T>& block) {
00156     return istream2block<T>(istr, block);
00157 }
00158 
00159 template<typename T,int nDim>
00160 std::istream& operator>>(std::istream& istr, TensorField3D<T,nDim>& block) {
00161     return istream2block<T>(istr, block);
00162 }
00163 
00164 template<typename T, template<typename U> class Descriptor>
00165 std::istream& operator>>(std::istream& istr, BlockLattice3D<T,Descriptor>& block) {
00166     return istream2block<T>(istr, block);
00167 }
00168 
00169 } // namespace plb
00170 
00171 #endif  // SERIALIZER_IO_3D_H