本文整理汇总了C++中MultiBlockLattice3D::executeInternalProcessors方法的典型用法代码示例。如果您正苦于以下问题:C++ MultiBlockLattice3D::executeInternalProcessors方法的具体用法?C++ MultiBlockLattice3D::executeInternalProcessors怎么用?C++ MultiBlockLattice3D::executeInternalProcessors使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MultiBlockLattice3D
的用法示例。
在下文中一共展示了MultiBlockLattice3D::executeInternalProcessors方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: runProgram
//.........这里部分代码省略.........
// 2 means the boundary at y = 0
// and so on...
numSpongeCells[0] = 0;
numSpongeCells[1] = param.numOutletSpongeCells;
numSpongeCells[2] = 0;
numSpongeCells[3] = 0;
numSpongeCells[4] = 0;
numSpongeCells[5] = 0;
std::vector<MultiBlock3D*> args;
args.push_back(lattice);
if (param.outletSpongeZoneType == 0) {
applyProcessingFunctional(new ViscositySpongeZone<T,DESCRIPTOR>(
param.nx, param.ny, param.nz, bulkValue, numSpongeCells),
lattice->getBoundingBox(), args);
} else {
applyProcessingFunctional(new SmagorinskySpongeZone<T,DESCRIPTOR>(
param.nx, param.ny, param.nz, bulkValue, param.targetSpongeCSmago, numSpongeCells),
lattice->getBoundingBox(), args);
}
}
/*
* Setting the initial conditions.
*/
// Initial condition: Constant pressure and velocity-at-infinity everywhere.
Array<T,3> uBoundary(param.getInletVelocity(0), 0.0, 0.0);
initializeAtEquilibrium(*lattice, lattice->getBoundingBox(), 1.0, uBoundary);
applyProcessingFunctional(
new BoxRhoBarJfunctional3D<T,DESCRIPTOR>(),
lattice->getBoundingBox(), lattice_rho_bar_j_arg); // Compute rhoBar and j before VirtualOutlet is executed.
lattice->executeInternalProcessors(1); // Execute all processors except the ones at level 0.
lattice->executeInternalProcessors(2);
lattice->executeInternalProcessors(3);
/*
* Particles (streamlines).
*/
// This part of the code that relates to particles, is purely for visualization
// purposes. Particles are used to compute streamlines essentially.
// Definition of a particle field.
MultiParticleField3D<ParticleFieldT>* particles = 0;
if (param.useParticles) {
particles = new MultiParticleField3D<ParticleFieldT> (
lattice->getMultiBlockManagement(),
defaultMultiBlockPolicy3D().getCombinedStatistics() );
std::vector<MultiBlock3D*> particleArg;
particleArg.push_back(particles);
std::vector<MultiBlock3D*> particleFluidArg;
particleFluidArg.push_back(particles);
particleFluidArg.push_back(lattice);
// Functional that advances the particles to their new position at each predefined time step.
integrateProcessingFunctional (
new AdvanceParticlesEveryWhereFunctional3D<T,DESCRIPTOR>(param.cutOffSpeedSqr),
lattice->getBoundingBox(), particleArg, 0);
// Functional that assigns the particle velocity according to the particle's position in the fluid.
integrateProcessingFunctional (
new FluidToParticleCoupling3D<T,DESCRIPTOR>((T) param.particleTimeFactor),