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

dataInitializerWrapper3D.hh

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 DATA_INITIALIZER_WRAPPER_3D_HH
00029 #define DATA_INITIALIZER_WRAPPER_3D_HH
00030 
00031 #include "dataProcessors/dataInitializerWrapper3D.h"
00032 #include "core/cell.h"
00033 #include "atomicBlock/dataProcessorWrapper3D.h"
00034 #include "atomicBlock/blockLattice3D.h"
00035 #include "atomicBlock/dataField3D.h"
00036 #include "multiBlock/multiBlockLattice3D.h"
00037 #include "multiBlock/multiDataField3D.h"
00038 #include "latticeBoltzmann/geometricOperationTemplates.h"
00039 
00040 namespace plb {
00041 
00042 /* *************** PART I ******************************************** */
00043 /* *************** Initialization of the block-lattice: atomic-block * */
00044 /* ******************************************************************* */
00045 
00046 template<typename T, template<class U> class Descriptor>
00047 void apply(BlockLattice3D<T,Descriptor>& lattice, Box3D domain, OneCellFunctional3D<T,Descriptor>* f) {
00048     applyProcessingFunctional(new GenericLatticeFunctional3D<T,Descriptor>(f), domain, lattice);
00049 }
00050 
00051 template<typename T, template<class U> class Descriptor>
00052 void applyIndexed(BlockLattice3D<T,Descriptor>& lattice, Box3D domain, OneCellIndexedFunctional3D<T,Descriptor>* f) {
00053     applyProcessingFunctional(new GenericIndexedLatticeFunctional3D<T,Descriptor>(f), domain, lattice);
00054 }
00055 
00056 template<typename T, template<class U> class Descriptor>
00057 void defineDynamics(BlockLattice3D<T,Descriptor>& lattice, Box3D domain, Dynamics<T,Descriptor>* dynamics) {
00058     applyProcessingFunctional (
00059         new InstantiateDynamicsFunctional3D<T,Descriptor>(dynamics), domain, lattice );
00060 }
00061 
00062 template<typename T, template<class U> class Descriptor>
00063 void defineDynamics(BlockLattice3D<T,Descriptor>& lattice, Box3D boundingBox,
00064                     DomainFunctional3D* domain, Dynamics<T,Descriptor>* dynamics) {
00065     applyProcessingFunctional (
00066         new InstantiateComplexDomainDynamicsFunctional3D<T,Descriptor>(dynamics, domain),
00067         boundingBox, lattice );
00068 }
00069 
00070 template<typename T, template<class U> class Descriptor>
00071 void defineDynamics(BlockLattice3D<T,Descriptor>& lattice,
00072                     DotList3D const& dotList, Dynamics<T,Descriptor>* dynamics)
00073 {
00074     applyProcessingFunctional (
00075         new InstantiateDotDynamicsFunctional3D<T,Descriptor>(dynamics), dotList, lattice );
00076 }
00077 
00078 template<typename T, template<class U> class Descriptor>
00079 void defineDynamics(BlockLattice3D<T,Descriptor>& lattice,
00080                     plint iX, plint iY, plint iZ, Dynamics<T,Descriptor>* dynamics)
00081 {
00082     DotList3D pos; pos.addDot(Dot3D(iX,iY,iZ));
00083     defineDynamics(lattice, pos, dynamics);
00084 }
00085 
00086 template<typename T, template<typename U> class Descriptor>
00087 void defineDynamics( BlockLattice3D<T,Descriptor>& lattice, ScalarField3D<bool>& boolMask,
00088                      Box3D domain, Dynamics<T,Descriptor>* dynamics, bool whichFlag )
00089 {
00090     applyProcessingFunctional (
00091             new DynamicsFromMaskFunctional3D<T,Descriptor>(dynamics, whichFlag),
00092             domain, lattice, boolMask );
00093 }
00094 
00095 template<typename T, template<typename U> class Descriptor>
00096 void defineDynamics( BlockLattice3D<T,Descriptor>& lattice, ScalarField3D<bool>& boolMask,
00097                      Dynamics<T,Descriptor>* dynamics, bool whichFlag )
00098 {
00099     defineDynamics(lattice, boolMask, lattice.getBoundingBox(), dynamics, whichFlag);
00100 }
00101 
00102 
00103 template<typename T, template<typename U> class Descriptor>
00104 void defineDynamics( BlockLattice3D<T,Descriptor>& lattice, ScalarField3D<int>& intMask,
00105                      Box3D domain, Dynamics<T,Descriptor>* dynamics, int whichFlag )
00106 {
00107     applyProcessingFunctional (
00108             new DynamicsFromIntMaskFunctional3D<T,Descriptor>(dynamics, whichFlag),
00109             domain, lattice, intMask );
00110 }
00111 
00112 template<typename T, template<typename U> class Descriptor>
00113 void defineDynamics( BlockLattice3D<T,Descriptor>& lattice, ScalarField3D<int>& intMask,
00114                      Dynamics<T,Descriptor>* dynamics, int whichFlag )
00115 {
00116     defineDynamics(lattice, intMask, lattice.getBoundingBox(), dynamics, whichFlag);
00117 }
00118 
00119 template<typename T, template<typename U> class Descriptor>
00120 void recomposeFromFlowVariables ( BlockLattice3D<T,Descriptor>& lattice,
00121                                   ScalarField3D<T>& density, TensorField3D<T,3>& velocity,
00122                                   TensorField3D<T,6>& strainRate, Box3D domain )
00123 {
00124     std::vector<AtomicBlock3D*> atomicBlocks(4);
00125     atomicBlocks[0] = &lattice;
00126     atomicBlocks[1] = &density;
00127     atomicBlocks[2] = &velocity;
00128     atomicBlocks[3] = &strainRate;
00129     applyProcessingFunctional( new RecomposeFromFlowVariablesFunctional3D<T,Descriptor>, domain,
00130                                atomicBlocks );
00131 }
00132 
00133 template<typename T, template<typename U> class Descriptor>
00134 void recomposeFromFlowVariables ( BlockLattice3D<T,Descriptor>& lattice,
00135                                   ScalarField3D<T>& density, TensorField3D<T,3>& velocity,
00136                                   TensorField3D<T,6>& strainRate )
00137 {
00138     recomposeFromFlowVariables( lattice, density, velocity, strainRate, lattice.getBoundingBox() );
00139 }
00140 
00141 template<typename T, template<class U> class Descriptor>
00142 void setOmega(BlockLattice3D<T,Descriptor>& lattice, Box3D domain, T omega) {
00143     applyProcessingFunctional(new AssignOmegaFunctional3D<T,Descriptor>(omega), domain, lattice);
00144 }
00145 
00146 template<typename T, template<class U> class Descriptor>
00147 void setBoundaryVelocity(BlockLattice3D<T,Descriptor>& lattice, Box3D domain, Array<T,3> velocity) {
00148     applyProcessingFunctional(new SetConstBoundaryVelocityFunctional3D<T,Descriptor>(velocity), domain, lattice);
00149 }
00150 
00151 template<typename T, template<class U> class Descriptor>
00152 void setBoundaryDensity(BlockLattice3D<T,Descriptor>& lattice, Box3D domain, T rho) {
00153     applyProcessingFunctional(new SetConstBoundaryDensityFunctional3D<T,Descriptor>(rho), domain, lattice);
00154 }
00155 
00156 template<typename T, template<class U> class Descriptor>
00157 void initializeAtEquilibrium(BlockLattice3D<T,Descriptor>& lattice, Box3D domain, T rho, Array<T,3> velocity) {
00158     applyProcessingFunctional(new IniConstEquilibriumFunctional3D<T,Descriptor>(rho, velocity), domain, lattice);
00159 }
00160 
00161 template<typename T, template<class U> class Descriptor>
00162 void stripeOffDensityOffset(BlockLattice3D<T,Descriptor>& lattice, Box3D domain, T deltaRho) {
00163     applyProcessingFunctional(new StripeOffDensityOffsetFunctional3D<T,Descriptor>(deltaRho), domain, lattice);
00164 }
00165 
00166 template<typename T, template<class U> class Descriptor>
00167 void setCompositeDynamics( BlockLattice3D<T,Descriptor>& lattice, Box3D domain,
00168                            CompositeDynamics<T,Descriptor>* compositeDynamics )
00169 {
00170     applyProcessingFunctional (
00171             new InstantiateCompositeDynamicsFunctional3D<T,Descriptor>(compositeDynamics),
00172             domain, lattice );
00173 }
00174 
00175 template<typename T, template<class U> class Descriptor>
00176 void setExternalScalar( BlockLattice3D<T,Descriptor>& lattice, Box3D domain,
00177                         int whichScalar, T externalScalar )
00178 {
00179     applyProcessingFunctional (
00180             new SetExternalScalarFunctional3D<T,Descriptor>(whichScalar, externalScalar),
00181             domain, lattice );
00182 }
00183 
00184 template<typename T, template<class U> class Descriptor>
00185 void setExternalVector( BlockLattice3D<T,Descriptor>& lattice, Box3D domain,
00186                         int vectorStartsAt, Array<T,Descriptor<T>::d> externalVector )
00187 {
00188     applyProcessingFunctional (
00189             new SetExternalVectorFunctional3D<T,Descriptor>(vectorStartsAt, externalVector),
00190             domain, lattice );
00191 }
00192 
00193 
00194 
00195 /* *************** PART II ******************************************* */
00196 /* *************** Initialization of the block-lattice: multi-block * */
00197 /* ******************************************************************* */
00198 
00199 template<typename T, template<class U> class Descriptor>
00200 void apply(MultiBlockLattice3D<T,Descriptor>& lattice, Box3D domain, OneCellFunctional3D<T,Descriptor>* f) {
00201     applyProcessingFunctional(new GenericLatticeFunctional3D<T,Descriptor>(f), domain, lattice);
00202 }
00203 
00204 template<typename T, template<class U> class Descriptor>
00205 void applyIndexed(MultiBlockLattice3D<T,Descriptor>& lattice, Box3D domain, OneCellIndexedFunctional3D<T,Descriptor>* f) {
00206     applyProcessingFunctional(new GenericIndexedLatticeFunctional3D<T,Descriptor>(f), domain, lattice);
00207 }
00208 
00209 template<typename T, template<class U> class Descriptor>
00210 void defineDynamics(MultiBlockLattice3D<T,Descriptor>& lattice, Box3D domain, Dynamics<T,Descriptor>* dynamics) {
00211     applyProcessingFunctional (
00212         new InstantiateDynamicsFunctional3D<T,Descriptor>(dynamics), domain, lattice );
00213 }
00214 
00215 template<typename T, template<class U> class Descriptor>
00216 void defineDynamics(MultiBlockLattice3D<T,Descriptor>& lattice, Box3D boundingBox,
00217                     DomainFunctional3D* domain, Dynamics<T,Descriptor>* dynamics) {
00218     applyProcessingFunctional (
00219         new InstantiateComplexDomainDynamicsFunctional3D<T,Descriptor>(dynamics, domain),
00220         boundingBox, lattice );
00221 }
00222 
00223 template<typename T, template<class U> class Descriptor>
00224 void defineDynamics(MultiBlockLattice3D<T,Descriptor>& lattice,
00225                     DotList3D const& dotList, Dynamics<T,Descriptor>* dynamics)
00226 {
00227     applyProcessingFunctional (
00228         new InstantiateDotDynamicsFunctional3D<T,Descriptor>(dynamics), dotList, lattice );
00229 }
00230 
00231 template<typename T, template<class U> class Descriptor>
00232 void defineDynamics(MultiBlockLattice3D<T,Descriptor>& lattice,
00233                     plint iX, plint iY, plint iZ, Dynamics<T,Descriptor>* dynamics)
00234 {
00235     DotList3D pos; pos.addDot(Dot3D(iX,iY,iZ));
00236     defineDynamics(lattice, pos, dynamics);
00237 }
00238 
00239 template<typename T, template<typename U> class Descriptor>
00240 void defineDynamics( MultiBlockLattice3D<T,Descriptor>& lattice, MultiScalarField3D<bool>& boolMask,
00241                      Box3D domain, Dynamics<T,Descriptor>* dynamics, bool whichFlag )
00242 {
00243     applyProcessingFunctional (
00244             new DynamicsFromMaskFunctional3D<T,Descriptor>(dynamics, whichFlag),
00245             domain, lattice, boolMask );
00246 }
00247 
00248 template<typename T, template<typename U> class Descriptor>
00249 void defineDynamics( MultiBlockLattice3D<T,Descriptor>& lattice, MultiScalarField3D<bool>& boolMask,
00250                      Dynamics<T,Descriptor>* dynamics, bool whichFlag )
00251 {
00252     defineDynamics(lattice, boolMask, lattice.getBoundingBox(), dynamics, whichFlag);
00253 }
00254 
00255 template<typename T, template<typename U> class Descriptor>
00256 void defineDynamics( MultiBlockLattice3D<T,Descriptor>& lattice, MultiScalarField3D<int>& intMask,
00257                      Box3D domain, Dynamics<T,Descriptor>* dynamics, int whichFlag )
00258 {
00259     applyProcessingFunctional (
00260             new DynamicsFromIntMaskFunctional3D<T,Descriptor>(dynamics, whichFlag),
00261             domain, lattice, intMask );
00262 }
00263 
00264 template<typename T, template<typename U> class Descriptor>
00265 void defineDynamics( MultiBlockLattice3D<T,Descriptor>& lattice, MultiScalarField3D<int>& intMask,
00266                      Dynamics<T,Descriptor>* dynamics, int whichFlag )
00267 {
00268     defineDynamics(lattice, intMask, lattice.getBoundingBox(), dynamics, whichFlag);
00269 }
00270 
00271 template<typename T, template<typename U> class Descriptor>
00272 void recomposeFromFlowVariables ( MultiBlockLattice3D<T,Descriptor>& lattice,
00273                                   MultiScalarField3D<T>& density, MultiTensorField3D<T,3>& velocity,
00274                                   MultiTensorField3D<T,6>& strainRate, Box3D domain )
00275 {
00276     std::vector<MultiBlock3D*> multiBlocks(4);
00277     multiBlocks[0] = &lattice;
00278     multiBlocks[1] = &density;
00279     multiBlocks[2] = &velocity;
00280     multiBlocks[3] = &strainRate;
00281     applyProcessingFunctional( new RecomposeFromFlowVariablesFunctional3D<T,Descriptor>, domain,
00282                                multiBlocks );
00283 }
00284 
00285 template<typename T, template<typename U> class Descriptor>
00286 void recomposeFromFlowVariables ( MultiBlockLattice3D<T,Descriptor>& lattice,
00287                                   MultiScalarField3D<T>& density, MultiTensorField3D<T,3>& velocity,
00288                                   MultiTensorField3D<T,6>& strainRate )
00289 {
00290     recomposeFromFlowVariables( lattice, density, velocity, strainRate, lattice.getBoundingBox() );
00291 }
00292 
00293 template<typename T, template<class U> class Descriptor>
00294 void setOmega(MultiBlockLattice3D<T,Descriptor>& lattice, Box3D domain, T omega) {
00295     applyProcessingFunctional(new AssignOmegaFunctional3D<T,Descriptor>(omega), domain, lattice);
00296 }
00297 
00298 template<typename T, template<class U> class Descriptor>
00299 void setBoundaryVelocity(MultiBlockLattice3D<T,Descriptor>& lattice, Box3D domain, Array<T,3> velocity) {
00300     applyProcessingFunctional(new SetConstBoundaryVelocityFunctional3D<T,Descriptor>(velocity), domain, lattice);
00301 }
00302 
00303 template<typename T, template<class U> class Descriptor>
00304 void setBoundaryDensity(MultiBlockLattice3D<T,Descriptor>& lattice, Box3D domain, T rho) {
00305     applyProcessingFunctional(new SetConstBoundaryDensityFunctional3D<T,Descriptor>(rho), domain, lattice);
00306 }
00307 
00308 template<typename T, template<class U> class Descriptor>
00309 void initializeAtEquilibrium(MultiBlockLattice3D<T,Descriptor>& lattice, Box3D domain, T rho, Array<T,3> velocity) {
00310     applyProcessingFunctional(new IniConstEquilibriumFunctional3D<T,Descriptor>(rho, velocity, (T)1), domain, lattice);
00311 }
00312 
00313 template<typename T, template<class U> class Descriptor>
00314 void initializeAtThermalEquilibrium(MultiBlockLattice3D<T,Descriptor>& lattice, Box3D domain, 
00315                                     T rho, Array<T,3> velocity, T temperature) {
00316     applyProcessingFunctional(new IniConstEquilibriumFunctional3D<T,Descriptor>(rho, velocity, temperature), domain, lattice);
00317 }
00318 
00319 template<typename T, template<class U> class Descriptor>
00320 void stripeOffDensityOffset(MultiBlockLattice3D<T,Descriptor>& lattice, Box3D domain, T deltaRho) {
00321     applyProcessingFunctional(new StripeOffDensityOffsetFunctional3D<T,Descriptor>(deltaRho), domain, lattice);
00322 }
00323 
00324 template<typename T, template<class U> class Descriptor>
00325 void setCompositeDynamics( MultiBlockLattice3D<T,Descriptor>& lattice, Box3D domain,
00326                            CompositeDynamics<T,Descriptor>* compositeDynamics )
00327 {
00328     applyProcessingFunctional (
00329             new InstantiateCompositeDynamicsFunctional3D<T,Descriptor>(compositeDynamics),
00330             domain, lattice );
00331 }
00332 
00333 
00334 template<typename T, template<class U> class Descriptor>
00335 void setExternalScalar( MultiBlockLattice3D<T,Descriptor>& lattice, Box3D domain,
00336                         int whichScalar, T externalScalar )
00337 {
00338     applyProcessingFunctional (
00339             new SetExternalScalarFunctional3D<T,Descriptor>(whichScalar, externalScalar),
00340             domain, lattice );
00341 }
00342 
00343 template<typename T, template<class U> class Descriptor>
00344 void setExternalVector( MultiBlockLattice3D<T,Descriptor>& lattice, Box3D domain,
00345                         int vectorStartsAt, Array<T,Descriptor<T>::d> externalVector )
00346 {
00347     applyProcessingFunctional (
00348             new SetExternalVectorFunctional3D<T,Descriptor>(vectorStartsAt, externalVector),
00349             domain, lattice );
00350 }
00351 
00352 template<typename T, template<class U> class Descriptor, int nDim>
00353 void setExternalVector( MultiBlockLattice3D<T,Descriptor>& lattice, Box3D domain,
00354                         int vectorStartsAt, MultiTensorField3D<T,nDim> &tensor )
00355 {
00356     applyProcessingFunctional (
00357             new SetExternalVectorFromTensorFieldFunctional3D<T,Descriptor,nDim>(vectorStartsAt),
00358             domain, lattice, tensor );
00359 }
00360 
00361 template<typename T, template<class U> class Descriptor>
00362 void interpolatePopulations (
00363         MultiBlockLattice3D<T,Descriptor>& modifiedLattice,
00364         MultiBlockLattice3D<T,Descriptor>& constLattice,
00365         plint minIter, plint maxIter, Box3D const& domain )
00366 {
00367     applyProcessingFunctional (
00368             new InterpolatePopulationsFunctional3D<T,Descriptor>(minIter,maxIter),
00369             domain, modifiedLattice, constLattice );
00370 }
00371 
00372 template<typename T, template<class U> class Descriptor>
00373 void interpolatePopulations (
00374         MultiBlockLattice3D<T,Descriptor>& modifiedLattice,
00375         MultiBlockLattice3D<T,Descriptor>& constLattice,
00376         plint minIter, plint maxIter )
00377 {
00378     interpolatePopulations( modifiedLattice, constLattice, minIter, maxIter,
00379                             modifiedLattice.getBoundingBox() );
00380 }
00381 
00382 /* *************** PART III ******************************************* */
00383 /* *************** Initialization of scalar- and tensor-fields: ****** */
00384 /* *************** Atomic-Block  ************************************* */
00385 /* ******************************************************************* */
00386 
00387 template<typename T>
00388 void setToConstant(ScalarField3D<T>& field, Box3D domain, T value) {
00389     applyProcessingFunctional(new IniConstScalarFunctional3D<T>(value), domain, field);
00390 }
00391 
00392 template<typename T>
00393 void setToConstant( ScalarField3D<T>& field, ScalarField3D<int>& mask,
00394                     int flag, Box3D domain, T value )
00395 {
00396     applyProcessingFunctional (
00397             new MaskedIniConstScalarFunctional3D<T>(flag, value), domain, mask, field);
00398 }
00399 
00400 template<typename T, int nDim>
00401 void setToConstant( TensorField3D<T,nDim>& field, Box3D domain,
00402                     Array<T,nDim> const& value )
00403 {
00404     applyProcessingFunctional (
00405             new IniConstTensorFunctional3D<T,nDim>(value), domain, field );
00406 }
00407 
00408 template<typename T, int nDim>
00409 void setToConstant( TensorField3D<T,nDim>& field, ScalarField3D<int>& mask, int flag,
00410                     Box3D domain, Array<T,nDim> const& value )
00411 {
00412     applyProcessingFunctional (
00413             new MaskedIniConstTensorFunctional3D<T,nDim>(flag, value), domain, field, mask );
00414 }
00415 
00416 template<typename T>
00417 void setToCoordinate(ScalarField3D<T>& field, Box3D domain, plint index) {
00418     applyProcessingFunctional(new SetToCoordinateFunctional3D<T>(index), domain, field);
00419 }
00420 
00421 template<typename T>
00422 void setToCoordinates(TensorField3D<T,3>& field, Box3D domain) {
00423     applyProcessingFunctional(new SetToCoordinatesFunctional3D<T>, domain, field);
00424 }
00425 
00426 template<typename T, int nDim>
00427 void assignComponent(TensorField3D<T,nDim>& tensorField, int whichComponent,
00428                      ScalarField3D<T>& scalarField, Box3D domain)
00429 {
00430     applyProcessingFunctional(new SetTensorComponentFunctional3D<T,nDim>(whichComponent),
00431                               domain, scalarField, tensorField);
00432 }
00433 
00434 /* *************** PART IV ******************************************* */
00435 /* *************** Initialization of scalar- and tensor-fields: ****** */
00436 /* *************** Multi-Block  ************************************** */
00437 /* ******************************************************************* */
00438 
00439 template<typename T>
00440 void setToConstant(MultiScalarField3D<T>& field, Box3D domain, T value) {
00441     applyProcessingFunctional(new IniConstScalarFunctional3D<T>(value), domain, field);
00442 }
00443 
00444 template<typename T>
00445 void setToConstant( MultiScalarField3D<T>& field, MultiScalarField3D<int>& mask,
00446                     int flag, Box3D domain, T value )
00447 {
00448     applyProcessingFunctional (
00449             new MaskedIniConstScalarFunctional3D<T>(flag, value), domain, field, mask);
00450 }
00451 
00452 template<typename T, int nDim>
00453 void setToConstant( MultiTensorField3D<T,nDim>& field, Box3D domain,
00454                     Array<T,nDim> const& value )
00455 {
00456     applyProcessingFunctional (
00457             new IniConstTensorFunctional3D<T,nDim>(value), domain, field );
00458 }
00459 
00460 template<typename T, int nDim>
00461 void setToConstant( MultiTensorField3D<T,nDim>& field, MultiScalarField3D<int>& mask, int flag,
00462                     Box3D domain, Array<T,nDim> const& value )
00463 {
00464     applyProcessingFunctional (
00465             new MaskedIniConstTensorFunctional3D<T,nDim>(flag, value), domain, mask, field );
00466 }
00467 
00468 template<typename T>
00469 void setToCoordinate(MultiScalarField3D<T>& field, Box3D domain, plint index) {
00470     applyProcessingFunctional(new SetToCoordinateFunctional3D<T>(index), domain, field);
00471 }
00472 
00473 template<typename T>
00474 void setToCoordinates(MultiTensorField3D<T,3>& field, Box3D domain) {
00475     applyProcessingFunctional(new SetToCoordinatesFunctional3D<T>, domain, field);
00476 }
00477 
00478 template<typename T, int nDim>
00479 void assignComponent(MultiTensorField3D<T,nDim>& tensorField, int whichComponent,
00480                      MultiScalarField3D<T>& scalarField, Box3D domain)
00481 {
00482     applyProcessingFunctional(new SetTensorComponentFunctional3D<T,nDim>(whichComponent),
00483                               domain, scalarField, tensorField);
00484 }
00485 
00486 }  // namespace plb
00487 
00488 #endif  // DATA_INITIALIZER_WRAPPER_3D_HH