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

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